2025.02.12 工作代码提交
This commit is contained in:
parent
b56aae7b27
commit
56ab4cb220
|
@ -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: {
|
||||||
|
|
|
@ -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')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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>
|
|
@ -90,6 +90,8 @@
|
||||||
content: rs.msg,
|
content: rs.msg,
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
})
|
})
|
||||||
|
}).finally(rs => {
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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" : {
|
||||||
|
|
|
@ -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" />
|
||||||
<!-- 闹钟弹窗 -->
|
<!-- 闹钟弹窗 -->
|
||||||
|
|
|
@ -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">
|
||||||
|
|
|
@ -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>
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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">
|
||||||
|
|
Loading…
Reference in New Issue