diff --git a/app.json b/app.json
index b880fc1..5ac98a3 100644
--- a/app.json
+++ b/app.json
@@ -52,6 +52,7 @@
"pages/payrule/payrule",
"pages/grade/grade",
"pages/exchange/exchange",
+ "pages/exchangeCard/exchangeCard",
"pages/game/index",
"pages/canvas/index",
"pages/specialcourtesy/specialcourtesy",
diff --git a/assets/images/scan.png b/assets/images/scan.png
new file mode 100644
index 0000000..62f81b1
Binary files /dev/null and b/assets/images/scan.png differ
diff --git a/ext.json b/ext.json
index dcaba26..34dfe10 100644
--- a/ext.json
+++ b/ext.json
@@ -2,44 +2,35 @@
"ext": {
"attr": {
"car": {
- "tjd": {
- "payPath": "",
- "tjdAppId": "wx6945d1bda68d7993"
- },
"etcp": {
- "payPath": "pages/pay/order-pay-open/main",
- "etcpAppId": "wxc07f9d67923d676d",
- "etcpCallbackUrl": "https://admin.malls.iformall.com/api/carCallback/etcpPaidCallback"
- },
- "bolink": {
- "payPath": "pages/park/park",
- "bolinkAppId": "wxbd08b4baa10fcc1d"
- },
- "version": "release"
+ "etcpAppId": "wx192b7d2e8dcbefd0",
+ "etcpVersion": "release",
+ "etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback"
+ }
},
- "mchId": "1539123951",
+ "mchId": "1604439800",
"imgProxy": [
{
- "newUrl": "https://c.malls.iformall.com/img",
+ "newUrl": "https://ctest.malls.iformall.com/img",
"orgUrl": "https://iformall-net.formall.oss-accelerate.aliyuncs.com"
},
{
- "newUrl": "https://c.malls.iformall.com/img1",
+ "newUrl": "https://ctest.malls.iformall.com/img1",
"orgUrl": "https://formall.oss-accelerate.aliyuncs.com"
},
{
- "newUrl": "https://c.malls.iformall.com/img2",
+ "newUrl": "https://ctest.malls.iformall.com/img2",
"orgUrl": "https://wx.qlogo.cn"
}
],
- "configUrl": "https://c.malls.iformall.com/C/api",
- "ifStoreApp": "0",
+ "configUrl": "https://ctest.malls.iformall.com/C/api",
+ "businessSwitch": "1",
"ifHaveWebSocket": "0",
"ifHaveCarModular": "1"
},
- "name": "欢乐城万象金街",
- "weappId": "wxde54451891094c16",
- "appVersion": "C.5.1.1"
+ "name": "金泸商务",
+ "weappId": "wx649b3be73c1afe47",
+ "appVersion": "C.test.5.2.0"
},
"debug": false,
"tabBar": {
@@ -75,7 +66,8 @@
"selectedIconPath": "assets/images/user-a.png"
}
],
- "custom": true
+ "color": "#abb1be",
+ "selectedColor": "#b2743d"
},
"window": {
"backgroundTextStyle": "dark",
@@ -84,12 +76,16 @@
"navigationBarBackgroundColor": "#FFFFFF"
},
"plugins": {
+ "auto-points-plugin": {
+ "version": "1.3.0",
+ "provider": "wxfab2bf944bfc4da6"
+ },
"live-player-plugin": {
"version": "1.3.4",
"provider": "wx2b03c6e691cd7370"
}
},
- "extAppid": "wxde54451891094c16",
+ "extAppid": "wx649b3be73c1afe47",
"extEnable": true,
"permission": {
"scope.userLocation": {
diff --git a/index/user.wxml b/index/user.wxml
index 96a5973..8044f16 100644
--- a/index/user.wxml
+++ b/index/user.wxml
@@ -137,6 +137,14 @@
>
+
+
+
+ 录入实体卡
+ >
+
+
+
问券调查
diff --git a/pages/exchange/exchange.js b/pages/exchange/exchange.js
index 58673e1..62d22de 100644
--- a/pages/exchange/exchange.js
+++ b/pages/exchange/exchange.js
@@ -9,33 +9,54 @@ Page({
* 页面的初始数据
*/
data: {
- navigationBarHeight
+ navigationBarHeight,
+ code: ""
},
// 兑换
- exchange(e){
+ exchange(e) {
+ console.log(e, 'e');
let that = this;
let code = e.detail.value.code;
let formId = e.detail.formId;
- if (!code || !code.replace(/\s*/g, "")){
+ if (!code || !code.replace(/\s*/g, "")) {
wx.showToast({
title: '请输入兑换码',
- icon:"none",
- duration:2500
+ icon: "none",
+ duration: 2500
})
return;
}
- that.checkPhoneStatus(e.detail.value.code,formId = e.detail.formId);
+ that.checkPhoneStatus(code, formId);
},
+
+ goScanCode() {
+ console.log('scan!!!');
+ const that = this
+ wx.scanCode({
+ success: (res) => {
+ console.log(res, 'res');
+ const num = res.result
+ that.setData({
+ code: num
+ })
+ that.exchange({ detail: { value: num } })
+ },
+ fail: (res) => {
+ console.log(res, 'fail');
+ }
+ })
+ },
+
checkPhoneStatus: function (password, formId) {
let that = this;
Http.get({
url: config.api.checkPhoneStatus,
data: {}
})
- .then(res => {
- that.getCouponOrderByPassword(password, formId);
- })
- .catch(err => {
+ .then(res => {
+ that.getCouponOrderByPassword(password, formId);
+ })
+ .catch(err => {
if (err.code == 11005) {
/**
* 手机号没有授权,将值传到用户手机号授权的页面
@@ -51,7 +72,7 @@ Page({
duration: 2500
})
}
- })
+ })
},
getCouponOrderByPassword(password, formId) {
let that = this;
@@ -62,34 +83,34 @@ Page({
formId: formId
}
})
- .then(res => {
- wx.showModal({
- title: '兑换成功',
- content: '消费卡已发放到"我的卡包"',
- showCancel: true,
- cancelText: "知道了",
- cancelColor: '',
- confirmText: "去查看",
- confirmColor: '#FD832D',
- success: function (res) {
- if (res.cancel) {
- //点击取消,默认隐藏弹框
- } else {
- wx.redirectTo({
- url: '/pages/cardorder/index/index',
- })
- }
- },
- fail: function (res) { },//接口调用失败的回调函数
- complete: function (res) { },//接口调用结束的回调函数(调用成功、失败都会执行)
+ .then(res => {
+ wx.showModal({
+ title: '兑换成功',
+ content: '消费卡已发放到"我的卡包"',
+ showCancel: true,
+ cancelText: "知道了",
+ cancelColor: '',
+ confirmText: "去查看",
+ confirmColor: '#FD832D',
+ success: function (res) {
+ if (res.cancel) {
+ //点击取消,默认隐藏弹框
+ } else {
+ wx.redirectTo({
+ url: '/pages/cardorder/index/index',
+ })
+ }
+ },
+ fail: function (res) { },//接口调用失败的回调函数
+ complete: function (res) { },//接口调用结束的回调函数(调用成功、失败都会执行)
+ })
})
- })
- .catch(err => {
- wx.showToast({
- title: err.message,
- icon: 'none',
- duration: 2000
+ .catch(err => {
+ wx.showToast({
+ title: err.message,
+ icon: 'none',
+ duration: 2000
+ })
})
- })
}
})
\ No newline at end of file
diff --git a/pages/exchange/exchange.wxml b/pages/exchange/exchange.wxml
index f8732eb..f652665 100644
--- a/pages/exchange/exchange.wxml
+++ b/pages/exchange/exchange.wxml
@@ -1,11 +1,13 @@
+