底部菜单diy页面无效修复
parent
6136158f10
commit
9029bee564
6
App.vue
6
App.vue
|
|
@ -967,9 +967,9 @@
|
|||
*/
|
||||
app_tabbar_pages() {
|
||||
var temp_tabbar = this.data.system_tabbar;
|
||||
var app_tabber = this.get_config('app_tabber') || null;
|
||||
if(app_tabber != null && (app_tabber.content || null) != null && (app_tabber.content.nav_content || null) != null) {
|
||||
temp_tabbar = app_tabber.content.nav_content.map(function(v) {
|
||||
var app_tabbar = this.get_config('app_tabbar') || null;
|
||||
if(app_tabbar != null && (app_tabbar.content || null) != null && (app_tabbar.content.nav_content || null) != null) {
|
||||
temp_tabbar = app_tabbar.content.nav_content.map(function(v) {
|
||||
if((v.link || null) != null && (v.link.page || null) != null) {
|
||||
return v.link.page;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,8 +149,9 @@
|
|||
|
||||
// 底部菜单初始化
|
||||
footer_init(status = 0) {
|
||||
var is_use_native_tabbar = app.globalData.data.is_use_native_tabbar == 1;
|
||||
var upd_data = {
|
||||
is_tabbar: (app.globalData.data.is_use_native_tabbar == 1) ? false : app.globalData.is_tabbar_pages()
|
||||
is_tabbar: is_use_native_tabbar ? false : app.globalData.is_tabbar_pages()
|
||||
};
|
||||
if(upd_data['is_tabbar']) {
|
||||
upd_data['key'] = Math.random();
|
||||
|
|
@ -159,7 +160,7 @@
|
|||
this.setData(upd_data);
|
||||
|
||||
// 如果没有菜单数据则读取一次
|
||||
if(upd_data['is_tabbar'] && status == 0 && upd_data['app_tabbar'] == null) {
|
||||
if(!is_use_native_tabbar && status == 0 && (upd_data['app_tabbar'] || null) == null) {
|
||||
app.globalData.init_config(0, this, 'footer_init', 1);
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -66,9 +66,7 @@
|
|||
this.get_data();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
this.init_common();
|
||||
|
||||
// 设置顶部导航的默认颜色
|
||||
this.set_navigation_bar_color();
|
||||
|
|
@ -80,6 +78,14 @@
|
|||
},
|
||||
|
||||
methods: {
|
||||
// 初始化公共
|
||||
init_common() {
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data(params = {}) {
|
||||
// 还没有数据则读取缓存
|
||||
|
|
@ -96,6 +102,9 @@
|
|||
|
||||
// 设置顶部导航的默认颜色
|
||||
this.set_navigation_bar_color();
|
||||
|
||||
// 公共onshow事件
|
||||
this.init_common();
|
||||
}
|
||||
} else {
|
||||
// 已有本地缓存则直接取远程有效数据(默认首次取的是远程缓存数据)
|
||||
|
|
@ -145,6 +154,9 @@
|
|||
|
||||
// 设置顶部导航的默认颜色
|
||||
this.set_navigation_bar_color();
|
||||
|
||||
// 公共onshow事件
|
||||
this.init_common();
|
||||
}
|
||||
|
||||
// 分享菜单处理
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
.page {
|
||||
height: 100vh;
|
||||
}
|
||||
.page > .content {
|
||||
padding-top: 20%;
|
||||
}
|
||||
|
|
@ -1,25 +1,29 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
<block v-if="data_list_loding_status == 3">
|
||||
<view class="padding-horizontal-main padding-vertical-xxxxl margin-main tc bg-white border-radius-main">
|
||||
<view class="padding-vertical-xxxxl">
|
||||
<text class="fw-b cr-price text-size-xxl">{{payment_currency_symbol}}{{data.pay_price}}</text>
|
||||
</view>
|
||||
<view class="margin-top-sm padding-bottom-xxxxl">
|
||||
<view :class="'cr-'+(pay_status == 1 ? 'green' : (pay_status == 2 ? 'red' : 'grey'))">{{pay_msg}}</view>
|
||||
</view>
|
||||
<view v-if="pay_status == 2" class="margin-top-xxxxl padding-vertical-xxxxl">
|
||||
<button class="bg-green br-green cr-white round text-size-sm padding-horizontal-xxxxl" size="mini" hover-class="none" @tap="pay_handle">重新发起支付</button>
|
||||
<view class="page bg-white">
|
||||
<view class="content padding-horizontal-main tc">
|
||||
<block v-if="data_list_loding_status == 3">
|
||||
<view class="padding-vertical-xxxxl">
|
||||
<text class="cr-price fw-b text-size-lg">{{payment_currency_symbol}}</text>
|
||||
<text class="cr-price fw-b text-size-xxl">{{data.pay_price}}</text>
|
||||
</view>
|
||||
<view class="margin-top-sm padding-bottom-xxxxl">
|
||||
<view :class="'cr-'+(pay_status == 1 ? 'green' : (pay_status == 2 ? 'red' : 'grey'))">{{pay_msg}}</view>
|
||||
</view>
|
||||
<view v-if="pay_status == 2" class="margin-top-xxxxl padding-vertical-xxxxl">
|
||||
<button class="bg-green br-green cr-white round text-size-sm padding-horizontal-xxxxl" size="mini" hover-class="none" @tap="pay_handle">重新发起支付</button>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</block>
|
||||
|
||||
<view v-if="is_back_btn && pay_status != 0" class="margin-top-xxxxl padding-top-xxxxl tc">
|
||||
<button class="bg-white br-main cr-main round text-size-sm padding-horizontal-xxxxl" size="mini" hover-class="none" open-type="launchApp" app-parameter="wechat">返回APP</button>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="is_back_btn && pay_status != 0" class="margin-top-xxxxl padding-top-xxxxl tc">
|
||||
<button class="bg-white br-main cr-main round text-size-sm padding-horizontal-xxxxl" size="mini" hover-class="none" open-type="launchApp" app-parameter="wechat">返回APP</button>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common ref="common" :propIsAppAdmin="false"></component-common>
|
||||
|
|
@ -83,36 +87,54 @@
|
|||
},
|
||||
|
||||
methods: {
|
||||
// 初始化
|
||||
// // 初始化
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("paydata", "cashier"),
|
||||
method: "POST",
|
||||
data: this.params,
|
||||
dataType: "json",
|
||||
var self = this;
|
||||
var action = 'login';
|
||||
// #ifdef MP-BAIDU
|
||||
action = 'getLoginCode';
|
||||
// #endif
|
||||
uni[action]({
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0 && (res.data.data || null) != null) {
|
||||
this.setData({
|
||||
data_list_loding_status: 3,
|
||||
data_list_loding_msg: '',
|
||||
data: res.data.data,
|
||||
});
|
||||
|
||||
// 直接调起支付
|
||||
this.pay_handle();
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
if (res.code) {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("paydata", "cashier", "allocation"),
|
||||
method: 'POST',
|
||||
data: {...self.params, ...{authcode: res.code}},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0 && (res.data.data || null) != null) {
|
||||
this.setData({
|
||||
data_list_loding_status: 3,
|
||||
data_list_loding_msg: '',
|
||||
data: res.data.data,
|
||||
});
|
||||
|
||||
// 直接调起支付
|
||||
this.pay_handle();
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: self.$t('common.internet_error_tips'),
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
fail: (e) => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: this.$t('common.internet_error_tips'),
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: self.$t('login.login.3nmrg2'),
|
||||
});
|
||||
},
|
||||
});
|
||||
|
|
@ -151,4 +173,5 @@
|
|||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './cashier.css';
|
||||
</style>
|
||||
Loading…
Reference in New Issue