2025.02.28 工作代码提交

This commit is contained in:
sx 2025-02-28 13:09:49 +08:00
parent 4402fdd67a
commit a16fa0f199
10 changed files with 113 additions and 23 deletions

View File

@ -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: {

View File

@ -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',
})
})
}
// 嵌套式回调

View File

@ -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" : {

View File

@ -746,6 +746,13 @@
{
"navigationBarTitleText" : "账号解冻"
}
},
{
"path" : "pages/mine/setting/privacySetting",
"style" :
{
"navigationBarTitleText" : "隐私设置"
}
}
],
"subPackages": [

View File

@ -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 @@
<cell class="cell" :style="[{height: viewSize.height + 'px'}]" :ref="`cellRef` + index"
v-for="(secItem,secIndex) in item.listData()" :key="secItem.id" @click.stop>
<!-- <template v-if="current[tabIndex] < secIndex + 2 && current[tabIndex] > secIndex - 2"> -->
<!-- 视频 -->
<indexVideo :ref="'videoRef' + index" :tabIndex="index" :current="current[tabIndex]"
:width="viewSize.width" :height="viewSize.height" :item="secItem" :index="secIndex"

View File

@ -0,0 +1,77 @@
<script setup>
//
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
}
</script>
<template>
<view class="app">
<view class="area">
<view class="line">
<view class="rows">
<view class="">个性化推荐管理</view>
<switch :checked="recommend" color="rgb(0,122,255)" style="transform:scale(0.7)"
@change="handleRecommend" />
</view>
<view class="notice mt10 c999 f28">
<text>特别说明: 关闭个性化推荐后您仍会收到通用内容推荐但可能与您的兴趣关联性较低
我们严格遵循个人信息保护法不会将您的个人信息用于未声明的其他用途</text>
</view>
</view>
</view>
</view>
</template>
<style lang="scss">
//
.area {
margin: 30rpx;
padding: 0 30rpx;
color: #333;
font-size: 30rpx;
background-color: #fff;
border-radius: 20rpx;
.line {
padding: 20rpx 10rpx;
}
.line+.line {
border-top: 1px solid #eeeeee;
}
}
</style>

View File

@ -228,6 +228,11 @@
</view>
</picker>
</view>
<view class="line rows" @click="link('/pages/mine/setting/privacySetting')">
<view class="">隐私设置</view>
<uni-icons type="right" />
</view>
</view>
</template>

View File

@ -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,

View File

@ -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)

View File

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