资质认证提示

master
gongfuxiang 2025-04-02 14:16:56 +08:00
parent 3e37cb4423
commit 9fe63258bc
4 changed files with 154 additions and 51 deletions

View File

@ -7,10 +7,10 @@
data: {
//
//
request_url:'http://shopxo.com/',
request_url:'https://new.shopxo.vip/',
// publicpublichttps://d1.shopxo.vip/public/
static_url:'http://shopxo.com/',
static_url:'https://new.shopxo.vip/',
// default
system_type: 'default',

View File

@ -0,0 +1,91 @@
<template>
<view :class="theme_view">
<component-popup :propShow="popup_status" propPosition="bottom" @onclose="popup_close_event">
<view :class="'certificate-popup bg-white ' + (propIsGrayscale ? 'grayscale' : '')">
<view class="close fr oh">
<view class="fr" @tap.stop="popup_close_event">
<iconfont name="icon-close-o" size="24rpx" color="#999"></iconfont>
</view>
</view>
<view class="padding-main">
hello
</view>
</view>
</component-popup>
</view>
</template>
<script>
const app = getApp();
import componentPopup from '@/components/popup/popup';
export default {
data() {
return {
theme_view: app.globalData.get_theme_value_view(),
popup_status: false,
cconfig: null
};
},
components: {
componentPopup,
},
props: {
propIsGrayscale: {
type: Boolean,
default: false,
},
},
created: function () {
//
this.init_config();
},
methods: {
//
init_config(status) {
if ((status || false) == true) {
this.setData({
config: app.globalData.get_config('plugins_base.certificate.data') || null,
});
} else {
app.globalData.is_config(this, 'init_config');
}
},
//
init(params = {}) {
//
this.init_config(true);
//
if(app.globalData.data.common_data_init_status == 1) {
//
if((this.config || null) != null && (this.config.business_type_data || null) != null) {
this.setData({
popup_status: true,
});
}
}
},
//
popup_close_event(e) {
this.setData({
popup_status: false,
});
},
}
};
</script>
<style scoped>
.certificate-popup {
padding: 36rpx;
position: relative;
}
.certificate-popup .close {
position: absolute;
top: 36rpx;
right: 36rpx;
z-index: 2;
}
</style>

View File

@ -40,6 +40,9 @@
<!-- 弹屏广告 -->
<component-popupscreen ref="popupscreen" :propIsGrayscale="propIsGrayscale"></component-popupscreen>
<!-- 资质认证 -->
<component-certificate ref="certificate" :propIsGrayscale="propIsGrayscale"></component-certificate>
</view>
</template>
<script>
@ -48,6 +51,7 @@
import componentAppAdmin from '@/components/app-admin/app-admin';
import componentUserBase from '@/components/user-base/user-base';
import componentPopupscreen from '@/components/popupscreen/popupscreen';
import componentCertificate from '@/components/certificate/certificate';
export default {
data() {
return {
@ -93,7 +97,8 @@
componentDiyFooter,
componentAppAdmin,
componentUserBase,
componentPopupscreen
componentPopupscreen,
componentCertificate
},
//
created: function () {
@ -145,6 +150,11 @@
this.$refs.popupscreen.init(params);
}
//
if (this.propIsPopupscreen && (this.$refs.certificate || null) != null) {
this.$refs.certificate.init(params);
}
// #ifdef MP-WEIXIN
//
if (app.globalData.data.is_weixin_privacy_setting == 1) {

View File

@ -112,57 +112,59 @@
init(params = {}) {
//
this.init_config(true);
//
var type = '';
if((params.type || null) == null) {
var page = '/'+app.globalData.current_page(false);
var obj = {
'index': '/pages/index/index',
'goods-category': '/pages/goods-category/goods-category',
'cart': '/pages/cart/cart',
'user': '/pages/user/user',
};
var index = Object.values(obj).indexOf(page);
if(index != -1) {
type = Object.keys(obj)[index];
}
} else {
type = params.type;
}
if((type || null) != null) {
//
if (!this.popup_status && this.pages.indexOf(type) != -1 && this.client.indexOf(this.client_value) != -1) {
//
var user = app.globalData.get_user_cache_info() || null;
//
var result = this.form_write_field_check_data(user);
//
if(this.client_value != 'weixin' || !this.is_weixin_force) {
//
var cache_time = parseInt(uni.getStorageSync(this.cache_key) || 0);
var current_time = Date.parse(new Date()) / 1000;
if (result.popup_status && !this.popup_status && cache_time > 0 && current_time < cache_time + parseInt(this.interval_time)) {
result['popup_status'] = false;
}
//
if(app.globalData.data.common_data_init_status == 1) {
//
var type = '';
if((params.type || null) == null) {
var page = '/'+app.globalData.current_page(false);
var obj = {
'index': '/pages/index/index',
'goods-category': '/pages/goods-category/goods-category',
'cart': '/pages/cart/cart',
'user': '/pages/user/user',
};
var index = Object.values(obj).indexOf(page);
if(index != -1) {
type = Object.keys(obj)[index];
}
// 1
clearTimeout(this.timer);
var self = this;
var timer = setTimeout(function () {
self.setData({
...result,
...{
back_object: params.object || null,
back_method: params.method || null,
back_params: params.params || params,
} else {
type = params.type;
}
if((type || null) != null) {
//
if (!this.popup_status && this.pages.indexOf(type) != -1 && this.client.indexOf(this.client_value) != -1) {
//
var user = app.globalData.get_user_cache_info() || null;
//
var result = this.form_write_field_check_data(user);
//
if(this.client_value != 'weixin' || !this.is_weixin_force) {
//
var cache_time = parseInt(uni.getStorageSync(this.cache_key) || 0);
var current_time = Date.parse(new Date()) / 1000;
if (result.popup_status && !this.popup_status && cache_time > 0 && current_time < cache_time + parseInt(this.interval_time)) {
result['popup_status'] = false;
}
}
// 1
clearTimeout(this.timer);
var self = this;
var timer = setTimeout(function () {
self.setData({
...result,
...{
back_object: params.object || null,
back_method: params.method || null,
back_params: params.params || params,
}
});
}, 500);
this.setData({
timer: timer
});
}, 500);
this.setData({
timer: timer
});
}
}
}
},