|
|
@@ -1,24 +1,18 @@
|
|
|
<template>
|
|
|
- <!-- 各种回调页面 -->
|
|
|
<div class="app-content" :class="[contentClass]">
|
|
|
<div class="callback-wrap">
|
|
|
<div class="callback-blo">
|
|
|
- <!-- 使用icon -->
|
|
|
- <!-- 待支付 -->
|
|
|
<block v-if="pageStatus == 1 || pageStatus == 2">
|
|
|
<div class="icon">
|
|
|
<i class="iconfont icondaizhifu"></i>
|
|
|
</div>
|
|
|
</block>
|
|
|
- <!-- 使用图片 -->
|
|
|
- <!-- 支付成功 -->
|
|
|
<block v-else>
|
|
|
<div class="status-img">
|
|
|
<img :src="`${constant.imgUrl}/retail/callback/success.png`" alt mode="widthFix" />
|
|
|
</div>
|
|
|
</block>
|
|
|
<div class="status-text app-size-36 app-bold">{{ pageTit }}</div>
|
|
|
- <!-- 待支付 -->
|
|
|
<block v-if="pageStatus == 1 || pageStatus == 2">
|
|
|
<div class="price">
|
|
|
<span>¥</span>
|
|
|
@@ -26,7 +20,6 @@
|
|
|
</div>
|
|
|
<div class="order-num app-color-3">订单号: {{ option.orderSn }}</div>
|
|
|
</block>
|
|
|
- <!-- 待支付 - 订单支付成功 -->
|
|
|
<block v-else-if="pageStatus == 3 && payDiscountPrice >0">
|
|
|
<div>
|
|
|
<span v-if="payDiscountType == 0" class="app-color-2">使用优惠券为您省</span>
|
|
|
@@ -36,19 +29,15 @@
|
|
|
<span class="app-price">{{ payDiscountPrice }}元</span>
|
|
|
</div>
|
|
|
</block>
|
|
|
-
|
|
|
<block v-if="pageStatus == 1 || pageStatus == 2">
|
|
|
<div class="call-one-btn">
|
|
|
<button v-if="isYeBtnShow" class="button-com red pay-ye" @click="balancePayFn">余额支付</button>
|
|
|
<button class="button-com green pay-wx" @click="wxPayFn">微信支付</button>
|
|
|
</div>
|
|
|
</block>
|
|
|
-
|
|
|
<block v-else-if="pageStatus == 3 || pageStatus == 4 || pageStatus == 5">
|
|
|
- <div class="call-btn-com call-two-btn">
|
|
|
- <button class="button-com default" @click="pageTo({ url: '/pages/order/detail', type: 2, query: { id: option.id } })" >查看订单</button>
|
|
|
- <navigator open-type="switchTab" url="/pages/home/index" class="button-com" >返回首页</navigator>
|
|
|
- </div>
|
|
|
+ <div class="call-btn-com call-two-btn" v-if="$util.isEmpty(loginInfo)"> <button class="button-com" @click="register()" >注册会员</button> </div>
|
|
|
+ <div class="call-btn-com call-two-btn"> <button class="button-com default" @click="goBack()" >返回</button></div>
|
|
|
</block>
|
|
|
</div>
|
|
|
<div class="coupon-wrap" v-if="option.pageStatus == 5">
|
|
|
@@ -60,56 +49,25 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <modal-module
|
|
|
- :show="passwordModal"
|
|
|
- @cancel="modalCancel"
|
|
|
- @click="passwordModalClick"
|
|
|
- :maskClosable="false"
|
|
|
- title="支付密码"
|
|
|
- padding="30upx 30upx"
|
|
|
- >
|
|
|
+ <modal-module :show="passwordModal" @cancel="modalCancel" @click="passwordModalClick" :maskClosable="false" title="支付密码" padding="30upx 30upx" >
|
|
|
<template v-slot:content>
|
|
|
<div class="app-modal-input-wrap">
|
|
|
<div class="inp-list-line">
|
|
|
- <!-- <div class="line-label">支付密码</div> -->
|
|
|
<div class="line-input">
|
|
|
- <input
|
|
|
- type="password"
|
|
|
- v-model="form.payPassword"
|
|
|
- :adjust-position="false"
|
|
|
- class="inp-input"
|
|
|
- />
|
|
|
+ <input type="password" v-model="form.payPassword" :adjust-position="false" class="inp-input" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</modal-module>
|
|
|
- <!-- 未设置支付密码弹窗 -->
|
|
|
- <alert-module
|
|
|
- :show="setPassModal"
|
|
|
- btnText="去设置"
|
|
|
- btnColor="#FF2842"
|
|
|
- padding="66upx 24upx 66upx 24upx"
|
|
|
- @click="hideAlert"
|
|
|
- >
|
|
|
+ <alert-module :show="setPassModal" btnText="去设置" btnColor="#FF2842" padding="66upx 24upx 66upx 24upx" @click="hideAlert" >
|
|
|
<div class="go-login-module">
|
|
|
- <div>暂未设置密码,去设置密码!</div>
|
|
|
+ <div>请先设置密码</div>
|
|
|
</div>
|
|
|
</alert-module>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-/** *
|
|
|
- * 页面状态
|
|
|
- * @parmas pageStatus 进入页面的状态
|
|
|
- * @parmas 1 待支付 - 余额支付 或者 微信支付 -- awaitPayYe
|
|
|
- * @parmas 2 待支付 - 微信支付 -- awaitPayWx
|
|
|
- * @parmas 3 支付成功 -- successPay
|
|
|
- * @parmas 4 评价成功 -- successEval
|
|
|
- * @parmas 5 支付成功 - 扫码支付 -- successPayCode
|
|
|
- * @parmas 6 申请成功 - 申请会员 -- registerMember
|
|
|
- */
|
|
|
import { mapGetters } from "vuex";
|
|
|
import ModalModule from "@/components/plugin/modal";
|
|
|
import AlertModule from "@/components/plugin/alert";
|
|
|
@@ -117,7 +75,7 @@ import wexinPay from "@/utils/pay/wxPay";
|
|
|
import { getShopUser } from "@/utils/auth";
|
|
|
import { balancePay, wxPay } from "@/api/order";
|
|
|
export default {
|
|
|
- name: "callback",
|
|
|
+ name: "index",
|
|
|
components: {
|
|
|
ModalModule,
|
|
|
AlertModule
|
|
|
@@ -140,23 +98,26 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters({ shopUser: "getShopUser" })
|
|
|
+ ...mapGetters({ shopUser: "getShopUser",loginInfo:"getLoginInfo" })
|
|
|
},
|
|
|
- onLoad() {},
|
|
|
methods: {
|
|
|
+ register(){
|
|
|
+ let account = uni.getStorageSync('account')
|
|
|
+ this.$util.pageTo({url: "/pages/login/index?account="+account,type:2})
|
|
|
+ },
|
|
|
+ goBack(){
|
|
|
+ uni.navigateBack({})
|
|
|
+ },
|
|
|
init() {
|
|
|
-
|
|
|
if(this.option.totalPrice){
|
|
|
this.totalPrice = parseFloat(Number(this.option.totalPrice))
|
|
|
}
|
|
|
-
|
|
|
this.pageStatus = this.option.pageStatus;
|
|
|
this.payDiscountPrice = this.option.payDiscountPrice;
|
|
|
this.payDiscountType = this.option.payDiscountType;
|
|
|
this.initClass(this.pageStatus);
|
|
|
getShopUser(true);
|
|
|
},
|
|
|
- // 余额支付
|
|
|
_balancePay() {
|
|
|
if (!this.form.payPassword) {
|
|
|
this.$msg("请先输入支付密码!");
|
|
|
@@ -262,7 +223,6 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
-
|
|
|
<style lang="scss" scoped>
|
|
|
.app-content {
|
|
|
.callback-wrap {
|
|
|
@@ -290,7 +250,7 @@ export default {
|
|
|
margin: 0 auto;
|
|
|
}
|
|
|
.call-btn-com {
|
|
|
- margin-top: 56upx;
|
|
|
+ margin-top:30upx;
|
|
|
@include disFlex(center, space-evenly);
|
|
|
}
|
|
|
// 一个按钮
|
|
|
@@ -311,9 +271,6 @@ export default {
|
|
|
padding-bottom: 22upx;
|
|
|
font-size: 32upx;
|
|
|
}
|
|
|
- .default {
|
|
|
- margin-right: 20upx;
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
// 优惠券
|
|
|
@@ -331,7 +288,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-// 待支付 - 公共
|
|
|
.awaitPayWx,
|
|
|
.awaitPayYe {
|
|
|
.status-text {
|
|
|
@@ -349,7 +305,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-// 待支付 - 余额
|
|
|
.registerMember,
|
|
|
.successPay,
|
|
|
.successPayCode,
|
|
|
@@ -360,7 +315,6 @@ export default {
|
|
|
margin-bottom: 52upx;
|
|
|
}
|
|
|
}
|
|
|
-// 提交成功
|
|
|
.registerMember {
|
|
|
.call-back-wrap {
|
|
|
.qr-code-img {
|