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

实名认证,地图完善

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