|
|
@@ -1,9 +1,5 @@
|
|
|
<template>
|
|
|
<div class="app-content pay-wrap">
|
|
|
- <!-- 加载状态 -->
|
|
|
- <div class="loading-wrap" v-if="$util.isEmpty(orderShop)">
|
|
|
- <div class="loading-text">正在加载...</div>
|
|
|
- </div>
|
|
|
|
|
|
<div class="delivery-wrap" v-if="!$util.isEmpty(orderShop)">
|
|
|
<div class="shop-logo-wrap" v-if="!$util.isEmpty(orderShop)">
|
|
|
@@ -126,19 +122,9 @@
|
|
|
onLoad(option) {
|
|
|
// #ifdef H5
|
|
|
this.specialInit()
|
|
|
- // #endif
|
|
|
- // #ifndef H5
|
|
|
- this.specialInit()
|
|
|
- // #endif
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- // H5环境下确保数据加载完成
|
|
|
- // #ifdef H5
|
|
|
- if (this.$util.isEmpty(this.orderShop)) {
|
|
|
- this.specialInit()
|
|
|
- }
|
|
|
// #endif
|
|
|
},
|
|
|
+ mounted() {},
|
|
|
methods: {
|
|
|
fillGetMan(){
|
|
|
this.tabIndex = this.tabIndex == 0 ? 1 : 0
|
|
|
@@ -155,36 +141,24 @@
|
|
|
this.tabIndex = parseInt(this.option.pageType)
|
|
|
}
|
|
|
getOrderShop(true).then(res => {
|
|
|
- if (res) {
|
|
|
- this.inpFocus = true
|
|
|
- uni.setNavigationBarTitle({
|
|
|
- title: `向【${res.shop.showName}】付款`
|
|
|
- })
|
|
|
- this.$refs.couponSel._getUserDiscount().then(status => {
|
|
|
- this.discountArr = status
|
|
|
- })
|
|
|
- // 设置分享
|
|
|
- let shareParams = {
|
|
|
- title: `点我付款`, // 分享标题
|
|
|
- desc: '享随机优惠,最高20元', // 分享内容
|
|
|
- imgUrl: '',
|
|
|
- pagePath: `/pages/pay/index?account=${res.shop.id}&store=0&fromType=3`
|
|
|
- }
|
|
|
- // #ifdef MP-WEIXIN
|
|
|
- this.jweixinFn(shareParams)
|
|
|
- // #endif
|
|
|
- console.log(`/pages/pay/index?account=${res.shop.id}&store=0&fromType=3`)
|
|
|
- } else {
|
|
|
- // H5环境下数据获取失败的处理
|
|
|
- // #ifdef H5
|
|
|
- this.$msg('数据加载失败,请刷新页面重试')
|
|
|
- // #endif
|
|
|
+ this.inpFocus = true
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
+ title: `向【${res.shop.showName}】付款`
|
|
|
+ })
|
|
|
+ this.$refs.couponSel._getUserDiscount().then(status => {
|
|
|
+ this.discountArr = status
|
|
|
+ })
|
|
|
+ // 设置分享
|
|
|
+ let shareParams = {
|
|
|
+ title: `点我付款`, // 分享标题
|
|
|
+ desc: '享随机优惠,最高20元', // 分享内容
|
|
|
+ imgUrl: '',
|
|
|
+ pagePath: `/pages/pay/index?account=${res.shop.id}&store=0&fromType=3`
|
|
|
}
|
|
|
- }).catch(err => {
|
|
|
- console.error('获取订单商店信息失败:', err)
|
|
|
- // #ifdef H5
|
|
|
- this.$msg('网络异常,请检查网络连接')
|
|
|
- // #endif
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ this.jweixinFn(shareParams)
|
|
|
+ // #endif
|
|
|
+ console.log(`/pages/pay/index?account=${res.shop.id}&store=0&fromType=3`)
|
|
|
})
|
|
|
},
|
|
|
_pay() {
|
|
|
@@ -312,19 +286,6 @@
|
|
|
min-height: calc(100vh - 20upx);
|
|
|
padding-top: 20upx;
|
|
|
}
|
|
|
-
|
|
|
- // 加载状态样式
|
|
|
- .loading-wrap {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- height: 400upx;
|
|
|
- .loading-text {
|
|
|
- font-size: 28upx;
|
|
|
- color: #999;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
.tabs-wrap {
|
|
|
position: fixed;
|
|
|
top: 0;
|