5 Incheckningar f6b89e2fde ... 28ee9681be

Upphovsman SHA1 Meddelande Datum
  bobo 28ee9681be Merge branch 'bobo/fix/welfgo-220209' into pre 3 år sedan
  bobo 41128a1b58 修改门店不显示bug 3 år sedan
  xing.li 764bfb6baf feat(飞码) 对接活动详情接口 3 år sedan
  xing.li 94ae2a68f9 feat(飞码) 对接活动详情接口 3 år sedan
  xing.li ad7e889a24 feat(修改样式) 3 år sedan

+ 15 - 0
.idea/git_toolbox_prj.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="GitToolBoxProjectSettings">
+    <option name="commitMessageIssueKeyValidationOverride">
+      <BoolValueOverride>
+        <option name="enabled" value="true" />
+      </BoolValueOverride>
+    </option>
+    <option name="commitMessageValidationConfigOverride">
+      <CommitMessageValidationOverride>
+        <option name="enabled" value="true" />
+      </CommitMessageValidationOverride>
+    </option>
+  </component>
+</project>

+ 14 - 1
components/couponWrap/index.js

@@ -38,7 +38,11 @@ Component({
      */
     methods: {
         prepareData() {
-            this.data.couponList.forEach(v => {
+            if (!this.data.couponList || this.data.couponList.length == 0) {
+                this.data.list = [];
+                this.data.flodMap = {};
+            }
+            this.data.couponList.forEach((v, i) => {
                 v.validTimesStr = this.validTimes(v)
                 if (typeof (v.type || v.couponType) == "string") {
                     v.type = { value: (v.type || v.couponType) }
@@ -65,6 +69,15 @@ Component({
                 } else {
                     v.stateStr = "不可用"
                 }
+                if (this.data.list) {
+                    let node = this.data.list[i];
+                    if (node) {
+                        v.description = node.description || '';
+                        v.bindShopType = node.bindShopType || 1;
+                        v.bindGoodsType = node.bindGoodsType || 1;
+                        v.isLoadCouponDetail = node.isLoadCouponDetail || false;
+                    }
+                }
             })
             this.setData({
                 list: this.data.couponList

+ 3 - 2
components/couponWrap/index.wxss

@@ -19,7 +19,7 @@
 }
 
 .coupon-card {
-    height: 156rpx;
+    min-height: 156rpx;
     width: 100%;
     position: relative;
     display: flex;
@@ -81,12 +81,13 @@
     font-weight: 600;
     font-size: 34rpx;
     padding-top: 32rpx;
-    white-space: nowrap;
+    max-width: 300rpx;
 }
 .coupon-card-right ._time_des {
     font-size: 24rpx;
     color: #A0A0A0;
     margin-top: 14rpx;
+    padding-bottom: 20rpx;
 }
 
 .coupon-card-num {

+ 6 - 0
pages/welfareMall/activityInfo/activityInfo.js

@@ -107,6 +107,12 @@ Page({
      if(res.data.status ==3){
       statusShowText = '已结束'
      }
+
+     if(res.data.status ==1){
+      statusShowText = '待开始'
+     }
+
+     
      console.log(res.data.stock)
      let buttonText = res.data.isPay == 1 ? '立即抢购' : '立即领取';
      // 构建券包传参参数

+ 19 - 21
pages/welfareMall/couponFitStore/index.js

@@ -49,27 +49,25 @@ Page({
                 })
                 }else {
                     // 2. 用户未授权的情况下, 打开授权界面, 引导用户授权.
-                    wx.openSetting({
+                    wx.authorize({
+                        scope: "scope.userLocation",
                         success(res) {
-                            // 2.1 如果二次授权允许了 userLocation 权限, 就再次执行获取位置的接口
-                            if (res.authSetting["scope.userLocation"]) {
-                                wx.getLocation({
-                                    success(res){
-                                        // 2.2 获取用户位置成功后,将会返回 latitude, longitude 两个字段,代表用户的经纬度位置
-                                        // 2.3 将获取到的 经纬度传值给 getAddress 解析出 具体的地址
-                                        that.setData({
-                                            latitude: res.latitude,
-                                            longitude: res.longitude,
-                                        })                
-                                        that.loadStoreListData()
-                                    },
-                                    fail() {
-                                        wx.navigateBack({
-                                          delta: -1,
-                                        })
-                                    }
-                                })
-                            }
+                            wx.getLocation({
+                                success(res){
+                                    // 2.2 获取用户位置成功后,将会返回 latitude, longitude 两个字段,代表用户的经纬度位置
+                                    // 2.3 将获取到的 经纬度传值给 getAddress 解析出 具体的地址
+                                    that.setData({
+                                        latitude: res.latitude,
+                                        longitude: res.longitude,
+                                    })                
+                                    that.loadStoreListData()
+                                },
+                                fail() {
+                                    wx.navigateBack({
+                                        delta: -1,
+                                    })
+                                }
+                            })     
                         }
                     })
                 }
@@ -212,7 +210,7 @@ Page({
         this.data.storeList = this.data.storeList.concat(list)
 
         this.setData({
-            storeList: list
+            storeList: this.data.storeList
         })
     },
     callPhone(e) {

+ 2 - 3
project.config.json

@@ -30,8 +30,7 @@
       "disablePlugins": [],
       "outputPath": ""
     },
-    "enableEngineNative": false,
-    "useIsolateContext": false,
+    "useIsolateContext": true,
     "userConfirmedBundleSwitch": false,
     "packNpmManually": false,
     "packNpmRelationList": [],
@@ -42,7 +41,7 @@
     "useCompilerPlugins": false
   },
   "compileType": "miniprogram",
-  "libVersion": "2.21.2",
+  "libVersion": "2.21.4",
   "appid": "wxcc1cdb8babd3f62c",
   "projectname": "%E9%A3%9E%E7%A0%81",
   "debugOptions": {

+ 6 - 0
project.private.config.json

@@ -185,6 +185,12 @@
           "pathName": "pages/welfareMall/buyInfo/buyInfo",
           "query": "",
           "scene": null
+        },
+        {
+          "name": "",
+          "pathName": "pages/welfareMall/activityInfo/activityInfo",
+          "query": "activityId=wGxvdw5qLa-132",
+          "scene": null
         }
       ]
     }