tremble před 5 roky
rodič
revize
f544acc879

+ 1 - 1
app.json

@@ -43,7 +43,7 @@
   "window": {
     "backgroundTextStyle": "dark",
     "navigationBarBackgroundColor": "#fff",
-    "navigationBarTitleText": "四维线上博览会",
+    "navigationBarTitleText": "看店4DKanKan",
     "navigationBarTextStyle": "black",
     "enablePullDownRefresh": true
   },

+ 1 - 1
pages/auth/btnAuth/btnAuth.js

@@ -9,7 +9,7 @@ Page({
     navUrl: '',
     code: '',
     login_img: "https://4d-tjw.oss-cn-shenzhen.aliyuncs.com/wxmall/images/login-bg.png",
-    login_logo: "https://4d-tjw.oss-cn-shenzhen.aliyuncs.com/wxmall/images/login-login.svg"    
+    login_logo: "https://4d-tjw.oss-cn-shenzhen.aliyuncs.com/wxmall/images/login-login.png"    
   },
 
   onLoad: function(options) {

+ 3 - 3
pages/auth/btnAuth/btnAuth.wxml

@@ -8,11 +8,11 @@
   </view>
   <view class='login_text'>
     <image src='{{login_logo}}'></image>
-    <view>四维线上博览会</view>
-    <view>参展成本低、展会永不落幕、传播无地区限制、高效持久获取商机、安全环保。</view>
+    <view>看店4DKanKan</view>
+    <view>宅家中,云逛街,轻松买</view>
   </view>
   <view class="quanxian">
-    <view>四维线上博览会小程序申请获得以下权限</view>
+    <view>看店4DKanKan小程序申请获得以下权限</view>
     <view>· 获得您的公开信息(昵称、头像等)</view>
   </view>
   <button  wx:if="{{canIUse}}" class='btn_login' open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">授权登录</button>

+ 1 - 0
pages/auth/btnAuth/btnAuth.wxss

@@ -81,4 +81,5 @@ page {
   width: 240rpx;
   height: 240rpx;
   border-radius:50%; 
+  background-color: #fff;
 }

+ 24 - 2
pages/goods/goods.js

@@ -16,6 +16,7 @@ Router({
     brand: {},
     specificationList: [],
     productList: [],
+    goodsNums:0,
     relatedGoods: [],
     cartGoodsCount: 0,
     userHasCollect: 0,
@@ -27,6 +28,7 @@ Router({
     hasCollectImage: "https://4d-tjw.oss-cn-shenzhen.aliyuncs.com/wxmall/images/icon_collect_checked.png",
     collectBackImage: "https://4d-tjw.oss-cn-shenzhen.aliyuncs.com/wxmall/images/icon_collect.png",
     collected:'',
+    skuActiveItem:[],
     isfromBrand:false
   },
  
@@ -34,6 +36,10 @@ Router({
     let that = this;
     util.request(api.GoodsDetail, { id: that.data.id }).then(function (res) {
       if (res.errno === 0) {
+        let goodsNums = 0 
+        res.data.productList.forEach(item=>{
+          goodsNums+=item.goods_number
+        })
         that.setData({
           goods: res.data.info,
           gallery: res.data.gallery,
@@ -43,7 +49,8 @@ Router({
           brand: res.data.brand,
           specificationList: res.data.specificationList,
           productList: res.data.productList,
-          userHasCollect: res.data.userHasCollect
+          userHasCollect: res.data.userHasCollect,
+          goodsNums:goodsNums
         });
           //设置默认值
           that.setDefSpecInfo(that.data.specificationList);
@@ -108,6 +115,8 @@ Router({
         }
       }
     }
+
+
     this.setData({
       'specificationList': _specificationList,
       'goods.list_pic_url': picUrl,
@@ -134,11 +143,24 @@ Router({
           _checkedObj.valueId = _specificationList[i].valueList[j].id;
           _checkedObj.valueText = _specificationList[i].valueList[j].value;
         }
+        else{
+          this.setData({
+            skuActiveItem : []
+          })
+        }
       }
       checkedValues.push(_checkedObj);
     }
 
-    console.log(checkedValues)
+    let goods_specification_ids = ''
+    checkedValues.forEach(item=>{
+      goods_specification_ids+=('_'+item.valueId)
+    })
+    let productItem = this.data.productList.find(item=>item.goods_specification_ids===goods_specification_ids) || []
+    console.log(productItem)
+    this.setData({
+      skuActiveItem : productItem
+    })
     return checkedValues;
 
   },

+ 2 - 2
pages/goods/goods.wxml

@@ -119,9 +119,9 @@
       <image class="img" mode="aspectFill" src="{{goods.list_pic_url}}"></image>
       <view class="info">
         <view class="c">
-          <view class="p">价格:¥{{goods.retail_price}}</view>
+          <view class="p">价格:¥{{skuActiveItem.market_price||'-'}}</view>
           <view class="a" wx:if="{{productList.length>0}}">已选择:{{checkedSpecText}}</view>
-          <view class="kucun">库存{{productList[0].goods_number}}件</view>
+          <view class="kucun">库存{{skuActiveItem.goods_number||goodsNums}}件</view>
         </view>
       </view>
     </view>

+ 2 - 2
pages/index/index.js

@@ -158,8 +158,8 @@ Router({
   },
   onShareAppMessage: function () {
     return {
-      title: '四维线上博览会:参展成本低、展会永不落幕、传播无地区限制、高效持久获取商机、安全环保。',
-      desc: '四维线上博览会:参展成本低、展会永不落幕、传播无地区限制、高效持久获取商机、安全环保。',
+      title: '看店4DKanKan:宅家中,云逛街,轻松买',
+      desc: '看店4DKanKan:宅家中,云逛街,轻松买',
       path: '/pages/index/index'
     }
   },

+ 2 - 2
pages/ucenter/orderDetail/orderDetail.wxml

@@ -23,7 +23,7 @@
     <view class="order-goods">
         <view class="h">
             <view class="label">商品信息</view>
-            <view class="status">{{orderInfo.order_status_text}}</view>
+            <view class="status"></view>
         </view>
         <view class="goods">
             <view class="item" wx:for="{{orderGoods}}" wx:key="{{item.id}}">
@@ -43,7 +43,7 @@
                             <view>¥{{sub.retail_price}} x {{sub.number}}</view>
                         </view>
                     </view>
-                    <view class="btn-look"  data-id="{{item.id}}" data-no="{{item.shipping_no}}" wx:if="{{item.shipping_status}}" catchtap="gotoLogti"><text>查看物流</text></view>
+                    <view class="btn-look"  data-id="{{item.id}}" data-no="{{item.shipping_no}}" wx:if="{{item.shippingStatus==1}}" catchtap="gotoLogti"><text>查看物流</text></view>
                 </view>
                 <!-- <view class="img">
                     <image src="{{item.list_pic_url}}"></image>

+ 1 - 1
pages/webview/index.js

@@ -97,7 +97,7 @@ Page({
     let { id, newPicUrl } = this.data
 
     return {
-      title: '四维线上博览会:参展成本低、展会永不落幕、传播无地区限制、高效持久获取商机、安全环保。',
+      title: '看店4DKanKan:宅家中,云逛街,轻松买',
       imageUrl: newPicUrl,
       url: `/pages/webview/index?id=${id}`,
     }

+ 5 - 2
project.config.json

@@ -4,6 +4,7 @@
 		"urlCheck": false,
 		"es6": true,
 		"postcss": true,
+		"preloadBackgroundData": false,
 		"minified": true,
 		"newFeature": true,
 		"coverView": true,
@@ -17,7 +18,9 @@
 			"ignore": [],
 			"disablePlugins": [],
 			"outputPath": ""
-		}
+		},
+		"useCompilerModule": true,
+		"userConfirmedUseCompilerModuleSwitch": false
 	},
 	"compileType": "miniprogram",
 	"libVersion": "2.10.3",
@@ -76,7 +79,7 @@
 					"id": 4,
 					"name": "pages/goods/goods",
 					"pathName": "pages/goods/goods",
-					"query": "id=1181015",
+					"query": "id=1181119",
 					"scene": null
 				},
 				{