表单核销
parent
361abcdbad
commit
381367737f
4
App.vue
4
App.vue
|
|
@ -7,10 +7,10 @@
|
|||
data: {
|
||||
// 基础配置
|
||||
// 数据接口请求地址
|
||||
request_url:'https://new.shopxo.vip/',
|
||||
request_url:'https://d1.shopxo.vip/',
|
||||
|
||||
// 静态资源地址(如系统根目录不在public目录下面请在静态地址后面加public目录、如:https://d1.shopxo.vip/public/)
|
||||
static_url:'https://new.shopxo.vip/',
|
||||
static_url:'https://d1.shopxo.vip/',
|
||||
|
||||
// 系统类型(默认default、如额外独立小程序、可与程序分身插件实现不同主体小程序及支付独立)
|
||||
system_type: 'default',
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
"return": "Return",
|
||||
"view_text": "Check",
|
||||
"detail_text": "Detail",
|
||||
"refresh_text": "Refresh",
|
||||
"yes_text": "Yes",
|
||||
"no_text": "NO",
|
||||
"place_order_text": "Place Order",
|
||||
|
|
@ -71,6 +72,7 @@
|
|||
"apply_time": "Application time",
|
||||
"verification_text": "Verification code",
|
||||
"verification_message": "Please enter the verification code",
|
||||
"verification_mobile_message": "Please enter the verification code or mobile number",
|
||||
"not_supported_scan_tips": "H5 webpage does not support scanning codes",
|
||||
"copy_link": "Copy link"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
"return": "返回",
|
||||
"view_text": "查看",
|
||||
"detail_text": "详情",
|
||||
"refresh_text": "刷新",
|
||||
"yes_text": "是",
|
||||
"no_text": "否",
|
||||
"place_order_text": "下单",
|
||||
|
|
@ -71,6 +72,7 @@
|
|||
"apply_time": "申请时间",
|
||||
"verification_text": "核销码",
|
||||
"verification_message": "请输入核销码",
|
||||
"verification_mobile_message": "请输入核销码或手机",
|
||||
"not_supported_scan_tips": "H5网页不支持扫码",
|
||||
"copy_link": "复制链接"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@
|
|||
"startLocationUpdate",
|
||||
"startLocationUpdateBackground"
|
||||
],
|
||||
"appid" : "wxa0bb5a98b71799fa",
|
||||
"appid" : "wxda7779770f53e901",
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
"es6" : true,
|
||||
|
|
|
|||
|
|
@ -1698,6 +1698,13 @@
|
|||
{
|
||||
"path": "check/check",
|
||||
"style": {
|
||||
// #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || APP
|
||||
"navigationStyle": "custom",
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
"transparentTitle": "auto",
|
||||
"titlePenetrate": "YES",
|
||||
// #endif
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
<view class="padding-main">
|
||||
<view class="padding-main page-content">
|
||||
<form @submit="form_submit" class="form-container">
|
||||
<view class="border-radius-main bg-white padding-main padding-bottom-xxxxl spacing-mb">
|
||||
<view class="title fw-b text-size margin-vertical-xxxl">{{$t('common.verification_text')}}</view>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
<uni-icons type="scan" size="56rpx" color="#666"></uni-icons>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<input type="text" class="wh-auto check-value" :placeholder="$t('common.verification_message')" placeholder-class="cr-grey-c" :value="check_value" @input="check_event" />
|
||||
<input type="text" class="wh-auto check-value" :placeholder="$t('common.verification_mobile_message')" placeholder-class="cr-grey-c" :value="check_value" @input="check_event" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-main">
|
||||
|
|
@ -20,6 +20,19 @@
|
|||
<text v-if="(error_msg || null) != null" class="cr-red">{{error_msg}}</text>
|
||||
<text v-if="(success_msg || null) != null" class="cr-green">{{success_msg}}</text>
|
||||
</view>
|
||||
<view class="bottom-fixed padding-xl tc">
|
||||
<button type="default" size="mini" class="bg-main-light br-main cr-main text-size-lg circle padding-0 refresh-submit" @tap="refresh_data_event">{{$t('common.refresh_text')}}</button>
|
||||
<view class="bottom-line-exclude flex-row jc-sb margin-top-xl">
|
||||
<block v-if="stats_data.length > 0">
|
||||
<block v-for="(item, index) in stats_data">
|
||||
<view>
|
||||
<view class="cr-grey">{{item.name}}</view>
|
||||
<view class="fw-b text-size-lg" :class="item.type == 1 ? 'cr-green' : (item.type == 0 ? 'cr-yellow' : '')">{{item.value}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
|
||||
|
|
@ -37,7 +50,8 @@
|
|||
form_submit_loading: false,
|
||||
check_value: '',
|
||||
error_msg: '',
|
||||
success_msg: ''
|
||||
success_msg: '',
|
||||
stats_data: []
|
||||
};
|
||||
},
|
||||
components: {
|
||||
|
|
@ -60,6 +74,9 @@
|
|||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
|
||||
// 刷新数据
|
||||
this.refresh_data_event('init');
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
@ -97,10 +114,10 @@
|
|||
success_msg: ''
|
||||
});
|
||||
var form_data = {
|
||||
extraction_code: this.check_value
|
||||
value: this.check_value
|
||||
}
|
||||
var validation = [
|
||||
{ fields: 'extraction_code', msg: this.$t('common.verification_message') }
|
||||
{ fields: 'value', msg: this.$t('common.verification_mobile_message') }
|
||||
];
|
||||
if (app.globalData.fields_check(form_data, validation)) {
|
||||
uni.showLoading({
|
||||
|
|
@ -111,24 +128,26 @@
|
|||
});
|
||||
var temp_code = this.check_value;
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('verification', 'adminorder', 'shop'),
|
||||
url: app.globalData.get_request_url('check', 'index', 'form'),
|
||||
method: 'POST',
|
||||
data: form_data,
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data;
|
||||
if (data.code == 0) {
|
||||
this.setData({
|
||||
form_submit_loading: false,
|
||||
check_value: '',
|
||||
error_msg: '',
|
||||
success_msg: res.data.msg+'('+temp_code+')',
|
||||
stats_data: data.data.stats_data || [],
|
||||
success_msg: data.msg+'('+data.data.username+')',
|
||||
});
|
||||
} else {
|
||||
if (app.globalData.is_login_check(res.data, this, 'form_submit')) {
|
||||
if (app.globalData.is_login_check(data, this, 'form_submit')) {
|
||||
this.setData({
|
||||
form_submit_loading: false,
|
||||
error_msg: res.data.msg+'('+temp_code+')',
|
||||
error_msg: data.msg+'('+temp_code+')',
|
||||
success_msg: '',
|
||||
});
|
||||
}
|
||||
|
|
@ -144,6 +163,28 @@
|
|||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 刷新数据
|
||||
refresh_data_event(e) {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('stats', 'index', 'form'),
|
||||
method: 'POST',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if (res.data.code == 0) {
|
||||
this.setData({
|
||||
stats_data: res.data.data || []
|
||||
});
|
||||
if(e != 'init') {
|
||||
app.globalData.showToast(res.data.msg, 'success');
|
||||
}
|
||||
} else {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -154,4 +195,12 @@
|
|||
line-height: 100rpx;
|
||||
font-size: 44rpx;
|
||||
}
|
||||
.page-content {
|
||||
padding-top: 12vh;
|
||||
}
|
||||
.refresh-submit {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
line-height: 140rpx;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue