diff --git a/App.vue b/App.vue
index d0dc6c7..4e988ba 100644
--- a/App.vue
+++ b/App.vue
@@ -10,9 +10,7 @@
queueId: null,
},
onLaunch: function(options) {
- console.log(3333)
- console.log(options)
- if ( options.query.qrCode ) {
+ if ( options.query&&options.query.qrCode ) {
if (this.getQueryString(options.query.qrCode, 'code')) {
this.globalData.tableCode = this.getQueryString(options.query.qrCode, 'code')
}
diff --git a/components/cwx-keyboard/cwx-keyboard.vue b/components/cwx-keyboard/cwx-keyboard.vue
index 2b4a0ff..9478598 100644
--- a/components/cwx-keyboard/cwx-keyboard.vue
+++ b/components/cwx-keyboard/cwx-keyboard.vue
@@ -82,7 +82,12 @@
//处理按键
_handleKeyPress(e) {
// console.log('点击传e', e.target.dataset.num);
+ // #ifdef MP-WEIXIN
let num = e.target.dataset.num;
+ // #endif
+ // #ifdef MP-ALIPAY
+ let num = e.target.targetDataset.num;
+ // #endif
//不同按键处理逻辑
// -1 代表无效按键,直接返回
if (num == -1) return false;
@@ -154,6 +159,7 @@
// this.money = S + num;
// }
// }
+ console.log(num)
if (this.money.length == 6) {
this.$emit('confirmEvent', this.money); //提交参数
return
diff --git a/components/payPassword.vue b/components/payPassword.vue
index 37531ca..408b4b0 100644
--- a/components/payPassword.vue
+++ b/components/payPassword.vue
@@ -6,22 +6,22 @@
- ●
+ ●
- ●
+ ●
- ●
+ ●
- ●
+ ●
- ●
+ ●
- ●
+ ●
@@ -67,8 +67,8 @@
* @param {Object} val
*/
KeyInfo(val) {
-
- if (val.index >= 6) {
+ console.log(val)
+ if (val.index&&val.index >= 6) {
return;
}
// 判断是否输入的是删除键
diff --git a/components/payPasswordtwo.vue b/components/payPasswordtwo.vue
index 8eb5a54..03a7b2f 100644
--- a/components/payPasswordtwo.vue
+++ b/components/payPasswordtwo.vue
@@ -7,22 +7,22 @@
- ●
+ ●
- ●
+ ●
- ●
+ ●
- ●
+ ●
- ●
+ ●
- ●
+ ●
@@ -56,7 +56,7 @@
},
watch: {
consumeFee(newVal, oldVal) {
-
+ console.log(this.consumeFee)
}
},
methods: {
diff --git a/framework/0-conf.js b/framework/0-conf.js
index 62446e1..44b09ed 100644
--- a/framework/0-conf.js
+++ b/framework/0-conf.js
@@ -6,8 +6,10 @@ const proxyApi = "/api"
// const proxyApi = 'http://192.168.1.15:9888/cashierService' // 王伟
// const proxyApi = 'http://192.168.1.27:9888/cashierService' // 帆哥
// const proxyApiwws = 'ws://192.168.1.15:9888/netty' // 测试
-const proxyApi = 'https://wxcashiertest.sxczgkj.cn/cashierService' // 测试
-const proxyApiwws = 'wss://wxcashiertest.sxczgkj.cn/netty' // 测试
+// const proxyApi = 'https://wxcashiertest.sxczgkj.cn/cashierService' // 测试
+// const proxyApiwws = 'wss://wxcashiertest.sxczgkj.cn/netty' // 测试
+const proxyApi = 'https://cashier.sxczgkj.cn/cashierService' // 线上
+const proxyApiwws = 'wss://cashier.sxczgkj.cn/netty' // 线上
// #endif
// #ifdef H5
diff --git a/pages/index/components/diamond.vue b/pages/index/components/diamond.vue
index 106878f..e920283 100644
--- a/pages/index/components/diamond.vue
+++ b/pages/index/components/diamond.vue
@@ -1,6 +1,6 @@
-
{{item.name}}
@@ -31,7 +31,7 @@
},
methods: {
clickdistrict(item) {
- // console.log(item,'调试')
+ console.log(item,'调试')
switch (item.jumpType) {
case 'absolute':
uni.pro.navigateTo('webview/webview', {
diff --git a/pages/member/components/registermember.vue b/pages/member/components/registermember.vue
index 09fa87f..c81d248 100644
--- a/pages/member/components/registermember.vue
+++ b/pages/member/components/registermember.vue
@@ -49,7 +49,7 @@
@@ -202,7 +202,6 @@
uni.login({
provider: 'weixin',
success: async (data) => {
- console.log(data)
let res = await this.api.userwxlogins({
code: data.code,
encryptedData: d.detail.encryptedData,
@@ -222,36 +221,12 @@
console.log(res)
my.getPhoneNumber({
success: async (data) => {
- console.log(data)
let res = await this.api.userwxlogins({
encryptedData: JSON.parse(data.response).response,
source: "alipay"
})
- this.phonetitle = res.data.substr(0, 3) + "****" + res.data.substr(7)
- this.mobile = res.data;
- }
- });
- }
- });
- // #endif
-
- // #ifdef MP-ALIPAY
- // 支付宝小程序环境
- my.getAuthCode({
- scopes: 'auth_user',
- success: (res) => {
- console.log(res)
- let authCode = res.authCode;
- my.getPhoneNumber({
- success: async (data) => {
- let res = await this.api.userwxlogins({
- // code: authCode,
- encryptedData: JSON.parse(data.response).response,
- source: "alipay"
- })
- this.phonetitle = res.data.substr(0, 3) + "****" + res.data.substr(7)
- this.mobile = res.data;
- console.log(this.phonetitle)
+ this.telephone = res.data
+ // console.log(this.phonetitle)
}
});
}
diff --git a/pages/member/index - 副本.vue b/pages/member/index - 副本.vue
new file mode 100644
index 0000000..695940e
--- /dev/null
+++ b/pages/member/index - 副本.vue
@@ -0,0 +1,723 @@
+
+
+
+
+
+ {{ shopUserInfo.shopName }}
+
+
+
+
+ 账户余额(元)
+
+ {{shopUserInfo.amount || '0.00'}}
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+ ¥
+
+
+ 自定义金额
+
+
+
+
+ 充值
+
+ ¥{{item.amount}}
+
+
+
+ 赠{{inputshow}}
+ ¥{{ item.giftAmount }}
+
+
+ 赠送{{item.giftAmount}}元
+
+
+
+
+
+
+
+
+ 您将获得:
+
+
+
+ {{ item }}
+
+
+
+
+
+
+ 适用门店
+ {{ shopUserInfo.shopName }}
+
+
+ 充值说明
+ 1.充值金额1家门店可用
+ 2.储值完成后不支持自助退款,可联系商家处理
+ 3.钱包余额不支持转赠,不可提现,长期有效
+
+
+
+
+
+
+
+
+
+ 已同意
+ 《用户隐私协议》
+
+
+
+ 立即充值
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/member/index.vue b/pages/member/index.vue
index 695940e..bbed540 100644
--- a/pages/member/index.vue
+++ b/pages/member/index.vue
@@ -27,27 +27,26 @@
type="number"
v-model="amount"
inputAlign="left"
- :placeholder="`充${amount}送${giftAmount}`"
+ :placeholder="`充${minNum}送${handselNum}`"
:customStyle="{border: '0'}"
- @input="amountChange"
>
自定义金额
-
+
充值
- ¥{{item.amount}}
-
+ ¥{{item.minNum}}
+
- 赠{{inputshow}}
- ¥{{ item.giftAmount }}
+ 赠
+ ¥{{ item.handselNum }}
- 赠送{{item.giftAmount}}元
+ 赠送{{item.handselNum}}元
@@ -109,7 +108,8 @@
isProtocol: false,
listdata: [],
amount: 0,
- giftAmount: 0,
+ minNum: 0,
+ handselNum: 0,
userInfo: {},
shopUserInfo: null,
shopId: '',
@@ -118,38 +118,33 @@
{name: "明细", url: "member/billDetails",icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/detail.png"},
{name: "管理", url: "member/storedManage",icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/manage.png"}
],
- type: "",
+
}
},
- async onLoad(options) {
+ async onLoad(e) {
// if ( e.type == 'list' || e.type == 'index') {
// this.shopId = e.shopId;
// this.init();
// }
+ console.log(e)
uni.cache.set('forceUpdate',1)
- // #ifdef MP-WEIXIN
- if (options.q) {
- this.shopId = this.getQueryString(decodeURIComponent(options.q), 'shopId')
+ if (e.q) {
+ this.shopId = this.getQueryString(decodeURIComponent(e.q), 'shopId')
uni.cache.set('shopId',this.shopId)
this.tokenShow = false;
- }
- // #endif
- // #ifdef MP-ALIPAY
- if (getApp().globalData.shopId) { this.shopId = getApp().globalData.shopId }
- uni.cache.set('shopId',this.shopId)
- // #endif
-
- if (options.shopId) {
- this.shopId = options.shopId
+ // 等待登录结果返回
+ // if (!uni.cache.get('token')) {
+ // await this.$onLaunched;
+ // }
+ this.shopInfo();
+ this.paygetActive()
+ } else{
+ this.shopId = e.shopId;
uni.cache.set('shopId',this.shopId)
+ this.shopInfo();
+ this.paygetActive()
}
- if (options.type) {
- this.type = options.type
- }
- if ( options.amount ) { this.amount = options.amount; }
- this.shopInfo();
- this.paygetActive()
},
methods: {
/**
@@ -198,44 +193,20 @@
let res = await this.api.paygetActive({
shopId: this.shopId,
page: 1,
- pageSize: 99
+ pageSize: 10
})
try {
this.listdata = res.data.list;
this.giftList = this.listdata[0].gives;
- this.giftAmount = this.listdata[0].giftAmount
- if ( this.type == 'topUpActivity') {
- this.amountChange()
- } else {
- this.amount = this.listdata[0].amount;
- }
+ this.amount = this.listdata[0].minNum;
+ this.minNum = this.listdata[0].minNum;
+ this.handselNum = this.listdata[0].handselNum
} catch (e) {
//TODO handle the exception
}
},
- /**
- * 监听金额修改
- */
- amountChange () {
- let item = this.listdata.filter(item=>this.amount==item.amount)
-
- if ( item.length > 0 ) {
- this.listdata.forEach((v,e)=>{
- if ( this.amount == v.amount) {
- this.inputshow = e;
- this.clickinput(v,e)
- }
- })
- } else {
- this.inputshow = '';
- this.giftList = [];
- this.giftAmount = '';
- }
-
- },
-
/**
* 进入明细\管理
* @param {Object} e
@@ -324,10 +295,12 @@
* @param {Object} b
*/
clickinput(a, b) {
+ console.log(a, b)
this.inputshow = b;
this.giftList = a.gives;
- this.amount = a.amount;
- this.giftAmount = a.giftAmount;
+ this.amount = a.minNum;
+ this.minNum = a.minNum;
+ this.handselNum = a.handselNum;
},
/**
@@ -383,20 +356,15 @@
uni.requestSubscribeMessage({
tmplIds:["AV-KybUHaK3KtFVLqpy6PHccHBS7XeX__mOM4RbufnQ"],
complete() {
- if ( _this.type && _this.type == "topUpActivity") {
- uni.pro.navigateBack()
+ if ( pages.length > 1) {
+ _this.shopInfo()
} else {
- if ( pages.length > 1) {
- _this.shopInfo()
- } else {
- setTimeout(res => {
- uni.switchTab({
- url: '/pages/index/index'
- })
- }, 500)
- }
+ setTimeout(res => {
+ uni.switchTab({
+ url: '/pages/index/index'
+ })
+ }, 500)
}
-
},
})
diff --git a/pages/product/placeOrder.vue b/pages/product/placeOrder.vue
index 740b319..1c92dd3 100644
--- a/pages/product/placeOrder.vue
+++ b/pages/product/placeOrder.vue
@@ -55,6 +55,7 @@
+
-
+
+
+
+
+
+ 支付宝支付
+
+
+
+
+
+
@@ -98,7 +112,7 @@
-
+
@@ -109,7 +123,7 @@
payPassword
},
onLoad(e) {
- this.$store.dispatch("set_shopid"); //获取shapid
+ // this.$store.dispatch("set_shopid"); //获取shapid
this.getInfo(e.id)
this.orderIds = e.id
this.amount = uni.cache.get('userInfo').amount
@@ -143,6 +157,12 @@
// 余额支付
async accountPayevent(pwd) {
this.ispws = false
+ if ( this.amountVIP.isVip == 0 ) {
+ uni.pro.navigateTo('/pages/member/index', {
+ shopId: this.info.shopId,
+ })
+ return;
+ }
let res = await this.api.payOrderPay({
orderId: this.listinfoid.id,
payType: "deposit",
@@ -207,7 +227,7 @@
let isVip = uni.cache.get('userInfo').isPwd
if (isVip == 0) {
uni.pro.navigateTo('/pages/user/repairpassword', {
- shopId_id: uni.cache.get('shopId')
+ shopId_id: this.info.shopId
})
} else {
this.ispws = true
@@ -221,12 +241,19 @@
},
async payEvent(id) {
let res = await this.api.payOrderPay({
+ // #ifdef MP-WEIXIN
payType: 'wechatPay',
+ // #endif
+ // #ifdef MP-ALIPAY
+ payType: 'aliPay',
+ // #endif
orderId: id,
orderType: 'group'
})
if (res) {
+ // 微信支付还是余额支付
uni.requestPayment({
+ // #ifdef MP-WEIXIN
provider: 'wxpay', //支付类型-固定值
partnerid: res.data.appId, // 微信支付商户号
timeStamp: res.data.timeStamp, // 时间戳(单位:秒)
@@ -234,22 +261,32 @@
package: res.data.package, // 固定值
signType: res.data.signType, //固定值
paySign: res.data.paySign, //签名
+ // #endif
+ // #ifdef MP-ALIPAY
+ provider: 'alipay', //支付类型-固定值
+ orderInfo: res.data.tradeNo, // 支付宝支付商户号
+ // #endif
success: (res) => {
+ let _this = this
uni.showToast({
title: "支付成功"
})
uni.navigateBack()
},
- fail: (err) => {
- setTimeout(res => {
- uni.showToast({
- icon: 'none',
- title: '支付失败'
- })
- uni.hideLoading()
- }, 2000)
+ fail: async (err) => {
+ console.log(err)
+ let res = await this.api.cancelOrderPay({
+ orderId: this.listinfoid.id,
+ })
+
+ uni.showToast({
+ icon: 'none',
+ title: '支付失败'
+ })
+ uni.hideLoading()
}
});
+
}
},
diff --git a/pages/user/coupon.vue b/pages/user/coupon.vue
index 775e73e..b2c5fec 100644
--- a/pages/user/coupon.vue
+++ b/pages/user/coupon.vue
@@ -115,7 +115,7 @@
*/
async getCouponList() {
try {
- let res = await this.api.conponList({
+ let res = await this.api.getUserConpons({
userId: uni.cache.get('userInfo').id,
shopId: uni.cache.get('shopId'),
status: this.status
diff --git a/uni_modules/cc-defineKeyboard/components/cc-defineKeyboard/cc-defineKeyboard.vue b/uni_modules/cc-defineKeyboard/components/cc-defineKeyboard/cc-defineKeyboard.vue
index 204a8fc..ce0f531 100644
--- a/uni_modules/cc-defineKeyboard/components/cc-defineKeyboard/cc-defineKeyboard.vue
+++ b/uni_modules/cc-defineKeyboard/components/cc-defineKeyboard/cc-defineKeyboard.vue
@@ -90,6 +90,7 @@
* @param {Number} index
*/
onKeyList(item, index) {
+ console.log(item)
let KeyInfo = item;
// 删除键
if (KeyInfo.keyCode === 8 && this.keyIndex > -1) {