支付回调修改
This commit is contained in:
parent
48e1f72f3f
commit
2427899247
@ -9,8 +9,8 @@ let httpApiThree
|
|||||||
let httpApiFour
|
let httpApiFour
|
||||||
|
|
||||||
// 在打包之前请检查当前环境是否正确
|
// 在打包之前请检查当前环境是否正确
|
||||||
const env = 'dev'; // 开发
|
// const env = 'dev'; // 开发
|
||||||
// const env = 'prod'; // 生产
|
const env = 'prod'; // 生产
|
||||||
// const env = 'prew'; // 预上线
|
// const env = 'prew'; // 预上线
|
||||||
|
|
||||||
switch (env) {
|
switch (env) {
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
"name" : "惠农生活",
|
"name" : "惠农生活",
|
||||||
"appid" : "__UNI__3A527D1",
|
"appid" : "__UNI__3A527D1",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.4.4",
|
"versionName" : "1.4.5",
|
||||||
"versionCode" : 144,
|
"versionCode" : 145,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
@ -121,31 +121,34 @@
|
|||||||
title: '暂时无需缴纳保证金'
|
title: '暂时无需缴纳保证金'
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
let that = this
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '商户' + this.merchant_Data.mer_name + '是否同意缴纳保证金',
|
content: '商户' + this.merchant_Data.mer_name + '是否同意缴纳保证金',
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
|
|
||||||
// console.log('用户点击确定');
|
// console.log('用户点击确定');
|
||||||
paymerchant().then((res) => {
|
paymerchant().then((res) => {
|
||||||
console.log(res.data)
|
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
provider: 'wxpay',
|
provider: 'wxpay',
|
||||||
orderInfo: res.data
|
orderInfo: res.data
|
||||||
.config, //微信、支付宝订单数据 【注意微信的订单信息,键值应该全部是小写,不能采用驼峰命名】
|
.config, //微信、支付宝订单数据 【注意微信的订单信息,键值应该全部是小写,不能采用驼峰命名】
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
this.$util.Tips({
|
that.$util.Tips({
|
||||||
title: '支付成功'
|
title: '支付成功'
|
||||||
});
|
});
|
||||||
console.log('success:' + JSON.stringify(res));
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.decimal()
|
that.decimal()
|
||||||
this.list(true)
|
that.list(true)
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
},
|
},
|
||||||
fail: function(err) {
|
fail: function(err) {
|
||||||
this.$util.Tips({
|
|
||||||
|
that.$util.Tips({
|
||||||
title: '支付失败'
|
title: '支付失败'
|
||||||
});
|
});
|
||||||
console.log('fail:' + JSON.stringify(err));
|
console.log('fail:' + JSON.stringify(err));
|
||||||
|
@ -248,17 +248,13 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.list(true);
|
this.list(true, this.street_id);
|
||||||
this.Area()
|
this.Area()
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
||||||
this.list()
|
|
||||||
|
|
||||||
this.Area()
|
this.Area()
|
||||||
|
this.selfLocation()
|
||||||
|
|
||||||
// this.openTongZhi()
|
// this.openTongZhi()
|
||||||
uni.$on('connectstatusChange', (connectstatus) => {
|
uni.$on('connectstatusChange', (connectstatus) => {
|
||||||
var connectstr = ''
|
var connectstr = ''
|
||||||
@ -275,10 +271,10 @@
|
|||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if (this.productList.length > 0) {
|
if (this.productList.length > 0) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.list(false);
|
this.list(false, this.street_id);
|
||||||
}, 500)
|
}, 500)
|
||||||
} else {
|
} else {
|
||||||
this.list()
|
this.list(true, this.street_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -299,13 +295,12 @@
|
|||||||
this.street = newValue.split(',')[0]
|
this.street = newValue.split(',')[0]
|
||||||
this.town = newValue.split(',')[0]
|
this.town = newValue.split(',')[0]
|
||||||
this.street_id = newValue.split(',')[1]
|
this.street_id = newValue.split(',')[1]
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (this.street.length <= 0) {
|
|
||||||
this.selfLocation()
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
@ -335,7 +330,6 @@
|
|||||||
},
|
},
|
||||||
//获取商品列表
|
//获取商品列表
|
||||||
list(isPage, id) {
|
list(isPage, id) {
|
||||||
// console.log('1111111')
|
|
||||||
let that = this;
|
let that = this;
|
||||||
if (that.loadend) return;
|
if (that.loadend) return;
|
||||||
if (that.loading) return;
|
if (that.loading) return;
|
||||||
@ -405,25 +399,16 @@
|
|||||||
} else if (scrollTop > 100) {
|
} else if (scrollTop > 100) {
|
||||||
this.backColor = 1
|
this.backColor = 1
|
||||||
this.isFshow = true
|
this.isFshow = true
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
getCloudShopMerId(id) {
|
getCloudShopMerId(id) {
|
||||||
get_cloud_shop(id).then(res => {
|
get_cloud_shop(id).then(res => {
|
||||||
res.data.length > 0 ? this.isYunCang = 1 : this.isYunCang = 0
|
res.data.length > 0 ? this.isYunCang = 1 : this.isYunCang = 0
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
selectLocation() {
|
selectLocation() {
|
||||||
|
|
||||||
this.showPicker = true
|
this.showPicker = true
|
||||||
},
|
},
|
||||||
confirm(e) {
|
confirm(e) {
|
||||||
@ -432,6 +417,7 @@
|
|||||||
this.street_id = e.value[1].code
|
this.street_id = e.value[1].code
|
||||||
this.town = e.value[1].name
|
this.town = e.value[1].name
|
||||||
this.loadend = false;
|
this.loadend = false;
|
||||||
|
this.$set(this.where, 'page', 1)
|
||||||
this.list(true, this.street_id)
|
this.list(true, this.street_id)
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
|
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
|
||||||
@ -523,6 +509,7 @@
|
|||||||
this.street_id = e.value[1].code
|
this.street_id = e.value[1].code
|
||||||
this.town = e.value[1].name
|
this.town = e.value[1].name
|
||||||
this.loadend = false;
|
this.loadend = false;
|
||||||
|
this.$set(this.where, 'page', 1)
|
||||||
this.list(true, this.street_id)
|
this.list(true, this.street_id)
|
||||||
},
|
},
|
||||||
selfLocation() {
|
selfLocation() {
|
||||||
@ -549,12 +536,13 @@
|
|||||||
this.town = res.data.address_reference.town.title
|
this.town = res.data.address_reference.town.title
|
||||||
this.street_id = res.data.address_reference.town.id
|
this.street_id = res.data.address_reference.town.id
|
||||||
this.street = res.data.address_component.street
|
this.street = res.data.address_component.street
|
||||||
|
this.list(true,this.street_id)
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$bus.$emit('value-updated', this.street + ',' + this
|
this.$bus.$emit('value-updated', this.street + ',' + this
|
||||||
.street_id);
|
.street_id);
|
||||||
|
|
||||||
})
|
})
|
||||||
this.list(this.street_id)
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.isshow = false
|
this.isshow = false
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
@ -150,7 +150,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class='discount' v-else>免运费</view>
|
<view class='discount' v-else>免运费</view>
|
||||||
</view>
|
</view>
|
||||||
<view class='item acea-row row-between-wrapper'
|
<!-- <view class='item acea-row row-between-wrapper'
|
||||||
v-if="!seckillId && order_type != 3 && order_type != 4 && item.order.enabledCoupon">
|
v-if="!seckillId && order_type != 3 && order_type != 4 && item.order.enabledCoupon">
|
||||||
<view>店铺优惠券</view>
|
<view>店铺优惠券</view>
|
||||||
<block v-if="item.coupon.length>0">
|
<block v-if="item.coupon.length>0">
|
||||||
@ -163,7 +163,7 @@
|
|||||||
<block v-else>
|
<block v-else>
|
||||||
<view class='discount'>暂无优惠券</view>
|
<view class='discount'>暂无优惠券</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view> -->
|
||||||
<!-- <view v-if="item.openReceipt == 1" class='item acea-row row-between-wrapper'>
|
<!-- <view v-if="item.openReceipt == 1" class='item acea-row row-between-wrapper'>
|
||||||
<view>开具发票 <text @tap="showInvoice" class="iconfont icon-wenhao1"></text></view>
|
<view>开具发票 <text @tap="showInvoice" class="iconfont icon-wenhao1"></text></view>
|
||||||
<view class='discount discount_voice' @tap="goInvoice(item.mer_id)">
|
<view class='discount discount_voice' @tap="goInvoice(item.mer_id)">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user