Browse Source

修改信息

master
主管理员 2 months ago
parent
commit
f26d36d2d9
5 changed files with 86 additions and 23 deletions
  1. +4
    -1
      api/api.js
  2. +25
    -7
      pages/index/center.vue
  3. +41
    -3
      pages_order/auth/certification.vue
  4. +4
    -3
      pages_order/mine/IntegralRecord.vue
  5. +12
    -9
      pages_order/mine/MemberRecharge.vue

+ 4
- 1
api/api.js View File

@ -5,7 +5,7 @@ let limit = {}
let debounce = {}
const models = ['score', 'boss', 'login', 'vip', 'company', 'work']
const models = ['score', 'boss', 'login', 'vip', 'company', 'work','index-lzx']
const config = {
// 示例
@ -185,6 +185,9 @@ const config = {
// method: 'GET',
// auth: true,
// },
}
export function api(key, data, callback, loadingTitle) {


+ 25
- 7
pages/index/center.vue View File

@ -9,14 +9,14 @@
</view>
<view class="info">
<view class="name">
倾心.
{{username}}
<view>
<uv-icon name="edit-pen" size="40rpx" color="#fff"></uv-icon>
修改资料
</view>
</view>
<view class="tips">
手机号1300000000
手机号{{phone}}
</view>
</view>
<!-- <view class="headBtn" @click="headBtn">
@ -52,7 +52,7 @@
<view class="line">
<view class="item">
<view class="">
30000
{{numInfo.integerNum}}
</view>
<view class="">
我的积分
@ -71,7 +71,7 @@
<view class="item"
@click="$utils.navigateTo('/pages_order/mine/collect')">
<view class="">
30000
{{numInfo.scNum}}
</view>
<view class="">
我的收藏
@ -81,7 +81,7 @@
<view class="item"
@click="$utils.navigateTo('/pages_order/mine/contactRecord')">
<view class="">
30000
{{numInfo.lxNum}}
</view>
<view class="">
联系记录
@ -197,11 +197,14 @@
computed: {
...mapState(['userInfo', 'role']),
headImage(){
return '/static/image/center/headImage.png'
return this.userInfo.headImage
},
username(){
return this.userInfo.nickName
},
phone(){
return this.userInfo.phone
}
},
data() {
return {
@ -217,10 +220,14 @@
url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
},
],
numInfo:null,
}
},
onShow() {
this.$store.commit('getUserInfo')
//
this.getUserCenterData();
},
methods: {
@ -235,6 +242,8 @@
}
})
},
//
contactUs() {
@ -247,6 +256,15 @@
cancle() {
this.show = false
},
//
getUserCenterData(){
this.$api('getUserCenterData',{}, res =>{
if(res.code == 200){
this.numInfo = res.result
}
})
},
}
}
</script>


+ 41
- 3
pages_order/auth/certification.vue View File

@ -25,7 +25,7 @@
</view>
<input type="text" class="form-input"
placeholder="请输入身份证号码"
v-model="form.name"/>
v-model="form.cerNo"/>
</view>
<view class="form-item">
@ -34,7 +34,7 @@
</view>
<input type="text" class="form-input"
placeholder="请输入联系方式"
v-model="form.name"/>
v-model="form.phone"/>
</view>
<view class="form-item">
@ -73,7 +73,7 @@
</view>
</view>
<view class="uni-color-btn">
<view class="uni-color-btn" @click="sumbit">
认证
</view>
@ -112,7 +112,19 @@
fileList: [],
}
},
onShow() {
this.getAuthenticationPerson();
},
methods: {
//
getAuthenticationPerson(){
this.$api('getAuthenticationPerson',{}, res =>{
if(res.code == 200){
this.form = res.result;
this.fileList = res.result.image ? res.result.image.split(',').map(url => {url}) : []
}
})
},
deleteImage(e){
this.fileList.splice(e.index, 1)
},
@ -125,7 +137,33 @@
})
})
})
},
// :lzx
sumbit(){
this.form.image = this.fileList.map((item) => item.url).join(",")
if(this.$utils.verificationAll(this.form,{
name:'请输入姓名',
cerNo:'请输入身份证号码',
phone:'请输入电话号码',
image:'身份证照片不能为空',
})) {
return
}
this.$api('addAuthenticationPerson',this.form, res =>{
if(res.code == 200){
uni.showToast({
title:'提交成功!等待审核',
icon: 'none'
})
setTimeout(uni.navigateBack,1000,-1)
}
})
}
}
}


+ 4
- 3
pages_order/mine/IntegralRecord.vue View File

@ -7,17 +7,17 @@
<view class="number">
当前积分
<view>
{{ formal.currentScore }}
{{ userInfo.integerPrice }}
</view>
</view>
<view class="bottom">
<!-- <view class="bottom">
<view>
正式积分{{ formal.formalScore }}
</view>
<view>
临时积分{{ formal.tempScore }}
</view>
</view>
</view> -->
</view>
<view class="">
@ -75,6 +75,7 @@
},
onShow() {
this.getCounst()
this.$store.commit('getUserInfo')
},
methods: {
leftClick() { //


+ 12
- 9
pages_order/mine/MemberRecharge.vue View File

@ -4,18 +4,18 @@
<navbar title="会员充值" bgColor="#3796F8" leftClick color="#fff" @leftClick="$utils.navigateBack" />
<view class="head">
<view class="headImage">
<image :src="headImage" mode="aspectFill"></image>
<image :src="userInfo.headImage" mode="aspectFill"></image>
</view>
<view class="info">
<view class="name">
倾心.
{{userInfo.nickName}}
<view>
<uv-icon name="edit-pen" size="40rpx" color="#fff"></uv-icon>
修改资料
</view>
</view>
<view class="tips">
手机号1300000000
手机号{{userInfo.phone}}
</view>
</view>
</view>
@ -71,7 +71,7 @@
<view>
总计金额{{ vip.price }}
</view>
<view>
<view @click="submit(vip.id)">
确认协议并支付
</view>
</view>
@ -93,13 +93,13 @@
vipId : ''
}
},
onShow() {
this.$store.commit('getUserInfo')
},
computed: {
headImage() {
return '/static/image/center/headImage.png'
},
...mapState([
'role',
]),
vip(){
let vip = {}
this.list.forEach(n => {
@ -120,8 +120,11 @@
},
},
methods: {
submit(){
submit(id){
console.log("当前标识:"+id)
this.$api('addVIP',{id:id}, res =>{
console.log(res)
})
},
getDataThen(list){
this.vipId = list[0] && list[0].id


Loading…
Cancel
Save