From a16fa0f199841999669bf81f628cdb7588587e61 Mon Sep 17 00:00:00 2001 From: sx <2427911852@qq.com> Date: Fri, 28 Feb 2025 13:09:49 +0800 Subject: [PATCH 1/4] =?UTF-8?q?2025.02.28=20=E5=B7=A5=E4=BD=9C=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jiuyi2/common/js/config.js | 3 +- jiuyi2/common/js/util.js | 9 ++- jiuyi2/manifest.json | 4 +- jiuyi2/pages.json | 7 ++ jiuyi2/pages/index/index.nvue | 17 +++-- jiuyi2/pages/mine/setting/privacySetting.vue | 77 ++++++++++++++++++++ jiuyi2/pages/mine/setting/setting.vue | 5 ++ jiuyi2/pages/release/commodity.vue | 8 +- jiuyi2/pages/shop/commodity/index.vue | 3 +- jiuyi2/vite.config.js | 3 +- 10 files changed, 113 insertions(+), 23 deletions(-) create mode 100644 jiuyi2/pages/mine/setting/privacySetting.vue diff --git a/jiuyi2/common/js/config.js b/jiuyi2/common/js/config.js index bce99ca0..d9448b2f 100644 --- a/jiuyi2/common/js/config.js +++ b/jiuyi2/common/js/config.js @@ -6,8 +6,7 @@ const config = { // host: 'h5api', // #endif // #ifndef H5 - // host: 'http://91f.xyz:8080', - host: 'http://chi9fe.natappfree.cc', + host: 'http://91f.xyz:8080', // #endif // 支付方式配置 payType: { diff --git a/jiuyi2/common/js/util.js b/jiuyi2/common/js/util.js index 2c59d799..fe31a50b 100644 --- a/jiuyi2/common/js/util.js +++ b/jiuyi2/common/js/util.js @@ -223,11 +223,12 @@ const util = { if (res.data.code == 401) { // 登出 util.logout(() => { - util.alert('请先登录') + util.alert(res.data.msg) reject(res.data) - // uni.reLaunch({ - // url: '/login/login', - // }) + + uni.redirectTo({ + url: '/pages/login/loginPhone', + }) }) } // 嵌套式回调 diff --git a/jiuyi2/manifest.json b/jiuyi2/manifest.json index f5e97211..70301450 100644 --- a/jiuyi2/manifest.json +++ b/jiuyi2/manifest.json @@ -2,8 +2,8 @@ "name" : "九亿", "appid" : "__UNI__08B31BC", "description" : "", - "versionName" : "1.0.8", - "versionCode" : 1008, + "versionName" : "1.0.9", + "versionCode" : 1009, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/jiuyi2/pages.json b/jiuyi2/pages.json index 3c9dd4a8..31b40411 100644 --- a/jiuyi2/pages.json +++ b/jiuyi2/pages.json @@ -746,6 +746,13 @@ { "navigationBarTitleText" : "账号解冻" } + }, + { + "path" : "pages/mine/setting/privacySetting", + "style" : + { + "navigationBarTitleText" : "隐私设置" + } } ], "subPackages": [ diff --git a/jiuyi2/pages/index/index.nvue b/jiuyi2/pages/index/index.nvue index 9c596671..811db6ff 100644 --- a/jiuyi2/pages/index/index.nvue +++ b/jiuyi2/pages/index/index.nvue @@ -96,12 +96,12 @@ data: [], pageNum: 1, total: 0, - pageSize: 10, + pageSize: 20, }) // 关注的视频列表 const attList = reactive({ data: [], - pageSize: 10, + pageSize: 20, pageNum: 1, total: 0, timer: null, @@ -224,9 +224,12 @@ }) onHide(() => { + // console.log('onHide', tabIndex.value, current, proxy.$refs) + const videoRefList = proxy.$refs[`videoRef${tabIndex.value}`] // 暂停视频 - if (proxy.$refs[`videoRef${tabIndex.value}`]) { - proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].pause() + if (videoRefList) { + // videoRefList[videoRefList.length - 2].pause() + videoRefList[current[tabIndex.value]].pause() } }) @@ -353,7 +356,7 @@ // task: 0, } - console.log('browseLog data', data) + // console.log('browseLog data', data) // api.video.browseLog({ data, @@ -363,7 +366,7 @@ const result = rs.data // 现在的有效读秒 const taskValue = task.value - console.log('browseLog result', rs, taskValue) + // console.log('browseLog result', rs, taskValue) // 如果不是第一次统计 if (taskValue.viewingDuration != 0) { @@ -452,6 +455,7 @@ dom.scrollToElement(element, { animated: true }) + console.log('current', current[tab_index]) // 如果视频切换 if (current[tab_index] != currentLast[tab_index]) { @@ -803,7 +807,6 @@ - + // 隐私设置 + import { + ref, + computed, + } from 'vue' + import { + useStore + } from 'vuex' + import { + onLoad, + onUnload + } from '@dcloudio/uni-app' + // 工具库 + import util from '@/common/js/util.js' + // api + import api from '@/api/index.js' + // 推荐 + const recommend = ref(false) + + onLoad(() => { + // 个性化推荐 + let recommendStore = uni.getStorageSync('recommendStore') + if (recommendStore) recommend.value = recommendStore + }) + + onUnload(() => { + uni.setStorageSync('recommendStore', recommend.value) + }) + + /** + * 修改推荐 + * @param {Object} event 默认事件 + */ + function handleRecommend(event) { + recommend.value = event.detail.value + } + + + + + \ No newline at end of file diff --git a/jiuyi2/pages/mine/setting/setting.vue b/jiuyi2/pages/mine/setting/setting.vue index 65c297cd..d33d2818 100644 --- a/jiuyi2/pages/mine/setting/setting.vue +++ b/jiuyi2/pages/mine/setting/setting.vue @@ -228,6 +228,11 @@ + + + 隐私设置 + + diff --git a/jiuyi2/pages/release/commodity.vue b/jiuyi2/pages/release/commodity.vue index bea5f729..431bb144 100644 --- a/jiuyi2/pages/release/commodity.vue +++ b/jiuyi2/pages/release/commodity.vue @@ -56,7 +56,7 @@ form.commission = detail.commission // 商品详情 if (detail.infoRichText) { - form.infoRichText = JSON.parse(detail.infoRichText) + form.infoRichText = decodeURIComponent(escape(atob(detail.infoRichText))) // 富文本编辑器初始化 proxy.$refs.editorAreaRef.init(form.infoRichText) } @@ -231,10 +231,8 @@ // 轮播图 data.sliderImage = data.sliderImage.join(',') // 商品详情 - // if (data.infoRichText) data.infoRichText = Buffer.from(data.infoRichText, 'utf8').toString('base64'); - // if (data.infoRichText) data.infoRichText = JSON.stringify(data.infoRichText) - console.log(btoa, data.infoRichText) - return + if (data.infoRichText) data.infoRichText = btoa(unescape(encodeURIComponent(data.infoRichText))) + // api.shop.saveProduct({ data, diff --git a/jiuyi2/pages/shop/commodity/index.vue b/jiuyi2/pages/shop/commodity/index.vue index e6f9ede5..5b02f9f1 100644 --- a/jiuyi2/pages/shop/commodity/index.vue +++ b/jiuyi2/pages/shop/commodity/index.vue @@ -94,8 +94,9 @@ if (rs.code == 200) { // const result = rs.data + // 商品详情 if (result.infoRichText) { - result.infoRichText = JSON.parse(result.infoRichText) + result.infoRichText = decodeURIComponent(escape(atob(result.infoRichText))) result.infoRichText = util.imgReplace(result.infoRichText) } Object.assign(detail, {}, result) diff --git a/jiuyi2/vite.config.js b/jiuyi2/vite.config.js index d8647819..fc5535df 100644 --- a/jiuyi2/vite.config.js +++ b/jiuyi2/vite.config.js @@ -3,8 +3,7 @@ import { } from 'vite'; import uni from '@dcloudio/vite-plugin-uni'; -// let target = 'http://91f.xyz:8080' -let target = 'http://chi9fe.natappfree.cc' +let target = 'http://91f.xyz:8080' export default defineConfig({ plugins: [uni()], From 16d69c5116f855d216047c3df462fb75c6f995b1 Mon Sep 17 00:00:00 2001 From: sx <2427911852@qq.com> Date: Fri, 28 Feb 2025 13:15:03 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jiuyi2/pages/mine/setting/binding.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jiuyi2/pages/mine/setting/binding.vue b/jiuyi2/pages/mine/setting/binding.vue index 9ad9c3f8..f7ce2360 100644 --- a/jiuyi2/pages/mine/setting/binding.vue +++ b/jiuyi2/pages/mine/setting/binding.vue @@ -139,7 +139,7 @@ - 请核对信息后进行绑定,因信息错误产生的问题后果自负 + 免责声明:请核对信息后进行绑定,因信息错误产生问题,后果责任,由用户(您本人)自行承担。 添加 From ff3913769cfb7060e9b57c2f702774977f070602 Mon Sep 17 00:00:00 2001 From: sx <2427911852@qq.com> Date: Fri, 28 Feb 2025 14:57:12 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jiuyi2/pages/index/wallet/wallet.vue | 12 +++--------- jiuyi2/pages/shop/store/index.vue | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/jiuyi2/pages/index/wallet/wallet.vue b/jiuyi2/pages/index/wallet/wallet.vue index 51d4b780..38dd5d1f 100644 --- a/jiuyi2/pages/index/wallet/wallet.vue +++ b/jiuyi2/pages/index/wallet/wallet.vue @@ -59,15 +59,9 @@ // 待释放列表 const releasedLst = ref([]) // 用户信息 - const userinfo = computed(() => { - let result = store.state.userinfo || {} - return result - }) + const userinfo = computed(() => store.state.userinfo || {}) // 我的钱包 - const wallet = computed(() => { - let result = store.state.purse || {} - return result - }) + const wallet = computed(() => store.state.purse || {}) onLoad(() => { // 获取待释放 @@ -190,7 +184,7 @@ - + 商家明细 diff --git a/jiuyi2/pages/shop/store/index.vue b/jiuyi2/pages/shop/store/index.vue index bb9d5819..93bd251d 100644 --- a/jiuyi2/pages/shop/store/index.vue +++ b/jiuyi2/pages/shop/store/index.vue @@ -236,7 +236,7 @@ defineExpose({ - + From 1fb340263bba19031e365ab883932f3f4c4806e3 Mon Sep 17 00:00:00 2001 From: sx <2427911852@qq.com> Date: Fri, 28 Feb 2025 19:19:35 +0800 Subject: [PATCH 4/4] =?UTF-8?q?2025.02.28=20=E5=B7=A5=E4=BD=9C=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jiuyi2/components/footerMenu/footerMenu.vue | 665 ++++++++++---------- jiuyi2/components/index/commentArea.vue | 7 +- jiuyi2/components/index/indexVideo.vue | 18 +- jiuyi2/components/index/proDetailAlt.vue | 2 +- jiuyi2/components/news/msgList.vue | 2 +- jiuyi2/pages/index/index.nvue | 24 +- 6 files changed, 365 insertions(+), 353 deletions(-) diff --git a/jiuyi2/components/footerMenu/footerMenu.vue b/jiuyi2/components/footerMenu/footerMenu.vue index 5e20aafa..ec3926cf 100644 --- a/jiuyi2/components/footerMenu/footerMenu.vue +++ b/jiuyi2/components/footerMenu/footerMenu.vue @@ -1,245 +1,245 @@