pull/2/head
parent
4f9bb936b4
commit
8938ee67c7
|
@ -97,10 +97,13 @@ export function orderData() {
|
||||||
* @param string id
|
* @param string id
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
// export function orderCancel(id) {
|
||||||
|
// return request.post('front/order/cancel', {
|
||||||
|
// id: id
|
||||||
|
// }, {}, 1);
|
||||||
|
// }
|
||||||
export function orderCancel(id) {
|
export function orderCancel(id) {
|
||||||
return request.post('front/order/cancel', {
|
return request.post('front/order/cancel?id=' + id);
|
||||||
id: id
|
|
||||||
}, {}, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -41,14 +41,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="header_bottom">
|
<view class="header_bottom">
|
||||||
<u-swiper
|
<u-swiper :list="bannerList" keyName="picUrl" height="100%" radius="20rpx" bgColor="transparent"
|
||||||
:list="bannerList"
|
@click="goUrl"></u-swiper>
|
||||||
keyName="picUrl"
|
|
||||||
height="100%"
|
|
||||||
radius="20rpx"
|
|
||||||
bgColor="transparent"
|
|
||||||
@click="goUrl"
|
|
||||||
></u-swiper>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="notice" @tap="goNoticeDetail">
|
<view class="notice" @tap="goNoticeDetail">
|
||||||
|
@ -184,7 +178,7 @@
|
||||||
import Loading from '@/components/Loading/index.vue';
|
import Loading from '@/components/Loading/index.vue';
|
||||||
const arrTemp = ["beforePay", "afterPay", "refundApply", "beforeRecharge", "createBargain", "pink"];
|
const arrTemp = ["beforePay", "afterPay", "refundApply", "beforeRecharge", "createBargain", "pink"];
|
||||||
export default {
|
export default {
|
||||||
computed: mapGetters(['isLogin', 'uid']),
|
computed: mapGetters(['isLogin', 'uid','tenantId']),
|
||||||
components: {
|
components: {
|
||||||
tabNav,
|
tabNav,
|
||||||
goodList,
|
goodList,
|
||||||
|
@ -269,7 +263,7 @@
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
},
|
},
|
||||||
vip: {},//会员
|
vip: {}, //会员
|
||||||
tempArr: [], //精品推荐临时数组
|
tempArr: [], //精品推荐临时数组
|
||||||
roll: [], // 新闻简报
|
roll: [], // 新闻简报
|
||||||
site_name: '', //首页title
|
site_name: '', //首页title
|
||||||
|
@ -335,25 +329,24 @@
|
||||||
// Promise.all([this.getAllCategory(), this.getIndexConfig()
|
// Promise.all([this.getAllCategory(), this.getIndexConfig()
|
||||||
// // , this.setVisit()
|
// // , this.setVisit()
|
||||||
// ]);
|
// ]);
|
||||||
|
// #ifdef MP
|
||||||
|
this.getTemlIds()
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getIndexConfig();
|
||||||
getUserInfo().then(res => {
|
getUserInfo().then(res => {
|
||||||
this.userInfo = res.data
|
this.userInfo = res.data
|
||||||
getTenant(153).then(res => {
|
getTenant(this.tenantId).then(res => {
|
||||||
this.tenant = res.data
|
this.tenant = res.data
|
||||||
this.text = res.data.notice
|
this.text = res.data.notice
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
getHeader().then(res => {
|
getHeader().then(res => {
|
||||||
this.vip = res.data
|
this.vip = res.data
|
||||||
console.log(this.vip, '会员')
|
|
||||||
})
|
})
|
||||||
this.getBanners()
|
this.getBanners()
|
||||||
this.getIndexPage()
|
this.getIndexPage()
|
||||||
this.getIndexConfig();
|
|
||||||
// #ifdef MP
|
|
||||||
this.getTemlIds()
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
let self = this
|
let self = this
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: self.site_name
|
title: self.site_name
|
||||||
|
@ -361,20 +354,19 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
goUrl(e){
|
goUrl(e) {
|
||||||
let url = ''
|
let url = ''
|
||||||
if(this.bannerList[e].url.indexOf('http')>=0){
|
if (this.bannerList[e].url.indexOf('http') >= 0) {
|
||||||
url = this.bannerList[e].url
|
url = this.bannerList[e].url
|
||||||
}else{
|
} else {
|
||||||
url = 'http://' + this.bannerList[e].url
|
url = 'http://' + this.bannerList[e].url
|
||||||
}
|
}
|
||||||
window.open(url)
|
window.open(url)
|
||||||
},
|
},
|
||||||
// 跳转会员权益
|
// 跳转会员权益
|
||||||
goEquity(){
|
goEquity() {
|
||||||
console.log('goEmember_equity')
|
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url:'/pages/member_equity/index'
|
url: '/pages/member_equity/index'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 跳转公告详情
|
// 跳转公告详情
|
||||||
|
@ -397,32 +389,23 @@
|
||||||
// 加入购物车
|
// 加入购物车
|
||||||
addCart(id) {
|
addCart(id) {
|
||||||
getSpuDetail(id).then(res => {
|
getSpuDetail(id).then(res => {
|
||||||
console.log(res.data.productValue.默认.id, '1111111111111')
|
|
||||||
let unique = res.data.productValue.默认.id
|
let unique = res.data.productValue.默认.id
|
||||||
postCartAdd({
|
postCartAdd({
|
||||||
productId: id,
|
productId: id,
|
||||||
productAttrUnique: unique,
|
productAttrUnique: unique,
|
||||||
cartNum: 1
|
cartNum: 1
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log('加入成功')
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
go() {
|
go() {
|
||||||
console.log(this.productList, '------')
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取banner和userInfo
|
// 获取banner和userInfo
|
||||||
getBanners() {
|
getBanners() {
|
||||||
|
|
||||||
// console.log(this.$store.tenantId,'tenantId')
|
|
||||||
getBanner().then(res => {
|
getBanner().then(res => {
|
||||||
this.bannerList = [...res.data.list]
|
this.bannerList = [...res.data.list]
|
||||||
console.log(res.data.list,'banner')
|
|
||||||
|
|
||||||
})
|
})
|
||||||
console.log(this.userInfo.userId, 'userInfo111111')
|
|
||||||
|
|
||||||
},
|
},
|
||||||
getCoupon: function(id, index) {
|
getCoupon: function(id, index) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -540,9 +523,7 @@
|
||||||
getIndexPage() {
|
getIndexPage() {
|
||||||
let that = this
|
let that = this
|
||||||
productPage().then(res => {
|
productPage().then(res => {
|
||||||
console.log(res.data.list, '商品列表')
|
|
||||||
this.productList = this.productList.concat(res.data.list)
|
this.productList = this.productList.concat(res.data.list)
|
||||||
console.log(this.productList, '---------')
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getcouponList() {
|
getcouponList() {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<view class="boxs"></view>
|
<view class="boxs"></view>
|
||||||
<view class="tops">
|
<view class="tops">
|
||||||
<view class="shopName">
|
<view class="shopName">
|
||||||
古驰旗舰店>
|
{{orderInfo.orderId}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content" v-for="(item,index) in orderInfo.orderInfoList" :key="item.productId">
|
<view class="content" v-for="(item,index) in orderInfo.orderInfoList" :key="item.productId">
|
||||||
|
@ -37,10 +37,10 @@
|
||||||
{{item.sku}}
|
{{item.sku}}
|
||||||
</view>
|
</view>
|
||||||
<view class="prices">
|
<view class="prices">
|
||||||
<u--text color="#E50202" mode="price" :text="item.proTotalPrice"></u--text>
|
<u--text color="#E50202" mode="price" :text="item.price"></u--text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<div class="sum">x{{item.cartNum}}</div>
|
<div class="sum">x{{item.payNum}}</div>
|
||||||
</view>
|
</view>
|
||||||
<view class="boxs"></view>
|
<view class="boxs"></view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -48,21 +48,21 @@
|
||||||
<view style="height: 1rpx;"></view>
|
<view style="height: 1rpx;"></view>
|
||||||
<view class="priceitems">
|
<view class="priceitems">
|
||||||
<text class="itemsleft">商品总价</text>
|
<text class="itemsleft">商品总价</text>
|
||||||
<text class="itemsright">
|
<view class="itemsright">
|
||||||
<u--text mode="price" :text="orderInfo.proTotalPrice"></u--text>
|
<u--text mode="price" :text="orderInfo.proTotalPrice"></u--text>
|
||||||
</text>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="priceitems">
|
<view class="priceitems">
|
||||||
<text class="itemsleft">运费</text>
|
<text class="itemsleft">运费</text>
|
||||||
<text class="itemsright">
|
<view class="itemsright">
|
||||||
<u--text mode="price" :text="orderInfo.payPostage"></u--text>
|
<u--text mode="price" :text="orderInfo.payPostage"></u--text>
|
||||||
</text>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="priceitems">
|
<view class="priceitems">
|
||||||
<text class="itemsleft">待付金额</text>
|
<text class="itemsleft">待付金额</text>
|
||||||
<text class="itemsright">
|
<view class="itemsright">
|
||||||
<u--text mode="price" :text="orderInfo.totalPrice"></u--text>
|
<u--text mode="price" :text="orderInfo.totalPrice"></u--text>
|
||||||
</text>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="detail">
|
<view class="detail">
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
<text class="detailright">{{orderInfo.createTime}}</text>
|
<text class="detailright">{{orderInfo.createTime}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pay">
|
<!-- <view class="pay">
|
||||||
<view style="height: 1rpx;"></view>
|
<view style="height: 1rpx;"></view>
|
||||||
<view class="title">支付方式</view>
|
<view class="title">支付方式</view>
|
||||||
<view class="payment" @click="isWx=!isWx">
|
<view class="payment" @click="isWx=!isWx">
|
||||||
|
@ -98,13 +98,13 @@
|
||||||
<view :class="[isWx?'radio':'radioNo']"></view>
|
<view :class="[isWx?'radio':'radioNo']"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="zf">
|
<view class="zf">
|
||||||
<view class="zfNumber"> <text>待支付:</text>
|
<view class="zfNumber"> <text>待支付:</text>
|
||||||
<u--text class="text" size="35rpx" mode="price" :text="orderInfo.totalPrice"></u--text>
|
<u--text class="text" size="35rpx" mode="price" :text="orderInfo.totalPrice"></u--text>
|
||||||
</view>
|
</view>
|
||||||
<view class="closeOrder" tap="cancelOrder()">取消订单</view>
|
<view class="closeOrder" @tap="cancelOrder()">取消订单</view>
|
||||||
<view class="orderPay" @tap='pay_open(orderInfo.orderId)'>立即付款</view>
|
<view class="orderPay" @tap='pay_open(orderInfo.orderId)'>立即付款</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -307,10 +307,11 @@
|
||||||
* 打开支付组件
|
* 打开支付组件
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
pay_open: function() {
|
pay_open: function(item) {
|
||||||
this.pay_close = true;
|
console.log(item,'0000000000')
|
||||||
this.pay_order_id = this.orderInfo.orderId;
|
uni.navigateTo({
|
||||||
this.totalPrice = this.orderInfo.payPrice;
|
url: '/pages/goods_cashier/index?order_id=' + item
|
||||||
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 支付成功回调
|
* 支付成功回调
|
||||||
|
@ -494,6 +495,7 @@
|
||||||
},
|
},
|
||||||
cancelOrder() {
|
cancelOrder() {
|
||||||
let self = this
|
let self = this
|
||||||
|
console.log(self)
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确认取消该订单?',
|
content: '确认取消该订单?',
|
||||||
|
@ -618,9 +620,9 @@
|
||||||
|
|
||||||
.shopName {
|
.shopName {
|
||||||
width: 240rpx;
|
width: 240rpx;
|
||||||
overflow: hidden;
|
// overflow: hidden;
|
||||||
white-space: nowrap;
|
// white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
// text-overflow: ellipsis;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-family: PingFang SC;
|
font-family: PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|
|
@ -105,7 +105,7 @@
|
||||||
value="" name="mark" placeholder='请添加备注(150字以内)'></textarea>
|
value="" name="mark" placeholder='请添加备注(150字以内)'></textarea>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class='wrapper borRadius14'>
|
<!-- <view class='wrapper borRadius14'>
|
||||||
<view class='item'>
|
<view class='item'>
|
||||||
<view>支付方式</view>
|
<view>支付方式</view>
|
||||||
<view class='list'>
|
<view class='list'>
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class='moneyList borRadius14'>
|
<view class='moneyList borRadius14'>
|
||||||
<view class='item acea-row row-between-wrapper'>
|
<view class='item acea-row row-between-wrapper'>
|
||||||
<view>商品总价:</view>
|
<view>商品总价:</view>
|
||||||
|
@ -156,7 +156,7 @@
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<!-- <home></home> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -616,6 +616,7 @@
|
||||||
payment: function(data) {
|
payment: function(data) {
|
||||||
let that = this;
|
let that = this;
|
||||||
orderCreate(data).then(res => {
|
orderCreate(data).then(res => {
|
||||||
|
console.log(res.data,'订单信息')
|
||||||
that.getOrderPay(res.data.orderNo, '支付成功');
|
that.getOrderPay(res.data.orderNo, '支付成功');
|
||||||
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
@ -627,149 +628,151 @@
|
||||||
},
|
},
|
||||||
getOrderPay: function(orderNo, message) {
|
getOrderPay: function(orderNo, message) {
|
||||||
let that = this;
|
let that = this;
|
||||||
let goPages = '/pages/order_pay_status/index?order_id=' + orderNo + '&msg=' + message;
|
uni.navigateTo({
|
||||||
wechatOrderPay({
|
url: '/pages/goods_cashier/index?order_id=' + orderNo
|
||||||
orderNo: orderNo,
|
|
||||||
payChannel: that.payChannel,
|
|
||||||
payType: that.payType,
|
|
||||||
scene: that.productType==='normal'? 0 :1177 //下单时小程序的场景值
|
|
||||||
}).then(res => {
|
|
||||||
let jsConfig = res.data.jsConfig;
|
|
||||||
switch (res.data.payType) {
|
|
||||||
case 'weixin':
|
|
||||||
// #ifdef MP
|
|
||||||
uni.requestPayment({
|
|
||||||
timeStamp: jsConfig.timeStamp,
|
|
||||||
nonceStr: jsConfig.nonceStr,
|
|
||||||
package: jsConfig.packages,
|
|
||||||
signType: jsConfig.signType,
|
|
||||||
paySign: jsConfig.paySign,
|
|
||||||
ticket: that.productType==='normal'? null : jsConfig.ticket,
|
|
||||||
success: function(ress) {
|
|
||||||
uni.hideLoading();
|
|
||||||
wechatQueryPayResult(orderNo).then(res => {
|
|
||||||
uni.hideLoading();
|
|
||||||
if (that.orderInfoVo.bargainId || that.orderInfoVo.combinationId || that.pinkId || that
|
|
||||||
.orderInfoVo.seckillId)
|
|
||||||
return that.$util.Tips({
|
|
||||||
title: '支付成功',
|
|
||||||
icon: 'success'
|
|
||||||
}, {
|
|
||||||
tab: 4,
|
|
||||||
url: goPages
|
|
||||||
});
|
|
||||||
return that.$util.Tips({
|
|
||||||
title: '支付成功',
|
|
||||||
icon: 'success'
|
|
||||||
}, {
|
|
||||||
tab: 5,
|
|
||||||
url: goPages
|
|
||||||
});
|
|
||||||
}).cache(err => {
|
|
||||||
uni.hideLoading();
|
|
||||||
return that.$util.Tips({
|
|
||||||
title: err
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
|
// wechatOrderPay({
|
||||||
|
// orderNo: orderNo,
|
||||||
|
// payChannel: that.payChannel,
|
||||||
|
// payType: that.payType,
|
||||||
|
// scene: that.productType==='normal'? 0 :1177 //下单时小程序的场景值
|
||||||
|
// }).then(res => {
|
||||||
|
// let jsConfig = res.data.jsConfig;
|
||||||
|
// switch (res.data.payType) {
|
||||||
|
// case 'weixin':
|
||||||
|
// // #ifdef MP
|
||||||
|
// uni.requestPayment({
|
||||||
|
// timeStamp: jsConfig.timeStamp,
|
||||||
|
// nonceStr: jsConfig.nonceStr,
|
||||||
|
// package: jsConfig.packages,
|
||||||
|
// signType: jsConfig.signType,
|
||||||
|
// paySign: jsConfig.paySign,
|
||||||
|
// ticket: that.productType==='normal'? null : jsConfig.ticket,
|
||||||
|
// success: function(ress) {
|
||||||
|
// uni.hideLoading();
|
||||||
|
// wechatQueryPayResult(orderNo).then(res => {
|
||||||
|
// uni.hideLoading();
|
||||||
|
// if (that.orderInfoVo.bargainId || that.orderInfoVo.combinationId || that.pinkId || that
|
||||||
|
// .orderInfoVo.seckillId)
|
||||||
|
// return that.$util.Tips({
|
||||||
|
// title: '支付成功',
|
||||||
|
// icon: 'success'
|
||||||
|
// }, {
|
||||||
|
// tab: 4,
|
||||||
|
// url: goPages
|
||||||
|
// });
|
||||||
|
// return that.$util.Tips({
|
||||||
|
// title: '支付成功',
|
||||||
|
// icon: 'success'
|
||||||
|
// }, {
|
||||||
|
// tab: 5,
|
||||||
|
// url: goPages
|
||||||
|
// });
|
||||||
|
// }).cache(err => {
|
||||||
|
// uni.hideLoading();
|
||||||
|
// return that.$util.Tips({
|
||||||
|
// title: err
|
||||||
|
// });
|
||||||
|
// })
|
||||||
|
|
||||||
},
|
// },
|
||||||
fail: function(e) {
|
// fail: function(e) {
|
||||||
uni.hideLoading();
|
// uni.hideLoading();
|
||||||
return that.$util.Tips({
|
// return that.$util.Tips({
|
||||||
title: '取消支付'
|
// title: '取消支付'
|
||||||
}, {
|
// }, {
|
||||||
tab: 5,
|
// tab: 5,
|
||||||
url: goPages + '&status=2'
|
// url: goPages + '&status=2'
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
complete: function(e) {
|
// complete: function(e) {
|
||||||
uni.hideLoading();
|
// uni.hideLoading();
|
||||||
//关闭当前页面跳转至订单状态
|
// //关闭当前页面跳转至订单状态
|
||||||
if (e.errMsg == 'requestPayment:cancel') return that.$util
|
// if (e.errMsg == 'requestPayment:cancel') return that.$util
|
||||||
.Tips({
|
// .Tips({
|
||||||
title: '取消支付'
|
// title: '取消支付'
|
||||||
}, {
|
// }, {
|
||||||
tab: 5,
|
// tab: 5,
|
||||||
url: goPages + '&status=2'
|
// url: goPages + '&status=2'
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
})
|
// })
|
||||||
// #endif
|
// // #endif
|
||||||
// #ifdef H5
|
// // #ifdef H5
|
||||||
let data = {
|
// let data = {
|
||||||
timestamp: jsConfig.timeStamp,
|
// timestamp: jsConfig.timeStamp,
|
||||||
nonceStr: jsConfig.nonceStr,
|
// nonceStr: jsConfig.nonceStr,
|
||||||
package: jsConfig.packages,
|
// package: jsConfig.packages,
|
||||||
signType: jsConfig.signType,
|
// signType: jsConfig.signType,
|
||||||
paySign: jsConfig.paySign
|
// paySign: jsConfig.paySign
|
||||||
};
|
// };
|
||||||
that.$wechat.pay(data).then(res => {
|
// that.$wechat.pay(data).then(res => {
|
||||||
if (res.errMsg == 'chooseWXPay:cancel') {
|
// if (res.errMsg == 'chooseWXPay:cancel') {
|
||||||
uni.hideLoading();
|
// uni.hideLoading();
|
||||||
return that.$util.Tips({
|
// return that.$util.Tips({
|
||||||
title: '取消支付'
|
// title: '取消支付'
|
||||||
}, {
|
// }, {
|
||||||
tab: 5,
|
// tab: 5,
|
||||||
url: goPages + '&status=2'
|
// url: goPages + '&status=2'
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
wechatQueryPayResult(orderNo).then(res => {
|
// wechatQueryPayResult(orderNo).then(res => {
|
||||||
uni.hideLoading();
|
// uni.hideLoading();
|
||||||
return that.$util.Tips({
|
// return that.$util.Tips({
|
||||||
title: '支付成功',
|
// title: '支付成功',
|
||||||
icon: 'success'
|
// icon: 'success'
|
||||||
}, {
|
// }, {
|
||||||
tab: 5,
|
// tab: 5,
|
||||||
url: goPages
|
// url: goPages
|
||||||
});
|
// });
|
||||||
}).cache(err => {
|
// }).cache(err => {
|
||||||
uni.hideLoading();
|
// uni.hideLoading();
|
||||||
return that.$util.Tips({
|
// return that.$util.Tips({
|
||||||
title: err
|
// title: err
|
||||||
});
|
// });
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
}).cache(res => {
|
// }).cache(res => {
|
||||||
uni.hideLoading();
|
// uni.hideLoading();
|
||||||
return that.$util.Tips({
|
// return that.$util.Tips({
|
||||||
title: '取消支付'
|
// title: '取消支付'
|
||||||
}, {
|
// }, {
|
||||||
tab: 5,
|
// tab: 5,
|
||||||
url: goPages + '&status=0'
|
// url: goPages + '&status=0'
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
// #endif
|
// // #endif
|
||||||
break;
|
// break;
|
||||||
case 'yue':
|
// case 'yue':
|
||||||
uni.hideLoading();
|
// uni.hideLoading();
|
||||||
return that.$util.Tips({
|
// return that.$util.Tips({
|
||||||
title: message
|
// title: message
|
||||||
}, {
|
// }, {
|
||||||
tab: 5,
|
// tab: 5,
|
||||||
url: goPages + '&status=1'
|
// url: goPages + '&status=1'
|
||||||
});
|
// });
|
||||||
break;
|
// break;
|
||||||
case 'weixinh5':
|
// case 'weixinh5':
|
||||||
uni.hideLoading();
|
// uni.hideLoading();
|
||||||
that.$util.Tips({
|
// that.$util.Tips({
|
||||||
title: '订单创建成功'
|
// title: '订单创建成功'
|
||||||
}, {
|
// }, {
|
||||||
tab: 5,
|
// tab: 5,
|
||||||
url: goPages + '&status=0'
|
// url: goPages + '&status=0'
|
||||||
});
|
// });
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
location.href = jsConfig.mwebUrl + '&redirect_url=' + window.location
|
// location.href = jsConfig.mwebUrl + '&redirect_url=' + window.location
|
||||||
.protocol + '//' + window.location.host +
|
// .protocol + '//' + window.location.host +
|
||||||
goPages + '&status=1';
|
// goPages + '&status=1';
|
||||||
}, 100)
|
// }, 100)
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}).catch(err => {
|
// }).catch(err => {
|
||||||
uni.hideLoading();
|
// uni.hideLoading();
|
||||||
return that.$util.Tips({
|
// return that.$util.Tips({
|
||||||
title: err
|
// title: err
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
getPayType: function(status, orderId, message, jsConfig) {
|
getPayType: function(status, orderId, message, jsConfig) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -961,14 +964,7 @@
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '订单支付中'
|
title: '订单支付中'
|
||||||
});
|
});
|
||||||
// #ifdef MP
|
|
||||||
openPaySubscribe().then(() => {
|
|
||||||
that.payment(data);
|
that.payment(data);
|
||||||
});
|
|
||||||
// #endif
|
|
||||||
// #ifndef MP
|
|
||||||
that.payment(data);
|
|
||||||
// #endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue