first commit
This commit is contained in:
1
衣莎项目/源码/YiShaXiYi/view/logistics/appLogistics/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/view/logistics/appLogistics/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
deb33626-7f7d-43df-9a4d-19e721e9f683
|
||||
261
衣莎项目/源码/YiShaXiYi/view/logistics/appLogistics/appLogistics.js
Normal file
261
衣莎项目/源码/YiShaXiYi/view/logistics/appLogistics/appLogistics.js
Normal file
@@ -0,0 +1,261 @@
|
||||
// view/logistics/appLogistics/appLogistics.js
|
||||
const app = getApp();
|
||||
const util = app.loadUtils("util")
|
||||
const regeneratorRuntime = app.loadAsync()
|
||||
const model = app.loadModel("index")
|
||||
const http = app.loadHttp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
system: app.globalData.system, //设备相关信息
|
||||
pageTitle: "申请加入小马哥", //头部标题
|
||||
isBack: true,//显示返回
|
||||
sex: 0,//性别
|
||||
updateImg: [],//图片
|
||||
dateAdd: [],//省市区数据
|
||||
dateName: '',//显示选择的省市区
|
||||
dateValue: [0, 0, 0],//省市区下表
|
||||
},
|
||||
// 性别选择
|
||||
onChange(e) {
|
||||
if (e.detail.key === this.key) {
|
||||
return wx.showModal({
|
||||
title: 'No switching is allowed',
|
||||
showCancel: !1,
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
sex: e.detail.key,
|
||||
})
|
||||
},
|
||||
// 选择图片
|
||||
ChooseImage(e) {
|
||||
let type = e.currentTarget.dataset.type
|
||||
let arr = this.data.updateImg
|
||||
wx.chooseImage({
|
||||
count: 1, //默认9
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album'], //从相册选择
|
||||
success: (res) => {
|
||||
const tempFilePaths = res.tempFilePaths
|
||||
http.http.uploadFile(tempFilePaths[0])
|
||||
.then(res => {
|
||||
let rel = JSON.parse(res.data)
|
||||
arr[type] = rel.data
|
||||
this.setData({
|
||||
updateImg: arr
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
// 联动的列发生改变
|
||||
bindMultiPickerColumnChange: function (e) {
|
||||
let column = e.detail.column,
|
||||
value = e.detail.value,
|
||||
dateAdd = this.data.dateAdd,
|
||||
dateValue = this.data.dateValue;
|
||||
switch (column) {
|
||||
case 0:
|
||||
dateValue[0] = value
|
||||
dateValue[1] = 0
|
||||
dateValue[2] = 0
|
||||
this.getDistrict({ pid: dateAdd[column][value].id, level: 'city' })
|
||||
break;
|
||||
case 1:
|
||||
dateValue[1] = value
|
||||
dateValue[2] = 0
|
||||
this.getDistrict({ pid: dateAdd[column][value].id, level: 'district' })
|
||||
break;
|
||||
case 2:
|
||||
dateValue[2] = value
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
this.setData({
|
||||
dateValue: dateValue
|
||||
})
|
||||
},
|
||||
// 选择省市区
|
||||
bindDateChange: function (e) {
|
||||
let dateAdd = this.data.dateAdd, value = e.detail.value;
|
||||
this.setData({
|
||||
dateName: dateAdd[0][value[0]].name + dateAdd[1][value[1]].name + dateAdd[2][value[2]].name + '',
|
||||
dateValue: value
|
||||
})
|
||||
},
|
||||
// 获取联动
|
||||
async getDistrict(parameter = {}) {
|
||||
let dateAdd = this.data.dateAdd;
|
||||
if (!parameter.level) {
|
||||
parameter = {
|
||||
pid: 1,
|
||||
level: 'province'
|
||||
}
|
||||
}
|
||||
let res = await http.http.request2({ url: `${http.api.getDistrict}`, method: 'POST', data: parameter })
|
||||
if (res.data.status == 1) {
|
||||
let rel = res.data.data
|
||||
switch (parameter.level) {
|
||||
case 'province':
|
||||
dateAdd[0] = rel
|
||||
this.getDistrict({ pid: rel[0].id, level: 'city' })
|
||||
break;
|
||||
case 'city':
|
||||
dateAdd[1] = rel
|
||||
this.getDistrict({ pid: rel[0].id, level: 'district' })
|
||||
break;
|
||||
case 'district':
|
||||
dateAdd[2] = rel
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
this.setData({
|
||||
dateAdd: dateAdd
|
||||
})
|
||||
}
|
||||
},
|
||||
// 提交from
|
||||
async submit(e) {
|
||||
let value = e.detail.value,
|
||||
sex = this.data.sex,
|
||||
updateImg = this.data.updateImg,
|
||||
dateName = this.data.dateName,
|
||||
dateAdd = this.data.dateAdd,
|
||||
dateValue = this.data.dateValue;
|
||||
if (value.name == '') {
|
||||
model.msg.dataMsg({
|
||||
content: "请输入姓名",
|
||||
type: "warning"
|
||||
})
|
||||
return
|
||||
} else if (value.id == '') {
|
||||
model.msg.dataMsg({
|
||||
content: "请输入身份证",
|
||||
type: "warning"
|
||||
})
|
||||
return
|
||||
} else if (value.age == '') {
|
||||
model.msg.dataMsg({
|
||||
content: "请输入年龄",
|
||||
type: "warning"
|
||||
})
|
||||
return
|
||||
} else if (!(/^[1]([3-9])[0-9]{9}$/.test(parseInt(value.tel)))) {
|
||||
model.msg.dataMsg({
|
||||
content: "请输入正确的手机号",
|
||||
type: "warning"
|
||||
})
|
||||
return
|
||||
} else if (value.id == '') {
|
||||
model.msg.dataMsg({
|
||||
content: "请输入身份证",
|
||||
type: "warning"
|
||||
})
|
||||
return
|
||||
} else if (dateName == '') {
|
||||
model.msg.dataMsg({
|
||||
content: "请选择区域",
|
||||
type: "warning"
|
||||
})
|
||||
return
|
||||
} else if (value.detail == '') {
|
||||
model.msg.dataMsg({
|
||||
content: "请输入街道或社区",
|
||||
type: "warning"
|
||||
})
|
||||
return
|
||||
} else if (!updateImg[0]) {
|
||||
model.msg.dataMsg({
|
||||
content: "请上传身份证正面照",
|
||||
type: "warning"
|
||||
})
|
||||
return
|
||||
} else if (!updateImg[1]) {
|
||||
model.msg.dataMsg({
|
||||
content: "请上传身份证反面照",
|
||||
type: "warning"
|
||||
})
|
||||
return
|
||||
}
|
||||
let data = {
|
||||
cardId: value.id,
|
||||
proviceId: dateAdd[0][dateValue[0]].id,
|
||||
cityId: dateAdd[1][dateValue[1]].id,
|
||||
areaId: dateAdd[2][dateValue[2]].id,
|
||||
villageId: 0,
|
||||
sex: sex + 1,
|
||||
realname: value.name,
|
||||
zmImg: updateImg[0],
|
||||
fmImg: updateImg[1],
|
||||
age: 0,
|
||||
phone: value.tel,
|
||||
}
|
||||
let res = await http.http.request2({ url: `${http.api.apply}`, method: "POST", data: data })
|
||||
if (res.data.status == 1) {
|
||||
wx.redirectTo({
|
||||
url: '/view/logistics/appLogistics/inApplication/inApplication'
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.getDistrict()
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"wux-segmented-control": "../../../extend/wux/dist/segmented-control/index"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
<!-- 头部 -->
|
||||
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
|
||||
<!-- view/logistics/appLogistics/appLogistics.wxml -->
|
||||
<view class="appLogistics">
|
||||
<view class="applog-bac">
|
||||
<image class="applog-bac-img" mode="widthFix" src="http://cdn.yishaxiyi.com/afe349ecd5a329573547637704c703f1.png" />
|
||||
</view>
|
||||
<form bindsubmit="submit">
|
||||
<view class="list_text pd30 mt20">
|
||||
<view class="text_row">
|
||||
<view class="text_row1 flex-con2">姓名</view>
|
||||
<view class="text_row2 flex-con2">
|
||||
<input placeholder-style="color:#cccccc;" maxlength="16" name="name" type="text" value="" placeholder="请输入您的真实姓名" />
|
||||
</view>
|
||||
<view class="text_row3 flex-con3"></view>
|
||||
</view>
|
||||
<view class="text_row">
|
||||
<view class="text_row1 flex-con2">身份证</view>
|
||||
<view class="text_row2 flex-con2">
|
||||
<input placeholder-style="color:#cccccc;" maxlength="18" name="id" type="idcard" value="" placeholder="请输入您的身份证号" />
|
||||
</view>
|
||||
<view class="text_row3 flex-con3"></view>
|
||||
</view>
|
||||
<view class="text_row">
|
||||
<view class="text_row1 flex-con2">年龄</view>
|
||||
<view class="text_row2 flex-con2">
|
||||
<input placeholder-style="color:#cccccc;" maxlength="2" name="age" type="number" value="" placeholder="请输入您的真实年龄" />
|
||||
</view>
|
||||
<view class="text_row3 flex-con3"></view>
|
||||
</view>
|
||||
<view class="text_row">
|
||||
<view class="text_row1 flex-con2">手机</view>
|
||||
<view class="text_row2 flex-con2">
|
||||
<input placeholder-style="color:#cccccc;" maxlength="11" name="tel" type="number" value="" placeholder="请输入您的手机号" />
|
||||
</view>
|
||||
<view class="text_row3 flex-con3"></view>
|
||||
</view>
|
||||
<view class="text_row">
|
||||
<view class="text_row1 flex-con2">性别</view>
|
||||
<view class="text_row2 flex-con2">
|
||||
<wux-segmented-control style="width:260rpx;" current="{{ sex }}" theme="balanced" values="{{ ['男', '女'] }}" bind:change="onChange" />
|
||||
</view>
|
||||
<view class="text_row3 flex-con3"></view>
|
||||
</view>
|
||||
<picker mode="multiSelector" value="{{dateValue}}" range-key="name" range="{{dateAdd}}" bindchange="bindDateChange" bindcolumnchange="bindMultiPickerColumnChange">
|
||||
<view class="text_row">
|
||||
<view class="text_row1 flex-con2">区域</view>
|
||||
<view class="text_row2 flex-con2">
|
||||
<input placeholder-style="color:#cccccc;" type="text" value="{{dateName}}" placeholder="请选择您所在的区域" disabled="{{true}}" />
|
||||
</view>
|
||||
<view class="text_row3 flex-con3">
|
||||
<image src="/static/img/icon/rthyrthertherth.png" />
|
||||
</view>
|
||||
</view>
|
||||
</picker>
|
||||
<view class="text_row">
|
||||
<view class="text_row1 flex-con2">详情</view>
|
||||
<view class="text_row2 flex-con2">
|
||||
<input placeholder-style="color:#cccccc;" name="detail" type="text" value="" placeholder="输入街道或社区" />
|
||||
</view>
|
||||
<view class="text_row3 flex-con3"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list_text_p">
|
||||
<view class="list_text_tit">上传身份证照片</view>
|
||||
<view class="list_text_tit_img">
|
||||
<view class="pr10 dis-flex flex1" data-type="0" bind:tap="ChooseImage">
|
||||
<view wx:if="{{!!updateImg[0]}}" class="dis-flex flex1 updateImg">
|
||||
<image class="flex1" src="{{updateImg[0]}}" />
|
||||
</view>
|
||||
<view wx:else class="flex-con3 flex1 update-all">
|
||||
<view class="update">
|
||||
<image class="update-icon" src="/static/img/icon/update-icon.png" />
|
||||
<view class="update-text">上传身份证正面照</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pr10 dis-flex flex1" data-type="1" bind:tap="ChooseImage">
|
||||
<view wx:if="{{!!updateImg[1]}}" class="dis-flex flex1 updateImg">
|
||||
<image class="flex1" src="{{updateImg[1]}}" />
|
||||
</view>
|
||||
<view wx:else class="flex-con3 flex1 update-all">
|
||||
<view class="update">
|
||||
<image class="update-icon" src="/static/img/icon/update-icon.png" />
|
||||
<view class="update-text">上传身份证反面照</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button class="sub" form-type="submit">提交申请</button>
|
||||
</form>
|
||||
</view>
|
||||
<!-- toasta提示 -->
|
||||
<i-toast id="toast" />
|
||||
169
衣莎项目/源码/YiShaXiYi/view/logistics/appLogistics/appLogistics.wxss
Normal file
169
衣莎项目/源码/YiShaXiYi/view/logistics/appLogistics/appLogistics.wxss
Normal file
@@ -0,0 +1,169 @@
|
||||
/* view/logistics/appLogistics/appLogistics.wxss */
|
||||
|
||||
page {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
.applog-bac-img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.list_text {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.text_row {
|
||||
display: flex;
|
||||
height: 100rpx;
|
||||
width: 100%;
|
||||
border-bottom: 2rpx solid #ebebeb;
|
||||
}
|
||||
|
||||
.text_row1 {
|
||||
flex: 2;
|
||||
font-size: 30rpx;
|
||||
font-weight: 400;
|
||||
font-stretch: normal;
|
||||
letter-spacing: 0px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.text_row2 {
|
||||
/* padding-left: 40rpx; */
|
||||
flex: 7;
|
||||
font-size: 32rpx;
|
||||
font-weight: normal;
|
||||
font-stretch: normal;
|
||||
letter-spacing: 0px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.text_row2 span {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 32rpx;
|
||||
font-weight: normal;
|
||||
font-stretch: normal;
|
||||
letter-spacing: 0px;
|
||||
color: #ccc;
|
||||
display: -webkit-box !important;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.text_row3 {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.text_row3 image {
|
||||
width: 15rpx;
|
||||
height: 33rpx;
|
||||
}
|
||||
|
||||
/* .text_row:last-child {
|
||||
border: 0;
|
||||
} */
|
||||
|
||||
.label-1__text, .label-2__text {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 100%;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.label-1__icon {
|
||||
position: relative;
|
||||
margin-right: 10px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: #fcfff4;
|
||||
}
|
||||
|
||||
.label-1__icon-checked {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
left: 3px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: #1aad19;
|
||||
}
|
||||
|
||||
.label-2__icon {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border: #ebebeb solid 2rpx;
|
||||
background: #fff;
|
||||
border-radius: 50px;
|
||||
}
|
||||
|
||||
.label-2__icon-checked {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin: -6px 0 0 -6px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: #1aad19;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.label-4_text {
|
||||
text-align: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
|
||||
.list_text_tit{
|
||||
margin-top: 35rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
font-stretch: normal;
|
||||
letter-spacing: 0px;
|
||||
color: #333;
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
.list_text_tit_img{
|
||||
margin-top: 60rpx;
|
||||
padding: 0 30rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
height: 214rpx;
|
||||
}
|
||||
|
||||
.update-all{
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.update{
|
||||
text-align: center;
|
||||
}
|
||||
.update-icon{
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
.update-text{
|
||||
font-family: PingFang-SC-Regular;
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
font-stretch: normal;
|
||||
color: #999999;
|
||||
}
|
||||
.updateImg{
|
||||
max-width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.updateImg image{
|
||||
width: 100%;
|
||||
height: 214rpx;
|
||||
}
|
||||
|
||||
.sub{
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
c34e0b29-b1ea-4989-8ea8-5bf3fa718a48
|
||||
@@ -0,0 +1,69 @@
|
||||
// view/logistics/appLogistics/inApplication/inApplication.js
|
||||
const app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
system: app.globalData.system, //设备相关信息
|
||||
pageTitle: "申请中", //头部标题
|
||||
isBack: true,//显示返回
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<!-- 头部 -->
|
||||
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
|
||||
<!-- view/logistics/appLogistics/inApplication/inApplication.wxml -->
|
||||
<view class="wardrobeInfo">
|
||||
<view class="wardrobeInfo_suo">
|
||||
<image src="/static/img/success-icon.png" />
|
||||
</view>
|
||||
<view class="wardrobeInfo_tit">申请成功</view>
|
||||
<view class="wardrobeInfo_tit1">正在审核中,我们会在3个工作日内给您来电,请耐心等待...</view>
|
||||
</view>
|
||||
<!-- toasta提示 -->
|
||||
<i-toast id="toast" />
|
||||
@@ -0,0 +1,34 @@
|
||||
/* view/logistics/appLogistics/inApplication/inApplication.wxss */
|
||||
page{
|
||||
background-color: #ffffff !important;
|
||||
height: 100%;
|
||||
}
|
||||
.wardrobeInfo{
|
||||
width: 660rpx;
|
||||
margin: 130rpx auto 0;
|
||||
}
|
||||
.wardrobeInfo_suo{
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
.wardrobeInfo_suo image{
|
||||
width: 231rpx;
|
||||
height: 231rpx;
|
||||
}
|
||||
.wardrobeInfo_tit{
|
||||
margin-top: 70rpx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 45rpx;
|
||||
color: #333333;
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
}
|
||||
.wardrobeInfo_tit1{
|
||||
width: 511rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 40rpx;
|
||||
font-family: PingFang-SC-Regular;
|
||||
font-size: 32rpx;
|
||||
text-align: center;
|
||||
color: #666666;
|
||||
}
|
||||
Reference in New Issue
Block a user