提交 e5a1e965 authored 作者: 正反's avatar 正反

实名认证,地图完善

上级 0349ff7b
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
<view class="cotrons" @click="show"> <view class="cotrons" @click="show">
<u-icon name="/static/images/screenList.png" label-color="#f0f5ff" size="50rpx" @cilck="show"></u-icon> <u-icon name="/static/images/screenList.png" label-color="#f0f5ff" size="50rpx" @cilck="show"></u-icon>
</view> </view>
<view class="cotrons2" @click="searchLocation"> <!-- <view class="cotrons2" @click="searchLocation">
<u-icon name="/static/images/search.png" label-color="#f0f5ff" size="50rpx" @cilck="searchLocation"> <u-icon name="/static/images/search.png" label-color="#f0f5ff" size="50rpx" @cilck="searchLocation">
</u-icon> </u-icon>
</view> </view> -->
<view> <view>
<u-popup v-model="showPopup" mode="right" width="80%" class="showPopup"> <u-popup v-model="showPopup" mode="right" width="80%" class="showPopup">
<view class="topBox"> <view class="topBox">
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
:name="item.name">{{item.name}} :name="item.name">{{item.name}}
</u-checkbox> </u-checkbox>
</u-checkbox-group> </u-checkbox-group>
<text class="tText" style="color: red;" :class="{'show':dispalyTypeText}">*请至少选择一个状态</text>
</view> </view>
</view> </view>
<view class="topBox"> <view class="topBox">
...@@ -54,19 +55,27 @@ ...@@ -54,19 +55,27 @@
<script> <script>
import { import {
GetSFOrderTypeQty GetSFOrderTypeQty,
SFView
} from '../../api/apis.js' } from '../../api/apis.js'
import {
loading,
hidden
} from '../../tips/myTips.js'
export default { export default {
onLoad() { onLoad() {
this.getUserLocation() this.getUserLocation()
uni.$u.mpShare.title = '页面分享'; uni.$u.mpShare.title = '页面分享';
let day2 = new Date(); let day2 = new Date();
day2.setTime(day2.getTime()); day2.setTime(day2.getTime());
this.choicetime = day2.getFullYear() + "-" + (day2.getMonth() + 1) + "-" + day2.getDate(); this.choicetime = day2.getFullYear() + "/" + (day2.getMonth() + 1) + "/" + day2.getDate();
}, },
data() { data() {
return { return {
choiceList: [],
dispalyTypeText: true,
timeType: false,
typeList: ["已超时", "待预约", "待服务"], typeList: ["已超时", "待预约", "待服务"],
choicetime: '', choicetime: '',
buttonDisabled: false, buttonDisabled: false,
...@@ -216,17 +225,26 @@ ...@@ -216,17 +225,26 @@
}, },
change(status) { change(status) {
if (status) { if (status) {
this.timeType = true
if (this.dispalyText === false) { if (this.dispalyText === false) {
this.buttonDisabled = true this.buttonDisabled = true
} }
} else { } else {
this.buttonDisabled = false this.buttonDisabled = false
this.timeType = false
} }
}, },
checkboxGroupChange(e) { checkboxGroupChange(e) {
console.log(e) console.log(e)
this.typeList = e this.typeList = e
console.log(this.typeList) console.log(this.typeList)
if (e.length != undefined && e.length > 0) {
this.dispalyTypeText = true
this.buttonDisabled = false
} else {
this.dispalyTypeText = false
this.buttonDisabled = true
}
}, },
radioGroupChange(e) { radioGroupChange(e) {
console.log(e) console.log(e)
...@@ -234,17 +252,17 @@ ...@@ -234,17 +252,17 @@
if (e == '今天' || '今天之后') { if (e == '今天' || '今天之后') {
let day2 = new Date(); let day2 = new Date();
day2.setTime(day2.getTime()); day2.setTime(day2.getTime());
time = day2.getFullYear() + "-" + (day2.getMonth() + 1) + "-" + day2.getDate(); time = day2.getFullYear() + "/" + (day2.getMonth() + 1) + "/" + day2.getDate();
} }
if (e === '明天') { if (e === '明天') {
let day2 = new Date(); let day2 = new Date();
day2.setTime(day2.getTime() + 24 * 60 * 60 * 1000); day2.setTime(day2.getTime() + 24 * 60 * 60 * 1000);
time = day2.getFullYear() + "-" + (day2.getMonth() + 1) + "-" + day2.getDate(); time = day2.getFullYear() + "/" + (day2.getMonth() + 1) + "/" + day2.getDate();
} }
if (e === '后天') { if (e === '后天') {
let day2 = new Date(); let day2 = new Date();
day2.setTime(day2.getTime() + 48 * 60 * 60 * 1000); day2.setTime(day2.getTime() + 48 * 60 * 60 * 1000);
time = day2.getFullYear() + "-" + (day2.getMonth() + 1) + "-" + day2.getDate(); time = day2.getFullYear() + "/" + (day2.getMonth() + 1) + "/" + day2.getDate();
} }
this.choicetime = time this.choicetime = time
...@@ -263,33 +281,73 @@ ...@@ -263,33 +281,73 @@
} }
}, },
searchLocation() { //订单筛选判断
let that = this // filterList() {
uni.chooseLocation({ // let choiceList = this.choiceList
success: function(res) { // let list = []
that.searchName=res.name // let date1 = new Date(this.choicetime)
console.log('位置名称:' + res.name); // let date3= new Date(this.timeChoice.startDate.replace(/-/g, "/"))
that.searchAddress= res.address // let date4=new Date(this.timeChoice.endDate.replace(/-/g, "/"))
console.log('详细地址:' + res.address); // for (let i = 0; i < list.length; i++) {
that.searchLatitude=res.latitude // let date2 = new Date(list[i].FHopeServiceTime)
console.log('纬度:' + res.latitude); // if (this.timeType === false) {
that.searchLongitude=res.longitude // if (this.value === '今天之后') {
console.log('经度:' + res.longitude); // if (date1.getTime() <= date2.getTime()) {
let mark = { // for (let j = 0; j < this.typeList.length; j++) {
id: 0, // if (list[i].caption === this.type[j].caption) {
latitude: 0, // choiceList.push(list)
longitude: 0, // }
zIndex: 5 // }
} // }
mark.id = that.markers.length + 1 // } else {
mark.latitude = that.searchLatitude // if (date1.getTime() === date2.getTime()) {
mark.longitude = that.searchLongitude // for (let j = 0; j < this.typeList.length; j++) {
that.markers.push(mark) // if (list[i].caption === this.type[j].caption) {
that.longitude=that.searchLongitude // choiceList.push(list)
that.latitude=that.searchLatitude // }
} // }
}); // }
}, // }
// } else {
// if(date2.getTime()>=date3.getTime() && date4.getTime()>=date2.getTime()){
// for (let j = 0; j < this.typeList.length; j++) {
// if (list[i].caption === this.type[j].caption) {
// choiceList.push(list)
// }
// }
// }
// }
// }
// },
// searchLocation() {
// let that = this
// uni.chooseLocation({
// success: function(res) {
// that.searchName=res.name
// console.log('位置名称:' + res.name);
// that.searchAddress= res.address
// console.log('详细地址:' + res.address);
// that.searchLatitude=res.latitude
// console.log('纬度:' + res.latitude);
// that.searchLongitude=res.longitude
// console.log('经度:' + res.longitude);
// let mark = {
// id: 0,
// latitude: 0,
// longitude: 0,
// zIndex: 5
// }
// mark.id = that.markers.length + 1
// mark.latitude = that.searchLatitude
// mark.longitude = that.searchLongitude
// that.markers.push(mark)
// that.longitude=that.searchLongitude
// that.latitude=that.searchLatitude
// }
// });
// },
confirm() { confirm() {
this.showPopup = false this.showPopup = false
GetSFOrderTypeQty().then((res) => { GetSFOrderTypeQty().then((res) => {
...@@ -297,9 +355,11 @@ ...@@ -297,9 +355,11 @@
console.log(res) console.log(res)
} }
}) })
this.markers = []
let date1 = new Date('2021-12-22'.replace(/-/g, "/")) let date1 = new Date(this.choicetime)
let date2 = new Date('2021/12/22') console.log(date1)
let date2 = new Date('2021/12/28')
console.log(date2)
console.log(date1.getTime() === date2.getTime()) console.log(date1.getTime() === date2.getTime())
} }
} }
......
...@@ -2,11 +2,7 @@ ...@@ -2,11 +2,7 @@
<view class="realname"> <view class="realname">
<u-top-tips ref="uTips"></u-top-tips> <u-top-tips ref="uTips"></u-top-tips>
<view class="header"> <view class="header">
<u-cell-item <u-cell-item v-for="(item,key) in cellList" :key="key" :title="item.title" :value="item.value"
v-for="(item,key) in cellList"
:key="key"
:title="item.title"
:value="item.value"
:arrow="false"></u-cell-item> :arrow="false"></u-cell-item>
</view> </view>
<view class="container"> <view class="container">
...@@ -14,34 +10,20 @@ ...@@ -14,34 +10,20 @@
<text>{{tip}}</text> <text>{{tip}}</text>
</view> </view>
<view class="positive"> <view class="positive">
<u-upload <u-form label-width="150" label-align="center" ref="Iform" :model="form">
:file-list="fileList1" <u-form-item prop="ufilePositive" :required="true">
:maxCount="1" <u-upload :file-list="fileList1" :maxCount="1" width="650" height="350" uploadText="请上传身份证正面照片"
width="650" :action="action1" :form-data="formData1" :header="header" :before-upload="beforeUpload1"
height="350" @on-success="uploadSuccess1">
uploadText="请上传身份证正面照片"
:action="action1"
:form-data="formData1"
:header="header"
:before-upload="beforeUpload1"
@on-success="uploadSuccess1"
>
</u-upload> </u-upload>
</view> </u-form-item>
<view class="positive"> <u-form-item prop="ufileBack" :required="true">
<u-upload <u-upload :file-list="fileList2" :maxCount="1" width="650" height="350" uploadText="请上传身份证背面照片"
:file-list="fileList2" :action="action2" :form-data="formData2" :header="header" :before-upload="beforeUpload2"
:maxCount="1" @on-success="uploadSuccess2">
width="650"
height="350"
uploadText="请上传身份证背面照片"
:action="action2"
:form-data="formData2"
:header="header"
:before-upload="beforeUpload2"
@on-success="uploadSuccess2"
>
</u-upload> </u-upload>
</u-form-item>
</u-form>
</view> </view>
<view class="btn"> <view class="btn">
<u-button :custom-style="btnStyle" @click="save">保存</u-button> <u-button :custom-style="btnStyle" @click="save">保存</u-button>
...@@ -51,86 +33,161 @@ ...@@ -51,86 +33,161 @@
</template> </template>
<script> <script>
import {uploadpic} from '../../api/api.js' import {
import {apiBaseUrl} from '../../api/request.js' uploadpic
} from '../../api/api.js'
import {
apiBaseUrl
} from '../../api/request.js'
import {
edit
} from '../../api/apis.js'
import {
loading,
hidden
} from '../../tips/myTips.js'
export default { export default {
onLoad(){ onLoad() {
this.url = apiBaseUrl this.url = apiBaseUrl
this.cellList[1].value = this.$store.state.userInfo.FCARD this.cellList[1].value = this.$store.state.userInfo.FCARD
uni.$u.mpShare.title = '页面分享'; uni.$u.mpShare.title = '页面分享';
this.id = this.$store.state.userInfo.Id
},
onShow() {
this.$refs.Iform.setRules(this.iRule);
}, },
data(){ data() {
return { return {
btnStyle:{ form: {
background:"#7D5AFC", ufilePositive: 0,
color:'#FFFFFF' ufileBack: 0
}, },
cellList:[ iRule: {
{ ufilePositive: [{
title:'真实姓名', required: true,
name:'name', validator: (rule, value, callback) => {
value:'' return this.form.ufilePositive > 0
},
message: '请上传身份证正面照片',
trigger: ['change', 'blur'],
}],
ufileBack: [{
required: true,
validator: (rule, value, callback) => {
return this.form.ufileBack > 0
},
message: '请上传身份证反面照片',
trigger: ['change', 'blur'],
}],
},
id: '',
postdata: {
IsDeleteEntry: true,
Model: {
FID: 1,
FCheckStatus: "",
IsDeleteEntry: true
}
},
btnStyle: {
background: "#7D5AFC",
color: '#FFFFFF'
},
cellList: [{
title: '真实姓名',
name: 'name',
value: ''
}, },
{ {
title:'身份证号码', title: '身份证号码',
name:'card', name: 'card',
value:'' value: ''
} }
], ],
tip:'提现账户必须与身份证姓名一致,图片大小不超过(5MB)', tip: '提现账户必须与身份证姓名一致,图片大小不超过(5MB)',
header:{ header: {
test:11 test: 11
}, },
url:'', url: '',
fileList1:[], fileList1: [],
formData1:{file:''}, formData1: {
fileList2:[], file: ''
formData2:{file:''}, },
fileList2:[] fileList2: [],
formData2: {
file: ''
},
fileList2: []
} }
}, },
methods:{ methods: {
beforeUpload1(index,list){ beforeUpload1(index, list) {
this.formData1.file = list[index].url this.formData1.file = list[index].url
}, },
beforeUpload2(index,list){ beforeUpload2(index, list) {
this.formData2.file = list[index].url this.formData2.file = list[index].url
}, },
uploadSuccess1(data, index, lists){ uploadSuccess1(data, index, lists) {
if(data.code == 100){ if (data.code == 100) {
this.$refs.uTips.show({ this.$refs.uTips.show({
title:data.message, title: data.message,
type: 'error', type: 'error',
duration: '2300' duration: '2300'
}) })
lists.splice(index,1) lists.splice(index, 1)
}else{ } else {
console.log(data) console.log(data)
this.formData1.file = data.result.fileurl this.formData1.file = data.result.fileurl
this.form.ufilePositive = 1
} }
}, },
uploadSuccess2(data, index, lists){ uploadSuccess2(data, index, lists) {
if(data.code == 100){ if (data.code == 100) {
this.$refs.uTips.show({ this.$refs.uTips.show({
title:data.message, title: data.message,
type: 'error', type: 'error',
duration: '2300' duration: '2300'
}) })
lists.splice(index,1) lists.splice(index, 1)
}else{ } else {
console.log(data) console.log(data)
this.formData2.file = data.result.fileurl this.formData2.file = data.result.fileurl
this.form.ufileBack = 1
} }
}, },
save(){ save() {
uni.navigateBack() this.$refs.Iform.validate(valid => {
if (valid) {
console.log('验证通过');
this.postdata.Model.FID = this.id
this.postdata.Model.FCheckStatus = 1
loading()
edit(this.postdata).then((res) => {
hidden()
if (res.data.code == 0) {
console.log(res)
uni.switchTab({
url: '/pages/my/my'
})
} else {
console.log("error")
uni.switchTab({
url: '/pages/my/my'
})
}
})
} else {
console.log('验证失败');
}
});
} }
}, },
computed:{ computed: {
action1:function(){ action1: function() {
return this.url + '/api/Idcard/front' return this.url + '/api/Idcard/front'
}, },
action2:function(){ action2: function() {
return this.url + '/api/Idcard/back' return this.url + '/api/Idcard/back'
} }
} }
...@@ -138,22 +195,24 @@ ...@@ -138,22 +195,24 @@
</script> </script>
<style> <style>
.realname{ .realname {}
} .container {
.container{
padding: 0 5%; padding: 0 5%;
background-color: #f0eff4; background-color: #f0eff4;
} }
.tip{
.tip {
margin: 3% 0; margin: 3% 0;
color: #ddbd19; color: #ddbd19;
font-size: 12px; font-size: 12px;
} }
.pic{
.pic {
background-color: white; background-color: white;
} }
.btn{
.btn {
margin-top: 20%; margin-top: 20%;
} }
</style> </style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论