zhaoxiaohai 3 年之前
父节点
当前提交
c7d37fb789
共有 3 个文件被更改,包括 13 次插入8 次删除
  1. 1 1
      components/My_DisplayItem/index.wxml
  2. 8 4
      pages/login/QrCode.js
  3. 4 3
      pages/tabbar-pages/home/index.js

+ 1 - 1
components/My_DisplayItem/index.wxml

@@ -5,7 +5,7 @@
             <image src="{{content.attinfos[0].fobsurl}}" mode="aspectFill"></image>
         </block>
         <block wx:else>
-            <image wx:if="{{content.ftype=='摄影摄像'}}" src="/static/supplyAndDemand/008.png" mode="aspectFit"></image>
+            <image wx:if="{{content.ftype=='摄影摄像'}}" src="/static/supplyAndDemand/icon-01.png" mode="aspectFit"></image>
             <image wx:elif="{{content.ftype=='产品策划'}}" src="/static/supplyAndDemand/icon-02.png" mode="aspectFit"></image>
             <image wx:elif="{{content.ftype=='平面设计'}}" src="/static/supplyAndDemand/icon-03.png" mode="aspectFit"></image>
             <image wx:elif="{{content.ftype=='寻找面料'}}" src="/static/supplyAndDemand/icon-04.png" mode="aspectFit"></image>

+ 8 - 4
pages/login/QrCode.js

@@ -19,10 +19,9 @@ Page({
      query */
     onLoad: function () {
         const query = {
-            // q: 'https://www.cnd3b.com/qr?type=shop&fbrand=测试品牌名&tagentsid=34205'
-            q: 'https://www.cnd3b.com/qr?type=shop&fbrand=江南布业&tagentsid=36112'
+            q: 'https://www.cnd3b.com/qr?type=partner&fbrand=测试品牌名&tagentsid=36112'
+            // q: 'https://www.cnd3b.com/qr?type=shop&fbrand=测试品牌名&tagentsid=36112'
         };
-        /* const query = {} */
         if (query.q) {
             const q = decodeURIComponent(query.q) // 获取到二维码原始链接内容、
             const data = {
@@ -51,7 +50,8 @@ Page({
             this.setData({
                 codeMsg: wx.getStorageSync('qrCodeMsg')
             })
-            wx.removeStorage('qrCodeMsg');
+            wx.setStorageSync('qrCodeMsg', "")
+            console.log(wx.getStorageSync('qrCodeMsg'))
         }
     },
     /* 确定 */
@@ -84,6 +84,7 @@ Page({
                                     url: '/pages/tabbar-pages/home/index',
                                 })
                             }, 500)
+                            wx.removeStorageSync('qrCodeMsg');
                         })
                     }
                 })
@@ -114,6 +115,7 @@ Page({
                                     url: '/pages/tabbar-pages/home/index',
                                 })
                             }, 500)
+                            wx.removeStorageSync('qrCodeMsg');
                         })
                     }
                 })
@@ -137,6 +139,7 @@ Page({
                                 url: '/pages/tabbar-pages/home/index',
                             })
                         }, 500)
+                        wx.removeStorageSync('qrCodeMsg');
                     }
                 })
             })
@@ -154,6 +157,7 @@ Page({
                                 url: '/pages/tabbar-pages/home/index',
                             })
                         }, 500)
+                        wx.removeStorageSync('qrCodeMsg');
                     }
                 })
             })

+ 4 - 3
pages/tabbar-pages/home/index.js

@@ -68,9 +68,6 @@ Page({
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
-        if (wx.getStorageSync('qrCodeMsg').type) return wx.navigateTo({
-            url: '/pages/login/QrCode',
-        });
         const that = this;
         /* 获取最新供需列表 */
         _Http.basic({
@@ -136,6 +133,10 @@ Page({
                 'tabbarList[3].fcount': getApp().globalData.msgFcount
             })
         }, 500)
+        //查看是否有状态邀请
+        if (wx.getStorageSync('qrCodeMsg').type) return wx.navigateTo({
+            url: '/pages/login/QrCode',
+        });
     },
     /* 一键联系 */
     contact() {