diff --git a/niucloud/config/version.php b/niucloud/config/version.php
index 1051ae8d3..691bf7976 100644
--- a/niucloud/config/version.php
+++ b/niucloud/config/version.php
@@ -1,6 +1,6 @@
'1.0.2',
- 'code' => '202305310001'
+ 'version' => '1.0.3',
+ 'code' => '202306080001'
];
diff --git a/uni-app/components/diy/group/index.vue b/uni-app/components/diy/group/index.vue
index ca4cfa812..0506c371e 100644
--- a/uni-app/components/diy/group/index.vue
+++ b/uni-app/components/diy/group/index.vue
@@ -24,7 +24,7 @@
-
+
diff --git a/uni-app/components/diy/image-ads/index.vue b/uni-app/components/diy/image-ads/index.vue
index 46038a172..d5ceaaf6a 100644
--- a/uni-app/components/diy/image-ads/index.vue
+++ b/uni-app/components/diy/image-ads/index.vue
@@ -2,16 +2,16 @@
-
+
-
-
+
@@ -38,6 +38,7 @@
return props.component;
}
})
+
const warpCss = computed(() => {
var style = '';
if (diyComponent.value.componentBgColor) style += 'background-color:' + diyComponent.value.componentBgColor + ';';
@@ -53,6 +54,10 @@
return style;
})
+ const imgHeight = computed(() => {
+ return (diyComponent.value.imageHeight * 2) + 'rpx';
+ })
+
const swiperIndex = ref(0);
const swiperChange = e => {
@@ -60,7 +65,6 @@
};
const handleData = () => {
- diyComponent.value.imageHeight = (diyComponent.value.imageHeight * 2) + 'rpx';
};
onMounted(() => {
diff --git a/uni-app/components/diy/member-info/index.vue b/uni-app/components/diy/member-info/index.vue
index 2204c3427..d58fb7bda 100644
--- a/uni-app/components/diy/member-info/index.vue
+++ b/uni-app/components/diy/member-info/index.vue
@@ -21,7 +21,8 @@
- {{ t('login') }}/{{ t('register') }}
+ {{ t('login') }}/{{ t('register') }}
+
@@ -34,19 +35,23 @@
- {{ money }}
+ {{ money }}
- {{ t('balance') }}
+ {{ t('balance') }}
- {{ parseInt(info?.point) || 0 }}
+ {{ parseInt(info?.point) || 0 }}
- {{ t('point') }}
+ {{ t('point') }}
@@ -81,7 +86,7 @@
const warpCss = computed(() => {
var style = '';
- if(diyComponent.value.componentBgColor) style += 'background-color:' + diyComponent.value.componentBgColor + ';';
+ if (diyComponent.value.componentBgColor) style += 'background-color:' + diyComponent.value.componentBgColor + ';';
if (diyComponent.value.bgUrl) {
style += 'background-image:url(' + img(diyComponent.value.bgUrl) + ');';
style += 'background-size: 100%;';
@@ -114,7 +119,7 @@
balance: 0,
point: 0,
money: 0,
- member_no:'NIU0000021'
+ member_no: 'NIU0000021'
}
} else {
return memberStore.info;
diff --git a/uni-app/locale/language.ts b/uni-app/locale/language.ts
index 91a116129..c27e9a86d 100644
--- a/uni-app/locale/language.ts
+++ b/uni-app/locale/language.ts
@@ -22,9 +22,7 @@ class Language {
uni.setLocale(locale)
// #ifdef H5
- if (process.env.NODE_ENV == 'production') {
- setDocumentTitle(path)
- }
+ setDocumentTitle(path)
// #endif
}
diff --git a/uni-app/locale/zh-Hans/pages.index.develop.json b/uni-app/locale/zh-Hans/pages.index.develop.json
index 9d4d9eed7..f54fd2332 100644
--- a/uni-app/locale/zh-Hans/pages.index.develop.json
+++ b/uni-app/locale/zh-Hans/pages.index.develop.json
@@ -2,7 +2,7 @@
"developTitle":"开发环境配置",
"baseUrl":"API请求地址",
"imgUrl":"图片服务器地址",
- "siteId":"站点ID",
+ "siteId":"站点ID(VITE_SITE_ID)",
"siteIdPlaceholder": "请输入站点ID",
"pleaseEnterNumber":"请输入数字",
"maximumCannotExceed":"最大不能超过"
diff --git a/uni-app/pages/index/nonexistence.vue b/uni-app/pages/index/nonexistence.vue
deleted file mode 100644
index a2780dfe9..000000000
--- a/uni-app/pages/index/nonexistence.vue
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/uni-app/pages/member/info.vue b/uni-app/pages/member/info.vue
deleted file mode 100644
index 02409e35d..000000000
--- a/uni-app/pages/member/info.vue
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/uni-app/stores/diy.ts b/uni-app/stores/diy.ts
index c214dd868..df7710512 100644
--- a/uni-app/stores/diy.ts
+++ b/uni-app/stores/diy.ts
@@ -46,8 +46,8 @@ const useDiyStore = defineStore('diy', {
try {
let data = JSON.parse(event.data);
this.currentIndex = data.currentIndex;
- if(data.global) this.global = data.global;
- if(data.value) this.value = data.value;
+ if (data.global) this.global = data.global;
+ if (data.value) this.value = data.value;
if (this.value) {
this.value.forEach((item, index) => {
@@ -101,7 +101,7 @@ const useDiyStore = defineStore('diy', {
});
window.parent.postMessage(data, '*');
// #endif
- },
+ }
}
})
diff --git a/uni-app/utils/common.ts b/uni-app/utils/common.ts
index 109858f38..237364f8b 100644
--- a/uni-app/utils/common.ts
+++ b/uni-app/utils/common.ts
@@ -3,6 +3,7 @@ import useDiyStore from '@/stores/diy'
import useMemberStore from '@/stores/member'
import pagesZh from '@/locale/zh-Hans.json'
import pagesEn from '@/locale/en.json'
+import { onReady } from '@dcloudio/uni-app'
/**
* 跳转页面
@@ -245,7 +246,17 @@ export function setDocumentTitle(route: string) {
'en': pagesEn
}
const key = route.replace('/', '').replaceAll('/', '.')
- locale[ uni.getLocale() ][key] && (document.title = locale[ uni.getLocale() ][key])
+ if (locale[ uni.getLocale() ][key]) {
+ setTimeout(() => {
+ uni.setNavigationBarTitle({
+ title: locale[ uni.getLocale() ][key],
+ fail(e) {
+ setDocumentTitle(route)
+ }
+ })
+ }, 500)
+ }
} catch (e) {
+ console.log(e)
}
}
\ No newline at end of file
diff --git a/uni-app/utils/interceptor.ts b/uni-app/utils/interceptor.ts
index a46467e59..822e79a1c 100644
--- a/uni-app/utils/interceptor.ts
+++ b/uni-app/utils/interceptor.ts
@@ -2,6 +2,7 @@ import { language } from '@/locale'
import { checkNeedLogin } from '@/utils/auth'
import { redirect, urlDeconstruction, getToken, getSiteId, setDocumentTitle } from '@/utils/common'
import { memberLog } from '@/api/auth'
+import { nextTick } from 'vue'
/**
* 页面跳转拦截器
@@ -23,10 +24,10 @@ export const redirectInterceptor = () => {
if ((getSiteId(uni.getStorageSync('wap_site_id') || import.meta.env.VITE_SITE_ID) === '') && route.path != '/pages/index/develop') {
redirect({ url: '/pages/index/develop', mode: 'reLaunch' })
}
- } else {
- // 设置网站标题
- setDocumentTitle(route.path)
- }
+ }
+
+ // 设置网站标题
+ setDocumentTitle(route.path)
// #endif
// 校验是否需要登录
@@ -53,15 +54,17 @@ export const launchInterceptor = () => {
if (location.search.indexOf('?mode=decorate&site_id=') != -1) {
uni.setStorageSync('wap_site_id', location.search.replace('?mode=decorate&site_id=',''));
}
+ if (location.search.indexOf('?mode=preview&site_id=') != -1) {
+ uni.setStorageSync('wap_site_id', location.search.replace('?mode=preview&site_id=',''));
+ }
if (getSiteId(uni.getStorageSync('wap_site_id') || import.meta.env.VITE_SITE_ID) === '') {
launch.path = '/pages/index/develop';
uni.setStorageSync('develop_before_path', launch.path);
redirect({ url: '/pages/index/develop', mode: 'reLaunch' })
}
- } else {
- // 设置网站标题
- setDocumentTitle(launch.path)
- }
+ }
+ // 设置网站标题
+ setDocumentTitle(launch.path)
// #endif
// 加载语言包