-
Notifications
You must be signed in to change notification settings - Fork 693
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
5e6f236
commit 3497f65
Showing
10 changed files
with
131 additions
and
7 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
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,5 +1,5 @@ | ||
module.exports = { | ||
version: "2.10.0", | ||
note: '增加可选配件功能支持', | ||
version: "2.11.0", | ||
note: '增加在线排队取号功能', | ||
subDomain: "beeorder", // 根据教程 https://www.it120.cc/help/qr6l4m.html 查看并设置你自己的 subDomain | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,88 @@ | ||
const WXAPI = require('apifm-wxapi') | ||
const AUTH = require('../../utils/auth') | ||
const APP = getApp() | ||
APP.configLoadOK = () => { | ||
|
||
} | ||
Page({ | ||
data: { | ||
|
||
}, | ||
onLoad: function (options) { | ||
|
||
}, | ||
onShow: function () { | ||
this.queuingTypes() | ||
this.queuingMy() | ||
}, | ||
async queuingTypes() { | ||
wx.showLoading({ | ||
title: '', | ||
}) | ||
const res = await WXAPI.queuingTypes() | ||
wx.hideLoading({ | ||
success: (res) => {}, | ||
}) | ||
if (res.code == 0) { | ||
this.setData({ | ||
list: res.data | ||
}) | ||
} | ||
}, | ||
async queuingMy() { | ||
const res = await WXAPI.queuingMy(wx.getStorageSync('token')) | ||
if (res.code == 0) { | ||
const mylist = [] | ||
res.data.forEach(ele => { | ||
const queuingLog = ele.queuingLog | ||
const queuingUpType = ele.queuingUpType | ||
const waitMinitus = (queuingLog.number - queuingUpType.curNumber -1) * queuingUpType.minitus | ||
if (waitMinitus) { | ||
queuingLog.waitMinitus = waitMinitus | ||
} | ||
queuingLog.typeEntity = queuingUpType | ||
mylist.push(queuingLog) | ||
}) | ||
this.setData({ | ||
mylist | ||
}) | ||
} | ||
}, | ||
async queuingGet(e) { | ||
const index = e.currentTarget.dataset.index | ||
const queueType = this.data.list[index] | ||
const isLogined = await AUTH.checkHasLogined() | ||
if (!isLogined) { | ||
AUTH.openLoginDialog() | ||
return | ||
} | ||
wx.showLoading({ | ||
title: '', | ||
}) | ||
const res = await WXAPI.queuingGet(wx.getStorageSync('token'), queueType.id) | ||
wx.hideLoading({ | ||
success: (res) => {}, | ||
}) | ||
if (res.code != 0) { | ||
wx.showToast({ | ||
title: res.msg, | ||
icon: 'none' | ||
}) | ||
} else { | ||
wx.showToast({ | ||
title: '取号成功' | ||
}) | ||
this.queuingMy() | ||
} | ||
}, | ||
processLogin(e) { | ||
if (!e.detail.userInfo) { | ||
wx.showToast({ | ||
title: '已取消', | ||
icon: 'none', | ||
}) | ||
return; | ||
} | ||
AUTH.register(this); | ||
}, | ||
}) |
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,14 @@ | ||
<van-empty wx:if="{{!list}}" description="暂无队列" /> | ||
<van-dialog id="van-dialog-auth-login" bind:getuserinfo="processLogin" /> | ||
<view class="btn-groups"> | ||
<van-button custom-class="btn" wx:for="{{list}}" wx:key="id" type="primary" block bind:click="queuingGet" data-index="{{ index }}">{{ item.name }} (共 {{item.numberGet}} 号,当前第 {{item.curNumber}} 号)</van-button> | ||
</view> | ||
<van-cell-group wx:if="{{ mylist }}" title="我的号子"> | ||
<van-cell | ||
value-class="cell-red" | ||
wx:for="{{mylist}}" wx:key="id" | ||
title="{{ item.typeEntity.name }}" | ||
label="{{ item.statusStr }} {{ item.waitMinitus ? '预计等待: ' + item.waitMinitus + '分钟' : '' }}" | ||
value="{{ item.number }}号" | ||
/> | ||
</van-cell-group> |
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,12 @@ | ||
.btn-groups { | ||
padding-top: 168rpx; | ||
padding-bottom: 64rpx; | ||
width: 600rpx; | ||
margin: auto; | ||
} | ||
.btn-groups .btn { | ||
margin: 32rpx 0; | ||
} | ||
.cell-red { | ||
color: #e64340 !important; | ||
} |