加密已通

This commit is contained in:
xk_guohonglei
2020-09-01 17:31:42 +08:00
parent fc6ae600a4
commit 39d433998a
6 changed files with 53 additions and 16 deletions

View File

@@ -161,17 +161,23 @@
},
onLoad() {
uni.showShareMenu()
},
onShow() {
this.getUserInfo()
this.getSiteInfo()
},
onPullDownRefresh() {
this.getUserInfo()
},
filters: {
numberFilter(value) {
value = value - 1 + 1
return value.toFixed(2)
if (value) {
value = value - 1 + 1
return value.toFixed(2)
} else {
return '0.00'
}
}
},
methods: {

View File

@@ -52,7 +52,7 @@
loadStatus: 'loading',
};
},
created() {
onShow() {
this.getList()
},
onPullDownRefresh() {

View File

@@ -8,7 +8,7 @@
<form>
<view class="cu-form-group">
<view class="title">姓名</view>
<input v-model="userInfo.cUserName" placeholder="请输入姓名" name="input" />
<input :maxlength="8" @input="getChinese" :value="userInfo.cUserName" @blur="showChinese" placeholder="请输入姓名" name="input" />
</view>
<view class="cu-form-group">
<view class="title">手机号</view>
@@ -66,6 +66,32 @@
}
},
methods: {
showChinese() {
const reg = /[\u4e00-\u9fa5]/g
var names = this.userInfo.cUserName.match(reg);
this.userInfo.cUserName = names.join("")
if (names) {
this.$set(this.userInfo, 'cUserName', names.join(""))
}
},
// 中文提取
getChinese(e) {
var value = e.target.value
console.log('e-target-value', value)
if (value !== null && value !== '') {
const reg = /[\u4e00-\u9fa5]/g
var names = value.match(reg);
// console.log(names)
// this.$set(this.userInfo, 'cUserName', names.join(""))
if (names) {
this.$set(this.userInfo, 'cUserName', names.join(""))
}
console.log('v-model-name', this.userInfo.cUserName)
}
},
calcMenuList() {
this.checkbox.forEach(item => {
console.log(item.checked)