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()],