|
|
|
|
@ -2,15 +2,50 @@ |
|
|
|
|
<view class="container"> |
|
|
|
|
<page-meta :root-font-size="fontsize+'px'"></page-meta> <!--动态设置html字体大小--> |
|
|
|
|
<view class="content_box"> |
|
|
|
|
<view class="top_box"> |
|
|
|
|
<view class="title_box"> |
|
|
|
|
当前报名单:<span style="color:#D73232">报名单{{currentNum}}</span> |
|
|
|
|
</view> |
|
|
|
|
<view class="turn_box"> |
|
|
|
|
<p class="turn_item prev" @click="handlePrev" v-if="currentNum > 1">上一页</p> |
|
|
|
|
<p class="turn_item next" @click="handleNext" v-if="currentNum < orderNum">下一页</p> |
|
|
|
|
</view> |
|
|
|
|
<!-- <view class="form_item"> |
|
|
|
|
<view class="img_box" @click="handlePrev"> |
|
|
|
|
<image src="../../../static/image/form.png" mode=""></image> |
|
|
|
|
<image src="../../../static/image/form_act.png" mode=""></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_txt"> |
|
|
|
|
报名单{{currentNum}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="line_box"></view> |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="img_box"> |
|
|
|
|
<image src="../../../static/image/form.png" mode=""></image> |
|
|
|
|
<image src="../../../static/image/form_act.png" mode=""></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_txt"> |
|
|
|
|
报名单{{currentNum}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="line_box"></view> |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="img_box"> |
|
|
|
|
<image src="../../../static/image/form.png" mode=""></image> |
|
|
|
|
<image src="../../../static/image/form_act.png" mode=""></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="form_txt" @click="handleNext"> |
|
|
|
|
报名单{{currentNum}} |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
</view> |
|
|
|
|
<view class="rele_content"> |
|
|
|
|
<view class="form_box"> |
|
|
|
|
<view class="top_header"> |
|
|
|
|
<img class="top_img" :src="imgPrefix + 'top.png'" alt=""> |
|
|
|
|
</view> |
|
|
|
|
<view class="top_content"> |
|
|
|
|
<view class="num_box" v-if="orderNum > 1"> |
|
|
|
|
表单{{currentNum}} |
|
|
|
|
</view> |
|
|
|
|
<view class="title"> |
|
|
|
|
枕头定制信息表 |
|
|
|
|
</view> |
|
|
|
|
@ -28,10 +63,12 @@ |
|
|
|
|
<uni-forms ref="valiForm" :rules="rules" :model="valiFormData" labelWidth="180px" |
|
|
|
|
label-position="top"> |
|
|
|
|
<uni-forms-item label="姓名" required name="username" :label-style="{'font-size':'40rpx'}"> |
|
|
|
|
<uni-easyinput :disabled="isDisabled" v-model="valiFormData.username" placeholder="请输入姓名" /> |
|
|
|
|
<uni-easyinput :disabled="isDisabled" v-model="valiFormData.username" |
|
|
|
|
placeholder="请输入姓名" /> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<uni-forms-item label="手机" required name="phone"> |
|
|
|
|
<uni-easyinput :disabled="isDisabled" v-model="valiFormData.phone" placeholder="请输入手机" /> |
|
|
|
|
<uni-easyinput :disabled="isDisabled" v-model="valiFormData.phone" |
|
|
|
|
placeholder="请输入手机" /> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<!-- <uni-forms-item label="地址" required name="address"> |
|
|
|
|
<uni-data-picker v-model="valiFormData.city" :localdata="aCityData" popup-title="选择城市"> |
|
|
|
|
@ -53,25 +90,30 @@ |
|
|
|
|
</uni-forms-item> --> |
|
|
|
|
<uni-forms-item label="身高" required name="height"> |
|
|
|
|
<p class="item_txt">单位:厘米cm</p> |
|
|
|
|
<uni-easyinput :disabled="isDisabled" v-model="valiFormData.height" placeholder="请输入身高" /> |
|
|
|
|
<uni-easyinput :disabled="isDisabled" v-model="valiFormData.height" |
|
|
|
|
placeholder="请输入身高" /> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<uni-forms-item label="体重" required name="weight"> |
|
|
|
|
<p class="item_txt">单位:公斤kg</p> |
|
|
|
|
<uni-easyinput :disabled="isDisabled" v-model="valiFormData.weight" placeholder="请输入体重" /> |
|
|
|
|
<uni-easyinput :disabled="isDisabled" v-model="valiFormData.weight" |
|
|
|
|
placeholder="请输入体重" /> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<uni-forms-item label="肩颈宽度"> |
|
|
|
|
<p class="item_txt">单位:厘米cm</p> |
|
|
|
|
<uni-easyinput :disabled="isDisabled" v-model="valiFormData.neckShoulderWidth" placeholder="请输入肩颈宽度" /> |
|
|
|
|
<uni-easyinput :disabled="isDisabled" v-model="valiFormData.neckShoulderWidth" |
|
|
|
|
placeholder="请输入肩颈宽度" /> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<uni-forms-item label="颈肩宽度示意图"> |
|
|
|
|
<view class="wid_pre"> |
|
|
|
|
<img class="wid_img" :src="imgPrefix + 'jian.png'" alt=""> |
|
|
|
|
<uni-data-checkbox :disabled="isDisabled" v-model="valiFormData.width" :localdata="widthData" /> |
|
|
|
|
<uni-data-checkbox :disabled="isDisabled" v-model="valiFormData.width" |
|
|
|
|
:localdata="widthData" /> |
|
|
|
|
</view> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<uni-forms-item label="颈长"> |
|
|
|
|
<p class="item_txt">单位:厘米cm</p> |
|
|
|
|
<uni-easyinput :disabled="isDisabled" v-model="valiFormData.neckLength" placeholder="请输入颈长" /> |
|
|
|
|
<uni-easyinput :disabled="isDisabled" v-model="valiFormData.neckLength" |
|
|
|
|
placeholder="请输入颈长" /> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<uni-forms-item label="颈长示意图"> |
|
|
|
|
<view class="hei_pre"> |
|
|
|
|
@ -80,10 +122,12 @@ |
|
|
|
|
</view> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<uni-forms-item label="年龄"> |
|
|
|
|
<uni-data-checkbox :disabled="isDisabled" v-model="valiFormData.ageRange" :localdata="ageData" /> |
|
|
|
|
<uni-data-checkbox :disabled="isDisabled" v-model="valiFormData.ageRange" |
|
|
|
|
:localdata="ageData" /> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<uni-forms-item label="您每晚的睡眠时间"> |
|
|
|
|
<uni-data-checkbox :disabled="isDisabled" v-model="valiFormData.sleepLength" :localdata="sleepData" /> |
|
|
|
|
<uni-data-checkbox :disabled="isDisabled" v-model="valiFormData.sleepLength" |
|
|
|
|
:localdata="sleepData" /> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<uni-forms-item label="您习惯的睡眠姿势" required name="sleepingPosture"> |
|
|
|
|
<view class="pos_box"> |
|
|
|
|
@ -101,24 +145,23 @@ |
|
|
|
|
|
|
|
|
|
</uni-forms-item> |
|
|
|
|
<uni-forms-item label="您习惯的枕头软硬度" required name="pillowHardness"> |
|
|
|
|
<uni-data-checkbox :disabled="isDisabled" v-model="valiFormData.pillowHardness" :localdata="posData" /> |
|
|
|
|
<uni-data-checkbox :disabled="isDisabled" v-model="valiFormData.pillowHardness" |
|
|
|
|
:localdata="posData" /> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<uni-forms-item label="您喜欢的枕头类型" required name="pillowMaterial"> |
|
|
|
|
<uni-data-checkbox :disabled="isDisabled" v-model="valiFormData.pillowMaterial" :localdata="matData" /> |
|
|
|
|
<uni-data-checkbox :disabled="isDisabled" v-model="valiFormData.pillowMaterial" |
|
|
|
|
:localdata="matData" /> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<uni-forms-item label="您现在的颈椎出现问题了吗"> |
|
|
|
|
<uni-data-checkbox :disabled="isDisabled" v-model="valiFormData.cervicalVertebra" :localdata="cerData" /> |
|
|
|
|
<uni-data-checkbox :disabled="isDisabled" v-model="valiFormData.cervicalVertebra" |
|
|
|
|
:localdata="cerData" /> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
<uni-forms-item label="您的其他需求"> |
|
|
|
|
<uni-easyinput :disabled="isDisabled" type="textarea" v-model="valiFormData.otherNeed" /> |
|
|
|
|
<uni-easyinput :disabled="isDisabled" type="textarea" |
|
|
|
|
v-model="valiFormData.otherNeed" /> |
|
|
|
|
</uni-forms-item> |
|
|
|
|
</uni-forms> |
|
|
|
|
<button class="btn_box" @click="submit('valiForm')">提交</button> |
|
|
|
|
<view class="button_box"> |
|
|
|
|
<p class="button" @click="handlePrev" v-if="currentNum > 1">上一个</p> |
|
|
|
|
<p class="button" @click="jumpOver">跳过</p> |
|
|
|
|
<p class="button" @click="handleNext" v-if="currentNum < orderNum">下一个</p> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<!-- <uni-popup ref="popup" background-color="#fff" @change="change"> |
|
|
|
|
<picker :range="locationArr" @change="cityChange" mode="multiSelector" @columnchange="columnchange" |
|
|
|
|
:value="multiIndex"> |
|
|
|
|
@ -154,9 +197,13 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
<view class="bottom_con"> |
|
|
|
|
<p class="btn_box" @click="jumpOver">跳过</p> |
|
|
|
|
<p class="btn_box" @click="submit('valiForm')">提交</p> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import aCityData from "../../../util/city.json"; |
|
|
|
|
@ -167,9 +214,9 @@ |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
phoneNumber:'', |
|
|
|
|
phoneNumber: '', |
|
|
|
|
imgPrefix: getApp().globalData.imgPrefix, |
|
|
|
|
isShowLink:false, |
|
|
|
|
isShowLink: false, |
|
|
|
|
fontsize: 12, |
|
|
|
|
// 校验表单数据 |
|
|
|
|
valiFormData: {}, |
|
|
|
|
@ -341,16 +388,16 @@ |
|
|
|
|
text: '侧睡', |
|
|
|
|
value: 2 |
|
|
|
|
}, ], |
|
|
|
|
isDisabled:false, |
|
|
|
|
orderNo:'', |
|
|
|
|
orderNum:'', |
|
|
|
|
orderData:[], |
|
|
|
|
currentNum:null, |
|
|
|
|
pageFrom:'' |
|
|
|
|
isDisabled: false, |
|
|
|
|
orderNo: '', |
|
|
|
|
orderNum: '', |
|
|
|
|
orderData: [], |
|
|
|
|
currentNum: null, |
|
|
|
|
pageFrom: '', |
|
|
|
|
formData: [] |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onShow(){ |
|
|
|
|
}, |
|
|
|
|
onShow() {}, |
|
|
|
|
onLoad(options) { |
|
|
|
|
// let srceenNunber=15; //因设计图是1920所有把设计图分为19.2份,所以html字体大小为100px |
|
|
|
|
let that = this; |
|
|
|
|
@ -392,150 +439,188 @@ |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 根据订单号获取已填写的订单信息 |
|
|
|
|
getOrderInfo(type){ |
|
|
|
|
getOrderInfo(type) { |
|
|
|
|
uni.request({ |
|
|
|
|
url:getApp().globalData.baseUrl + '/blade-desk/custom-made-info/list-by-order-no?orderNo=' + this.orderNo, |
|
|
|
|
method:'GET', |
|
|
|
|
header:{ |
|
|
|
|
url: getApp().globalData.baseUrl + '/blade-desk/custom-made-info/list-by-order-no?orderNo=' + |
|
|
|
|
this.orderNo, |
|
|
|
|
method: 'GET', |
|
|
|
|
header: { |
|
|
|
|
'Blade-Auth': 'bearer ' + uni.getStorageSync('token') |
|
|
|
|
}, |
|
|
|
|
success:(res) =>{ |
|
|
|
|
success: (res) => { |
|
|
|
|
console.log(res) |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.orderData = res.data.data; |
|
|
|
|
if(type == 'save'){ |
|
|
|
|
if(this.orderData.length == this.orderNum){ |
|
|
|
|
if(this.pageFrom == 'order'){ |
|
|
|
|
if (type == 'save') { |
|
|
|
|
if (this.orderData.length == this.orderNum) { |
|
|
|
|
if (this.pageFrom == 'order') { |
|
|
|
|
uni.navigateBack({ |
|
|
|
|
url:"/pages/pages_zhentou/order/order" |
|
|
|
|
url: "/pages/pages_zhentou/order/order" |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
uni.redirectTo({ |
|
|
|
|
url:"/pages/pages_zhentou/order/order" |
|
|
|
|
url: "/pages/pages_zhentou/order/order" |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
this.currentNum = this.orderData.length + 1; |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
if(this.orderData.length == this.orderNum){ |
|
|
|
|
} else { |
|
|
|
|
if (this.orderData.length == this.orderNum) { |
|
|
|
|
this.currentNum = 1; |
|
|
|
|
this.valiFormData = this.orderData[0] |
|
|
|
|
this.valiFormData.neckShoulderWidth = this.valiFormData.neckShoulderWidth == -1 ? '' : this.valiFormData.neckShoulderWidth; |
|
|
|
|
this.valiFormData.neckLength = this.valiFormData.neckLength == -1 ? '' : this.valiFormData.neckLength; |
|
|
|
|
this.valiFormData.ageRange = this.valiFormData.ageRange == -1 ? '' : this.valiFormData.ageRange; |
|
|
|
|
this.valiFormData.sleepLength = this.valiFormData.sleepLength == -1 ? '' : this.valiFormData.sleepLength; |
|
|
|
|
this.valiFormData.cervicalVertebra = this.valiFormData.cervicalVertebra == -1 ? '' : this.valiFormData.cervicalVertebra; |
|
|
|
|
this.valiFormData.otherNeed = this.valiFormData.otherNeed == -1 ? '' : this.valiFormData.otherNeed; |
|
|
|
|
this.valiFormData.neckShoulderWidth = this.valiFormData |
|
|
|
|
.neckShoulderWidth == -1 ? '' : this.valiFormData.neckShoulderWidth; |
|
|
|
|
this.valiFormData.neckLength = this.valiFormData.neckLength == -1 ? '' : |
|
|
|
|
this.valiFormData.neckLength; |
|
|
|
|
this.valiFormData.ageRange = this.valiFormData.ageRange == -1 ? '' : this |
|
|
|
|
.valiFormData.ageRange; |
|
|
|
|
this.valiFormData.sleepLength = this.valiFormData.sleepLength == -1 ? '' : |
|
|
|
|
this.valiFormData.sleepLength; |
|
|
|
|
this.valiFormData.cervicalVertebra = this.valiFormData.cervicalVertebra == |
|
|
|
|
-1 ? '' : this.valiFormData.cervicalVertebra; |
|
|
|
|
this.valiFormData.otherNeed = this.valiFormData.otherNeed == -1 ? '' : this |
|
|
|
|
.valiFormData.otherNeed; |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
this.currentNum = this.orderData.length + 1; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else if (res.data.code == 401) { |
|
|
|
|
this.doLogin() |
|
|
|
|
} else { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.data.msg, |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
handlePrev(){ |
|
|
|
|
handlePrev() { |
|
|
|
|
// console.log(this.currentNum - 2) |
|
|
|
|
this.currentNum = this.currentNum - 1; |
|
|
|
|
this.valiFormData = this.orderData[this.currentNum - 1]; |
|
|
|
|
if(!this.valiFormData){ |
|
|
|
|
if (!this.valiFormData) { |
|
|
|
|
this.valiFormData = {} |
|
|
|
|
}else{ |
|
|
|
|
this.valiFormData.neckShoulderWidth = this.valiFormData.neckShoulderWidth == -1 ? '' : this.valiFormData.neckShoulderWidth; |
|
|
|
|
} else { |
|
|
|
|
this.valiFormData.neckShoulderWidth = this.valiFormData.neckShoulderWidth == -1 ? '' : this |
|
|
|
|
.valiFormData.neckShoulderWidth; |
|
|
|
|
this.valiFormData.neckLength = this.valiFormData.neckLength == -1 ? '' : this.valiFormData.neckLength; |
|
|
|
|
this.valiFormData.ageRange = this.valiFormData.ageRange == -1 ? '' : this.valiFormData.ageRange; |
|
|
|
|
this.valiFormData.sleepLength = this.valiFormData.sleepLength == -1 ? '' : this.valiFormData.sleepLength; |
|
|
|
|
this.valiFormData.cervicalVertebra = this.valiFormData.cervicalVertebra == -1 ? '' : this.valiFormData.cervicalVertebra; |
|
|
|
|
this.valiFormData.sleepLength = this.valiFormData.sleepLength == -1 ? '' : this.valiFormData |
|
|
|
|
.sleepLength; |
|
|
|
|
this.valiFormData.cervicalVertebra = this.valiFormData.cervicalVertebra == -1 ? '' : this.valiFormData |
|
|
|
|
.cervicalVertebra; |
|
|
|
|
this.valiFormData.otherNeed = this.valiFormData.otherNeed == -1 ? '' : this.valiFormData.otherNeed; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
jumpOver(){ |
|
|
|
|
if(this.pageFrom == 'order'){ |
|
|
|
|
jumpOver() { |
|
|
|
|
if (this.pageFrom == 'order') { |
|
|
|
|
uni.navigateBack({ |
|
|
|
|
url:"/pages/pages_zhentou/order/order" |
|
|
|
|
url: "/pages/pages_zhentou/order/order" |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
uni.redirectTo({ |
|
|
|
|
url:"/pages/pages_zhentou/order/order" |
|
|
|
|
url: "/pages/pages_zhentou/order/order" |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
handleNext(){ |
|
|
|
|
handleNext() { |
|
|
|
|
console.log(this.currentNum) |
|
|
|
|
this.currentNum = this.currentNum + 1 |
|
|
|
|
this.valiFormData = this.orderData[this.currentNum - 1]; |
|
|
|
|
if(!this.valiFormData){ |
|
|
|
|
if (!this.valiFormData) { |
|
|
|
|
console.log('123') |
|
|
|
|
this.valiFormData = {} |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
console.log('456') |
|
|
|
|
this.valiFormData.neckShoulderWidth = this.valiFormData.neckShoulderWidth == -1 ? '' : this.valiFormData.neckShoulderWidth; |
|
|
|
|
this.valiFormData.neckShoulderWidth = this.valiFormData.neckShoulderWidth == -1 ? '' : this |
|
|
|
|
.valiFormData.neckShoulderWidth; |
|
|
|
|
this.valiFormData.neckLength = this.valiFormData.neckLength == -1 ? '' : this.valiFormData.neckLength; |
|
|
|
|
this.valiFormData.ageRange = this.valiFormData.ageRange == -1 ? '' : this.valiFormData.ageRange; |
|
|
|
|
this.valiFormData.sleepLength = this.valiFormData.sleepLength == -1 ? '' : this.valiFormData.sleepLength; |
|
|
|
|
this.valiFormData.cervicalVertebra = this.valiFormData.cervicalVertebra == -1 ? '' : this.valiFormData.cervicalVertebra; |
|
|
|
|
this.valiFormData.sleepLength = this.valiFormData.sleepLength == -1 ? '' : this.valiFormData |
|
|
|
|
.sleepLength; |
|
|
|
|
this.valiFormData.cervicalVertebra = this.valiFormData.cervicalVertebra == -1 ? '' : this.valiFormData |
|
|
|
|
.cervicalVertebra; |
|
|
|
|
this.valiFormData.otherNeed = this.valiFormData.otherNeed == -1 ? '' : this.valiFormData.otherNeed; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 获取表单信息 |
|
|
|
|
getInfo(){ |
|
|
|
|
getInfo() { |
|
|
|
|
uni.request({ |
|
|
|
|
// this.phoneNumber |
|
|
|
|
url:getApp().globalData.baseUrl + '/blade-desk/custom-made-info/get-newest?phone=15932584136' , |
|
|
|
|
method:'GET', |
|
|
|
|
header:{ |
|
|
|
|
url: getApp().globalData.baseUrl + '/blade-desk/custom-made-info/get-newest?phone=15932584136', |
|
|
|
|
method: 'GET', |
|
|
|
|
header: { |
|
|
|
|
'Blade-Auth': 'bearer ' + uni.getStorageSync('token') |
|
|
|
|
}, |
|
|
|
|
success:(res) =>{ |
|
|
|
|
success: (res) => { |
|
|
|
|
console.log(res) |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.valiFormData = { |
|
|
|
|
username:res.data.data.username == '-1' ? '' : res.data.data.username, |
|
|
|
|
ageRange:res.data.data.ageRange == '-1' ? '' : res.data.data.ageRange, |
|
|
|
|
height:res.data.data.height == '-1' ? '' : res.data.data.height, |
|
|
|
|
neckLength:res.data.data.neckLength == '-1' ? '' : res.data.data.neckLength, |
|
|
|
|
neckShoulderWidth:res.data.data.neckShoulderWidth == '-1' ? '' : res.data.data.neckShoulderWidth, |
|
|
|
|
pillowHardness:res.data.data.pillowHardness == '-1' ? '' : res.data.data.pillowHardness, |
|
|
|
|
pillowMaterial:res.data.data.pillowMaterial == '-1' ? '' : res.data.data.pillowMaterial, |
|
|
|
|
sleepingPosture:res.data.data.sleepingPosture == '-1' ? '' : res.data.data.sleepingPosture, |
|
|
|
|
status:res.data.data.status == '-1' ? '' : res.data.data.status, |
|
|
|
|
weight:res.data.data.weight == '-1' ? '' : res.data.data.weight, |
|
|
|
|
address:res.data.data.detail == '-1' ? '' : res.data.data.detail, |
|
|
|
|
sleepLength:res.data.data.sleepLength == '-1' ? '' : res.data.data.sleepLength, |
|
|
|
|
cervicalVertebra:res.data.data.cervicalVertebra == '-1' ? '' : res.data.data.cervicalVertebra, |
|
|
|
|
otherNeed:res.data.data.otherNeed == '-1' ? '' : res.data.data.otherNeed, |
|
|
|
|
phone:res.data.data.phone == '-1' ? '' : res.data.data.phone |
|
|
|
|
} |
|
|
|
|
this.province = res.data.data.province == '-1' ? '' :res.data.data.province; |
|
|
|
|
this.city = res.data.data.city == '-1' ? '' :res.data.data.city; |
|
|
|
|
this.district = res.data.data.district == '-1' ? '' :res.data.data.district; |
|
|
|
|
username: res.data.data.username == '-1' ? '' : res.data.data.username, |
|
|
|
|
ageRange: res.data.data.ageRange == '-1' ? '' : res.data.data.ageRange, |
|
|
|
|
height: res.data.data.height == '-1' ? '' : res.data.data.height, |
|
|
|
|
neckLength: res.data.data.neckLength == '-1' ? '' : res.data.data |
|
|
|
|
.neckLength, |
|
|
|
|
neckShoulderWidth: res.data.data.neckShoulderWidth == '-1' ? '' : res.data |
|
|
|
|
.data.neckShoulderWidth, |
|
|
|
|
pillowHardness: res.data.data.pillowHardness == '-1' ? '' : res.data.data |
|
|
|
|
.pillowHardness, |
|
|
|
|
pillowMaterial: res.data.data.pillowMaterial == '-1' ? '' : res.data.data |
|
|
|
|
.pillowMaterial, |
|
|
|
|
sleepingPosture: res.data.data.sleepingPosture == '-1' ? '' : res.data.data |
|
|
|
|
.sleepingPosture, |
|
|
|
|
status: res.data.data.status == '-1' ? '' : res.data.data.status, |
|
|
|
|
weight: res.data.data.weight == '-1' ? '' : res.data.data.weight, |
|
|
|
|
address: res.data.data.detail == '-1' ? '' : res.data.data.detail, |
|
|
|
|
sleepLength: res.data.data.sleepLength == '-1' ? '' : res.data.data |
|
|
|
|
.sleepLength, |
|
|
|
|
cervicalVertebra: res.data.data.cervicalVertebra == '-1' ? '' : res.data |
|
|
|
|
.data.cervicalVertebra, |
|
|
|
|
otherNeed: res.data.data.otherNeed == '-1' ? '' : res.data.data.otherNeed, |
|
|
|
|
phone: res.data.data.phone == '-1' ? '' : res.data.data.phone |
|
|
|
|
} |
|
|
|
|
this.province = res.data.data.province == '-1' ? '' : res.data.data.province; |
|
|
|
|
this.city = res.data.data.city == '-1' ? '' : res.data.data.city; |
|
|
|
|
this.district = res.data.data.district == '-1' ? '' : res.data.data.district; |
|
|
|
|
// this.getCurrentArea(this.province) |
|
|
|
|
console.log(this.valiFormData) |
|
|
|
|
if(this.valiFormData.username !== '' && |
|
|
|
|
if (this.valiFormData.username !== '' && |
|
|
|
|
this.valiFormData.phone !== '' && this.valiFormData.height !== '' && |
|
|
|
|
this.valiFormData.weight !== '' && this.valiFormData.pillowHardness !== '' && |
|
|
|
|
this.valiFormData.pillowMaterial !== '' && this.valiFormData.sleepingPosture !== ''){ |
|
|
|
|
this.valiFormData.pillowMaterial !== '' && this.valiFormData |
|
|
|
|
.sleepingPosture !== '') { |
|
|
|
|
this.isDisabled = true |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
this.isDisabled = false |
|
|
|
|
} |
|
|
|
|
} else if (res.data.code == 401) { |
|
|
|
|
this.doLogin() |
|
|
|
|
} else { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.data.msg, |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
getCurrentArea(value){ |
|
|
|
|
this.allCityData.map((item,index) =>{ |
|
|
|
|
if(item.province == value){ |
|
|
|
|
getCurrentArea(value) { |
|
|
|
|
this.allCityData.map((item, index) => { |
|
|
|
|
if (item.province == value) { |
|
|
|
|
this.multiIndex[0] = index |
|
|
|
|
item.citys.map((item1,index1) =>{ |
|
|
|
|
if(item1.city == this.province){ |
|
|
|
|
item.citys.map((item1, index1) => { |
|
|
|
|
if (item1.city == this.province) { |
|
|
|
|
console.log('111') |
|
|
|
|
this.locationArr[1].push(item.city); |
|
|
|
|
} |
|
|
|
|
if(item1.city == this.city){ |
|
|
|
|
if (item1.city == this.city) { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
@ -630,8 +715,8 @@ |
|
|
|
|
sleepLength: this.valiFormData.sleepLength, |
|
|
|
|
cervicalVertebra: this.valiFormData.cervicalVertebra, |
|
|
|
|
otherNeed: this.valiFormData.otherNeed, |
|
|
|
|
orderNo:this.orderNo, |
|
|
|
|
id:this.valiFormData.id ? this.valiFormData.id : '' |
|
|
|
|
orderNo: this.orderNo, |
|
|
|
|
id: this.valiFormData.id ? this.valiFormData.id : '' |
|
|
|
|
} |
|
|
|
|
console.log(getApp().globalData.baseUrl) |
|
|
|
|
|
|
|
|
|
@ -652,6 +737,8 @@ |
|
|
|
|
this.province = ''; |
|
|
|
|
this.district = ''; |
|
|
|
|
this.getOrderInfo('save') |
|
|
|
|
} else if (res.data.code == 401) { |
|
|
|
|
this.doLogin() |
|
|
|
|
} else { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '提交失败', |
|
|
|
|
@ -667,6 +754,37 @@ |
|
|
|
|
console.log('err', err); |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//登录 |
|
|
|
|
doLogin(type) { |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '登录中', |
|
|
|
|
mask: true |
|
|
|
|
}); |
|
|
|
|
uni.request({ |
|
|
|
|
url: getApp().globalData.baseUrl + '/blade-auth/getToken', |
|
|
|
|
method: 'POST', |
|
|
|
|
data: { |
|
|
|
|
openId: getApp().globalData.openId, |
|
|
|
|
phone: this.phone |
|
|
|
|
}, |
|
|
|
|
header: { |
|
|
|
|
'Authorization': 'Basic c2FiZXI6c2FiZXJfc2VjcmV0' |
|
|
|
|
}, |
|
|
|
|
success: (res) => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
uni.setStorageSync('token', res.data.data.access_token); |
|
|
|
|
} else { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.data.msg, |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
complete: () => { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 省市区确认事件 |
|
|
|
|
pickerChange(e) { |
|
|
|
|
var _this = this |
|
|
|
|
@ -764,7 +882,7 @@ |
|
|
|
|
position: relative; |
|
|
|
|
/* max-width: 1920px; |
|
|
|
|
max-height: 920px; */ |
|
|
|
|
background-image: url('http://47.104.224.41:9000/etriphome/appresource/image/bag.png'); |
|
|
|
|
// background-image: url('http://47.104.224.41:9000/etriphome/appresource/image/bag.png'); |
|
|
|
|
background-position: top center; |
|
|
|
|
background-size: cover; |
|
|
|
|
background-repeat: no-repeat; |
|
|
|
|
@ -775,26 +893,103 @@ |
|
|
|
|
/* padding-bottom: 30px; */ |
|
|
|
|
|
|
|
|
|
.content_box { |
|
|
|
|
width: 690rpx; |
|
|
|
|
/* max-width: 700px; */ |
|
|
|
|
height: 96%; |
|
|
|
|
height: 80%; |
|
|
|
|
background-color: #fff; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
margin-top: 2%; |
|
|
|
|
overflow: auto; |
|
|
|
|
border-radius: 24rpx; |
|
|
|
|
padding: 30rpx 0; |
|
|
|
|
|
|
|
|
|
.top_box { |
|
|
|
|
width: 690rpx; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
// background: #fff; |
|
|
|
|
// display: flex; |
|
|
|
|
// align-items: center; |
|
|
|
|
// justify-content: space-around; |
|
|
|
|
|
|
|
|
|
.rele_content{ |
|
|
|
|
.title_box{ |
|
|
|
|
width:100%; |
|
|
|
|
text-align: left; |
|
|
|
|
margin-left: 30rpx; |
|
|
|
|
color: #666; |
|
|
|
|
font-size: 26rpx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.turn_box{ |
|
|
|
|
width: 690rpx; |
|
|
|
|
display: flex; |
|
|
|
|
margin: 28rpx 0 36rpx 0; |
|
|
|
|
|
|
|
|
|
.turn_item{ |
|
|
|
|
width: 200rpx; |
|
|
|
|
height: 78rpx; |
|
|
|
|
background: #FFFFFF; |
|
|
|
|
border-radius: 20rpx 20rpx 20rpx 20rpx; |
|
|
|
|
border: 1rpx solid #D73232; |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
justify-content: center; |
|
|
|
|
font-size: 26rpx; |
|
|
|
|
color: #D73232; |
|
|
|
|
margin-right: 106rpx; |
|
|
|
|
margin-left: 30rpx; |
|
|
|
|
|
|
|
|
|
&.next{ |
|
|
|
|
color: #666666; |
|
|
|
|
border: 1rpx solid #A5A5A5; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.form_item { |
|
|
|
|
width: 100rpx; |
|
|
|
|
display: flex; |
|
|
|
|
flex-direction: column; |
|
|
|
|
align-items: center; |
|
|
|
|
justify-content: center; |
|
|
|
|
|
|
|
|
|
.img_box { |
|
|
|
|
width: 68rpx; |
|
|
|
|
height: 68rpx; |
|
|
|
|
|
|
|
|
|
image { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 100%; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.form_txt { |
|
|
|
|
color: #666; |
|
|
|
|
font-size: 24rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.line_box { |
|
|
|
|
width: 153rpx; |
|
|
|
|
height: 1px; |
|
|
|
|
background: #D1D1D1; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.rele_content { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 80%; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
position: relative; |
|
|
|
|
overflow: auto; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.footer { |
|
|
|
|
margin: 0 auto; |
|
|
|
|
max-width: 700px; |
|
|
|
|
max-width: 100%; |
|
|
|
|
height: 80rpx; |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
color: #e9e9e9; |
|
|
|
|
color: #666; |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
justify-content: center; |
|
|
|
|
@ -825,7 +1020,7 @@ |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.add_item{ |
|
|
|
|
.add_item { |
|
|
|
|
width: 600rpx; |
|
|
|
|
height: 600rpx; |
|
|
|
|
position: absolute; |
|
|
|
|
@ -843,8 +1038,9 @@ |
|
|
|
|
width: 200rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.form_box { |
|
|
|
|
max-width: 700rpx; |
|
|
|
|
max-width: 100%; |
|
|
|
|
background: #fff; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
border-radius: 24rpx; |
|
|
|
|
@ -868,7 +1064,7 @@ |
|
|
|
|
.top_content { |
|
|
|
|
padding: 30rpx; |
|
|
|
|
|
|
|
|
|
.num_box{ |
|
|
|
|
.num_box { |
|
|
|
|
font-family: inherit; |
|
|
|
|
font-size: 40rpx; |
|
|
|
|
font-weight: normal; |
|
|
|
|
@ -918,14 +1114,15 @@ |
|
|
|
|
margin: 40rpx auto; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.button_box{ |
|
|
|
|
.button_box { |
|
|
|
|
width: 484rpx; |
|
|
|
|
height: 60rpx; |
|
|
|
|
display: flex; |
|
|
|
|
align-self: center; |
|
|
|
|
justify-content: space-between; |
|
|
|
|
padding: 0 100rpx; |
|
|
|
|
.button{ |
|
|
|
|
|
|
|
|
|
.button { |
|
|
|
|
width: 100rpx; |
|
|
|
|
height: 60rpx; |
|
|
|
|
background: #fff; |
|
|
|
|
@ -1112,5 +1309,38 @@ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.bottom_con { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 160rpx; |
|
|
|
|
background-color: #fff; |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: center; |
|
|
|
|
// align-items: center; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
// margin-top: 40rpx; |
|
|
|
|
position: fixed; |
|
|
|
|
bottom: 0; |
|
|
|
|
|
|
|
|
|
.btn_box { |
|
|
|
|
width: 320rpx; |
|
|
|
|
height: 78rpx; |
|
|
|
|
margin-top: 30rpx; |
|
|
|
|
background: #FFFFFF; |
|
|
|
|
border-radius: 20rpx 20rpx 20rpx 20rpx; |
|
|
|
|
border: 1rpx solid #D73232; |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
justify-content: center; |
|
|
|
|
font-size: 26rpx; |
|
|
|
|
color: #D73232; |
|
|
|
|
|
|
|
|
|
&:last-child { |
|
|
|
|
background: #D73232; |
|
|
|
|
color: #fff; |
|
|
|
|
margin-left: 50rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |