From bd3a03dc8f01e57163cac78e21ab2cf3b5c13c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=A8=E6=A0=88=E5=B0=8F=E5=AD=A6=E7=94=9F?= <1518079521@qq.com> Date: Mon, 23 Oct 2023 17:24:36 +0800 Subject: [PATCH] update app pages --- uni-app/src/app/api/member.ts | 1 - .../app/components/diy/addon-list/index.vue | 4 +- .../app/components/diy/goods-list/index.vue | 122 -------------- .../app/components/diy/graphic-nav/index.vue | 52 +++--- .../src/app/components/diy/group/index.scss | 3 +- .../src/app/components/diy/group/index.vue | 24 +-- .../app/components/diy/horz-blank/index.vue | 4 +- .../src/app/components/diy/hot-area/index.vue | 4 +- .../app/components/diy/image-ads/index.vue | 4 +- .../app/components/diy/member-info/index.vue | 4 +- .../src/app/components/diy/notice/index.vue | 15 +- .../app/components/diy/rubik-cube/index.vue | 4 +- uni-app/src/app/components/diy/text/index.vue | 4 +- .../app/components/fixed/demo-index/index.vue | 4 +- .../src/app/components/fixed/group/index.vue | 4 +- .../locale/zh-Hans/pages.member.address.json | 3 +- .../pages.member.location_address_edit.json | 14 ++ uni-app/src/app/pages/index/diy.vue | 46 +++--- uni-app/src/app/pages/index/index.vue | 46 +++--- uni-app/src/app/pages/member/address.vue | 107 ++++++++---- uni-app/src/app/pages/member/address_edit.vue | 15 +- uni-app/src/app/pages/member/index.vue | 11 +- .../pages/member/location_address_edit.vue | 155 +++++++++++++++++- 23 files changed, 379 insertions(+), 271 deletions(-) delete mode 100644 uni-app/src/app/components/diy/goods-list/index.vue create mode 100644 uni-app/src/app/locale/zh-Hans/pages.member.location_address_edit.json diff --git a/uni-app/src/app/api/member.ts b/uni-app/src/app/api/member.ts index 87ac5690d..28d559fd8 100644 --- a/uni-app/src/app/api/member.ts +++ b/uni-app/src/app/api/member.ts @@ -197,7 +197,6 @@ export function addAddress(params: Record) { /** * 编辑会员收货地址 - * @param id * @param params * @returns */ diff --git a/uni-app/src/app/components/diy/addon-list/index.vue b/uni-app/src/app/components/diy/addon-list/index.vue index 3f296dc4c..1fc3b9aff 100644 --- a/uni-app/src/app/components/diy/addon-list/index.vue +++ b/uni-app/src/app/components/diy/addon-list/index.vue @@ -24,7 +24,7 @@ import useDiyStore from '@/app/stores/diy'; import { getWapIndexList } from '@/app/api/system'; - const props = defineProps(['component', 'index', 'pullDownRefresh']); + const props = defineProps(['component', 'index', 'pullDownRefreshCount']); const diyStore = useDiyStore(); const diyComponent = computed(() => { @@ -48,7 +48,7 @@ const list = ref([]) watch( - () => props.pullDownRefresh, + () => props.pullDownRefreshCount, (newValue, oldValue) => { // 处理下拉刷新业务 } diff --git a/uni-app/src/app/components/diy/goods-list/index.vue b/uni-app/src/app/components/diy/goods-list/index.vue deleted file mode 100644 index 3c57d2779..000000000 --- a/uni-app/src/app/components/diy/goods-list/index.vue +++ /dev/null @@ -1,122 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uni-app/src/app/components/diy/graphic-nav/index.vue b/uni-app/src/app/components/diy/graphic-nav/index.vue index ad0a9850f..759d3a882 100644 --- a/uni-app/src/app/components/diy/graphic-nav/index.vue +++ b/uni-app/src/app/components/diy/graphic-nav/index.vue @@ -1,7 +1,7 @@ @@ -32,13 +37,11 @@ import { img, redirect } from '@/utils/common'; const { setShare, onShareAppMessage, onShareTimeline } = useShare() - setShare(); - onShareAppMessage() - onShareTimeline() - const loading = ref(true); const diyStore = useDiyStore(); - const pullDownRefresh = ref(0) + const pullDownRefreshCount = ref(0) + + const id = ref(0) const name = ref('DIY_INDEX') const template = ref('') @@ -58,6 +61,11 @@ } }) + setShare(); + onShareAppMessage() + onShareTimeline() + + // 监听页面加载 onLoad(option => { // #ifdef H5 // 装修模式 @@ -66,21 +74,18 @@ loading.value = false; } // #endif + id.value = option.id || ''; template.value = option.template || ''; }); - // 监听下拉刷新事件 - onPullDownRefresh(() => { - pullDownRefresh.value++; - uni.stopPullDownRefresh(); - }) - + // 监听页面显示 onShow(() => { // 装修模式 if (diyStore.mode == 'decorate') { diyStore.init(); } else { getDiyInfo({ + id: id.value, name: name.value, template: template.value }).then((res : any) => { @@ -106,6 +111,7 @@ title: diyData.title }); loading.value = false; + } else if (data.mode == 'other') { // 跳转到其他页面 redirect({ url: data.page }) @@ -115,13 +121,13 @@ } }); + + // 监听下拉刷新事件 + onPullDownRefresh(() => { + pullDownRefreshCount.value++; + uni.stopPullDownRefresh(); + }) \ No newline at end of file diff --git a/uni-app/src/app/pages/member/address.vue b/uni-app/src/app/pages/member/address.vue index 4fda97826..0f0e207d4 100644 --- a/uni-app/src/app/pages/member/address.vue +++ b/uni-app/src/app/pages/member/address.vue @@ -1,34 +1,46 @@ + \ No newline at end of file