黔西南积分
This commit is contained in:
@@ -3,22 +3,22 @@
|
||||
<div class="item">
|
||||
<span class="label"><span class="tips">*</span>居民登记</span>
|
||||
<div class="value">
|
||||
<u-input type="number" placeholder="请填写数量 " v-model="num" input-align="right" placeholder-style="color:#999;font-size:15px;" height="42" :maxlength="10" :clearable="false" />
|
||||
<u-input type="number" placeholder="请填写数量 " v-model="form.registerCount" input-align="right" placeholder-style="color:#999;font-size:15px;" height="42" :maxlength="10" :clearable="false" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label"><span class="tips">*</span>居民朋友</span>
|
||||
<div class="value">
|
||||
<u-input type="number" placeholder="请填写数量 " v-model="num" input-align="right" placeholder-style="color:#999;font-size:15px;" height="42" :maxlength="10" :clearable="false" />
|
||||
<u-input type="number" placeholder="请填写数量 " v-model="form.friendCount" input-align="right" placeholder-style="color:#999;font-size:15px;" height="42" :maxlength="10" :clearable="false" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label"><span class="tips">*</span>居民知己</span>
|
||||
<div class="value">
|
||||
<u-input type="number" placeholder="请填写数量 " v-model="num" input-align="right" placeholder-style="color:#999;font-size:15px;" height="42" :maxlength="10" :clearable="false" />
|
||||
<u-input type="number" placeholder="请填写数量 " v-model="form.confidantCount" input-align="right" placeholder-style="color:#999;font-size:15px;" height="42" :maxlength="10" :clearable="false" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="add-btn">
|
||||
<div class="add-btn" @click="submit()">
|
||||
<div>提交</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -30,7 +30,11 @@
|
||||
appName: '更新居民数据',
|
||||
data() {
|
||||
return {
|
||||
num: ''
|
||||
form: {
|
||||
registerCount: 0,
|
||||
friendCount: 0,
|
||||
confidantCount: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -38,10 +42,37 @@
|
||||
},
|
||||
onShow() {
|
||||
document.title = '更新居民数据'
|
||||
this.getTotal()
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
getTotal() {
|
||||
this.$http.post(`/app/appwxuserfamiliarityrate/wxTopStatistics`).then(res=> {
|
||||
if(res?.data) {
|
||||
this.form = {...res.data}
|
||||
}
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
if(!/^[0-9]+$/.test(this.form.registerCount)){
|
||||
return this.$u.toast(`居民登记请输入正整数`)
|
||||
}
|
||||
if(!/^[0-9]+$/.test(this.form.friendCount)){
|
||||
return this.$u.toast(`居民朋友请输入正整数`)
|
||||
}
|
||||
if(!/^[0-9]+$/.test(this.form.confidantCount)){
|
||||
return this.$u.toast(`居民知己请输入正整数`)
|
||||
}
|
||||
this.$http.post(`/app/appwxuserfamiliarityrate/wxcpAdd`, this.form).then(res=> {
|
||||
if(res.code == 0) {
|
||||
uni.$emit('update')
|
||||
this.$u.toast(`居民数据更新成功`)
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 600);
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user