bayi 1 年間 前
コミット
42f38355e5
5 ファイル変更16 行追加9 行削除
  1. 2 0
      api/user.js
  2. 7 1
      pages/my/gzh/index.js
  3. 1 1
      pages/my/gzh/index.wxml
  4. 3 4
      pages/my/index.wxml
  5. 3 3
      utils/request.js

+ 2 - 0
api/user.js

@@ -39,4 +39,6 @@ module.exports = {
     getInviteList: data => request('/v3/user/invite', 'get', data),
     // 绑定音箱端
     bindDevice: data => request('/v3/user/deviceCode', 'post', data),
+    // 获取公众号二维码(携带用户uid)
+    getWxQrcode: data => request('/v3/user/showqrcode', 'get', data),
 }

+ 7 - 1
pages/my/gzh/index.js

@@ -1,9 +1,15 @@
+import {
+    getWxQrcode
+} from '~/api/user'
 Component({
     data: {
         show: false,
+        qrCode:''
     },
     methods: {
-        open() {
+        async open() {
+            let res = await getWxQrcode()
+            console.log(res);
             this.getTabBar().setData({
                 mask: true
             })

+ 1 - 1
pages/my/gzh/index.wxml

@@ -1,6 +1,6 @@
 <view class="activationModal" wx:if="{{show}}">
     <view class="modal">
-        <image src="/static/lollipop.png" class="qrCode" show-menu-by-longpress="true" />
+        <image src="{{qrCode}}" class="qrCode" show-menu-by-longpress="true" />
     </view>
     <image src="/static/lollipop.png" class="close" catchtap="closeModal" />
 </view>

+ 3 - 4
pages/my/index.wxml

@@ -61,9 +61,8 @@
     </view>
   </view> -->
     <!-- 安卓 -->
-    <view class="scrollViewBox">
-        <scroll-view class="goodsList" scroll-x="true" enhanced show-scrollbar="{{false}}"
-            wx:if="{{vipTime!='1'&&!isIos}}">
+    <view class="scrollViewBox" wx:if="{{vipTime!='1'&&!isIos}}">
+        <scroll-view class="goodsList" scroll-x="true" enhanced show-scrollbar="{{false}}">
             <view class="payBox pbbg2" bindtap="toBuy" data-id="{{products[0].id}}">
                 <view class="pay">
                     {{isPreferential?'立即续费':'立即开通'}}
@@ -90,7 +89,7 @@
         </view>
         <view class="subBtn">去激活</view>
     </view>
-    <view class="activation" bindtap="toGzh" wx:if="{{vipTime!='1'}}">
+    <view class="activation" bindtap="toGzh">
         <view class="tips">
             <image src="/static/care.png" class="tipsImg" />关注公众号不迷路,更多福利等您!
         </view>

+ 3 - 3
utils/request.js

@@ -6,13 +6,13 @@ const {
         envVersion
     }
 } = wx.getAccountInfoSync();
-/* if (envVersion == 'develop') {
+if (envVersion == 'develop') {
     baseUrl = 'https://reader-api.efunbox.cn/wx'
     oldUrl = 'https://reader-api.efunbox.cn'
-} else { */
+} else {
     baseUrl = 'https://reader-api.ai160.com/wx'
     oldUrl = 'https://reader-api.ai160.com'
-// }
+}
 
 function request(url, method, data, oldBaseUrl = false, intercept = true) {
     let header = {