forked from woniudiancang/bee
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65acd4c
commit a12ec8d
Showing
11 changed files
with
126 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module.exports = { | ||
version: "4.2.1", | ||
note: 'fix:加入购物车minBuyNumber导致的数量bug', | ||
version: "4.3.0", | ||
note: '增加动态会员码功能', | ||
subDomain: "beeorder", // 根据教程 https://www.it120.cc/help/qr6l4m.html 查看并设置你自己的 subDomain | ||
baiduMapKey: "TJ3BZ-6LVCF-C25JP-JOA3O-EWZFJ-5FBMI", // 百度地图开放平台去申请自己的key,用来计算配送距离 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const WXAPI = require('apifm-wxapi') | ||
import wxbarcode from 'wxbarcode' | ||
|
||
Page({ | ||
data: { | ||
balance: 0, | ||
freeze: 0, | ||
score: 0, | ||
growth: 0, | ||
userCode: undefined | ||
}, | ||
onLoad(e) { | ||
this.getUserAmount() | ||
this.dynamicUserCode() | ||
}, | ||
onShow: function () { | ||
}, | ||
async getUserAmount() { | ||
const res = await WXAPI.userAmount(wx.getStorageSync('token')) | ||
if (res.code == 0) { | ||
this.setData({ | ||
balance: res.data.balance, | ||
freeze: res.data.freeze, | ||
score: res.data.score, | ||
growth: res.data.growth | ||
}) | ||
} | ||
}, | ||
async dynamicUserCode() { | ||
const res = await WXAPI.dynamicUserCode(wx.getStorageSync('token')) | ||
if (res.code == 0) { | ||
this.setData({ | ||
userCode: res.data | ||
}) | ||
wxbarcode.barcode('barcode', res.data, 650, 200); | ||
wxbarcode.qrcode('qrcode', res.data, 650, 650); | ||
} | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"navigationBarTitleText": "会员码" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
<view class="title">{{ userCode }}</view> | ||
<canvas class="user-code-bar" canvas-id="barcode" /> | ||
<canvas class="user-code" canvas-id="qrcode" /> | ||
<van-grid column-num="2" icon-size="64rpx" square> | ||
<van-grid-item icon="balance-o" text="余额 {{ balance }}" icon-color="#e64340" text-class="amount-c" /> | ||
<van-grid-item icon="points" text="积分 {{ score }}" icon-color="#e64340" text-class="amount-c" /> | ||
</van-grid> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.title { | ||
text-align: center; | ||
color: #666; | ||
margin: 32rpx; | ||
} | ||
|
||
.van-grid-item__text { | ||
color: #e64340 !important; | ||
font-size: 28rpx !important; | ||
} | ||
|
||
.user-code-bar { | ||
width: 650rpx; | ||
height: 200rpx; | ||
margin-left: 50rpx; | ||
} | ||
|
||
.user-code { | ||
width: 650rpx; | ||
height: 650rpx; | ||
margin-left: 50rpx; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters