diff --git a/uni-app/src/addon/components/diy/group/index.vue b/uni-app/src/addon/components/diy/group/index.vue index 40f446914..c2c099878 100644 --- a/uni-app/src/addon/components/diy/group/index.vue +++ b/uni-app/src/addon/components/diy/group/index.vue @@ -124,13 +124,16 @@ - + + diff --git a/uni-app/src/addon/components/diy/group/useDiyGroup.ts b/uni-app/src/addon/components/diy/group/useDiyGroup.ts index ccb5d7142..3611fdc23 100644 --- a/uni-app/src/addon/components/diy/group/useDiyGroup.ts +++ b/uni-app/src/addon/components/diy/group/useDiyGroup.ts @@ -5,6 +5,8 @@ import { onPageScroll, onHide, onShow } from '@dcloudio/uni-app'; import useDiyStore from '@/app/stores/diy'; export function useDiyGroup(params: any = {}) { + // 新增:控制版权显示的状态,默认隐藏 + const showCopyright = ref(false); let scrollVal: any = ""; //组件滚动值集合 const componentsScrollBool: any = ref({}); //组件是否根据滚动进行相应改变 @@ -98,6 +100,10 @@ export function useDiyGroup(params: any = {}) { componentsScrollBool.value[key] = -1; } } + // 新增:页面加载完成后,显示版权 + showCopyright.value = true; + console.log('组件加载完成', showCopyright.value); + }, 500) }); }); @@ -174,11 +180,13 @@ export function useDiyGroup(params: any = {}) { scrollV: scrollValStr.value, data: data.value, componentsScrollBool: componentsScrollBool.value, + showCopyright, // 新增:暴露版权显示状态 placeholderEvent, refresh, isShowPlaceHolder, getComponentClass, onPageScroll: onPageScrollLifeCycle, onMounted: onMountedLifeCycle + } } diff --git a/uni-app/src/app/pages/member/point_detail.vue b/uni-app/src/app/pages/member/point_detail.vue index 5ef5c219f..7e825b52d 100644 --- a/uni-app/src/app/pages/member/point_detail.vue +++ b/uni-app/src/app/pages/member/point_detail.vue @@ -19,7 +19,7 @@ - + - + + class="sidebar-margin card-template mt-[var(--top-m)]"> {{ item.month_info.year }}年 diff --git a/uni-app/src/app/stores/diy.ts b/uni-app/src/app/stores/diy.ts index ded888b41..bd66cd999 100644 --- a/uni-app/src/app/stores/diy.ts +++ b/uni-app/src/app/stores/diy.ts @@ -13,6 +13,7 @@ interface Diy { pageStartBgColor: string, // 页面背景颜色(开始) pageEndBgColor: string, // 页面背景颜色(结束) bottomTabBar: any, // 底部导航 + copyright: any, // 版权信息 bgUrl: string }, // 组件集合 @@ -38,6 +39,14 @@ const useDiyStore = defineStore('diy', { bottomTabBar: { control: true, // 是否允许展示编辑 isShow: true, // 是否显示 + designNav:{ + title:'', + key:'' + } + }, + copyright:{ + control: true, // 是否允许展示编辑 + isShow: false, // 是否显示 }, bgUrl: '' }, diff --git a/uni-app/src/components/copy-right/copy-right.vue b/uni-app/src/components/copy-right/copy-right.vue new file mode 100644 index 000000000..d572d98c0 --- /dev/null +++ b/uni-app/src/components/copy-right/copy-right.vue @@ -0,0 +1,29 @@ + + + + + \ No newline at end of file diff --git a/uni-app/src/components/tabbar/tabbar.vue b/uni-app/src/components/tabbar/tabbar.vue index d55dcd210..4850dae20 100644 --- a/uni-app/src/components/tabbar/tabbar.vue +++ b/uni-app/src/components/tabbar/tabbar.vue @@ -46,7 +46,6 @@ if (!addon && configStore.addon) { } const tabbar: any = reactive({}) - const setTabbar = () => { let list = cloneDeep(useConfigStore().tabbarList); if (list.length == 1) { @@ -96,6 +95,19 @@ const setTabbar = () => { setTabbar() +// 移除原有的 "if (!props.addon)" 条件限制,直接监听 configStore.addon +watch( + () => useConfigStore().addon, + (newAddon, oldAddon) => { + // 当 props.addon 为空时,才响应 configStore.addon 的变化 + if (!props.addon && newAddon !== oldAddon) { + addon = newAddon; // 同步更新本地 addon 变量 + setTabbar(); // 重新设置 TabBar + } + }, + { immediate: true, deep: true } // 立即执行 + 深度监听 +); + watch( () => props.addon, (newValue, oldValue) => { diff --git a/uni-app/src/components/top-tabbar/top-tabbar.vue b/uni-app/src/components/top-tabbar/top-tabbar.vue index 15d5ba559..ca09bc56e 100644 --- a/uni-app/src/components/top-tabbar/top-tabbar.vue +++ b/uni-app/src/components/top-tabbar/top-tabbar.vue @@ -192,7 +192,7 @@ if (componentsScrollVal) { let pages = getCurrentPages(); const isBackShow = computed(() => { let bool = false; - if (props.isBack && pages.length > 1) { + if (props.isBack) { bool = true; } return bool; @@ -205,7 +205,14 @@ const goBack = () => { if (typeof props.customBack === 'function') { props.customBack(); } else { - uni.navigateBack(); + if (getCurrentPages().length > 1) { + uni.navigateBack() + } else { + redirect({ + url: '/addon/shop/pages/index', + mode: 'reLaunch' + }); + } } } /******************************* 返回按钮-end ***********************/ diff --git a/uni-app/src/manifest.json b/uni-app/src/manifest.json index fe52c94cf..55994fad7 100644 --- a/uni-app/src/manifest.json +++ b/uni-app/src/manifest.json @@ -1,40 +1,36 @@ { - "name" : "", - "appid" : "__UNI__9B03DBD", - "description" : "", - "versionName" : "1.0.0", - "versionCode" : "100", - "transformPx" : false, - /* 5+App特有相关 */ - "app-plus" : { + "name": "", + "appid": "__UNI__9B03DBD", + "description": "", + "versionName": "1.0.0", + "versionCode": "100", + "transformPx": false, + "app-plus": { "compatible": { "ignoreVersion": true }, - "usingComponents" : true, - "nvueStyleCompiler" : "uni-app", - "compilerVersion" : 3, - "splashscreen" : { - "alwaysShowBeforeRender" : true, - "waiting" : true, - "autoclose" : true, - "delay" : 0 + "usingComponents": true, + "nvueStyleCompiler": "uni-app", + "compilerVersion": 3, + "splashscreen": { + "alwaysShowBeforeRender": true, + "waiting": true, + "autoclose": true, + "delay": 0 }, - /* 模块配置 */ - "modules" : { - "Camera" : {}, - "Barcode" : {}, - "Contacts" : {}, - "Geolocation" : {}, - "Payment" : {}, - "VideoPlayer" : {}, - "Maps" : {}, - "Share" : {} + "modules": { + "Camera": {}, + "Barcode": {}, + "Contacts": {}, + "Geolocation": {}, + "Payment": {}, + "VideoPlayer": {}, + "Maps": {}, + "Share": {} }, - /* 应用发布信息 */ - "distribute" : { - /* android打包配置 */ - "android" : { - "permissions" : [ + "distribute": { + "android": { + "permissions": [ "", "", "", @@ -52,88 +48,71 @@ "" ] }, - /* ios打包配置 */ - "ios" : { - "dSYMs" : false + "ios": { + "dSYMs": false }, - /* SDK配置 */ - "sdkConfigs" : { - "geolocation" : { - "system" : { - "__platform__" : [ "android" ] - } - }, - "payment" : { - "alipay" : { - "__platform__" : [ "ios", "android" ] - } - }, - "oauth" : {}, - "maps" : { - "tencent" : { - "key" : "6ZDBZ-CLSLX-66747-7MVM4-HLK47-XMBXU" - } - }, - "share" : { - "weixin" : { - "appid" : "", - "UniversalLinks" : "" + "sdkConfigs": { + "maps": { + "tencent": { + "key": "6ZDBZ-CLSLX-66747-7MVM4-HLK47-XMBXU" } } } } }, - /* 快应用特有相关 */ - "quickapp" : {}, - /* 小程序特有相关 */ - "mp-weixin" : { - "appid" : "", - "setting" : { - "urlCheck" : false + "quickapp": {}, + "mp-weixin": { + "appid": "", + "setting": { + "urlCheck": false }, - "usingComponents" : true, - "permission" : { - "scope.userLocation" : { - "desc" : "为了更好地为您提供服务" + "usingComponents": true, + "permission": { + "scope.userLocation": { + "desc": "为了更好地为您提供服务" }, - "scope.writePhotosAlbum" : { - "desc" : "为了更好地为您提供服务" + "scope.writePhotosAlbum": { + "desc": "为了更好地为您提供服务" } }, - "requiredPrivateInfos" : [ "chooseLocation", "getLocation", "chooseAddress" ], - "__usePrivacyCheck__" : true + "requiredPrivateInfos": [ + "chooseLocation", + "getLocation", + "chooseAddress" + ], + "__usePrivacyCheck__": true }, - "mp-alipay" : { - "usingComponents" : true + "mp-alipay": { + "usingComponents": true }, - "mp-baidu" : { - "usingComponents" : true + "mp-baidu": { + "usingComponents": true }, - "mp-toutiao" : { - "usingComponents" : true + "mp-toutiao": { + "usingComponents": true }, - "uniStatistics" : { - "enable" : false + "uniStatistics": { + "enable": false }, - "vueVersion" : "3", - "h5" : { - "router" : { - "mode" : "history", - "base" : "/wap/" + "vueVersion": "3", + "h5": { + "router": { + "mode": "history", + "base": "/wap/" }, - "sdkConfigs" : { - "maps" : { - "qqmap" : { - "key" : "" + "sdkConfigs": { + "maps": { + "qqmap": { + "key": "" } } }, - "async" : { - "loading" : "", - "error" : "", - "delay" : 0, - "timeout" : 3000 + "async": { + "loading": "", + "error": "", + "delay": 0, + "timeout": 3000 } }, - "fallbackLocale" : "zh-Hans" -} + "fallbackLocale": "zh-Hans" +} \ No newline at end of file diff --git a/uni-app/src/pages.json b/uni-app/src/pages.json index ead628376..b94bd2b59 100644 --- a/uni-app/src/pages.json +++ b/uni-app/src/pages.json @@ -216,7 +216,7 @@ ], "subPackages": [ // {{ PAGE_BEGAIN }} - // {{ PAGE_END }} +// {{ PAGE_END }} { "root": "app/components", "pages": [] diff --git a/uni-app/src/stores/system.ts b/uni-app/src/stores/system.ts index 4500d9de6..15bcb6fa2 100644 --- a/uni-app/src/stores/system.ts +++ b/uni-app/src/stores/system.ts @@ -34,7 +34,8 @@ interface System { weappOptions: any }, versionInfo: any, - updateVersionPopup: boolean + updateVersionPopup: boolean, + copyright:any } const useSystemStore = defineStore('system', { @@ -76,7 +77,8 @@ const useSystemStore = defineStore('system', { weappOptions: {} }, versionInfo: null, - updateVersionPopup: false + updateVersionPopup: false, + copyright:null } }, actions: { @@ -115,6 +117,9 @@ const useSystemStore = defineStore('system', { return item.key }) + // 版权设置 + this.copyright = data.copyright + // 会员等级 const memberStore = useMemberStore(); memberStore.levelList = data.member_level; diff --git a/uni-app/src/styles/common.scss b/uni-app/src/styles/common.scss index 765cc6940..82a460ef5 100644 --- a/uni-app/src/styles/common.scss +++ b/uni-app/src/styles/common.scss @@ -247,19 +247,19 @@ button[type='primary'],uni-button[type='primary']{ font-size: 28rpx; &.class-select{ position: relative; - font-weight: 500; + font-weight: 700; color: var(--primary-color); - &::before { - content: ""; - position: absolute; - bottom: -14rpx; - height: 6rpx; - border-radius: 100rpx; - background-color: var(--primary-color); - width: 40rpx; - left: 50%; - transform: translateX(-50%); - } + // &::before { + // content: ""; + // position: absolute; + // bottom: -14rpx; + // height: 6rpx; + // border-radius: 100rpx; + // background-color: var(--primary-color); + // width: 40rpx; + // left: 50%; + // transform: translateX(-50%); + // } } } } @@ -291,19 +291,19 @@ button[type='primary'],uni-button[type='primary']{ font-size: 28rpx; &.class-select{ position: relative; - font-weight: 500; + font-weight: 700; color: var(--primary-color); - &::before{ - content: ""; - position: absolute; - bottom: 10rpx; - width: 40rpx; - height:6rpx; - border-radius: 4rpx; - background-color: var(--primary-color); - left: 50%; - transform: translateX(-50%); - } + // &::before{ + // content: ""; + // position: absolute; + // bottom: 10rpx; + // width: 40rpx; + // height:6rpx; + // border-radius: 4rpx; + // background-color: var(--primary-color); + // left: 50%; + // transform: translateX(-50%); + // } } } } @@ -322,19 +322,19 @@ button[type='primary'],uni-button[type='primary']{ margin:0 var(--sidebar-m); &.class-select{ position: relative; - font-weight: 500; + font-weight: 700; color: var(--primary-color); - &::before{ - content: ""; - position: absolute; - bottom: 10rpx; - width: 40rpx; - height:6rpx; - border-radius: 4rpx; - background-color: var(--primary-color); - left: 50%; - transform: translateX(-50%); - } + // &::before{ + // content: ""; + // position: absolute; + // bottom: 10rpx; + // width: 40rpx; + // height:6rpx; + // border-radius: 4rpx; + // background-color: var(--primary-color); + // left: 50%; + // transform: translateX(-50%); + // } } }