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

@ -101,9 +101,9 @@ export default{
default: () => false default: () => false
}, },
// //
partyData: { // partyData: {
type: Object // type: Object
}, // },
}, },
data(){ data(){
@ -115,7 +115,7 @@ export default{
smsCode:'', smsCode:'',
is_register:1, is_register:1,
refereeId:false, refereeId:false,
isParty:false, isParty:true,
squied_type:2, squied_type:2,
squied_mobile:'', squied_mobile:'',
squied_smsCode:'', squied_smsCode:'',
@ -129,6 +129,11 @@ export default{
isLoading: false, isLoading: false,
captchaCode: '', captchaCode: '',
captcha: {}, captcha: {},
partyData:{
code: null,
oauth: 'MP-WEIXIN',
userInfo:{}
}
} }
}, },
methods:{ methods:{
@ -274,10 +279,25 @@ export default{
} }
}, 1000) }, 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 const app = this
if (!app.isLoading && app.formValidation(SUBMIT_LOGIN)) { if (!app.isLoading && app.formValidation(SUBMIT_LOGIN)) {
this.partyData.code = await app.getCode();
console.log(await app.getCode())
app.submitLogin() app.submitLogin()
} }
}, },

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

@ -18,7 +18,10 @@
<!-- 待收货 --> <!-- 待收货 -->
<block v-else-if="order.receipt_status == ReceiptStatusEnum.NOT_RECEIVED.value"> <block v-else-if="order.receipt_status == ReceiptStatusEnum.NOT_RECEIVED.value">
<image class="image" src="/static/order/status/wait_receipt.png" mode="aspectFit"></image> <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>
<!-- 已完成 --> <!-- 已完成 -->
<block v-if="order.order_status == OrderStatusEnum.COMPLETED.value"> <block v-if="order.order_status == OrderStatusEnum.COMPLETED.value">
@ -32,6 +35,7 @@
<view class="status-text"> <view class="status-text">
<text>{{ order.state_text }}</text> <text>{{ order.state_text }}</text>
</view> </view>
</view> </view>
<!-- 下一步操作 --> <!-- 下一步操作 -->
<!-- <view class="next-action" v-if="order.order_status == OrderStatusEnum.NORMAL.value"> <!-- <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 v-if="order.delivery_type == DeliveryTypeEnum.EXPRESS.value" class="delivery-address i-card">
<view class="link-man"> <view class="link-man">
<text class="name">{{ order.address.name }}</text> <text class="name">{{ order.address?order.address.name:'' }}</text>
<text class="phone">{{ order.address.phone }}</text> <text class="phone">{{ order.address?order.address.phone:'' }}</text>
</view> </view>
<view class="address"> <view class="address">
<text class="region" v-for="(region, idx) in order.address.region" :key="idx">{{ region }}</text> <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> </view>
@ -307,11 +311,11 @@
</view> </view>
<view class="addrContent"> <view class="addrContent">
<view class="personInfo"> <view class="personInfo">
收货地址{{ order.address.name }} {{ order.address.phone }} 收货地址{{ order.address?order.address.name:'' }} {{ order.address?order.address.phone:'' }}
</view> </view>
<view class="addressText"> <view class="addressText">
<text class="region" v-for="(region, idx) in order.address.region" :key="idx">{{ region }}</text> <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> </view>
</view> </view>
@ -393,6 +397,11 @@
OrderApi.detail(app.orderId) OrderApi.detail(app.orderId)
.then(result => { .then(result => {
app.order = result.data.order 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.setting = result.data.setting
app.isLoading = false app.isLoading = false
}) })
@ -520,7 +529,7 @@
background-color: #F92404; background-color: #F92404;
height: 280rpx; height: 280rpx;
padding: 56rpx 30rpx 0 30rpx; padding: 56rpx 30rpx 0 30rpx;
position: relative;
.order-status { .order-status {
display: flex; display: flex;
align-items: center; align-items: center;
@ -580,6 +589,8 @@
box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05); box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05);
margin: 0 auto 20rpx auto; margin: 0 auto 20rpx auto;
border-radius: 20rpx; border-radius: 20rpx;
position: relative;
z-index: 9;
} }
// //
@ -1015,4 +1026,19 @@
margin-top:22rpx; 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> </style>
Loading…
Cancel
Save