2025.02.15 工作代码提交 修复已经设置了二级密码没有先验证的bug

This commit is contained in:
sx 2025-02-15 21:58:36 +08:00
parent 069ec46cb9
commit 243e1b1d03
6 changed files with 36 additions and 28 deletions

View File

@ -6,8 +6,8 @@ const config = {
// host: 'h5api',
// #endif
// #ifndef H5
// host: 'http://91f.xyz:8080',
host: 'http://1a4b9ed1.r24.cpolar.top',
host: 'http://91f.xyz:8080',
// host: 'http://d5si5v.natappfree.cc',
// #endif
// 支付方式配置
payType: {

View File

@ -41,7 +41,6 @@
*/
function init(productId) {
if (productId) proId.value = productId
//
open()
//

View File

@ -134,11 +134,7 @@
}).then(rs => {
if (rs.code == 200) {
if (list.pageNum == 1) list.data.length = []
list.data.push(...rs.rows.map(item => {
item.format_videoUrl = util.format_url(item.videoUrl, 'video')
item.format_imageUrl = util.format_url(item.imageUrl, 'img')
return item
}))
list.data.push(...rs.rows)
list.total = rs.total
return
}
@ -285,7 +281,7 @@
<scroll-view scroll-x="true" class="scroll">
<view class="list df">
<view class="item oh pr fs0 mr20 br20" v-for="(item,index) in myVideos" :key="index">
<image class="poster br20" :src="item.format_imageUrl" mode="aspectFill" />
<image class="poster br20" :src="item.coverUrl" mode="aspectFill" />
<!-- <view class="window pfull"></view> -->
</view>
</view>

View File

@ -216,9 +216,9 @@
}, 50)
//
// proxy.$refs.productAltRef.init()
handleProBuy({
productId: 42,
})
// handleProBuy({
// productId: 42,
// })
})
onShow(() => {
@ -686,6 +686,7 @@
* @param {Object} item 视频列表项
*/
function handleShowProduct(item) {
console.log('video', item)
// 打开产品详情弹窗
proxy.$refs.productAltRef.init(item.productId)
}
@ -856,7 +857,7 @@
<!-- 左侧菜单弹窗 -->
<leftMenuAlt ref="leftMenuRef" />
<!-- 产品详情弹窗 -->
<productAlt ref="productAltRef" @click="handleProductBuy" />
<productAlt ref="productAltRef" @buy="handleProductBuy" />
<!-- 产品立即下单弹窗 -->
<productSpecAlt ref="productSpecAltRef" :detail="productDetail" @confirm="handlePay" />

View File

@ -28,19 +28,23 @@
} = getCurrentInstance()
//
const store = useStore()
// set rePwd check
const mode = ref('set')
// pwd rePwd check
const mode = ref('pwd')
//
const form = reactive({
pwd: '',
rePwd: '',
check: '',
})
//
const formKey = ref('pwd')
//
const userinfo = computed(() => {
let result = store.state.userinfo
if (result.hasSecondCipher) mode.value = 'check'
if (result.hasSecondCipher) {
mode.value = 'check'
formKey.value = 'check'
}
return result
})
@ -79,7 +83,7 @@
//
form.pwd = ''
form.rePwd = ''
mode.value = 'set'
mode.value = 'pwd'
return
}
//
@ -112,22 +116,23 @@
}
//
if (!data.pwd) {
if (!data.check) {
util.alert('二级密码不能为空')
return
}
//
data.pwd = CryptoJS.MD5(data.pwd).toString()
data.check = CryptoJS.MD5(data.check).toString()
//
api.mine.checkSecondLevelCipher({
data: {
id: userinfo.value.id,
secondLevelCipher: data.pwd,
secondLevelCipher: data.check,
}
}).then(rs => {
if (rs.code == 200) {
form.pwd = ''
mode.value = 'set'
form.check = ''
mode.value = 'pwd'
return
}
util.alert({
@ -162,7 +167,7 @@
<template>
<view class="appbw">
<view class="container ver mt10p" v-if="mode === 'set'">
<view class="container ver mt10p" v-if="mode === 'pwd'">
<view class="title c333 f54">设置二级密码</view>
<view class="content mt50 c666 f32">请设置六位数字的二级密码</view>
@ -187,14 +192,22 @@
<view class="container ver mt10p" v-if="mode === 'check'">
<view class="title c333 f54">验证二级密码</view>
<view class="content mt50 c666 f32">请输入二级密码用于验证</view>
<view class="inputBox mt50 ptb10 plr30">
<input type="number" :maxlength="6" v-model="form.pwd" :focus="true" placeholder="六位数字密码" />
<view class="pwd">
<codeInput v-model:modelValue="form.check" />
</view>
<!-- <view class="inputBox mt50 ptb10 plr30">
<input type="number" :maxlength="6" v-model="form.pwd" :focus="true" placeholder="六位数字密码" />
</view> -->
<view class="btn lg black mtb50 plr50" @click="handleCheck">验证</view>
</view>
</view>
<!-- -->
<view v-show="0">{{userinfo}}</view>
<!-- 安全键盘 -->
<!-- <cc-defineKeyboard ref="CodeKeyboard" passwrdType="pay" @KeyInfo="KeyInfo" /> -->
<view class="keyboard">

View File

@ -3,9 +3,8 @@ import {
} from 'vite';
import uni from '@dcloudio/vite-plugin-uni';
// let target = 'http://91f.xyz:8080'
let target = 'http://1a4b9ed1.r24.cpolar.top'
let target = 'http://91f.xyz:8080'
// let target = 'http://d5si5v.natappfree.cc'
export default defineConfig({
plugins: [uni()],