diff --git a/pages/user/index/index.js b/pages/user/index/index.js index 3e25205..89e2470 100644 --- a/pages/user/index/index.js +++ b/pages/user/index/index.js @@ -362,8 +362,8 @@ Page({ show_tc: function() { if (!this.data.userInfo) return false; //base64_encode($user.mobile.'|'.date('Y-m-d H:i:s') - var val= this.data.userInfo.mobile+"|"+ut.formatTime(); - val=ut.base64_encode(val); + var val=this.data.userInfo.mobile+"|"+ut.formatTime(); + val="^"+ut.base64_encode(val); qrcode('qrcode', val, 480, 480, this); this.setData({ diff --git a/pages/user/index/index.wxml b/pages/user/index/index.wxml index 19479fc..3d6fa58 100644 --- a/pages/user/index/index.wxml +++ b/pages/user/index/index.wxml @@ -284,8 +284,8 @@ {{userInfo.nickname}} - - + + {{userInfo.address}} diff --git a/pages/user/userinfo/userinfo.js b/pages/user/userinfo/userinfo.js index f13ab9a..3be9c02 100644 --- a/pages/user/userinfo/userinfo.js +++ b/pages/user/userinfo/userinfo.js @@ -17,6 +17,10 @@ var a = getApp(), var timestamp = Date.parse(new Date()); var date = new Date(timestamp); +const { + barcode, + qrcode +} = require('../../../utils/index.js'); Page({ data: { @@ -713,6 +717,13 @@ Page({ //------卡片的显示和关闭-------- show_tc: function() { + if (!getApp().globalData.userInfo) return false; + //base64_encode($user.mobile.'|'.date('Y-m-d H:i:s') + var val=getApp().globalData.userInfo.mobile+"|"+ut.formatTime(); + val="^"+ut.base64_encode(val); + + qrcode('qrcode', val, 480, 480, this); + this.setData({ tc_hide: false, }); diff --git a/pages/user/userinfo/userinfo.wxml b/pages/user/userinfo/userinfo.wxml index b3a0389..6a949b3 100644 --- a/pages/user/userinfo/userinfo.wxml +++ b/pages/user/userinfo/userinfo.wxml @@ -254,7 +254,7 @@ - + 扫一扫上面的二维码图案,即可消费 diff --git a/pages/user/userinfo/userinfo.wxss b/pages/user/userinfo/userinfo.wxss index 6b6da66..6b11ea0 100644 --- a/pages/user/userinfo/userinfo.wxss +++ b/pages/user/userinfo/userinfo.wxss @@ -246,9 +246,11 @@ input { } .arrow-right { - width: 30rpx; - height: 30rpx; + width: 35rpx; + height: 35rpx; margin-left: 10rpx; + position: relative; + top: 5rpx; } .code {