新增分享,找回密码,实名认证,签约
This commit is contained in:
@@ -11,17 +11,14 @@ Page({
|
||||
address : '',
|
||||
isDefault : '',
|
||||
disabled : false,
|
||||
|
||||
//省份选择
|
||||
areas : [],
|
||||
areaId : '',
|
||||
areaIndex : 0,
|
||||
|
||||
//市级选择
|
||||
cityList : [],
|
||||
cityId : 0,
|
||||
cityIndex : 0,
|
||||
|
||||
//区域选择
|
||||
regiList : [],
|
||||
regiId : 0,
|
||||
@@ -90,8 +87,14 @@ Page({
|
||||
atcode = area[index].id
|
||||
if (index != this.data.areaIndex) {
|
||||
this.setData({
|
||||
areaIndex : index,
|
||||
areaId : atcode
|
||||
areaIndex : index,
|
||||
areaId : atcode,
|
||||
cityList : [],
|
||||
cityId : 0,
|
||||
cityIndex : 0,
|
||||
regiList : [],
|
||||
regiId : 0,
|
||||
regiIndex : 0,
|
||||
})
|
||||
// 获取市级列表
|
||||
this.citylist(atcode)
|
||||
@@ -107,9 +110,12 @@ Page({
|
||||
}).then(res=>{
|
||||
let cityArr = res.data
|
||||
this.setData({
|
||||
cityId : cityArr[0].id,
|
||||
cityIndex : 0,
|
||||
cityList : cityArr
|
||||
cityId : cityArr[0].id,
|
||||
cityIndex : 0,
|
||||
cityList : cityArr,
|
||||
regiList : [],
|
||||
regiId : 0,
|
||||
regiIndex : 0,
|
||||
})
|
||||
|
||||
// 获取区级列表
|
||||
@@ -208,14 +214,17 @@ Page({
|
||||
*/
|
||||
addressRemove(){
|
||||
wx.showModal({
|
||||
title : '提示',
|
||||
content : '是否删除地址',
|
||||
success : res=> {
|
||||
title : '提示',
|
||||
content : '是否删除地址',
|
||||
confirmText : '删除',
|
||||
confirmColor: '#e92152',
|
||||
success : res => {
|
||||
if (res.confirm) {
|
||||
wx.showLoading({
|
||||
title: '删除中',
|
||||
})
|
||||
wx.$api.site.siteDel(this.data.addressId).then(res=>{
|
||||
wx.$api.site.siteDel(this.data.addressId).then(() => {
|
||||
wx.hideLoading()
|
||||
wx.navigateBack()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,52 +1,53 @@
|
||||
<form bindsubmit="siteform" class="site-form">
|
||||
<view class="site-input">
|
||||
<label>收货人</label>
|
||||
<input placeholder="请输入收货人姓名" name="name" value="{{nameValue}}" type="text" bindinput="bindinput"></input>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>手机号码</label>
|
||||
<input placeholder="请输入手机号码" maxlength="11" name="mobile" type="number" value="{{mobile}}"></input>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>所在省份</label>
|
||||
<picker bindchange="areasChange" value="{{areaIndex}}" range="{{areas}}" range-key="name" name="region_id">
|
||||
<view class="picker">
|
||||
{{ areas[areaIndex].name }}
|
||||
<view class="content">
|
||||
<form bindsubmit="siteform">
|
||||
<view class="site-form">
|
||||
<view class="site-input">
|
||||
<label>收货人</label>
|
||||
<input placeholder="请输入收货人姓名" name="name" value="{{nameValue}}" type="text" bindinput="bindinput"></input>
|
||||
</view>
|
||||
<image src="/static/icons/orderArrow.png"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>所在城市</label>
|
||||
<picker bindchange="cityDrop" value="{{cityIndex}}" range="{{cityList}}" range-key="name" class="conneColor" name="city_id">
|
||||
<view class="picker">
|
||||
{{ cityList[cityIndex].name }}
|
||||
<view class="site-input">
|
||||
<label>手机号码</label>
|
||||
<input placeholder="请输入手机号码" maxlength="11" name="mobile" type="number" value="{{mobile}}"></input>
|
||||
</view>
|
||||
<image src="/static/icons/orderArrow.png"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>所在区域</label>
|
||||
<picker bindchange="regiDrop" value="{{regiIndex}}" range="{{regiList}}" range-key="name" class="conneColor" name="district_id">
|
||||
<view class="picker">
|
||||
{{ regiList[regiIndex].name }}
|
||||
<view class="site-input">
|
||||
<label>所在省份</label>
|
||||
<picker bindchange="areasChange" value="{{areaIndex}}" range="{{areas}}" range-key="name" name="region_id">
|
||||
<view class="picker nowrap">
|
||||
{{ areas[areaIndex].name }}
|
||||
<image class="picker-icon" src="/static/icons/orderArrow.png"></image>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<image src="/static/icons/orderArrow.png"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>收货地址</label>
|
||||
<input placeholder="请输入详细地址" name="address" value="{{address}}"></input>
|
||||
</view>
|
||||
<view class="site-switch">
|
||||
<text>设置默认地址</text>
|
||||
<switch style='zoom:.6;' bindchange="addressDefault" color="#ff9951" checked="{{isDefault}}" />
|
||||
</view>
|
||||
<view class="site-del" bindtap="addressRemove">
|
||||
<image class="site-del-img" src="/static/icons/siteDel.png"></image>
|
||||
<text>删除地址</text>
|
||||
</view>
|
||||
<view class="site-btn">
|
||||
<button form-type="submit" size="mini" disabled="{{disabled}}">保存</button>
|
||||
</view>
|
||||
</form>
|
||||
<view class="site-input">
|
||||
<label>所在城市</label>
|
||||
<picker bindchange="cityDrop" value="{{cityIndex}}" range="{{cityList}}" range-key="name" class="conneColor" name="city_id">
|
||||
<view class="picker nowrap">
|
||||
{{ cityList[cityIndex].name }}
|
||||
<image class="picker-icon" src="/static/icons/orderArrow.png"></image>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>所在区域</label>
|
||||
<picker bindchange="regiDrop" value="{{regiIndex}}" range="{{regiList}}" range-key="name" class="conneColor" name="district_id">
|
||||
<view class="picker nowrap">
|
||||
{{ regiList[regiIndex].name }}
|
||||
<image class="picker-icon" src="/static/icons/orderArrow.png"></image>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="site-input">
|
||||
<label>收货地址</label>
|
||||
<input placeholder="请输入详细地址" name="address" value="{{address}}"></input>
|
||||
</view>
|
||||
<view class="site-switch">
|
||||
<text>设置默认地址</text>
|
||||
<switch style='zoom:.6;' bindchange="addressDefault" color="#e92152" checked="{{isDefault}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="site-btn">
|
||||
<button form-type="submit" size="mini" disabled="{{disabled}}">保存</button>
|
||||
</view>
|
||||
<view class="site-del" bindtap="addressRemove">删除地址</view>
|
||||
</form>
|
||||
</view>
|
||||
@@ -1,99 +1,19 @@
|
||||
.site-form {
|
||||
background: white;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.site-input {
|
||||
padding: 0 30rpx 0 200rpx;
|
||||
position: relative;
|
||||
line-height: 110rpx;
|
||||
min-height: 110rpx;
|
||||
}
|
||||
.content{ min-height: 100vh; background: #f7f8f9; padding-top: 30rpx; box-sizing: border-box; }
|
||||
|
||||
.site-input::before {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 30rpx;
|
||||
right: 0;
|
||||
height: 1rpx;
|
||||
content: "";
|
||||
background: #e4e6f2;
|
||||
}
|
||||
/* 收货地址 */
|
||||
.site-form{ background: white; border-radius: 20rpx; margin: 0 30rpx; padding: 20rpx 0; }
|
||||
.site-input{ display: flex; justify-content: space-between; align-items: center; padding: 0 30rpx;}
|
||||
.site-input label{ width: 170rpx; font-size: 30rpx; color: #333; line-height: 90rpx; }
|
||||
.site-input input{ width: calc(100% - 170rpx); font-size: 30rpx; }
|
||||
.site-input picker{ width: calc(100% - 170rpx); }
|
||||
.picker{ padding-right: 90rpx; width: 100%; box-sizing: border-box; position: relative; }
|
||||
.picker-icon{ width: 32rpx; height: 32rpx; position: absolute; right: 0; top: 50%; margin-top: -16rpx; }
|
||||
.site-switch{ display: flex; align-items: center; justify-content: space-between; padding: 0 30rpx; height: 90rpx; color: #333; }
|
||||
|
||||
.site-input:last-child::before {
|
||||
display: none;
|
||||
}
|
||||
/* 保存地址 */
|
||||
.site-btn{ padding: 50rpx 30rpx 30rpx; }
|
||||
.site-btn button[size="mini"]{ background: #e92152; height: 90rpx; line-height: 90rpx; width: 100%; vertical-align: top; border-radius: 45rpx; color: white; font-size: 32rpx; }
|
||||
.site-btn button[size="mini"][disabled] { background: #e92152; color: #fff; opacity: .5; }
|
||||
.site-del{ margin: 0 30rpx; line-height: 90rpx; text-align: center; color: #e92152; background: white; border-radius: 45rpx; }
|
||||
|
||||
.site-input label {
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.site-input input {
|
||||
height: 110rpx;
|
||||
}
|
||||
|
||||
.site-input image {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: calc(50% - 22rpx);
|
||||
}
|
||||
|
||||
.site-btn {
|
||||
padding: 20rpx 30rpx;
|
||||
margin-top: 100rpx;
|
||||
}
|
||||
|
||||
.site-btn button[size="mini"] {
|
||||
width: 100%;
|
||||
background: #e92152;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
font-size: 30rpx;
|
||||
color: white;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.site-btn button[disabled] {
|
||||
background: #e92152 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.site-switch {
|
||||
font-size: 32rpx;
|
||||
margin: 30rpx;
|
||||
display: flex;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.site-switch text {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.site-switch-active {
|
||||
color: #797979;
|
||||
}
|
||||
|
||||
.site-del {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 40rpx;
|
||||
padding-top: 60rpx;
|
||||
border-top: 2rpx solid rgb(228, 230, 242);
|
||||
color: #ff9951;
|
||||
}
|
||||
|
||||
.site-del-btn {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.site-del-img {
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
display: inline-block;
|
||||
vertical-align: -10rpx;
|
||||
margin-right: 5rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user