合并代码
This commit is contained in:
parent
1323d54c75
commit
4bc0294829
|
@ -44,7 +44,13 @@
|
|||
// 获取系统配置
|
||||
getConfig() {
|
||||
api.getConfig().then(rs => {
|
||||
|
||||
if(rs.code == 200) {
|
||||
store.commit('setState', {
|
||||
key: 'config',
|
||||
value: rs.data
|
||||
})
|
||||
return
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,28 @@ import util from '@/common/js/util.js'
|
|||
|
||||
// 卷轴积分
|
||||
export const durian = {
|
||||
/**
|
||||
* 果树列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
durianList(param) {
|
||||
return util.request({
|
||||
url: `/coreplay/duriantreeinfo/tree-list`,
|
||||
method: 'GET',
|
||||
query: param.query,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 榴莲果释放明细
|
||||
* @param {Object} param
|
||||
*/
|
||||
getLog(param) {
|
||||
return util.request({
|
||||
url: `/coreplay/durianfruitdetail/getDetailInfoByTreeId`,
|
||||
method: 'GET',
|
||||
query: param.query,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 果树列表
|
||||
* @param {Object} param
|
||||
|
|
|
@ -46,9 +46,9 @@ const api = {
|
|||
*/
|
||||
getArticle(param) {
|
||||
return util.request({
|
||||
url: '/home/getArticle',
|
||||
query: param.query,
|
||||
method: 'POST',
|
||||
url: '/user/protocol/inquire',
|
||||
path: param.path,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
|
|
|
@ -1728,9 +1728,7 @@ const util = {
|
|||
uni.setClipboardData({
|
||||
data: text,
|
||||
success: () => {
|
||||
util.alert({
|
||||
title: '文本已复制到剪贴板',
|
||||
})
|
||||
util.alert('文本已复制到剪贴板')
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -19,10 +19,21 @@
|
|||
const task = computed(() => {
|
||||
return store.state.task
|
||||
})
|
||||
// 系统配置
|
||||
const config = computed(() => {
|
||||
return store.state.config
|
||||
})
|
||||
// 进度条
|
||||
const progress = computed(() => {
|
||||
let result = task.value.viewingDuration
|
||||
result = (Number(result) % 300) / 3
|
||||
// 选项
|
||||
const option = {
|
||||
// 优先任务转换
|
||||
0: config.value.TASK_READING_SECOND,
|
||||
// 有效读秒转换
|
||||
1: config.value.EFFECTIVE_SECONDS,
|
||||
}
|
||||
result = (Number(result) % Number(option[task.value.taskType])) / 3
|
||||
return result
|
||||
})
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<uni-icons type="circle" size="40rpx" color="#99" v-else />
|
||||
</view>
|
||||
<text>已阅读并同意</text>
|
||||
<text class="mlr10 c333" @click="article(1)">服务协议</text>
|
||||
<text class="mlr10 c333" @click="article(3)">用户协议</text>
|
||||
<text>和</text>
|
||||
<text class="mlr10 c333" @click="article(1)">隐私政策</text>
|
||||
</view>
|
||||
|
|
|
@ -15,7 +15,9 @@
|
|||
import api from '@/api';
|
||||
|
||||
// 内容
|
||||
const wrap = reactive({})
|
||||
const wrap = reactive({
|
||||
content: ``
|
||||
})
|
||||
// 对应内容id
|
||||
const wrapId = ref('')
|
||||
|
||||
|
@ -28,9 +30,7 @@
|
|||
// 获取详情
|
||||
function getDetail() {
|
||||
api.getArticle({
|
||||
query: {
|
||||
id: wrapId.value
|
||||
}
|
||||
path: [wrapId.value]
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
Object.assign(wrap, rs.data)
|
||||
|
@ -50,7 +50,7 @@
|
|||
<view class="title mt30 tac c333 f40">{{wrap.name}}</view>
|
||||
|
||||
<view class="main mt30 mlr30">
|
||||
<rich-text :nodes="wrap.context" />
|
||||
<rich-text :nodes="wrap.content" />
|
||||
</view>
|
||||
|
||||
<view class="fill" style="height: 30rpx;"></view>
|
||||
|
|
|
@ -14,7 +14,10 @@
|
|||
import {
|
||||
onLoad
|
||||
} from '@dcloudio/uni-app'
|
||||
import durianlApi from '@/api/durian.js';
|
||||
// 工具库
|
||||
import util from '@/common/js/util';
|
||||
//
|
||||
import api from '@/api/index.js';
|
||||
const treeData = ref([])
|
||||
const store = useStore()
|
||||
const userinfo = computed(() => {
|
||||
|
@ -29,30 +32,69 @@
|
|||
|
||||
// 我的榴莲果树
|
||||
function buyDurianList() {
|
||||
durianlApi.buyDurianList({}).then(rs => {
|
||||
api.durian.buyDurianList({}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
treeData.value = rs.data.dataList
|
||||
treeData.value = rs.data.dataList.map(item => {
|
||||
item.formatHash = formatStr(item.treeHash)
|
||||
return item
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理字符串
|
||||
* @param {Object} str
|
||||
*/
|
||||
function formatStr(str) {
|
||||
// 如果字符串长度小于等于6,直接返回原字符串
|
||||
if (str.length <= 6) return str
|
||||
return str.slice(0, 3) + '***' + str.slice(-3); // 拼接结果
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 跳转详情
|
||||
* @param {Object} item
|
||||
*/
|
||||
function handleDetail(item) {
|
||||
uni.navigateTo({
|
||||
url: util.setUrl('/pages/index/durianLog', {
|
||||
id: item.durianTreeId,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制
|
||||
* @param {Object} ev 需要复制的码
|
||||
*/
|
||||
function handleCopy(ev) {
|
||||
util.copyText(ev)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="appbw">
|
||||
<!-- -->
|
||||
<view class="list mlr40">
|
||||
<view class="item rows mtb25 br15" v-for="(item,index) in treeData" :key="index">
|
||||
<image class="wh180" src="/static/tree.png" mode="aspectFit" />
|
||||
<view class="col f1 ml30 c333 f26">
|
||||
<view class="txt">每日可释放:{{item.release}}</view>
|
||||
<!-- <view class="txt mtb5">当前可释放:{{item.released}}</view> -->
|
||||
<view class="txt">当前级别:{{item.treeName}}</view>
|
||||
<view class="item rows mtb25 br15" v-for="(item,index) in treeData" :key="index"
|
||||
@click="handleDetail(item)">
|
||||
<image class="wh180 fs0" src="/static/tree.png" mode="aspectFit" />
|
||||
|
||||
<view class="col f1 ml30 mtb30 c333 f26">
|
||||
<view class="txt mtb10">每日可释放:{{item.release}}</view>
|
||||
<view class="txt mtb10">剩余可释放:{{item.remainFruitCount}}</view>
|
||||
<view class="txt mtb10">当前级别:{{item.treeName}}</view>
|
||||
<view class="txt mtb10" @click.stop="util.copyText(item.treeHash)">
|
||||
<text>哈希值: {{item.formatHash}}</text>
|
||||
<image class="wh20 ml10" src="/static/copy.png" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -163,20 +163,23 @@
|
|||
return
|
||||
}
|
||||
|
||||
// 榴莲果交易
|
||||
api.durian.consume({
|
||||
data: {
|
||||
// 交易对方的用户id
|
||||
targetUserId: form.targetUserId,
|
||||
// 交易类型
|
||||
transactionType: 10,
|
||||
// 榴莲果交易数量
|
||||
fruitAmount: form.fruitAmount,
|
||||
// 对方姓名
|
||||
name: `${form.first}${form.name}`,
|
||||
// 对方账号
|
||||
account: form.account,
|
||||
// 二级密码
|
||||
secondPassword: ev
|
||||
// 更新用户信息
|
||||
userId: userinfo.value.id,
|
||||
// 交易对方的用户id
|
||||
targetUserId: form.targetUserId,
|
||||
// 交易类型
|
||||
transactionType: 10,
|
||||
// 榴莲果交易数量
|
||||
fruitAmount: form.fruitAmount,
|
||||
// 对方姓名
|
||||
name: `${form.first}${form.name}`,
|
||||
// 对方账号
|
||||
account: form.account,
|
||||
// 二级密码
|
||||
secondPassword: ev
|
||||
}
|
||||
}).then(rs => {
|
||||
if (rs.code === 200) {
|
||||
|
|
|
@ -18,16 +18,15 @@
|
|||
} from 'vuex'
|
||||
// 顶部
|
||||
import apex from '/components/header/apex'
|
||||
import durian from '@/api/durian.js';
|
||||
import api from '@/api/index.js';
|
||||
// 工具库
|
||||
import util from '@/common/js/util.js'
|
||||
const store = useStore()
|
||||
|
||||
//积分变动记录
|
||||
const scrollLog = reactive({
|
||||
data: [],
|
||||
pageNum: 1,
|
||||
pageSize: 30,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
})
|
||||
// 榴莲树id
|
||||
|
@ -69,11 +68,11 @@
|
|||
|
||||
// 积分变动明细
|
||||
function getList() {
|
||||
durian.getMyFruitLog({
|
||||
api.durian.getLog({
|
||||
query: {
|
||||
durianTreeInfoId: id.value,
|
||||
pageNum: scrollLog.pageNum,
|
||||
pageSize: scrollLog.pageSize,
|
||||
userId: userinfo.value.userId,
|
||||
}
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
|
@ -102,16 +101,19 @@
|
|||
<view class="li" v-for="(item,index) in scrollLog.data" :key="index">
|
||||
<view class="item rows ptb30 plr20 bfff">
|
||||
<view class="col oh f1">
|
||||
<view class="c333 f36">{{item.context}}</view>
|
||||
<view class="c333 f36">榴莲果树产出</view>
|
||||
<view class="mt20 c666 f28">{{item.createTime}}</view>
|
||||
</view>
|
||||
<view class="change fs0 c333 f36" v-if="Number(item.scroll) != 0">
|
||||
<text v-if="Number(item.scroll) > 0">+</text>
|
||||
<text>{{item.scroll}}</text>
|
||||
<text>{{item.releaseCount}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 填充 -->
|
||||
<view class="fill"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -54,10 +54,6 @@
|
|||
const oclockWindow = ref(false)
|
||||
// 有效读秒
|
||||
const readSecond = reactive({
|
||||
// 单个视频最大
|
||||
max: 20,
|
||||
// 总数最大
|
||||
totalMax: 300,
|
||||
// 定时器
|
||||
timer: null,
|
||||
})
|
||||
|
@ -144,6 +140,10 @@
|
|||
const currentVideoRef = computed(() => {
|
||||
return proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]]
|
||||
})
|
||||
// 系统配置
|
||||
const config = computed(() => {
|
||||
return uni.$store.state.config
|
||||
})
|
||||
|
||||
// 加载完成之后
|
||||
onLoad(() => {
|
||||
|
@ -411,7 +411,7 @@
|
|||
// 开启计时器
|
||||
readSecond.timer = setInterval(() => {
|
||||
// 当前视频有效读秒 小于等于 最大有效读秒限制(视频最大时长-2s,设置的有效读秒上限)
|
||||
if (item.readSecond < Math.min(Math.floor(item.videoDuration) - 2, 20)) {
|
||||
if (item.readSecond < Math.min(Math.floor(item.videoDuration) - 2, config.value.EFFECTIVE_VIDEO_TIME)) {
|
||||
// 增加这条视频的有效读秒
|
||||
item.readSecond++
|
||||
} else {
|
||||
|
|
|
@ -9,27 +9,31 @@
|
|||
import {
|
||||
useStore
|
||||
} from 'vuex'
|
||||
import {
|
||||
onReady,
|
||||
} from '@dcloudio/uni-app'
|
||||
// api
|
||||
import api from '@/api/index.js'
|
||||
// util
|
||||
import util from '@/common/js/util.js'
|
||||
// 加密
|
||||
import CryptoJS from 'crypto-js';
|
||||
//
|
||||
import codeInput from '@/components/mine/codeInput.vue'
|
||||
const {
|
||||
proxy
|
||||
} = getCurrentInstance()
|
||||
//
|
||||
const store = useStore()
|
||||
// 模式 set设置密码 check验证密码
|
||||
// 模式 set设置密码 rePwd确认密码 check验证密码
|
||||
const mode = ref('set')
|
||||
// 表单
|
||||
const form = reactive({
|
||||
pwd: '',
|
||||
rePwd: '',
|
||||
})
|
||||
//
|
||||
const passwordArr = reactive([])
|
||||
const AffirmStatus = ref(1)
|
||||
// 当前输入表单键
|
||||
const formKey = reactive('pwd')
|
||||
// 用户信息
|
||||
const userinfo = computed(() => {
|
||||
let result = store.state.userinfo
|
||||
|
@ -37,18 +41,42 @@
|
|||
return result
|
||||
})
|
||||
|
||||
onReady(() => {
|
||||
proxy.$refs.CodeKeyboard.show();
|
||||
})
|
||||
|
||||
// 下一步
|
||||
function handleNext() {
|
||||
const data = {
|
||||
...form
|
||||
}
|
||||
// 验证必填项
|
||||
if (!form.pwd) {
|
||||
util.alert('二级密码不能为空')
|
||||
}
|
||||
mode.value = 'rePwd'
|
||||
}
|
||||
|
||||
// 确认输入密码
|
||||
function handleSubmit() {
|
||||
const data = {
|
||||
...form
|
||||
}
|
||||
console.log('data', data)
|
||||
return
|
||||
|
||||
// 验证必填项
|
||||
if (!data.pwd) {
|
||||
util.alert('二级密码不能为空')
|
||||
return
|
||||
}
|
||||
if (data.pwd !== data.rePwd) {
|
||||
util.alert('两次输入密码不一致')
|
||||
util.alert({
|
||||
content: '两次输入密码不一致',
|
||||
showCancel: false
|
||||
})
|
||||
mode.value = 'set'
|
||||
return
|
||||
}
|
||||
//
|
||||
data.pwd = CryptoJS.MD5(data.pwd).toString()
|
||||
|
@ -68,7 +96,7 @@
|
|||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCanecl: false,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
@ -100,44 +128,29 @@
|
|||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCanecl: false,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 唤起键盘
|
||||
*/
|
||||
function onPayUp() {
|
||||
proxy.$refs.CodeKeyboard.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付键盘回调
|
||||
* @param {Object} val
|
||||
*/
|
||||
function KeyInfo(val) {
|
||||
console.log('val', val)
|
||||
if (val.index >= 6) {
|
||||
return
|
||||
}
|
||||
|
||||
if (form[formKey.value].length >= 6) return
|
||||
// 判断是否输入的是删除键
|
||||
if (val.keyCode === 8) {
|
||||
// 删除最后一位
|
||||
passwordArr.splice(val.index + 1, 1)
|
||||
form[formKey.value] = form[formKey.value].slice(0, -1)
|
||||
// passwordArr.splice(val.index + 1, 1)
|
||||
}
|
||||
// 判断是否输入的是.
|
||||
else if (val.keyCode == 190) {
|
||||
// 输入.无效
|
||||
} else {
|
||||
passwordArr.push(val.key);
|
||||
}
|
||||
|
||||
// 判断是否等于6
|
||||
if (passwordArr.length === 6) {
|
||||
passwordArr = [];
|
||||
AffirmStatus.value = AffirmStatus.value + 1;
|
||||
form[formKey.value] += val.key
|
||||
// passwordArr.push(val.key);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -147,18 +160,21 @@
|
|||
<view class="container ver mt10p" v-if="mode === 'set'">
|
||||
<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>
|
||||
<view class="inputBox mt50 ptb10 plr30">
|
||||
<input type="number" :maxlength="6" v-model="form.rePwd" placeholder="再次输入密码" />
|
||||
|
||||
<view class="pwd">
|
||||
<codeInput v-model:modelValue="form.pwd" />
|
||||
</view>
|
||||
|
||||
<!-- <view class="pwd rows mt50 ptb10 plr30" @click="onPayUp">
|
||||
<view class="item fmid" v-for="(item,index) in 6" :key="index">
|
||||
<text v-if="passwordArr[index] != null">●</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="btn lg black mtb50 plr50" @click="handleSubmit">下一步</view>
|
||||
</view>
|
||||
|
||||
<view class="container ver mt10p" v-if="mode === 'rePwd'">
|
||||
<view class="title c333 f54">确认二级密码</view>
|
||||
<view class="content mt50 c666 f32">请再次输入刚才设置的二级密码</view>
|
||||
|
||||
<view class="pwd">
|
||||
<codeInput v-model:modelValue="form.repwd" />
|
||||
</view>
|
||||
|
||||
<view class="btn lg black mtb50 plr50" @click="handleSubmit">确认</view>
|
||||
</view>
|
||||
|
@ -178,14 +194,4 @@
|
|||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.pwd {
|
||||
|
||||
.item {
|
||||
margin: 0 10rpx;
|
||||
width: 70rpx;
|
||||
height: 80rpx;
|
||||
background-color: #f4f4f4;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -208,17 +208,17 @@
|
|||
<uni-icons type="right" />
|
||||
</view>
|
||||
|
||||
<view class="line rows">
|
||||
<view class="line rows" @click="link('/pages/mine/setting/feedback')">
|
||||
<view class="">意见反馈</view>
|
||||
<uni-icons type="right" />
|
||||
</view>
|
||||
|
||||
<view class="line rows">
|
||||
<view class="line rows" @click="link(util.setUrl('/pages/index/article',{id: 2,}))">
|
||||
<view class="">关于我们</view>
|
||||
<uni-icons type="right" />
|
||||
</view>
|
||||
|
||||
<view class="line rows" @click="link(util.setUrl('/pages/index/article',{id: 6,}))">
|
||||
<view class="line rows" @click="link(util.setUrl('/pages/index/article',{id: 3,}))">
|
||||
<view class="">用户协议</view>
|
||||
<uni-icons type="right" />
|
||||
</view>
|
||||
|
@ -238,12 +238,7 @@
|
|||
|
||||
<!-- 切换账号 退出登录 -->
|
||||
<view class="mtb30 c999">
|
||||
<view class="mtb5">
|
||||
<view @click="link('/pages/mine/switch-accounts/index')" class="btn">切换账号</view>
|
||||
</view>
|
||||
<view class="mtb5">
|
||||
<view @click="logOff" class="btn">退出登录</view>
|
||||
</view>
|
||||
<view @click="logOff" class="btn">退出登录</view>
|
||||
</view>
|
||||
|
||||
<view class="fill" style="height: 30rpx;"></view>
|
||||
|
|
|
@ -161,6 +161,17 @@ reset_password
|
|||
//注册
|
||||
register
|
||||
|
||||
榴莲果交易类型id
|
||||
1 兑换榴莲果树
|
||||
2 商城评论
|
||||
3 查看他人评论
|
||||
4 查看视频分析
|
||||
5 兑换视频展播量
|
||||
6 推广他人视频
|
||||
7 申请完播量
|
||||
8 挂卖榴莲果
|
||||
9 挂买榴莲果
|
||||
10 用户互转
|
||||
|
||||
区分商家认证
|
||||
isShop
|
||||
|
@ -355,15 +366,3 @@ call_type 通话类型 2为视频,1是音频
|
|||
|
||||
选择视频截帧
|
||||
|
||||
榴莲果交易类型id
|
||||
1 兑换榴莲果树
|
||||
2 商城评论
|
||||
3 查看他人评论
|
||||
4 查看视频分析
|
||||
5 兑换视频展播量
|
||||
6 推广他人视频
|
||||
7 申请完播量
|
||||
8 挂卖榴莲果
|
||||
9 挂买榴莲果
|
||||
10 用户互转
|
||||
|
||||
|
|
|
@ -24,6 +24,13 @@ export default createStore({
|
|||
//有效时长
|
||||
viewingDuration: 0,
|
||||
},
|
||||
// 各种变量配置
|
||||
config: {
|
||||
"DAY_POINTS_RELEASE": 0.3, //每日积分释放
|
||||
"TASK_READING_SECOND": 300, //任务读秒
|
||||
"EFFECTIVE_SECONDS": 300, //有效读秒
|
||||
"EFFECTIVE_VIDEO_TIME": 20 //有效视频时间
|
||||
},
|
||||
},
|
||||
|
||||
mutations: {
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
<template>
|
||||
<view class="page-total" v-show="isShow">
|
||||
<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">
|
||||
<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>
|
||||
|
@ -16,71 +14,69 @@
|
|||
data() {
|
||||
return {
|
||||
isShow: false,
|
||||
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: 'del',
|
||||
en: 'DEL',
|
||||
keyCode: 8,
|
||||
},
|
||||
],
|
||||
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: 'del',
|
||||
en: 'DEL',
|
||||
keyCode: 8,
|
||||
}, ],
|
||||
keyIndex: -1,
|
||||
};
|
||||
},
|
||||
props:{
|
||||
props: {
|
||||
passwrdType: {
|
||||
type: String,
|
||||
default: 'pay'
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
show(){
|
||||
methods: {
|
||||
show() {
|
||||
this.isShow = true;
|
||||
},
|
||||
hide(){
|
||||
hide() {
|
||||
this.isShow = false;
|
||||
},
|
||||
/**
|
||||
|
@ -88,23 +84,8 @@
|
|||
* @param {Object} item
|
||||
* @param {Number} index
|
||||
*/
|
||||
onKeyList(item,index){
|
||||
let KeyInfo = item;
|
||||
// 删除键
|
||||
if(KeyInfo.keyCode === 8 && this.keyIndex > -1){
|
||||
this.keyIndex--;
|
||||
}
|
||||
// 不是删除键
|
||||
if(KeyInfo.keyCode != 8){
|
||||
if(this.passwrdType == 'pay' && this.keyIndex >= 5){
|
||||
console.log('支付键盘');
|
||||
this.keyIndex = -1;
|
||||
return;
|
||||
}
|
||||
this.keyIndex++;
|
||||
}
|
||||
KeyInfo.index = this.keyIndex;
|
||||
this.$emit('KeyInfo',KeyInfo);
|
||||
onKeyList(item, index) {
|
||||
this.$emit('KeyInfo', item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -112,4 +93,4 @@
|
|||
|
||||
<style scoped lang="scss">
|
||||
@import 'cc-defineKeyboard.scss';
|
||||
</style>
|
||||
</style>
|
|
@ -15,11 +15,11 @@ export default defineConfig({
|
|||
changeOrigin: true,
|
||||
},
|
||||
"/user": {
|
||||
target: "http://192.168.1.241:8080",
|
||||
target: "http://192.168.1.235:8080",
|
||||
changeOrigin: true,
|
||||
},
|
||||
"/coreplay": {
|
||||
target: "http://192.168.1.241:8080",
|
||||
target: "http://192.168.1.235:8080",
|
||||
changeOrigin: true,
|
||||
},
|
||||
"/file": {
|
||||
|
@ -27,7 +27,7 @@ export default defineConfig({
|
|||
changeOrigin: true,
|
||||
},
|
||||
"/video": {
|
||||
target: "http://192.168.1.241:8080",
|
||||
target: "http://192.168.1.235:8080",
|
||||
changeOrigin: true,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue