|
@@ -11,35 +11,22 @@ Page({
|
|
|
navbarData: {
|
|
|
name: '节俭会'
|
|
|
},
|
|
|
+
|
|
|
background: '',
|
|
|
- tenant: '',
|
|
|
+
|
|
|
+
|
|
|
heat: 80,
|
|
|
+ heatColor: { '0%': '#E1FFFF', '25%': '#00FF7F', '50%': '#191970', '75%': '#ee0a24', '100%': '#ff0000', },
|
|
|
+
|
|
|
step: 0,
|
|
|
- heatColor: {
|
|
|
- '0%': '#E1FFFF',
|
|
|
- '25%': '#00FF7F',
|
|
|
- '50%': '#191970',
|
|
|
- '75%': '#ee0a24',
|
|
|
- '100%': '#ff0000',
|
|
|
- },
|
|
|
- thrList: [
|
|
|
- {
|
|
|
- name: '菜名',
|
|
|
- num: 1,
|
|
|
- reserve: '100'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '菜名',
|
|
|
- num: 1,
|
|
|
- reserve: '100'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '菜名',
|
|
|
- num: 1,
|
|
|
- reserve: '100'
|
|
|
- },
|
|
|
- ],
|
|
|
- thrTitle: ''
|
|
|
+
|
|
|
+
|
|
|
+ thrTitle: '',
|
|
|
+
|
|
|
+ tenant: '',
|
|
|
+
|
|
|
+ thrList: [],
|
|
|
+
|
|
|
},
|
|
|
|
|
|
reserveBtn: function () {
|
|
@@ -50,30 +37,29 @@ Page({
|
|
|
|
|
|
twoBtn: function (e) {
|
|
|
let type = e.currentTarget.dataset.smile
|
|
|
- if (type == '1') {
|
|
|
+ if (type == '1') {
|
|
|
wx.switchTab({
|
|
|
url: '/pages/reserve/index',
|
|
|
})
|
|
|
- } else if (type == '2') {
|
|
|
+ } else if (type == '2') {
|
|
|
wx.showToast({
|
|
|
title: '暂未开通',
|
|
|
})
|
|
|
- } else {
|
|
|
+ } else {
|
|
|
wx.showToast({
|
|
|
title: '暂未开通',
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
},
|
|
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function (options) {
|
|
|
+
|
|
|
app.toLogin().then(res => {
|
|
|
this.getMealCard();
|
|
|
});
|
|
|
+
|
|
|
wx.request({
|
|
|
url: `${app.globalData.publicUrl}/api/st/system/tenant/getTenant/${app.globalData.tenant}`,
|
|
|
method: "get",
|
|
@@ -91,12 +77,13 @@ Page({
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
wx.getWeRunData({
|
|
|
success: (res) => {
|
|
|
+ const app = getApp()
|
|
|
const { encryptedData, iv } = res
|
|
|
const session_key = app.globalData.wxInfo.session_key;
|
|
|
const data = { encryptedData, iv, session_key }
|
|
|
-
|
|
|
wx.request({
|
|
|
url: `${app.globalData.publicUrl}/api/st/system/weixin/decrypt`,
|
|
|
method: "POST",
|
|
@@ -111,7 +98,6 @@ Page({
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
},
|
|
|
|
|
|
|
|
@@ -166,7 +152,7 @@ Page({
|
|
|
onShareAppMessage: function () {
|
|
|
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
getMealCard() {
|
|
|
const openid = app.globalData.wxInfo.openid;
|
|
|
if (!openid) return;
|
|
@@ -197,6 +183,7 @@ Page({
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
initQrCode(id) {
|
|
|
const url = `${app.globalData.publicUrl}/api/st/dining/order/useMeal/${id}?_tenant=${app.globalData.tenant}`;
|
|
|
var qrcode = new QRCode(`myQrcode`, {
|