...
|
...
|
@@ -2,17 +2,19 @@ |
|
|
<view style="background-color: white; height: 100%;">
|
|
|
<view v-if="!result" class="">
|
|
|
<view class="top">
|
|
|
<image src="http://equiphappy.shs.broing.cn/assets/miniprogram/bg3.png" style="height: 432rpx;width: 100%;" mode=""></image>
|
|
|
<image src="http://equiphappy.shs.broing.cn/assets/miniprogram/bg3.png"
|
|
|
style="height: 432rpx;width: 100%;" mode=""></image>
|
|
|
</view>
|
|
|
<view class="" style="padding: 32rpx;background-color: white;">
|
|
|
<u--form labelPosition="left" :model="model1" :rules="rules" ref="uForm">
|
|
|
<u-form-item label="设备信息" labelWidth="200rpx" prop="userInfo.name" borderBottom ref="item1" @click="goChoose">
|
|
|
<u-form-item label="设备信息" labelWidth="200rpx" prop="userInfo.name" borderBottom ref="item1"
|
|
|
@click="goChoose">
|
|
|
<u--input v-model="model1.userInfo.name" disabled disabledColor="#ffffff" placeholder="请选择设备"
|
|
|
border="none"></u--input>
|
|
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
|
|
</u-form-item>
|
|
|
<u-form-item label="设备停放地" labelWidth="200rpx" prop="userInfo.address" borderBottom
|
|
|
@click="goMap" ref="item1">
|
|
|
<u-form-item label="设备停放地" labelWidth="200rpx" prop="userInfo.address" borderBottom @click="goMap"
|
|
|
ref="item1">
|
|
|
<u--input v-model="model1.userInfo.address" disabled disabledColor="#ffffff" placeholder="请选择"
|
|
|
border="none"></u--input>
|
|
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
...
|
...
|
@@ -29,8 +31,7 @@ |
|
|
border="none"></u--input>
|
|
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
|
|
</u-form-item>
|
|
|
<u-form-item label="出厂年限" labelWidth="200rpx" prop="userInfo.year" borderBottom
|
|
|
ref="item1">
|
|
|
<u-form-item label="出厂年限" labelWidth="200rpx" prop="userInfo.year" borderBottom ref="item1">
|
|
|
<u--input v-model="model1.userInfo.year" border="none"></u--input>
|
|
|
</u-form-item>
|
|
|
<u-form-item label="表显小时数" labelWidth="200rpx" prop="userInfo.hours" borderBottom ref="item1">
|
...
|
...
|
@@ -39,16 +40,19 @@ |
|
|
|
|
|
|
|
|
</u--form>
|
|
|
<view class="" style="width: 60%;margin-top: 50rpx;display: flex;justify-content: center;margin-left: 20%;">
|
|
|
<view class=""
|
|
|
style="width: 60%;margin-top: 50rpx;display: flex;justify-content: center;margin-left: 20%;">
|
|
|
<u-button shape="circle" text="开始估价" color="linear-gradient(to right, #46BAEC,#2F67D3)"
|
|
|
@click="submit"></u-button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-else class="rBox">
|
|
|
<image src="../../static/right.png" style="width: 128rpx;margin: 182rpx 0 48rpx 0;height: 128rpx;" mode=""></image>
|
|
|
<image src="../../static/right.png" style="width: 128rpx;margin: 182rpx 0 48rpx 0;height: 128rpx;" mode="">
|
|
|
</image>
|
|
|
<p class="title">提交成功</p>
|
|
|
<p style="margin: 24rpx 0 162rpx 0; color: #00000066;font-size: 28rpx;font-weight: 400;"> 平台将3个工作日内联系您,为您进行价格评估</p>
|
|
|
<p style="margin: 24rpx 0 162rpx 0; color: #00000066;font-size: 28rpx;font-weight: 400;">
|
|
|
平台将3个工作日内联系您,为您进行价格评估</p>
|
|
|
<view class="" style="width: 40%;">
|
|
|
<u-button text="返回首页" @click="goIndex"></u-button>
|
|
|
</view>
|
...
|
...
|
@@ -66,10 +70,10 @@ |
|
|
userInfo: {
|
|
|
name: '',
|
|
|
year: '',
|
|
|
hours:'',
|
|
|
address:'',
|
|
|
brand_name:'',
|
|
|
xh_name:''
|
|
|
hours: '',
|
|
|
address: '',
|
|
|
brand_name: '',
|
|
|
xh_name: ''
|
|
|
},
|
|
|
},
|
|
|
actions: [{
|
...
|
...
|
@@ -93,11 +97,11 @@ |
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
goChoose(){
|
|
|
goChoose() {
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/subPages/more?val=2'
|
|
|
})
|
|
|
},
|
|
|
},
|
|
|
goLogo() {
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/sellAndBuy/logo'
|
...
|
...
|
@@ -108,10 +112,10 @@ |
|
|
url: '/pages/sellAndBuy/chooseNum'
|
|
|
})
|
|
|
},
|
|
|
goMap(){
|
|
|
goMap() {
|
|
|
let that = this
|
|
|
uni.chooseLocation({
|
|
|
success: function (res) {
|
|
|
success: function(res) {
|
|
|
console.log('位置名称:' + res.name);
|
|
|
console.log('详细地址:' + res.address);
|
|
|
console.log('纬度:' + res.latitude);
|
...
|
...
|
@@ -122,8 +126,8 @@ |
|
|
that.model1.userInfo.lng = res.longitude
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
submit() {
|
|
|
let p = {
|
...
|
...
|
@@ -139,10 +143,10 @@ |
|
|
res => {
|
|
|
uni.showToast({
|
|
|
title: res.msg,
|
|
|
icon:'none'
|
|
|
icon: 'none'
|
|
|
})
|
|
|
|
|
|
if(res.code == 1){
|
|
|
|
|
|
if (res.code == 1) {
|
|
|
let pagearr = getCurrentPages(); //获取应用页面栈
|
|
|
let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息
|
|
|
console.log('option:', currentPage) //获取页面传递的信息
|
...
|
...
|
@@ -154,9 +158,9 @@ |
|
|
url: '/pages/index/buy'
|
|
|
})
|
|
|
}, 1000)
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
}).catch(err => {
|
|
|
uni.showToast({
|
|
|
title: err.msg
|
...
|
...
|
@@ -171,63 +175,62 @@ |
|
|
this.model1.userInfo.sex = e.name
|
|
|
this.$refs.uForm.validateField('userInfo.sex')
|
|
|
},
|
|
|
onShow() {
|
|
|
let pagearr = getCurrentPages(); //获取应用页面栈
|
|
|
let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息
|
|
|
console.log('option:', currentPage) //获取页面传递的信息
|
|
|
this.model1.userInfo.category_id = currentPage.$vm.category_id
|
|
|
this.model1.userInfo.name = currentPage.$vm.name
|
|
|
this.model1.userInfo.brand_id = currentPage.$vm.brand_id
|
|
|
this.model1.userInfo.brand_name = currentPage.$vm.brand_name
|
|
|
this.model1.userInfo.xinghao_id = currentPage.$vm.xh_id
|
|
|
this.model1.userInfo.xh_name = currentPage.$vm.xh_name
|
|
|
console.log(this.model1.userInfo);
|
|
|
},
|
|
|
|
|
|
goUpload() {
|
|
|
this.result = true
|
|
|
},
|
|
|
goIndex(){
|
|
|
goIndex() {
|
|
|
uni.reLaunch({
|
|
|
url:'/pages/index/buy'
|
|
|
url: '/pages/index/buy'
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
onReady() {
|
|
|
//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
|
|
|
// this.$refs.uForm.setRules(this.rules)
|
|
|
},
|
|
|
onShow() {
|
|
|
let pagearr = getCurrentPages(); //获取应用页面栈
|
|
|
let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息
|
|
|
console.log('option:', currentPage) //获取页面传递的信息
|
|
|
this.model1.userInfo.brand_id = currentPage.$vm.brand_id
|
|
|
this.model1.userInfo.brand_name = currentPage.$vm.brand_name
|
|
|
this.model1.userInfo.xinghao_id = currentPage.$vm.xh_id
|
|
|
this.model1.userInfo.xh_name = currentPage.$vm.xh_name
|
|
|
this.model1.userInfo.category_id = currentPage.$vm.category_id || currentPage.$vm.model1.userInfo.category.id
|
|
|
this.model1.userInfo.name = currentPage.$vm.name || currentPage.$vm.model1.userInfo.category.name
|
|
|
this.model1.userInfo.brand_id = currentPage.$vm.brand_id || currentPage.$vm.model1.userInfo.brand.id
|
|
|
this.model1.userInfo.brand_name = currentPage.$vm.brand_name || currentPage.$vm.model1.userInfo.brand.id
|
|
|
this.model1.userInfo.xinghao_id = currentPage.$vm.xh_id || currentPage.$vm.model1.userInfo.xinghao.id
|
|
|
this.model1.userInfo.xh_name = currentPage.$vm.xh_name || currentPage.$vm.model1.userInfo.xinghao.name
|
|
|
this.model1.userInfo.year = currentPage.$vm.model1.userInfo.year
|
|
|
this.model1.userInfo.hours = currentPage.$vm.model1.userInfo.hours
|
|
|
|
|
|
console.log(this.model1.userInfo);
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
let token = uni.getStorageSync('token')
|
|
|
if (token) {
|
|
|
console.log(option);
|
|
|
let info = JSON.parse(option.info)
|
|
|
this.model1.userInfo = info
|
|
|
this.model1.userInfo.name = info.brand.name
|
|
|
console.log(this.model1.userInfo);
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: '请登陆后重试',
|
|
|
icon: 'none'
|
|
|
onReady() {
|
|
|
//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
|
|
|
// this.$refs.uForm.setRules(this.rules)
|
|
|
},
|
|
|
|
|
|
onLoad(option) {
|
|
|
let token = uni.getStorageSync('token')
|
|
|
if (token) {
|
|
|
console.log(option);
|
|
|
let info = JSON.parse(option.info)
|
|
|
this.model1.userInfo = info
|
|
|
this.model1.userInfo.name = info.category.name
|
|
|
this.model1.userInfo.brand_id = info.brand.id
|
|
|
this.model1.userInfo.brand_name = info.brand.name
|
|
|
this.model1.userInfo.xinghao_id = info.xinghao.id
|
|
|
this.model1.userInfo.xh_name = info.xinghao.name
|
|
|
console.log(this.model1.userInfo);
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: '请登陆后重试',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
|
|
|
setTimeout(() => {
|
|
|
uni.redirectTo({
|
|
|
url: '/pages/index/login'
|
|
|
})
|
|
|
|
|
|
setTimeout(() => {
|
|
|
uni.redirectTo({
|
|
|
url: '/pages/index/login'
|
|
|
})
|
|
|
}, 2000)
|
|
|
}
|
|
|
|
|
|
},
|
|
|
}, 2000)
|
|
|
}
|
|
|
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
|
|
...
|
...
|
|