feat: 订单加贡献值
This commit is contained in:
@@ -1,65 +1,203 @@
|
||||
<template>
|
||||
<view class="order_sumbit_ok_warp">
|
||||
<Header leftTitle="" left-path-type="switchTab" left-path="/pages/mine/mine" />
|
||||
<view class="order_sumbit_ok_content_warp">
|
||||
<view class="ok_img">
|
||||
<up-image src="https://static.tbmall.xin/static/ok.png" width="120" height="120"
|
||||
bgColor="#f1f6ff00"></up-image>
|
||||
<view class="ok_img_msg">支付成功</view>
|
||||
</view>
|
||||
<view class="ok_but" @click="jumpHome">确认</view>
|
||||
</view>
|
||||
<qiaobao-assistant page-key="pages/order_package/order_submit_ok/order_submit_ok" title="订单状态与支付" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Header from '@/components/header.vue';
|
||||
|
||||
export default {
|
||||
components: { Header },
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jumpHome() {
|
||||
uni.switchTab({
|
||||
url: '/pages/home/home',
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.order_sumbit_ok_warp {
|
||||
height: calc(100vh - 80rpx);
|
||||
text-align: center;
|
||||
|
||||
.order_sumbit_ok_content_warp {
|
||||
padding: 40rpx;
|
||||
}
|
||||
|
||||
.ok_img {
|
||||
display: grid;
|
||||
|
||||
.ok_img_msg {
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
color: $app-bt-bj;
|
||||
}
|
||||
}
|
||||
|
||||
.ok_but {
|
||||
margin-top: 100rpx;
|
||||
background: $app-bt-bj;
|
||||
border-radius: 16rpx;
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
height: 46rpx;
|
||||
color: #FFF;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<view class="order_sumbit_ok_warp">
|
||||
<Header leftTitle="" left-path-type="switchTab" left-path="/pages/mine/mine" />
|
||||
<view class="order_sumbit_ok_content_warp">
|
||||
<!-- 支付成功图标与标题 -->
|
||||
<view class="success_header">
|
||||
<image class="success_icon_img" src="https://static.tbmall.xin/static/mine-purse/icon_arrow_black_3.png"
|
||||
mode="aspectFit"></image>
|
||||
<view class="success_title">支付成功</view>
|
||||
</view>
|
||||
|
||||
<!-- 贡献值卡片 -->
|
||||
<view class="contribution_card" v-if="expendNum">
|
||||
<view class="card_subtitle">本单预计获得</view>
|
||||
<view class="card_value_row">
|
||||
<image class="coin_icon" src="https://static.tbmall.xin/static/mine-purse/vcoin_1.png"
|
||||
mode="aspectFit"></image>
|
||||
<text class="value_num">{{ expendNum }}</text>
|
||||
<text class="value_unit">贡献值</text>
|
||||
</view>
|
||||
<view class="card_tips">退款或售后将按平台规则调整</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部确定按钮 -->
|
||||
<view class="bottom_btn_wrap">
|
||||
<view class="confirm_btn" @click="jumpHome">确定</view>
|
||||
</view>
|
||||
|
||||
<qiaobao-assistant page-key="pages/order_package/order_submit_ok/order_submit_ok" title="订单状态与支付" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Header from '@/components/header.vue';
|
||||
|
||||
export default {
|
||||
components: { Header },
|
||||
data() {
|
||||
return {
|
||||
expendNum: 0, // 贡献值字段
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options && options.expendNum !== undefined) {
|
||||
this.expendNum = options.expendNum;
|
||||
}
|
||||
// 获取临时缓存并更新 expendNum,获取完成后清空缓存
|
||||
const cache = uni.getStorageSync('order_submit_temp');
|
||||
if (cache !== '' && cache !== null && cache !== undefined) {
|
||||
let expendNum = 0;
|
||||
|
||||
if (typeof cache === 'object') {
|
||||
expendNum = cache.expendNum !== undefined
|
||||
? cache.expendNum
|
||||
: (cache.data?.expendNum !== undefined ? cache.data.expendNum : cache.data?.contribution);
|
||||
} else {
|
||||
expendNum = cache;
|
||||
}
|
||||
|
||||
if (expendNum !== undefined && expendNum !== null && expendNum !== '') {
|
||||
this.expendNum = expendNum;
|
||||
}
|
||||
uni.removeStorageSync('order_submit_temp');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jumpHome() {
|
||||
uni.switchTab({
|
||||
url: '/pages/home/home',
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.order_sumbit_ok_warp {
|
||||
min-height: 100vh;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
|
||||
|
||||
.order_sumbit_ok_content_warp {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 48rpx 36rpx 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.success_header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.success_icon_img {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
.success_title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #111111;
|
||||
margin-top: 24rpx;
|
||||
line-height: 1.4;
|
||||
}
|
||||
}
|
||||
|
||||
.contribution_card {
|
||||
width: 100%;
|
||||
background: #f8f5fe;
|
||||
border-radius: 24rpx;
|
||||
padding: 40rpx 32rpx;
|
||||
margin-top: 56rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.card_subtitle {
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.card_value_row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 18rpx;
|
||||
|
||||
.coin_icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 10rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.value_num {
|
||||
font-size: 44rpx;
|
||||
font-weight: bold;
|
||||
color: #7934f6;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.value_unit {
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
color: #7934f6;
|
||||
margin-left: 4rpx;
|
||||
line-height: 1.2;
|
||||
}
|
||||
}
|
||||
|
||||
.card_tips {
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
margin-top: 24rpx;
|
||||
line-height: 1.4;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom_btn_wrap {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 20rpx 36rpx;
|
||||
padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
|
||||
background: #ffffff;
|
||||
box-sizing: border-box;
|
||||
z-index: 99;
|
||||
|
||||
.confirm_btn {
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
background: #7934f6;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 32rpx;
|
||||
color: #ffffff;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: opacity 0.15s ease;
|
||||
|
||||
&:active {
|
||||
opacity: 0.85;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user