From 03e0addbffcc91a22911cd02e76e9bf440e01371 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Wed, 30 Aug 2023 09:27:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/uniApi.js | 13 ++----------- store/modules/config.js | 3 ++- subpkg/buyShare/buyShare.vue | 4 ++-- subpkg/shareCapital/shareCapital.vue | 12 ++---------- 4 files changed, 8 insertions(+), 24 deletions(-) diff --git a/libs/uniApi.js b/libs/uniApi.js index b5cac75..ffd8def 100644 --- a/libs/uniApi.js +++ b/libs/uniApi.js @@ -87,25 +87,16 @@ export function clearStorage() { @title 最多汉字数量7个 @icon success loading none */ -export function Toast(title, icon = 'none', obj = {}, duration = 800) { +export function Toast(title, icon = 'none', obj = {}, duration = 700) { let toastData = { title: title, duration: duration, - position: 'center', + // position: 'center', mask: true, icon: icon ? icon : 'none', ...obj }; uni.showToast(toastData); - // #ifdef APP-PLUS - setTimeout(function() { - try{ - uni.hideToast(); - }catch(e){ - //TODO handle the exception - } - }, 800) - // #endif } /* 显示loading提示框,需要手动隐藏 diff --git a/store/modules/config.js b/store/modules/config.js index 1c1f664..be53b06 100644 --- a/store/modules/config.js +++ b/store/modules/config.js @@ -4,7 +4,7 @@ import { getConfig } from "@/api/config.js"; const state = { eyeType: Cache.get('eyeType') || true, // 小眼睛 request: Cache.get('request') || true, // 网络请求 - config: {} + config: Cache.get('config') || {} }; const mutations = { @@ -18,6 +18,7 @@ const mutations = { }, SET_CONFIG(state, data){ state.config = {...data}; + Cache.set('config', state.config); } }; diff --git a/subpkg/buyShare/buyShare.vue b/subpkg/buyShare/buyShare.vue index d9aeedb..a1e80ab 100644 --- a/subpkg/buyShare/buyShare.vue +++ b/subpkg/buyShare/buyShare.vue @@ -12,10 +12,10 @@ {{task.content}} - 历史记录 + 事件记录 - + diff --git a/subpkg/shareCapital/shareCapital.vue b/subpkg/shareCapital/shareCapital.vue index 9dd9a6d..d622849 100644 --- a/subpkg/shareCapital/shareCapital.vue +++ b/subpkg/shareCapital/shareCapital.vue @@ -40,18 +40,10 @@ import { Toast } from '../../libs/uniApi'; }, methods:{ retreat(){ - uni.showToast({ - icon:'none', - title:'开发中', - duration: 700 - }) + Toast('开发中') }, hand(){ - uni.showToast({ - icon:'none', - title:'开发中', - duration: 700 - }) + Toast('开发中') } } }