Browse Source

小程序:首页接口对接

panyong 2 years ago
parent
commit
61c1fd5af0

+ 20 - 0
htmldev/wxMini/app.wxss

@@ -259,6 +259,26 @@ view.footer-fixed-bottom button[type='default'] {
   --picker-confirm-action-color: #333;
 }
 
+.list-bitmap {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  padding-top: 320rpx;
+}
+
+.list-bitmap image {
+  width: 400rpx;
+  height: 400rpx;
+}
+
+
+.list-bitmap text {
+  margin-top: 8rpx;
+  color: rgba(102, 102, 102, 1);
+  font-size: 28rpx;
+  line-height: 34rpx;
+}
+
 .pulldown-wrapper,
 .pullup-wrapper {
   display: flex;

+ 1 - 1
htmldev/wxMini/pages/businessGoodsEdit/api/index.js

@@ -1,6 +1,6 @@
 const { request } = require('../../../api/request')
 
-const mockData = {
+export const mockData = {
   'product_img_url': [
     {
       'url': 'https://tuotuoyinfu-oss.oss-cn-beijing.aliyuncs.com/images/user/bashi632322ffe57fa.jpg',

+ 3 - 2
htmldev/wxMini/pages/businessGoodsEdit/businessGoodsEdit.js

@@ -1,5 +1,5 @@
 const uploadJS = require('../../mixin/upload.js')
-const { postAddProduct, postModifyProduct, getProductDetail } = require('./api/index')
+const { postAddProduct, postModifyProduct, getProductDetail, mockData } = require('./api/index')
 const { getProductCategoryList, getProductBrandList } = require('../../api/common')
 const { formatTs, yuan2Fen, fen2Yuan } = require('../../utils/util')
 const minDate = new Date().getTime()
@@ -38,7 +38,8 @@ Page({
       'product_all_price': '', // 批发价
       'product_price': '', // 零售价
       'product_count': '', // 库存
-      'product_sale_at': '预售' // 预售时间(0代表预售)
+      'product_sale_at': '预售', // 预售时间(0代表预售)
+      ...mockData
     },
     product_img_url_max: 1,
     product_rotation_img_list_max: 5,

+ 1 - 1
htmldev/wxMini/pages/mine/mine.js

@@ -22,7 +22,7 @@ Page({
     booLock: false,
     sessionId: '',
     userInfo: {
-      // 'shop_status': 0, // 状态(0审核中1审核通过审核失败)
+      // 'shop_status': 0, // 状态(0审核中1审核通过2审核失败)
       // 'user_shop_id': 0 //店铺ID(0代表无店铺)
     }
   },

+ 2 - 2
htmldev/wxMini/pages/mine/mine.wxml

@@ -43,7 +43,7 @@
   <view class="main">
     <view
       class="business-account"
-      wx:if="{{userInfo === 2}}">
+      wx:if="{{userInfo.shop_status === 0}}">
       <image src="../../image/mine/bg.png"></image>
       <view>
         <view class="describe">已有商家账号</view>
@@ -66,7 +66,7 @@
     </view>
     <view
       class="list"
-      wx:if="{{userInfo !== 2}}"
+      wx:if="{{userInfo.shop_status !== 0}}"
       data-page="businessApply"
       bind:tap="jump">
       <image class="label" src="../../image/mine/user.png"></image>