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


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

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


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

@ -25,7 +25,7 @@
</view> </view>
<input type="text" class="form-input" <input type="text" class="form-input"
placeholder="请输入身份证号码" placeholder="请输入身份证号码"
v-model="form.name"/>
v-model="form.cerNo"/>
</view> </view>
<view class="form-item"> <view class="form-item">
@ -34,7 +34,7 @@
</view> </view>
<input type="text" class="form-input" <input type="text" class="form-input"
placeholder="请输入联系方式" placeholder="请输入联系方式"
v-model="form.name"/>
v-model="form.phone"/>
</view> </view>
<view class="form-item"> <view class="form-item">
@ -73,7 +73,7 @@
</view> </view>
</view> </view>
<view class="uni-color-btn">
<view class="uni-color-btn" @click="sumbit">
认证 认证
</view> </view>
@ -112,7 +112,19 @@
fileList: [], fileList: [],
} }
}, },
onShow() {
this.getAuthenticationPerson();
},
methods: { 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){ deleteImage(e){
this.fileList.splice(e.index, 1) 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 class="number">
当前积分 当前积分
<view> <view>
{{ formal.currentScore }}
{{ userInfo.integerPrice }}
</view> </view>
</view> </view>
<view class="bottom">
<!-- <view class="bottom">
<view> <view>
正式积分{{ formal.formalScore }} 正式积分{{ formal.formalScore }}
</view> </view>
<view> <view>
临时积分{{ formal.tempScore }} 临时积分{{ formal.tempScore }}
</view> </view>
</view>
</view> -->
</view> </view>
<view class=""> <view class="">
@ -75,6 +75,7 @@
}, },
onShow() { onShow() {
this.getCounst() this.getCounst()
this.$store.commit('getUserInfo')
}, },
methods: { methods: {
leftClick() { // leftClick() { //


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

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


Loading…
Cancel
Save