2025.02.12 工作代码提交

This commit is contained in:
sx 2025-02-12 17:03:02 +08:00
parent b56aae7b27
commit 56ab4cb220
14 changed files with 248 additions and 38 deletions

View File

@ -21,6 +21,10 @@ const config = {
name: '余额', name: '余额',
icon: '/static/balance.png', icon: '/static/balance.png',
}, },
durian: {
name: '榴莲果',
icon: '/static/fruit.png',
},
}, },
// 腾讯im聊天 // 腾讯im聊天
TChat: { TChat: {

View File

@ -14,17 +14,23 @@
} = getCurrentInstance() } = getCurrentInstance()
const emit = defineEmits(['setting']) const emit = defineEmits(['setting'])
//
function open() { function open() {
proxy.$refs.teen.open() proxy.$refs.teen.open()
} }
//
function close() { function close() {
proxy.$refs.teen.close() proxy.$refs.teen.close()
} }
//
function handleSetting() { function handleSetting() {
//
uni.navigateTo({
url: '/pages/mine/setting/teen'
})
proxy.$refs.teen.close() proxy.$refs.teen.close()
emit('setting')
} }
// //

View File

@ -9,7 +9,9 @@
defineExpose, defineExpose,
ref, ref,
getCurrentInstance, getCurrentInstance,
defineEmits defineEmits,
onMounted,
nextTick
} from 'vue'; } from 'vue';
import { import {
useStore useStore
@ -20,13 +22,27 @@
import api from '@/api/index.js' import api from '@/api/index.js'
// //
import CryptoJS from 'crypto-js'; import CryptoJS from 'crypto-js';
//
import codeInput from '@/components/mine/codeInput.vue'
//
import keyboard from '@/components/public/keyboard/keyboard.vue'
// //
const props = defineProps({ const props = defineProps({
// //
check: { check: {
type: Boolean, type: Boolean,
default: false default: false
} },
//
price: {
type: [Number, String],
},
//
unitKey: {
type: String,
default: 'balance'
},
}) })
// //
@ -41,6 +57,15 @@
const pwd = ref('') const pwd = ref('')
// //
const userinfo = computed(() => store.state.userinfo) const userinfo = computed(() => store.state.userinfo)
//
const unit = computed(() => {
let config = util.config.payType
return config[props.unitKey] || {}
})
onMounted(() => {
console.log('onMounted', keyboard, proxy.$refs)
})
// //
function open() { function open() {
@ -64,6 +89,28 @@
}, 500) }, 500)
} }
/**
* 支付键盘回调
* @param {Object} val
*/
function KeyInfo(val) {
//
if (val.keyCode === 8) {
//
pwd.value = pwd.value.slice(0, -1)
return
}
//
if (pwd.value.length >= 6) return
// .
else if (val.keyCode == 190) {
// .
} else {
pwd.value += val.key
// passwordArr.push(val.key);
}
}
// //
function handleConfirm() { function handleConfirm() {
if (!/^\d{6}$/.test(pwd.value)) { if (!/^\d{6}$/.test(pwd.value)) {
@ -106,18 +153,30 @@
</script> </script>
<template> <template>
<uni-popup ref="pwdRef" type="center"> <uni-popup ref="pwdRef" type="bottom">
<view class="pwdAlt popMid plr30 bfff"> <view class="pwdAlt popBot plr30 bfff">
<view class="title mtb30 f30">验证二级密码</view> <view class="header rows mtb30 f30">
<view class="title ">验证二级密码</view>
<uni-icons type="closeempty" @click="close()" />
</view>
<view class="inputBox mtb20 plr30"> <view class="tac f48" v-if="price || unit">
<input v-model="pwd" :maxlength="6" type="number" placeholder="输入二级密码" /> <text>{{price}}</text>
<text>{{unit.name}}</text>
</view>
<view class="line mtb20 plr30">
<codeInput v-model:modelValue="pwd" />
<!-- <input v-model="pwd" :maxlength="6" type="number" placeholder="输入二级密码" /> -->
</view> </view>
<view class="btns mtb30 rows"> <view class="btns mtb30 rows">
<view class="btn lg cancel plr40 f1" @click="$refs.pwdRef.close()">取消</view> <view class="btn lg cancel plr40 f1" @click="$refs.pwdRef.close()">取消</view>
<view class="btn lg black plr40 f1" @click="handleConfirm">验证</view> <view class="btn lg black plr40 f1" @click="handleConfirm">验证</view>
</view> </view>
<!-- 安全键盘 -->
<keyboard ref="CodeKeyboard" passwrdType="pay" @KeyInfo="KeyInfo" />
</view> </view>
</uni-popup> </uni-popup>
</template> </template>

View File

@ -0,0 +1,43 @@
.page-total{
// position: fixed;
// left: 0;
// bottom: 0;
// width: 100%;
// background-color: #f6f6f6;
}
.key-list{
display: flex;
flex-wrap: wrap;
align-items: center;
padding: 1% 3%;
height: 90%;
margin-top: 20rpx;
.list{
display: flex;
align-items: center;
justify-content: center;
width: 32%;
height: 92rpx;
background-color: #FFFFFF;
border-radius: 10rpx;
box-shadow: 0 0 10rpx rgba(0,0,0,0.1);
margin-right: 1.7%;
margin-bottom: 16rpx;
text{
font-size: 38rpx;
font-weight: bold;
color: #222222;
}
}
.list:nth-child(3n){
margin-right: 0;
}
.special{
background-color: #f6f6f6;
box-shadow: none;
text{
color: #959595;
}
}
}

View File

@ -0,0 +1,89 @@
<template>
<view class="page-total">
<view class="key-list">
<view class="list" v-for="(item,index) in keyList" :class="{'special':item.keyCode==190||item.keyCode==8}"
@click="onKeyList(item,index)" :key="item.keyCode">
<text>{{item.key}}</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
keyList: [{
key: 1,
en: '',
keyCode: 49,
}, {
key: 2,
en: 'ABC',
keyCode: 50,
}, {
key: 3,
en: 'ABC',
keyCode: 51,
}, {
key: 4,
en: 'ABC',
keyCode: 52,
}, {
key: 5,
en: 'ABC',
keyCode: 53,
}, {
key: 6,
en: 'ABC',
keyCode: 54,
}, {
key: 7,
en: 'ABC',
keyCode: 55,
}, {
key: 8,
en: 'ABC',
keyCode: 56,
}, {
key: 9,
en: 'ABC',
keyCode: 57,
}, {
key: '',
en: 'ABC',
keyCode: 190,
}, {
key: 0,
en: 'ABC',
keyCode: 48,
}, {
key: '删除',
en: 'DEL',
keyCode: 8,
}, ],
keyIndex: -1,
};
},
props: {
passwrdType: {
type: String,
default: 'pay'
}
},
methods: {
/**
* 密码键盘按下
* @param {Object} item
* @param {Number} index
*/
onKeyList(item, index) {
this.$emit('KeyInfo', item);
}
}
}
</script>
<style scoped lang="scss">
@import 'keyboard.scss';
</style>

View File

@ -90,6 +90,8 @@
content: rs.msg, content: rs.msg,
showCancel: false, showCancel: false,
}) })
}).finally(rs => {
uni.stopPullDownRefresh()
}) })
} }

