baolei преди 2 месеца
родител
ревизия
dcc03cf004
променени са 4 файла, в които са добавени 10 реда и са изтрити 2 реда
  1. 6 0
      components/product-list/product-list.js
  2. 2 1
      config.js
  3. 1 0
      pages/all/all.js
  4. 1 1
      pages/cart/cart.wxml

+ 6 - 0
components/product-list/product-list.js

@@ -62,6 +62,12 @@ Component({
         },
         // 获取分类商品
         getClassifyCommodity(){
+            if (!!this.data.filterObj.pageNum) {
+              this.setData({
+                pageNum:this.data.filterObj.pageNum
+              })
+            }
+
             let data = {
                 ...this.data.filterObj,
                 pageNum:this.data.pageNum,

+ 2 - 1
config.js

@@ -1,4 +1,5 @@
-export const baseUrl = "https://mpapitest.gululuq.com"; // 服务器地址
+// export const baseUrl = "https://mpapitest.gululuq.com"; // 服务器地址
+export const baseUrl = "https://mpapi.gululuq.com"; // 服务器地址
 // export const baseUrl = "http://测试接口地址"; // 测试服务器地址
 export const appid = "wx12e34630814e5d30"; // 小程序appid
 // export const ossHost = "https://res.zrug.top";

+ 1 - 0
pages/all/all.js

@@ -22,6 +22,7 @@ Page({
       let filterObj = this.data.filterObj;
       if(index === 0) filterObj.ipId = item.ipId;
       if(index === 1) filterObj.prodClassId = item.prodClassId;
+      filterObj.pageNum = 1;
       this.setData({
           [index === 0?'filterIndex1':'filterIndex2']:index2,
           filterObj

+ 1 - 1
pages/cart/cart.wxml

@@ -13,7 +13,7 @@
             <view class="itemProd" wx:for="{{cartList}}" wx:key="id">
                 <checkbox value="{{item.id}}" checked="{{item.checkFlag === '1'}}"></checkbox>
                 <view class="goods-info">
-                    <image src="/images/index/category-item.png" mode="aspectFill"></image>
+                    <image src="{{item.prodPicList[0].picUrl}}" mode="aspectFill"></image>
                     <view class="info">
                         <text>{{item.prodName}}</text>
                         <text>{{item.prodAttrName}}</text>