Browse Source

优化登记表

test
jyt 2 years ago
parent
commit
10b7721587
2 changed files with 18 additions and 27 deletions
  1. +6
    -19
      pages/mine/registerCode.vue
  2. +12
    -8
      pages/mine/registerForm.vue

+ 6
- 19
pages/mine/registerCode.vue View File

@@ -1,7 +1,7 @@
<template>
<view class="registerCode">
<view class="registerImg">
<image :src="qrCodeUrl+'/customer/getQrCode?page=pages/mine/registerForm&scene='+projectId" mode=""></image>
<image :src="qrCodeUrl+'/customer/getQrCode?appid='+appid+'&page=pages/mine/registerForm&scene='+projectId" mode=""></image>
</view>
<view class="registerBtn" @click="down">
保存图片到手机
@@ -15,15 +15,18 @@
data() {
return {
qrCodeUrl: "",
projectId:""
projectId:"",
appid:"",
};
},
onShow() {
this.projectId = uni.getStorageSync('buildingID').id;
this.appid = uni.getAccountInfoSync().miniProgram.appId;
this.qrCodeUrl = domain.baseUrl;
},
methods: {
down() {
let url = this.qrCodeUrl+'/customer/getQrCode?page=pages/mine/registerForm&scene='+this.projectId
let url = this.qrCodeUrl+'/customer/getQrCode?appid='+this.appid+'&page=pages/mine/registerForm&scene='+this.projectId
console.log(url)
uni.getImageInfo({
src:url,
@@ -108,22 +111,6 @@
}
},
onLoad() {
this.qrCodeUrl = domain.baseUrl
// let urlData = {
// page:'pages/mine/registerForm',
// scene:'556',
// width:300
// }
// uni.request({
// url:this.qrCodeUrl + '/customer/getQrCode',
// method:"POST",
// data:urlData,
// success(res) {
// console.log(res)
// }
// })
}
}
</script>


+ 12
- 8
pages/mine/registerForm.vue View File

@@ -33,7 +33,6 @@
</view>
</view>
</view>

<view class="title" @click="Buildingselection()">
<view class="titletext">到访途径</view>
<view class="titletext2"
@@ -67,7 +66,6 @@
<u-select :mask-close-able="false" v-model="Showhiddenunits" mode="single-column" :list="list"
@cancel="cancel" @confirm="confirm"></u-select>
</view>
</view>
</template>

@@ -95,6 +93,7 @@
howMany: 1,
projectId: '',
phone:'',
projectId:'',
projectName:'xxx'
},
daitiReceptionobj: {},
@@ -121,27 +120,28 @@
},
methods: {
save() {
save() {
if (this.parames.name.length == 0) {
uni.showToast({
uni.showToast({
icon: "none",
title: "姓名不能为空"
})
return;
}
},
getPhoneNumber(e){
console.log(e)
getPhoneNumber(e){
this.qrCodeUrl = domain.baseUrl
if(e.detail.errMsg=="getPhoneNumber:ok"){
let data = {
code:e.detail.code,
appid:uni.getAccountInfoSync().miniProgram.appId,
}
uni.request({
url:this.qrCodeUrl + '/code/loginSessionKey',
method:"GET",
data,
success:(res)=> {
console.log(res.data.data)
let phoneNum = JSON.parse(res.data.data).phone_info.phoneNumber
this.parames.phone = phoneNum
if(this.parames.phone!=null && this.parames.phone!=""){
@@ -160,14 +160,19 @@
'Access-Token': uni.getStorageSync('weapp_session_login_data').token
},
success: (addres) => {
console.log(addres.data,111)
if(addres.data.code == 10000){
uni.reLaunch({
url:'/pages/mine/registerResult'
})
}else{
uni.showToast({
icon: "none",
title: addres.data.message
})
}
}
})
}
}
@@ -176,7 +181,6 @@
}else{
return;
}
},
changeSex(sex) {
this.parames.sex = sex;


Loading…
Cancel
Save