liudan 1 month ago
parent 79d992ba8b
commit 70519be48d
  1. 14
      pages/checkout/cashier/index.vue
  2. 30
      pages/login/components/register.vue
  3. 7
      pages/login/register.vue
  4. 40
      pages/order/detail.vue

@ -31,7 +31,7 @@
<view class="item-left_text" v-if="item.method=='point'">
<text>{{ PayMethodEnum[item.method].name }}</text>
<view class="pointInfo">
当前可用积分{{personal.points}}可抵0.95
当前可用积分{{order.pointsNum}}可抵{{order.pointsMoney}}
</view>
</view>
<view v-if="item.method === PayMethodEnum.BALANCE.value" class="user-balance">
@ -315,6 +315,7 @@
}
console.log(PayMethodEnum,"nnnnn")
const paymentData = result.data.payment
console.log(this.order.pay_price,"1234")
//
if (method === PayMethodEnum.BALANCE.value) {
app.onShowSuccess(result)
@ -330,9 +331,14 @@
//
if (method === PayMethodEnum.WECHAT.value) {
console.log('paymentData', paymentData)
Wechat.payment({ orderKey: app.orderId, ...paymentData })
.then(res => app.onPaySuccess(res))
.catch(err => app.onPayFail(err))
if(this.order.pay_price!='0.00'){
Wechat.payment({ orderKey: app.orderId, ...paymentData })
.then(res => app.onPaySuccess(res))
.catch(err => app.onPayFail(err))
}else{
this.onShowSuccess('订单支付成功')
}
}
},

@ -101,9 +101,9 @@ export default{
default: () => false
},
//
partyData: {
type: Object
},
// partyData: {
// type: Object
// },
},
data(){
@ -115,7 +115,7 @@ export default{
smsCode:'',
is_register:1,
refereeId:false,
isParty:false,
isParty:true,
squied_type:2,
squied_mobile:'',
squied_smsCode:'',
@ -129,6 +129,11 @@ export default{
isLoading: false,
captchaCode: '',
captcha: {},
partyData:{
code: null,
oauth: 'MP-WEIXIN',
userInfo:{}
}
}
},
methods:{
@ -274,10 +279,25 @@ export default{
}
}, 1000)
},
getCode() {
return new Promise((resolve, reject) => {
uni.login({
provider: 'weixin',
success({ code }) {
console.log('code', code)
resolve(code)
},
fail: reject
})
})
},
//
handleLogin() {
async handleLogin() {
const app = this
if (!app.isLoading && app.formValidation(SUBMIT_LOGIN)) {
this.partyData.code = await app.getCode();
console.log(await app.getCode())
app.submitLogin()
}
},

@ -1,10 +1,10 @@
<template>
<view v-if="isLoad" class="login" :style="appThemeStyle">
<!-- <MpWeixin v-if="isMpWeixinAuth" @success="onGetUserInfoSuccess" />
<WxOfficial v-else-if="isWxOfficialAuth" @success="onGetUserInfoSuccess" />
<!-- <MpWeixin v-if="isMpWeixinAuth" @success="onGetUserInfoSuccess" /> -->
<!-- <WxOfficial v-else-if="isWxOfficialAuth" @success="onGetUserInfoSuccess" />
<MpAlipay v-else-if="isMpAlipayAuth" @success="onGetUserInfoSuccess" />
<Main v-else :isParty="isParty" :partyData="partyData" :isMpWeixinMobile="isMpWeixinMobile" /> -->
<register :isParty="isParty" :partyData="partyData" :isMpWeixinMobile="isMpWeixinMobile" />
<register :isParty="isParty" :isMpWeixinMobile="isMpWeixinMobile" />
</view>
</template>
@ -58,7 +58,6 @@
},
methods: {
// [--]
async getRegisterSetting() {
this.setting = await SettingModel.item(SettingKeyEnum.REGISTER.value, false)

@ -18,7 +18,10 @@
<!-- 待收货 -->
<block v-else-if="order.receipt_status == ReceiptStatusEnum.NOT_RECEIVED.value">
<image class="image" src="/static/order/status/wait_receipt.png" mode="aspectFit"></image>
</block>
<view class="qujianma" v-if="order.ziti_address">
取件码{{order.order_id}}
</view>
</block>
</block>
<!-- 已完成 -->
<block v-if="order.order_status == OrderStatusEnum.COMPLETED.value">
@ -32,6 +35,7 @@
<view class="status-text">
<text>{{ order.state_text }}</text>
</view>
</view>
<!-- 下一步操作 -->
<!-- <view class="next-action" v-if="order.order_status == OrderStatusEnum.NORMAL.value">
@ -49,12 +53,12 @@
<!-- 快递配送配送地址 -->
<view v-if="order.delivery_type == DeliveryTypeEnum.EXPRESS.value" class="delivery-address i-card">
<view class="link-man">
<text class="name">{{ order.address.name }}</text>
<text class="phone">{{ order.address.phone }}</text>
<text class="name">{{ order.address?order.address.name:'' }}</text>
<text class="phone">{{ order.address?order.address.phone:'' }}</text>
</view>
<view class="address">
<text class="region" v-for="(region, idx) in order.address.region" :key="idx">{{ region }}</text>
<text class="detail">{{ order.address.detail }}</text>
<text class="detail">{{ order.address&&order.address.detail }}</text>
</view>
</view>
@ -307,11 +311,11 @@
</view>
<view class="addrContent">
<view class="personInfo">
收货地址{{ order.address.name }} {{ order.address.phone }}
收货地址{{ order.address?order.address.name:'' }} {{ order.address?order.address.phone:'' }}
</view>
<view class="addressText">
<text class="region" v-for="(region, idx) in order.address.region" :key="idx">{{ region }}</text>
<text class="detail">{{ order.address.detail }}</text>
<text class="detail">{{ order.address?order.address.detail:'' }}</text>
</view>
</view>
</view>
@ -393,6 +397,11 @@
OrderApi.detail(app.orderId)
.then(result => {
app.order = result.data.order
if(app.order.address){
app.order.address = app.order.address
}else{
app.order.address = app.order.ziti_address
}
app.setting = result.data.setting
app.isLoading = false
})
@ -520,7 +529,7 @@
background-color: #F92404;
height: 280rpx;
padding: 56rpx 30rpx 0 30rpx;
position: relative;
.order-status {
display: flex;
align-items: center;
@ -580,6 +589,8 @@
box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05);
margin: 0 auto 20rpx auto;
border-radius: 20rpx;
position: relative;
z-index: 9;
}
//
@ -1015,4 +1026,19 @@
margin-top:22rpx;
}
}
.shouhuo{
border:1px solid #000;
}
.qujianma{
position: absolute;
right: 25rpx;
top: 50%;
transform: translateY(-50%);
z-index:2;
font-family: Source Han Sans SC;
font-weight: 400;
font-size: 36rpx;
color: #FFFFFF;
}
</style>
Loading…
Cancel
Save