no message

cyl/job_im
jscyl13849007907 3 days ago
parent 1d2ea5efdf
commit f95c12a8ca

@ -367,6 +367,10 @@ export default {
getApp().globalData.themeColor = demoConfig.themeColor;
this.themeColor = demoConfig.themeColor;
}
} else {
let originalThemeColor = uni.getStorageSync("ORIGINAL_THEME_COLOR") || getApp().globalData.themeColor;
getApp().globalData.themeColor = originalThemeColor;
this.themeColor = originalThemeColor;
}
if (this.appInfo.noticeImg) {
this.noticeImg = this.appInfo.noticeImg;
@ -407,10 +411,14 @@ export default {
if (demoEnabled && demoConfig) {
that.$set(that.appInfo, 'logo', demoConfig.logo);
that.$set(that.appInfo, 'appName', demoConfig.appName);
}
if (demoConfig && demoConfig.themeColor) {
getApp().globalData.themeColor = demoConfig.themeColor;
that.themeColor = demoConfig.themeColor;
if (demoConfig.themeColor) {
getApp().globalData.themeColor = demoConfig.themeColor;
that.themeColor = demoConfig.themeColor;
}
} else {
let originalThemeColor = uni.getStorageSync("ORIGINAL_THEME_COLOR") || getApp().globalData.themeColor;
getApp().globalData.themeColor = originalThemeColor;
that.themeColor = originalThemeColor;
}
},
data() {

@ -25,7 +25,7 @@
</view>
</view>
</view>
<view class="g_mt_40 g_ml_12 g_mr_12">
<view class="g_mt_40 g_ml_12 g_mr_12 vonfigbtn">
<rh-button btnText="保存" @clickBtn="handleSubmit" type="primary" size="full" style="width: 250px;" />
</view>
<view class="g_flex_row_end g_pr_20 g_mt_8 g_fs_14 g_mb_24" style="color: #576b95" @click="handleRestore"></view>
@ -109,6 +109,9 @@ export default {
});
return;
}
if (!uni.getStorageSync("ORIGINAL_THEME_COLOR")) {
uni.setStorageSync("ORIGINAL_THEME_COLOR", getApp().globalData.themeColor);
}
uni.setStorageSync("DEMO_MODE_CONFIG", {
appName: that.formData.appName,
logo: that.formData.logo,
@ -126,12 +129,12 @@ export default {
}, 1500);
},
handleRestore() {
let defaultThemeColor = "#fea702";
let originalThemeColor = uni.getStorageSync("ORIGINAL_THEME_COLOR") || getApp().globalData.themeColor;
uni.setStorageSync("DEMO_MODE_ENABLED", false);
let demoConfig = uni.getStorageSync("DEMO_MODE_CONFIG") || {};
demoConfig.enabled = false;
uni.setStorageSync("DEMO_MODE_CONFIG", demoConfig);
getApp().globalData.themeColor = defaultThemeColor;
getApp().globalData.themeColor = originalThemeColor;
uni.showToast({
title: "已恢复",
icon: "success",
@ -193,4 +196,10 @@ export default {
transform: scale(1.1);
}
}
.vonfigbtn{
.bocai_btn_mode_circle{
width: 250px !important;
}
}
</style>

Loading…
Cancel
Save