|
@@ -7,10 +7,10 @@
|
|
|
<view style="margin: 0 20rpx;">
|
|
|
<uni-forms :value="formData" ref="form" :rules="rules" validate-trigger="bind"
|
|
|
err-show-type="undertext">
|
|
|
- <view class="title">
|
|
|
+<!-- <view class="title">
|
|
|
<p>个人资料</p>
|
|
|
- </view>
|
|
|
- <uni-forms-item name="age" label="年龄区间">
|
|
|
+ </view> -->
|
|
|
+ <!-- <uni-forms-item name="age" label="年龄区间">
|
|
|
<picker @change="bindPickerChange" :value="index" :range="array"
|
|
|
range-key="age_bracket_discribe">
|
|
|
<view>{{ Xage }}</view>
|
|
@@ -34,15 +34,43 @@
|
|
|
<uni-easyinput type="number" maxlength="11" :inputBorder="true" v-model="formData.phone"
|
|
|
placeholder="请输入联系电话">
|
|
|
</uni-easyinput>
|
|
|
- </uni-forms-item>
|
|
|
+ </uni-forms-item> -->
|
|
|
|
|
|
<view class="line"></view>
|
|
|
|
|
|
- <view class="title">
|
|
|
- <p>收货地址</p>
|
|
|
+
|
|
|
+ <view class="but2">
|
|
|
+ <view class="title" >
|
|
|
+ <p>收货地址:</p>
|
|
|
+ </view>
|
|
|
+<!-- <button type="default" class="btn3" @click="chooseAddr()">
|
|
|
+ <image class="weixinlogo" :src="weixinimage">
|
|
|
+ </image>
|
|
|
+ <p class="auto-text">
|
|
|
+ 自动获取</p>
|
|
|
+ </button> -->
|
|
|
+ <button class="but3" @click="chooseAddr()">
|
|
|
+ <image class="weixinlogo" :src="weixinimage">
|
|
|
+ 自动获取
|
|
|
+ </button>
|
|
|
+ <view style="display: flex;margin-top: 3%;">
|
|
|
+ <p class='ipon' style="padding-right: 200rpx;color:#707070">{{formData.name}}</p>
|
|
|
+ <p class='ipon' style="padding-right: 200rpx;color:#707070">{{formData.number}}</p>
|
|
|
+
|
|
|
+ <!-- <text>{{formData.detailregion}}</text> -->
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <p class='ipon' style="color:#707070">{{formData.detailregion}}</p>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+
|
|
|
+<!-- <view class="setdeault">
|
|
|
+ <view class="setdeault-text">设为默认收货地址</view>
|
|
|
+ <switch style='zoom:.8;' @change="setDefault" />
|
|
|
+ </view>
|
|
|
+ -->
|
|
|
|
|
|
- <uni-forms-item name="name" required label="收件人">
|
|
|
+<!-- <uni-forms-item name="name" required label="收件人">
|
|
|
<uni-easyinput type="text" :inputBorder="true" v-model="formData.name" placeholder="请输入收件人">
|
|
|
</uni-easyinput>
|
|
|
</uni-forms-item>
|
|
@@ -64,11 +92,8 @@
|
|
|
<uni-easyinput type="text" :inputBorder="true" v-model="formData.detailregion"
|
|
|
placeholder="请输入详细地址(省/市/县/镇/)">
|
|
|
</uni-easyinput>
|
|
|
- </uni-forms-item>
|
|
|
- <view class="setdeault">
|
|
|
- <view class="setdeault-text">设为默认收货地址</view>
|
|
|
- <switch style='zoom:.8;' @change="setDefault" />
|
|
|
- </view>
|
|
|
+ </uni-forms-item> -->
|
|
|
+
|
|
|
|
|
|
<view class="line"></view>
|
|
|
|
|
@@ -131,6 +156,7 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ weixinimage: "../../static/img/icon-weixin.png",
|
|
|
navH: getApp().globalData.navHeight,
|
|
|
hasClicked: false,
|
|
|
address: [],
|
|
@@ -340,6 +366,41 @@
|
|
|
this.getlist()
|
|
|
},
|
|
|
methods: {
|
|
|
+ chooseAddr() {
|
|
|
+ const that = this
|
|
|
+ uni.chooseAddress({
|
|
|
+ success(res) {
|
|
|
+ that.formData.name = res.userName
|
|
|
+ that.formData.number=res.telNumber
|
|
|
+ that.formData.detailregion=res.provinceName + res.cityName + res.countyName + res.detailInfo
|
|
|
+ console.log(res)
|
|
|
+ console.log(res.userName)
|
|
|
+ console.log(res.postalCode)
|
|
|
+ console.log(res.provinceName)
|
|
|
+ console.log(res.cityName)
|
|
|
+ console.log(res.countyName)
|
|
|
+ console.log(res.detailInfo)
|
|
|
+ console.log(res.nationalCode)
|
|
|
+ console.log(res.telNumber)
|
|
|
+
|
|
|
+ that.$https.post('/youngee/c/t/p/add-talent-address', {
|
|
|
+ region_code: res.nationalCode,
|
|
|
+ detail_addr: res.provinceName + res.cityName + res.countyName + res.detailInfo,
|
|
|
+ phone_number: res.telNumber,
|
|
|
+ receiver_name: res.userName,
|
|
|
+ mail_code: res.postalCode,
|
|
|
+ default_tag: 1
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ console.log(res)
|
|
|
+ that.getlist()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ fail: (res) => {
|
|
|
+ console.log(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
initRegion() {
|
|
|
// 声明城市数组
|
|
|
let cityArr = [];
|
|
@@ -923,6 +984,38 @@
|
|
|
});
|
|
|
})
|
|
|
this.regionStr = '请选择省市区';
|
|
|
+ },
|
|
|
+ chooseAddr() {
|
|
|
+ const that = this
|
|
|
+ uni.chooseAddress({
|
|
|
+ success(res) {
|
|
|
+ console.log(res)
|
|
|
+ console.log(res.userName)
|
|
|
+ console.log(res.postalCode)
|
|
|
+ console.log(res.provinceName)
|
|
|
+ console.log(res.cityName)
|
|
|
+ console.log(res.countyName)
|
|
|
+ console.log(res.detailInfo)
|
|
|
+ console.log(res.nationalCode)
|
|
|
+ console.log(res.telNumber)
|
|
|
+
|
|
|
+ that.$https.post('/youngee/c/t/p/add-talent-address', {
|
|
|
+ region_code: res.nationalCode,
|
|
|
+ detail_addr: res.provinceName + res.cityName + res.countyName + res.detailInfo,
|
|
|
+ phone_number: res.telNumber,
|
|
|
+ receiver_name: res.userName,
|
|
|
+ mail_code: res.postalCode,
|
|
|
+ default_tag: 1
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ console.log(res)
|
|
|
+ that.getlist()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ fail: (res) => {
|
|
|
+ console.log(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
@@ -1010,7 +1103,34 @@
|
|
|
padding-bottom: 15rpx;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ .but2{
|
|
|
+ width: 100%;
|
|
|
+ height:260rpx;
|
|
|
+
|
|
|
+ }
|
|
|
+ .but3{
|
|
|
+ // width: 27%;
|
|
|
+ // height:50rpx;
|
|
|
+ // display: flex;
|
|
|
+ // align-items: center;
|
|
|
+ margin-left: 0;
|
|
|
+ // background-color: #F0D232;
|
|
|
+ // font-size: 30rpx;
|
|
|
+ // color: #ffffff;
|
|
|
+ background-color: #f2d22d;
|
|
|
+ color: #ffffff;
|
|
|
+ border-color: #ffffff;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ font-size: 22rpx;
|
|
|
+ line-height: 200%;
|
|
|
+ letter-spacing: 10rpx;
|
|
|
+ font-weight: 500;
|
|
|
+ height: 50rpx;
|
|
|
+ width: 225rpx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
.setdeault {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
@@ -1128,7 +1248,16 @@
|
|
|
text-align: center;
|
|
|
margin-top: 2%;
|
|
|
}
|
|
|
-
|
|
|
+ .auto-text {
|
|
|
+ display: inline-block;
|
|
|
+ // font-size:32rpx;
|
|
|
+ }
|
|
|
+ .weixinlogo {
|
|
|
+ display: inline-block;
|
|
|
+ padding-right: 5rpx;
|
|
|
+ width: 35rpx;
|
|
|
+ height: 35rpx;
|
|
|
+ }
|
|
|
.but1 {
|
|
|
width: 120%;
|
|
|
text-align: center;
|