新增虚拟商品充值账户验证
This commit is contained in:
parent
6ac44f6a63
commit
078c7c8e55
|
|
@ -217,6 +217,13 @@
|
|||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 充值账户 -->
|
||||
<view class="content-textarea-container padding-main border-radius-main bg-white spacing-mb" v-if="is_account">
|
||||
<view class="content">
|
||||
<input type="text" class="input" placeholder="请输入充值账户" placeholder-class="input_placeholder" v-model="account" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 留言 -->
|
||||
<view class="content-textarea-container padding-main border-radius-main bg-white spacing-mb">
|
||||
<view class="content">
|
||||
|
|
@ -467,6 +474,8 @@
|
|||
// 现金--跳转指定页面
|
||||
to_appoint_page: '/pages/user-order/user-order',
|
||||
wx_appid: '',
|
||||
is_account: 0,
|
||||
account: '',
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -534,6 +543,28 @@
|
|||
},
|
||||
|
||||
methods: {
|
||||
// 是否显示充值账户
|
||||
getShowAccount() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('searchgoodsaccount', 'goods'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
goods_data: this.params.goods_data,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
console.log('getShowAccount===', res);
|
||||
if (res.data.code == 0) {
|
||||
this.is_account = res.data.data.is_account;
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
// 初始化微信 JS-SDK
|
||||
initWechatSdk(config) {
|
||||
uni.request({
|
||||
|
|
@ -897,6 +928,11 @@
|
|||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取是否显示充值账户
|
||||
if (this.buy_site_model_value == 3) {
|
||||
this.getShowAccount();
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
|
|
@ -1007,6 +1043,7 @@
|
|||
data['payment_type'] = this.payment_type;
|
||||
data['user_note'] = this.user_note_value;
|
||||
data['site_model'] = this.buy_site_model_value;
|
||||
data['account'] = this.account;
|
||||
|
||||
// 数据验证
|
||||
var validation = [];
|
||||
|
|
@ -1067,6 +1104,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
// 如果是虚拟商品
|
||||
if (data.site_model == 3 && !this.account) {
|
||||
app.globalData.showToast('请输入您要充值的账户');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 加载loding
|
||||
uni.showLoading({
|
||||
title: this.$t('buy.buy.r79t77'),
|
||||
|
|
@ -1421,6 +1464,12 @@
|
|||
</style>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.input {
|
||||
font-size: 14px;
|
||||
}
|
||||
.input_placeholder {
|
||||
color: #999;
|
||||
}
|
||||
$color: #ff723b;
|
||||
.address-wrap {
|
||||
background-color: $color;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
<block v-if="is_single_page == 0">
|
||||
<view class="nav-search padding-horizontal-main pr" :style="'padding-top:' + (status_bar_height + 5) + 'px;'">
|
||||
<view class="logo" style="height: 30px; display: flex; align-items: center; position: relative; z-index: 9; margin-right: 10px">
|
||||
<image src="/static/images/common/user.png" mode="aspectFit" style="width: 30px; height: 30px"></image>
|
||||
<text style="margin-left: 4px">银收客</text>
|
||||
<image :src="application_logo || '/static/images/common/user.png'" mode="aspectFit" style="width: 30px; height: 30px; border-radius: 4px"></image>
|
||||
<text style="margin-left: 4px">{{ application_title }}</text>
|
||||
</view>
|
||||
<view style="flex: 1">
|
||||
<view class="goods-top-search-bg pa top-0 left-0 right-0 bottom-0 wh-auto oh">
|
||||
|
|
@ -398,6 +398,8 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
application_title: app.globalData.get_application_title(),
|
||||
application_logo: app.globalData.get_application_logo_square(),
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
theme_static_url: theme_static_url,
|
||||
common_static_url: common_static_url,
|
||||
|
|
@ -548,6 +550,7 @@
|
|||
wx.ready(() => {
|
||||
console.log('微信 JS-SDK 初始化成功');
|
||||
let web_openid = localStorage.getItem('web_openid');
|
||||
console.log('web_openid===', web_openid);
|
||||
if (!web_openid) {
|
||||
const code = this.getCodeFromUrl();
|
||||
console.log('code===', code);
|
||||
|
|
|
|||
|
|
@ -111,17 +111,18 @@
|
|||
<!-- 虚拟销售数据 -->
|
||||
<view v-if="(site_fictitious || null) != null" class="site-fictitious panel-item padding-horizontal-main padding-top-main bg-white">
|
||||
<view class="br-b padding-bottom-main fw-b text-size">{{ site_fictitious.title || $t('user-order-detail.user-order-detail.y9woor') }}</view>
|
||||
<view class="panel-content oh padding-top-main">
|
||||
<view class="panel-content oh padding-top-main br-b">
|
||||
<view v-if="(site_fictitious.tips || null) != null" class="tips-value radius padding-main margin-bottom-main">
|
||||
<mp-html :content="site_fictitious.tips" />
|
||||
</view>
|
||||
<view v-for="(item, index) in detail.items" :key="index" class="item br-b-dashed oh padding-bottom-main margin-bottom-main">
|
||||
<image class="left-image br fl radius" :src="item.images" mode="aspectFill"></image>
|
||||
<view class="right-value fr">
|
||||
<view v-for="(item, index) in detail.items" :key="index" style="display: flex">
|
||||
<image class="left-image br fl radius" :src="item.images" mode="aspectFill" style="flex-shrink: 0"></image>
|
||||
<view class="right-value" style="padding: 0 10px">
|
||||
<view v-if="(item.spec_text || null) != null" class="text-base fw-b margin-bottom-sm text-size-xs">{{ item.spec_text }}</view>
|
||||
<mp-html v-if="(item.fictitious_goods_value || null) != null" :content="item.fictitious_goods_value" />
|
||||
<text v-else class="cr-grey text-size-xs">{{ $t('user-order-detail.user-order-detail.7xtnjt') }}</text>
|
||||
</view>
|
||||
<view class="copy" v-if="!item.account" :data-value="item.fictitious_goods_value_str" @tap="text_copy_event">复制</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -171,6 +172,16 @@
|
|||
<image class="icon" :class="{ active: isCheckOrderAll }" src="/static/icon_down_arrow.svg" mode="aspectFit"></image>
|
||||
</view>
|
||||
|
||||
<!-- 支付账户填错后重新提交模块 -->
|
||||
<view class="content-textarea-container padding-main border-radius-main bg-white spacing-mb" v-if="detail && detail.is_account">
|
||||
<view class="content">
|
||||
<input type="text" class="input" placeholder="请输入充值账户" placeholder-class="input_placeholder" v-model="account" />
|
||||
</view>
|
||||
<view class="btn-wrap">
|
||||
<view class="btn" @click="replayAccountHandle"> 重新提交充值账户 </view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 支付选择 -->
|
||||
<view class="payment-list border-radius-main bg-white oh padding-main spacing-mb" v-if="detail && detail.status == 1">
|
||||
<view v-for="(item, index) in payment_list" :key="index">
|
||||
|
|
@ -298,6 +309,7 @@
|
|||
temp_pay_index: 0,
|
||||
remainingTime: '',
|
||||
intervalId: null,
|
||||
account: '',
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -341,6 +353,45 @@
|
|||
},
|
||||
|
||||
methods: {
|
||||
// 重新提交虚拟账户
|
||||
replayAccountHandle() {
|
||||
if (!this.account) {
|
||||
app.globalData.showToast('请输入您要充值的账户');
|
||||
return false;
|
||||
}
|
||||
|
||||
uni.showLoading({
|
||||
title: '提交中...',
|
||||
mask: true,
|
||||
});
|
||||
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('resetaccount', 'order'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
order_id: this.detail.id,
|
||||
account: this.account,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
console.log('getShowAccount===', res);
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
this.detail.is_account = 0;
|
||||
app.globalData.showToast('提交成功');
|
||||
this.init();
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
},
|
||||
});
|
||||
},
|
||||
// 获取剩余支付时间
|
||||
updateRemainingTime() {
|
||||
const now = dayjs();
|
||||
|
|
@ -495,6 +546,12 @@
|
|||
data_bottom_line_status: true,
|
||||
data_list_loding_msg: '',
|
||||
});
|
||||
if (this.detail.order_model == 3 && this.detail.items[0].account) {
|
||||
this.detail_list.unshift({
|
||||
name: '充值账户',
|
||||
value: this.detail.items[0].account,
|
||||
});
|
||||
}
|
||||
if (this.detail.status == 1) {
|
||||
this.updateRemainingTime();
|
||||
this.intervalId = setInterval(this.updateRemainingTime, 1000);
|
||||
|
|
@ -770,4 +827,52 @@
|
|||
.container {
|
||||
padding-bottom: calc(132upx + env(safe-area-inset-bottom));
|
||||
}
|
||||
.btn-wrap {
|
||||
.btn {
|
||||
margin-left: 10px;
|
||||
padding: 10px 24px;
|
||||
color: #fff;
|
||||
border-radius: 100px;
|
||||
background: linear-gradient(to right, #ffb726, $color);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24upx;
|
||||
&:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
.text {
|
||||
font-weight: bold;
|
||||
}
|
||||
.time {
|
||||
font-size: 20upx;
|
||||
margin-top: -2px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
}
|
||||
.input {
|
||||
font-size: 14px;
|
||||
border-bottom: 1px solid #ececec;
|
||||
padding: 10px 0;
|
||||
}
|
||||
.input_placeholder {
|
||||
color: #999;
|
||||
}
|
||||
.copy {
|
||||
padding-left: 12px;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
&:before {
|
||||
content: '';
|
||||
height: 16px;
|
||||
border-left: 1px solid #999;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 3px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue