diff --git a/manifest.json b/manifest.json
index 377f67b..ef4d123 100644
--- a/manifest.json
+++ b/manifest.json
@@ -127,7 +127,7 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
- "appid" : "wx3dcc897ef3f95446",
+ "appid" : "wxb7b0409b4b36e4b1",
"setting" : {
"urlCheck" : false,
"es6" : false,
diff --git a/pages/mall/index.vue b/pages/mall/index.vue
index 026f53e..6582e62 100644
--- a/pages/mall/index.vue
+++ b/pages/mall/index.vue
@@ -82,29 +82,17 @@
选择支付方式
-
+
微信支付
-
+
-
-
-
- 吧唧币
- {{ orderData.goods.price*100 }} (剩余:{{ orderData.use_integral }})
-
-
-
-
-
-
-
-
+
@@ -144,16 +132,14 @@
-
+
+ 立即支付
{{
` ¥${orderData.price}`
}}
-
- {{orderData.price*100}}吧唧币
-
@@ -175,9 +161,8 @@
orderData: null,
isAgree: true,
isWXPay: true,
- useMoney: false,
- integral: true,
- zhifu: 0,
+ useMoney: true,
+
}
},
onLoad() {
@@ -247,17 +232,25 @@
this.goodsId = data.id;
var that = this;
this.req({
- url: 'mall_ordermoney',
+ url: 'ordermoney',
data: {
prize_num: 1,
goods_id: data.id,
goods_num: 1,
+ use_money_is: this.useMoney ? 1 : 2,
+ use_integral_is: this.isWXPay ? 1 : 2,
+ // coupon_id: (that.couponData && that.couponData.id) || ''
},
success(res) {
if (res.status == 1) {
-
+ // that.pay_news = res.data
+ // if (res.data.coupon_id) {
+ // that.couponData = {
+ // id: res.data.coupon_id,
+ // price: res.data.coupon_price
+ // }
+ // }
that.orderData = res.data
- that.zhifu = 0;
that.$refs.pop.open()
}
}
@@ -269,15 +262,9 @@
},
changePay(e) {
- if (this.zhifu != e) {
- this.zhifu = e;
- }
- if (this.zhifu == 1) {
+ this[e] = !this[e]
- }
- // this[e] = !this[e]
-
- // this.confirmSubmit(0)
+ this.confirmSubmit(0)
},
confirmSubmit(type) {
@@ -294,11 +281,16 @@
var that = this;
- let url = 'mall_ordermoney'
+ let url = 'infinite_ordermoney'
let data = {
goods_id: this.goodsId,
prize_num: 1,
+ use_money_is: this.useMoney ? 1 : 2,
+ use_integral_is: this.isWXPay ? 1 : 2,
+ // coupon_id: (this.couponData && this.couponData.id) || '',
+ // is_mibao: this.pageTabCur
+ // ad_id: uni.getStorageSync('_ad_id')
}
if (type == 1) {
@@ -328,6 +320,8 @@
if (type == 0) {
console.log("res.data", res.data);
this.orderData = res.data;
+
+ // that.open('pop');
}
if (type == 1) {
@@ -362,73 +356,6 @@
},
-
- pay(type) {
- //orderData.price
- //{{ orderData.goods.price*100 }} (剩余:{{ orderData.use_integral }})
- var pri = this.orderData.goods.price * 100;
- if (this.orderData.use_integral < pri) {
- uni.showToast({
- title: '吧唧币不足',
- icon: 'none',
- });
- return;
- }
-
- console.log("type", type);
-
- var that = this;
-
- let url = 'mall_orderbuy'
-
- let data = {
- goods_id: this.goodsId,
- prize_num: 1,
- }
-
- this.req({
- url,
- data,
- success: async res => {
- if (res.status == 1) {
- if (type == 0) {
- console.log("res.data", res.data);
- this.orderData = res.data;
- }
-
- if (type == 1) {
- that.close('pop')
- if (res.data.status == 1) {
-
- const status = await that.$c.wxMpPay({
- data: res.data.res
- })
- if (status == 'success') {
- // that.getPrize(res.data.order_num)
- that.getData();
- }
-
-
-
-
- } else {
- that.$c.toast({
- title: res.msg,
- duration: 500,
- success: () => {
- // that.getPrize(res.data.order_num)
- that.getData();
- }
- })
- }
- }
- }
- }
- })
-
- },
-
-
},
}
diff --git a/pages/sangdai/sangdai.vue b/pages/sangdai/sangdai.vue
index 9f3ed06..46c48b3 100644
--- a/pages/sangdai/sangdai.vue
+++ b/pages/sangdai/sangdai.vue
@@ -166,7 +166,7 @@
共{{nowChooseNum}}
- 件物品,合计兑换吧唧币
+ 件物品,合计兑换¥
{{totalChangeMoney}}
@@ -301,7 +301,7 @@
- 成功获得{{zhanshiMoney}}吧唧币
+ 恭喜您兑换成功获得¥{{zhanshiMoney}}
@@ -467,7 +467,7 @@
arr.forEach(item => {
// console.log(item);
if (item.goodslist_money > 0 && item.chooseNum > 0) {
- let m = item.goodslist_money / 100 * item.chooseNum;
+ let m = item.goodslist_money * item.chooseNum;
mon += m;
}
});