View File

@ -2,8 +2,8 @@
"name" : "九亿", "name" : "九亿",
"appid" : "__UNI__08B31BC", "appid" : "__UNI__08B31BC",
"description" : "", "description" : "",
"versionName" : "1.0.4", "versionName" : "1.0.5",
"versionCode" : 1004, "versionCode" : 1005,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@ -578,7 +578,7 @@
// 视频暂停 // 视频暂停
function handleVideoOnPause() { function handleVideoOnPause() {
if (proxy.$refs.discRef) proxy.$refs.discRef.pause() if (proxy.$refs.discRef) proxy.$refs.discRef.pause()
// readSecondPause() readSecondPause()
} }
/** /**
@ -724,10 +724,6 @@
<cell class="cell" :style="[{height: viewSize.height + 'px'}]" :ref="`cellRef` + index" <cell class="cell" :style="[{height: viewSize.height + 'px'}]" :ref="`cellRef` + index"
v-for="(secItem,secIndex) in item.listData()" :key="secItem.id" @click.stop> v-for="(secItem,secIndex) in item.listData()" :key="secItem.id" @click.stop>
<!-- <template v-if="current[tabIndex] < secIndex + 2 && current[tabIndex] > secIndex - 2"> --> <!-- <template v-if="current[tabIndex] < secIndex + 2 && current[tabIndex] > secIndex - 2"> -->
<view class="pa t0 l0 r0 b0 fmid" :style="{zIndex: 99,}">
<text class="f32 cfff">{{current[tabIndex]}}</text>
<text class="f32 cfff">{{index}}</text>
</view>
<!-- 视频 --> <!-- 视频 -->
<indexVideo :ref="'videoRef' + index" :tabIndex="index" :current="current[tabIndex]" <indexVideo :ref="'videoRef' + index" :tabIndex="index" :current="current[tabIndex]"
@ -754,7 +750,7 @@
<!-- 快捷收藏 --> <!-- 快捷收藏 -->
<fastCollect ref="fastCollectRef" /> <fastCollect ref="fastCollectRef" />
<!-- 青少年模式 --> <!-- 青少年模式 -->
<teen ref="teenRef" @setting="showAlarm" /> <teen ref="teenRef" />
<!-- 长按菜单 --> <!-- 长按菜单 -->
<moreMenu ref="moreMenuRef" @changeSpeed="handleSpeed" /> <moreMenu ref="moreMenuRef" @changeSpeed="handleSpeed" />
<!-- 闹钟弹窗 --> <!-- 闹钟弹窗 -->

View File

@ -120,7 +120,7 @@
</view> </view>
<!-- 购买卷轴 --> <!-- 购买卷轴 -->
<payPwd ref="payPwdRef" @confirm="buyScroll" /> <payPwd ref="payPwdRef" @confirm="buyScroll" :price="scrollItem.scrollSeedMoney" unitKey="balance" />
</template> </template>
<style lang="scss"> <style lang="scss">

View File

@ -20,6 +20,9 @@
import CryptoJS from 'crypto-js'; import CryptoJS from 'crypto-js';
// //
import codeInput from '@/components/mine/codeInput.vue' import codeInput from '@/components/mine/codeInput.vue'
//
import keyboard from '@/components/public/keyboard/keyboard.vue'
const { const {
proxy proxy
} = getCurrentInstance() } = getCurrentInstance()
@ -41,11 +44,6 @@
return result return result
}) })
onReady(() => {
//
proxy.$refs.CodeKeyboard.show();
})
// //
function handleNext() { function handleNext() {
const data = { const data = {
@ -198,8 +196,19 @@
</view> </view>
<!-- 安全键盘 --> <!-- 安全键盘 -->
<cc-defineKeyboard ref="CodeKeyboard" passwrdType="pay" @KeyInfo="KeyInfo" /> <!-- <cc-defineKeyboard ref="CodeKeyboard" passwrdType="pay" @KeyInfo="KeyInfo" /> -->
<view class="keyboard">
<keyboard ref="CodeKeyboard" passwrdType="pay" @KeyInfo="KeyInfo" />
</view>
</template> </template>
<style lang="scss"> <style lang="scss">
//
.keyboard {
position: fixed;
left: 0;
right: 0;
bottom: 0;
background-color: #f8f8f8;
}
</style> </style>

View File

@ -43,11 +43,11 @@
name: '即时消息', name: '即时消息',
load: false, load: false,
}, },
// { {
// key: 'video', key: 'video',
// name: '', name: '视讯消息',
// load: false, load: false,
// }, },
// { // {
// key: 'video', // key: 'video',
// name: '', // name: '',
@ -202,7 +202,6 @@
<!-- 群组 --> <!-- 群组 -->
<swiper-item> <swiper-item>
<!-- <groupList v-if="menuList[1].load" /> -->
<msgList v-if="menuList[1].load" /> <msgList v-if="menuList[1].load" />
<view class="loading" v-else>正在加载</view> <view class="loading" v-else>正在加载</view>
</swiper-item> </swiper-item>

View File

@ -333,7 +333,7 @@
<!-- 商品名称 --> <!-- 商品名称 -->
<view class="name mtb20 f34 c333 t2hd">{{detail.name}}</view> <view class="name mtb20 f34 c333 t2hd">{{detail.name}}</view>
<view class="history mtb20 rows" v-if="0"> <view class="history mtb20 rows">
<view class="c666 f28">商品修改历史</view> <view class="c666 f28">商品修改历史</view>
<uni-icons type="right" /> <uni-icons type="right" />
</view> </view>

View File

@ -3,6 +3,7 @@
ref, ref,
reactive, reactive,
getCurrentInstance, getCurrentInstance,
computed,
} from 'vue' } from 'vue'
import { import {
onReachBottom, onReachBottom,
@ -28,8 +29,6 @@
} = getCurrentInstance() } = getCurrentInstance()
// id // id
const orderId = ref('') const orderId = ref('')
//
const paytype = ref('')
// //
const detail = reactive({ const detail = reactive({
createTime: '', createTime: '',
@ -38,6 +37,10 @@
}) })
// //
const paytypeList = reactive([]) const paytypeList = reactive([])
//
const paytype = ref('')
//
const payTypeItem = computed(() => paytypeList.find(item => item.paymentMethod == paytype.value) || {})
// //
const date = reactive(new Date()) const date = reactive(new Date())
@ -162,7 +165,7 @@
} }
// //
proxy.$refs.secondPwd.open() proxy.$refs.secondPwdRef.open()
} }
</script> </script>
@ -253,7 +256,7 @@
</view> </view>
<!-- 二级密码 --> <!-- 二级密码 -->
<secondPwd ref="secondPwd" :check="true" @confirm="handleSubmit" /> <secondPwd ref="secondPwdRef" :check="true" @confirm="handleSubmit" :unitKey="paytype" :price="detail.totalPrice" />
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -54,9 +54,9 @@
// //
const pwdCb = ref('') const pwdCb = ref('')
// //
const userinfo = computed(() => { const userinfo = computed(() => store.state.userinfo)
return store.state.userinfo //
}) const config = computed(() => store.state.config)
onLoad(() => { onLoad(() => {
// //
@ -577,7 +577,7 @@
</template> </template>
<!-- 二级密码 --> <!-- 二级密码 -->
<payPwd ref="payPwdRef" :check="true" @confirm="handlePayPwd" /> <payPwd ref="payPwdRef" :check="true" :price="config.DEPOSIT_ALLOCATION" @confirm="handlePayPwd" />
</template> </template>
<style lang="scss"> <style lang="scss">