支付回调修改

This commit is contained in:
jia 2023-09-26 21:55:14 +08:00
parent 48e1f72f3f
commit 2427899247
5 changed files with 35 additions and 44 deletions

View File

@ -9,8 +9,8 @@ let httpApiThree
let httpApiFour
// 在打包之前请检查当前环境是否正确
const env = 'dev'; // 开发
// const env = 'prod'; // 生产
// const env = 'dev'; // 开发
const env = 'prod'; // 生产
// const env = 'prew'; // 预上线
switch (env) {

View File

@ -2,8 +2,8 @@
"name" : "惠农生活",
"appid" : "__UNI__3A527D1",
"description" : "",
"versionName" : "1.4.4",
"versionCode" : 144,
"versionName" : "1.4.5",
"versionCode" : 145,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -121,31 +121,34 @@
title: '暂时无需缴纳保证金'
});
} else {
let that = this
uni.showModal({
title: '提示',
content: '商户' + this.merchant_Data.mer_name + '是否同意缴纳保证金',
success: function(res) {
if (res.confirm) {
// console.log('');
paymerchant().then((res) => {
console.log(res.data)
uni.requestPayment({
provider: 'wxpay',
orderInfo: res.data
.config, //
success: function(res) {
this.$util.Tips({
that.$util.Tips({
title: '支付成功'
});
console.log('success:' + JSON.stringify(res));
setTimeout(()=>{
this.decimal()
this.list(true)
},1000)
setTimeout(() => {
that.decimal()
that.list(true)
}, 1000)
},
fail: function(err) {
this.$util.Tips({
that.$util.Tips({
title: '支付失败'
});
console.log('fail:' + JSON.stringify(err));

View File

@ -20,7 +20,7 @@
<view class="" v-if="!isFshow">
<view class="site-box1 flex_a_c_j_sb">
<view class="place_wrapper flex_a_c" @click="selectLocation">
<view class="place_wrapper flex_a_c" @click="selectLocation">
<view class="iconfont icon-weizhi"></view>
<view class="town_name">{{street}}</view>
</view>
@ -175,7 +175,7 @@
import {
getIndexData,
getDiy,
cloudWarehouse
cloudWarehouse
} from '@/api/api.js'
import {
@ -248,17 +248,13 @@
},
onPullDownRefresh() {
this.list(true);
this.list(true, this.street_id);
this.Area()
uni.stopPullDownRefresh()
},
onLoad() {
this.list()
this.Area()
this.selfLocation()
// this.openTongZhi()
uni.$on('connectstatusChange', (connectstatus) => {
var connectstr = ''
@ -275,10 +271,10 @@
onReachBottom() {
if (this.productList.length > 0) {
setTimeout(() => {
this.list(false);
this.list(false, this.street_id);
}, 500)
} else {
this.list()
this.list(true, this.street_id)
}
@ -299,13 +295,12 @@
this.street = newValue.split(',')[0]
this.town = newValue.split(',')[0]
this.street_id = newValue.split(',')[1]
});
if (this.street.length <= 0) {
this.selfLocation()
}
},
// #ifdef APP-PLUS
@ -335,7 +330,6 @@
},
//
list(isPage, id) {
// console.log('1111111')
let that = this;
if (that.loadend) return;
if (that.loading) return;
@ -345,10 +339,10 @@
that.loading = true;
that.loadTitle = '';
cloudWarehouse({
page:that.where.page,
limit:that.where.limit,
street_code:id,
category_id:0
page: that.where.page,
limit: that.where.limit,
street_code: id,
category_id: 0
}).then(res => {
// console.log(222)
let list = res.data.list;
@ -405,25 +399,16 @@
} else if (scrollTop > 100) {
this.backColor = 1
this.isFshow = true
}
},
getCloudShopMerId(id) {
get_cloud_shop(id).then(res => {
res.data.length > 0 ? this.isYunCang = 1 : this.isYunCang = 0
})
},
selectLocation() {
this.showPicker = true
},
confirm(e) {
@ -432,7 +417,8 @@
this.street_id = e.value[1].code
this.town = e.value[1].name
this.loadend = false;
this.list(true, this.street_id)
this.$set(this.where, 'page', 1)
this.list(true, this.street_id)
this.$nextTick(() => {
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.town = e.value[1].name
this.loadend = false;
this.$set(this.where, 'page', 1)
this.list(true, this.street_id)
},
selfLocation() {
@ -549,12 +536,13 @@
this.town = res.data.address_reference.town.title
this.street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street
this.list(true,this.street_id)
this.$nextTick(() => {
this.$bus.$emit('value-updated', this.street + ',' + this
.street_id);
})
this.list(this.street_id)
}).catch(err => {
this.isshow = false
uni.showToast({

View File

@ -150,7 +150,7 @@
</view>
<view class='discount' v-else>免运费</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">
<view>店铺优惠券</view>
<block v-if="item.coupon.length>0">
@ -163,7 +163,7 @@
<block v-else>
<view class='discount'>暂无优惠券</view>
</block>
</view>
</view> -->
<!-- <view v-if="item.openReceipt == 1" class='item acea-row row-between-wrapper'>
<view>开具发票 <text @tap="showInvoice" class="iconfont icon-wenhao1"></text></view>
<view class='discount discount_voice' @tap="goInvoice(item.mer_id)">