作者 “关晓峰”

FIX

@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 37
38 <view class=" flexBox" :style="isBtn ? 'align-items: baseline;' : '' " > 38 <view class=" flexBox" :style="isBtn ? 'align-items: baseline;' : '' " >
39 <view class="tips" v-if="isBtn" style="width: 70%;"> 39 <view class="tips" v-if="isBtn" style="width: 70%;">
40 - {{info.province}} {{info.province !=='' ? '-' : ''}} {{info.city}} {{(info.city !=='' && !isBtn) ? '-' : ''}} <text v-if="!isBtn">距您{{info.distance || '0'}}km</text> 40 + {{info.province}} {{info.province !=='' ? '-' : ''}} {{info.city}} {{(info.city !=='' && !isBtn) ? '-' : ''}} <text v-if="!isBtn">距您{{info.distance || '0'}}m</text>
41 </view> 41 </view>
42 <view class="font" style="justify-content: flex-end; " :style="!isBtn ? 'width: 100%' : ''"> 42 <view class="font" style="justify-content: flex-end; " :style="!isBtn ? 'width: 100%' : ''">
43 <text>{{info.price}}</text> 43 <text>{{info.price}}</text>
@@ -86,7 +86,7 @@ @@ -86,7 +86,7 @@
86 </view> 86 </view>
87 <view class="flexBox" v-if="!isBtn" style="padding-bottom: 16rpx;"> 87 <view class="flexBox" v-if="!isBtn" style="padding-bottom: 16rpx;">
88 <view class="tips"> 88 <view class="tips">
89 - {{info.province}} - {{info.city}} -距您{{info.distance || '0'}}km 89 + {{info.province}} - {{info.city}} -距您{{info.distance || '0'}}m
90 </view> 90 </view>
91 <view class="tips"> 91 <view class="tips">
92 {{info.createtime_text}} 92 {{info.createtime_text}}
@@ -147,7 +147,7 @@ @@ -147,7 +147,7 @@
147 }, 147 },
148 goPublish(url){ 148 goPublish(url){
149 uni.navigateTo({ 149 uni.navigateTo({
150 - url:`/pages/sellAndBuy/hire?val=${this.info.type==3 ? 1 : 2}` 150 + url:`/pages/sellAndBuy/hire?val=${this.info.type==3 ? 1 : 2}&info=${JSON.stringify(this.info)}`
151 }) 151 })
152 }, 152 },
153 goPrice(){ 153 goPrice(){
1 <template> 1 <template>
2 <view> 2 <view>
3 - <view class="listBox" :style="info.tag_list.length == 0 ? 'max-height: 234rpx; min-height: 0;' : ''" @click="goDetail">  
4 - <view class="listBox_top" style="justify-content: space-between;"> 3 + <view class="listBox" :style="info.tag_list.length == 0 ? 'max-height: 234rpx; min-height: 0;' : ''" >
  4 + <view class="listBox_top" style="justify-content: space-between;" @click="goDetail">
5 <view class="listBox_top" style="width: 50vw;"> 5 <view class="listBox_top" style="width: 50vw;">
6 <view class="box1" style="margin-right: 24rpx;"> 6 <view class="box1" style="margin-right: 24rpx;">
7 <image src="../../static/need.png" style="width: 68rpx; height: 40rpx;" v-if="info.type == 2" mode=""></image> 7 <image src="../../static/need.png" style="width: 68rpx; height: 40rpx;" v-if="info.type == 2" mode=""></image>
@@ -11,21 +11,25 @@ @@ -11,21 +11,25 @@
11 {{info.category.name + info.brand.name + info.xinghao.name}} 11 {{info.category.name + info.brand.name + info.xinghao.name}}
12 </view> 12 </view>
13 </view> 13 </view>
14 - <view class="font oneh" style="width: 30vw;" v-if="info.price && info.price !== ''"> 14 +
  15 + <view v-if="isBtn">
  16 + <p style="font-size: 28rpx; color: #3375D8;" v-if="info.status == 2">已发布</p>
  17 + <p style="font-size: 28rpx; color: #3375D8;" v-if="info.status == 1">审核中</p>
  18 + <p style="font-size: 28rpx; color: #E63D27;" v-if="info.status == 3">已拒绝</p>
  19 + <p style="font-size: 28rpx; color: #000000;" v-if="info.status == 4">已关闭</p>
  20 + </view>
  21 + <view class="font oneh" style="width: 30vw;" v-else-if="info.price && info.price !== ''">
15 <!-- <text>{{info.price}}</text> --> 22 <!-- <text>{{info.price}}</text> -->
16 <text>**</text> 23 <text>**</text>
17 <text style="font-size: 26rpx;">{{info.category.price_unit}}/{{info.category.day_unit}}</text> 24 <text style="font-size: 26rpx;">{{info.category.price_unit}}/{{info.category.day_unit}}</text>
18 </view> 25 </view>
19 </view> 26 </view>
20 - <view class="listBox_top" style="justify-content: space-between; margin-top: 28rpx; margin-bottom: 46rpx;" v-if="info.tag_list.length > 0" > 27 + <view class="listBox_top" style="justify-content: space-between; margin-top: 28rpx; margin-bottom: 46rpx;" v-if="info.tag_list.length > 0" @click="goDetail">
21 <view class="listBox_top" > 28 <view class="listBox_top" >
22 <view style="margin: 0 5rpx" v-for="item in info.tag_list"> 29 <view style="margin: 0 5rpx" v-for="item in info.tag_list">
23 <u-tag :text="item.name" plain size="mini" type="info"></u-tag> 30 <u-tag :text="item.name" plain size="mini" type="info"></u-tag>
24 </view> 31 </view>
25 </view> 32 </view>
26 -  
27 -  
28 -  
29 </view> 33 </view>
30 <view class="tips" v-if="isBtn" style="margin-top: 28rpx;"> 34 <view class="tips" v-if="isBtn" style="margin-top: 28rpx;">
31 {{info.province}} - {{info.city}} - {{info.region}}-距您{{info.distance || '0'}}km 35 {{info.province}} - {{info.city}} - {{info.region}}-距您{{info.distance || '0'}}km
@@ -44,15 +48,15 @@ @@ -44,15 +48,15 @@
44 </view> 48 </view>
45 <view class="flexBox" style="justify-content: flex-end !important; padding-bottom: 16rpx;" v-else> 49 <view class="flexBox" style="justify-content: flex-end !important; padding-bottom: 16rpx;" v-else>
46 <view style="display: flex;"> 50 <view style="display: flex;">
47 - <view class="" v-if="info.status == 1 || info.status == 2"> 51 + <view class="" v-if="info.status == 1 || info.status == 2 || info.status == 3">
48 <u-button type="info" size="small" text="关闭信息" @click="close"></u-button> 52 <u-button type="info" size="small" text="关闭信息" @click="close"></u-button>
49 </view> 53 </view>
50 - <view class="" style="margin-right: 16rpx;" v-if="info.status == 3 || info.status == 1"> 54 + <view class="" style="margin-right: 16rpx;" v-if="info.status == 2 ">
51 <u-button type="primary" size="small" style="margin: 0 16rpx;" text="修改信息" @click="goPublish1"></u-button> 55 <u-button type="primary" size="small" style="margin: 0 16rpx;" text="修改信息" @click="goPublish1"></u-button>
52 </view> 56 </view>
53 <view class="" v-else-if="info.status == 4"> 57 <view class="" v-else-if="info.status == 4">
54 <u-button type="primary" size="small" text="重新发布" @click="goNeeds(info.type)"></u-button> 58 <u-button type="primary" size="small" text="重新发布" @click="goNeeds(info.type)"></u-button>
55 - </view>w 59 + </view>
56 </view> 60 </view>
57 61
58 </view> 62 </view>
@@ -109,7 +113,7 @@ @@ -109,7 +113,7 @@
109 }, 113 },
110 goNeeds(type) { 114 goNeeds(type) {
111 uni.navigateTo({ 115 uni.navigateTo({
112 - url: `/pages/sellAndBuy/hub?val=${type}` 116 + url: `/pages/sellAndBuy/hub?val=${type}&info=${JSON.stringify(this.info)}`
113 }) 117 })
114 } 118 }
115 } 119 }
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 31
32 <view class="boxs" style="padding: 0 24rpx; justify-content: space-evenly"> 32 <view class="boxs" style="padding: 0 24rpx; justify-content: space-evenly">
33 <view class="item" v-for="item in list.slice(0,3)" 33 <view class="item" v-for="item in list.slice(0,3)"
34 - @click="goRot('/pages/subPages/moreSearch',item.name)"> 34 + @click="goSearch(item)">
35 <view class="imgbtn"> 35 <view class="imgbtn">
36 <image :src="item.icon_url" class="img" mode=""></image> 36 <image :src="item.icon_url" class="img" mode=""></image>
37 </view> 37 </view>
@@ -125,6 +125,12 @@ @@ -125,6 +125,12 @@
125 } 125 }
126 }, 126 },
127 methods: { 127 methods: {
  128 + goSearch(item){
  129 + uni.navigateTo({
  130 + url: `/pages/subPages/moreSearch?val=${item.name}&valId=${item.id}`
  131 + })
  132 + this.show = false
  133 + },
128 // 标题文字居中 134 // 标题文字居中
129 getWxTitleTop() { 135 getWxTitleTop() {
130 let menuButtonInfo = uni.getMenuButtonBoundingClientRect() 136 let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 style="width: 80rpx; height: 80rpx;margin-right:16rpx" mode=""></image> 7 style="width: 80rpx; height: 80rpx;margin-right:16rpx" mode=""></image>
8 <image src="/static/icon/1815.png" v-else-if="item.type == 2" 8 <image src="/static/icon/1815.png" v-else-if="item.type == 2"
9 style="width: 80rpx; height: 80rpx;margin-right:16rpx" mode=""></image> 9 style="width: 80rpx; height: 80rpx;margin-right:16rpx" mode=""></image>
10 - <image src="/static/image/1813.png" v-else style="width: 80rpx; height: 80rpx;margin-right:16rpx" 10 + <image src="/static/icon/Group 1813@2x.png" v-else style="width: 80rpx; height: 80rpx;margin-right:16rpx"
11 mode=""></image> 11 mode=""></image>
12 </view> 12 </view>
13 <view style="display: flex;flex-direction: column;width: 100%;"> 13 <view style="display: flex;flex-direction: column;width: 100%;">
@@ -62,7 +62,7 @@ @@ -62,7 +62,7 @@
62 <view style="margin-bottom: 30rpx;"> 62 <view style="margin-bottom: 30rpx;">
63 <text>确定退出登录吗?</text> 63 <text>确定退出登录吗?</text>
64 </view> 64 </view>
65 - <view class="" style="display: flex; align-items: center;justify-content: space-evenly;"> 65 + <view class="" style="display: flex; align-items: center;justify-content: space-evenly; margin-bottom: 40rpx;">
66 <view class="" style="margin-right: 20rpx;"> 66 <view class="" style="margin-right: 20rpx;">
67 <u-button size="small" text="取消" type="info" @click="close()"></u-button> 67 <u-button size="small" text="取消" type="info" @click="close()"></u-button>
68 </view> 68 </view>
@@ -2,17 +2,19 @@ @@ -2,17 +2,19 @@
2 <view style="background-color: white; height: 100%;"> 2 <view style="background-color: white; height: 100%;">
3 <view v-if="!result" class=""> 3 <view v-if="!result" class="">
4 <view class="top"> 4 <view class="top">
5 - <image src="http://equiphappy.shs.broing.cn/assets/miniprogram/bg3.png" style="height: 432rpx;width: 100%;" mode=""></image> 5 + <image src="http://equiphappy.shs.broing.cn/assets/miniprogram/bg3.png"
  6 + style="height: 432rpx;width: 100%;" mode=""></image>
6 </view> 7 </view>
7 <view class="" style="padding: 32rpx;background-color: white;"> 8 <view class="" style="padding: 32rpx;background-color: white;">
8 <u--form labelPosition="left" :model="model1" :rules="rules" ref="uForm"> 9 <u--form labelPosition="left" :model="model1" :rules="rules" ref="uForm">
9 - <u-form-item label="设备信息" labelWidth="200rpx" prop="userInfo.name" borderBottom ref="item1" @click="goChoose"> 10 + <u-form-item label="设备信息" labelWidth="200rpx" prop="userInfo.name" borderBottom ref="item1"
  11 + @click="goChoose">
10 <u--input v-model="model1.userInfo.name" disabled disabledColor="#ffffff" placeholder="请选择设备" 12 <u--input v-model="model1.userInfo.name" disabled disabledColor="#ffffff" placeholder="请选择设备"
11 border="none"></u--input> 13 border="none"></u--input>
12 <u-icon slot="right" name="arrow-right"></u-icon> 14 <u-icon slot="right" name="arrow-right"></u-icon>
13 </u-form-item> 15 </u-form-item>
14 - <u-form-item label="设备停放地" labelWidth="200rpx" prop="userInfo.address" borderBottom  
15 - @click="goMap" ref="item1"> 16 + <u-form-item label="设备停放地" labelWidth="200rpx" prop="userInfo.address" borderBottom @click="goMap"
  17 + ref="item1">
16 <u--input v-model="model1.userInfo.address" disabled disabledColor="#ffffff" placeholder="请选择" 18 <u--input v-model="model1.userInfo.address" disabled disabledColor="#ffffff" placeholder="请选择"
17 border="none"></u--input> 19 border="none"></u--input>
18 <u-icon slot="right" name="arrow-right"></u-icon> 20 <u-icon slot="right" name="arrow-right"></u-icon>
@@ -29,8 +31,7 @@ @@ -29,8 +31,7 @@
29 border="none"></u--input> 31 border="none"></u--input>
30 <u-icon slot="right" name="arrow-right"></u-icon> 32 <u-icon slot="right" name="arrow-right"></u-icon>
31 </u-form-item> 33 </u-form-item>
32 - <u-form-item label="出厂年限" labelWidth="200rpx" prop="userInfo.year" borderBottom  
33 - ref="item1"> 34 + <u-form-item label="出厂年限" labelWidth="200rpx" prop="userInfo.year" borderBottom ref="item1">
34 <u--input v-model="model1.userInfo.year" border="none"></u--input> 35 <u--input v-model="model1.userInfo.year" border="none"></u--input>
35 </u-form-item> 36 </u-form-item>
36 <u-form-item label="表显小时数" labelWidth="200rpx" prop="userInfo.hours" borderBottom ref="item1"> 37 <u-form-item label="表显小时数" labelWidth="200rpx" prop="userInfo.hours" borderBottom ref="item1">
@@ -39,16 +40,19 @@ @@ -39,16 +40,19 @@
39 40
40 41
41 </u--form> 42 </u--form>
42 - <view class="" style="width: 60%;margin-top: 50rpx;display: flex;justify-content: center;margin-left: 20%;"> 43 + <view class=""
  44 + style="width: 60%;margin-top: 50rpx;display: flex;justify-content: center;margin-left: 20%;">
43 <u-button shape="circle" text="开始估价" color="linear-gradient(to right, #46BAEC,#2F67D3)" 45 <u-button shape="circle" text="开始估价" color="linear-gradient(to right, #46BAEC,#2F67D3)"
44 @click="submit"></u-button> 46 @click="submit"></u-button>
45 </view> 47 </view>
46 </view> 48 </view>
47 </view> 49 </view>
48 <view v-else class="rBox"> 50 <view v-else class="rBox">
49 - <image src="../../static/right.png" style="width: 128rpx;margin: 182rpx 0 48rpx 0;height: 128rpx;" mode=""></image> 51 + <image src="../../static/right.png" style="width: 128rpx;margin: 182rpx 0 48rpx 0;height: 128rpx;" mode="">
  52 + </image>
50 <p class="title">提交成功</p> 53 <p class="title">提交成功</p>
51 - <p style="margin: 24rpx 0 162rpx 0; color: #00000066;font-size: 28rpx;font-weight: 400;"> 平台将3个工作日内联系您,为您进行价格评估</p> 54 + <p style="margin: 24rpx 0 162rpx 0; color: #00000066;font-size: 28rpx;font-weight: 400;">
  55 + 平台将3个工作日内联系您,为您进行价格评估</p>
52 <view class="" style="width: 40%;"> 56 <view class="" style="width: 40%;">
53 <u-button text="返回首页" @click="goIndex"></u-button> 57 <u-button text="返回首页" @click="goIndex"></u-button>
54 </view> 58 </view>
@@ -66,10 +70,10 @@ @@ -66,10 +70,10 @@
66 userInfo: { 70 userInfo: {
67 name: '', 71 name: '',
68 year: '', 72 year: '',
69 - hours:'',  
70 - address:'',  
71 - brand_name:'',  
72 - xh_name:'' 73 + hours: '',
  74 + address: '',
  75 + brand_name: '',
  76 + xh_name: ''
73 }, 77 },
74 }, 78 },
75 actions: [{ 79 actions: [{
@@ -93,7 +97,7 @@ @@ -93,7 +97,7 @@
93 } 97 }
94 }, 98 },
95 methods: { 99 methods: {
96 - goChoose(){ 100 + goChoose() {
97 uni.navigateTo({ 101 uni.navigateTo({
98 url: '/pages/subPages/more?val=2' 102 url: '/pages/subPages/more?val=2'
99 }) 103 })
@@ -108,10 +112,10 @@ @@ -108,10 +112,10 @@
108 url: '/pages/sellAndBuy/chooseNum' 112 url: '/pages/sellAndBuy/chooseNum'
109 }) 113 })
110 }, 114 },
111 - goMap(){ 115 + goMap() {
112 let that = this 116 let that = this
113 uni.chooseLocation({ 117 uni.chooseLocation({
114 - success: function (res) { 118 + success: function(res) {
115 console.log('位置名称:' + res.name); 119 console.log('位置名称:' + res.name);
116 console.log('详细地址:' + res.address); 120 console.log('详细地址:' + res.address);
117 console.log('纬度:' + res.latitude); 121 console.log('纬度:' + res.latitude);
@@ -139,10 +143,10 @@ @@ -139,10 +143,10 @@
139 res => { 143 res => {
140 uni.showToast({ 144 uni.showToast({
141 title: res.msg, 145 title: res.msg,
142 - icon:'none' 146 + icon: 'none'
143 }) 147 })
144 148
145 - if(res.code == 1){ 149 + if (res.code == 1) {
146 let pagearr = getCurrentPages(); //获取应用页面栈 150 let pagearr = getCurrentPages(); //获取应用页面栈
147 let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息 151 let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息
148 console.log('option:', currentPage) //获取页面传递的信息 152 console.log('option:', currentPage) //获取页面传递的信息
@@ -171,48 +175,47 @@ @@ -171,48 +175,47 @@
171 this.model1.userInfo.sex = e.name 175 this.model1.userInfo.sex = e.name
172 this.$refs.uForm.validateField('userInfo.sex') 176 this.$refs.uForm.validateField('userInfo.sex')
173 }, 177 },
174 - onShow() {  
175 - let pagearr = getCurrentPages(); //获取应用页面栈  
176 - let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息  
177 - console.log('option:', currentPage) //获取页面传递的信息  
178 - this.model1.userInfo.category_id = currentPage.$vm.category_id  
179 - this.model1.userInfo.name = currentPage.$vm.name  
180 - this.model1.userInfo.brand_id = currentPage.$vm.brand_id  
181 - this.model1.userInfo.brand_name = currentPage.$vm.brand_name  
182 - this.model1.userInfo.xinghao_id = currentPage.$vm.xh_id  
183 - this.model1.userInfo.xh_name = currentPage.$vm.xh_name  
184 - console.log(this.model1.userInfo);  
185 - }, 178 +
186 goUpload() { 179 goUpload() {
187 this.result = true 180 this.result = true
188 }, 181 },
189 - goIndex(){ 182 + goIndex() {
190 uni.reLaunch({ 183 uni.reLaunch({
191 - url:'/pages/index/buy' 184 + url: '/pages/index/buy'
192 }) 185 })
193 } 186 }
194 }, 187 },
195 - onReady() {  
196 - //如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。  
197 - // this.$refs.uForm.setRules(this.rules)  
198 - },  
199 onShow() { 188 onShow() {
200 let pagearr = getCurrentPages(); //获取应用页面栈 189 let pagearr = getCurrentPages(); //获取应用页面栈
201 let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息 190 let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息
202 console.log('option:', currentPage) //获取页面传递的信息 191 console.log('option:', currentPage) //获取页面传递的信息
203 - this.model1.userInfo.brand_id = currentPage.$vm.brand_id  
204 - this.model1.userInfo.brand_name = currentPage.$vm.brand_name  
205 - this.model1.userInfo.xinghao_id = currentPage.$vm.xh_id  
206 - this.model1.userInfo.xh_name = currentPage.$vm.xh_name 192 + this.model1.userInfo.category_id = currentPage.$vm.category_id || currentPage.$vm.model1.userInfo.category.id
  193 + this.model1.userInfo.name = currentPage.$vm.name || currentPage.$vm.model1.userInfo.category.name
  194 + this.model1.userInfo.brand_id = currentPage.$vm.brand_id || currentPage.$vm.model1.userInfo.brand.id
  195 + this.model1.userInfo.brand_name = currentPage.$vm.brand_name || currentPage.$vm.model1.userInfo.brand.id
  196 + this.model1.userInfo.xinghao_id = currentPage.$vm.xh_id || currentPage.$vm.model1.userInfo.xinghao.id
  197 + this.model1.userInfo.xh_name = currentPage.$vm.xh_name || currentPage.$vm.model1.userInfo.xinghao.name
  198 + this.model1.userInfo.year = currentPage.$vm.model1.userInfo.year
  199 + this.model1.userInfo.hours = currentPage.$vm.model1.userInfo.hours
  200 +
207 console.log(this.model1.userInfo); 201 console.log(this.model1.userInfo);
208 }, 202 },
  203 + onReady() {
  204 + //如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
  205 + // this.$refs.uForm.setRules(this.rules)
  206 + },
  207 +
209 onLoad(option) { 208 onLoad(option) {
210 let token = uni.getStorageSync('token') 209 let token = uni.getStorageSync('token')
211 if (token) { 210 if (token) {
212 console.log(option); 211 console.log(option);
213 let info = JSON.parse(option.info) 212 let info = JSON.parse(option.info)
214 this.model1.userInfo = info 213 this.model1.userInfo = info
215 - this.model1.userInfo.name = info.brand.name 214 + this.model1.userInfo.name = info.category.name
  215 + this.model1.userInfo.brand_id = info.brand.id
  216 + this.model1.userInfo.brand_name = info.brand.name
  217 + this.model1.userInfo.xinghao_id = info.xinghao.id
  218 + this.model1.userInfo.xh_name = info.xinghao.name
216 console.log(this.model1.userInfo); 219 console.log(this.model1.userInfo);
217 } else { 220 } else {
218 uni.showToast({ 221 uni.showToast({
@@ -74,7 +74,13 @@ @@ -74,7 +74,13 @@
74 } 74 }
75 }, 75 },
76 onLoad(option) { 76 onLoad(option) {
77 - uni.$u.http.get(`/api/index/xinghao_list?category_id=${option.category_id}&brand_id=${option.brand_id}`).then( 77 + let brand_id = ''
  78 + let category_id = ''
  79 + if(option && option.category_id !== 'undefined' && option.brand_id !== 'undefined'){
  80 + brand_id = option.brand_id
  81 + category_id = option.category_id
  82 + }
  83 + uni.$u.http.get(`/api/index/xinghao_list?category_id=${category_id}&brand_id=${brand_id}`).then(
78 res => { 84 res => {
79 // this.indexList = res.data.word 85 // this.indexList = res.data.word
80 this.itemArr = res.data.data 86 this.itemArr = res.data.data
@@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
63 <u-form-item label="设备预算" labelWidth="200rpx" prop="userInfo.price" borderBottom 63 <u-form-item label="设备预算" labelWidth="200rpx" prop="userInfo.price" borderBottom
64 ref="item1"> 64 ref="item1">
65 <view class="flexb" style="width: 100%;"> 65 <view class="flexb" style="width: 100%;">
66 - <u--input v-model="model1.userInfo.price" border="none" ></u--input> 66 + <u--input v-model="model1.userInfo.price" border="none" placeholder="0" ></u--input>
67 <text>{{model1.userInfo.price_unit || '万元'}}</text> 67 <text>{{model1.userInfo.price_unit || '万元'}}</text>
68 </view> 68 </view>
69 </u-form-item> 69 </u-form-item>
@@ -96,7 +96,7 @@ @@ -96,7 +96,7 @@
96 name: '', 96 name: '',
97 xh_name: '', 97 xh_name: '',
98 region: '', 98 region: '',
99 - price: 0, 99 + price: '',
100 day: '', 100 day: '',
101 lat: '', 101 lat: '',
102 lng: '' 102 lng: ''
@@ -166,12 +166,15 @@ @@ -166,12 +166,15 @@
166 let pagearr = getCurrentPages(); //获取应用页面栈 166 let pagearr = getCurrentPages(); //获取应用页面栈
167 let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息 167 let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息
168 console.log('option:', currentPage) //获取页面传递的信息 168 console.log('option:', currentPage) //获取页面传递的信息
169 - this.model1.userInfo.category_id = currentPage.$vm.category_id  
170 - this.model1.userInfo.name = currentPage.$vm.name  
171 - this.model1.userInfo.brand_id = currentPage.$vm.brand_id  
172 - this.model1.userInfo.brand_name = currentPage.$vm.brand_name  
173 - this.model1.userInfo.xinghao_id = currentPage.$vm.xh_id  
174 - this.model1.userInfo.xh_name = currentPage.$vm.xh_name 169 +
  170 +
  171 + this.model1.userInfo.category_id = currentPage.$vm.category_id || currentPage.$vm.model1.userInfo.category.id
  172 + this.model1.userInfo.name = currentPage.$vm.name || currentPage.$vm.model1.userInfo.category.name
  173 + this.model1.userInfo.brand_id = currentPage.$vm.brand_id || currentPage.$vm.model1.userInfo.brand.id
  174 + this.model1.userInfo.brand_name = currentPage.$vm.brand_name || currentPage.$vm.model1.userInfo.brand.id
  175 + this.model1.userInfo.xinghao_id = currentPage.$vm.xh_id || currentPage.$vm.model1.userInfo.xinghao.id
  176 + this.model1.userInfo.xh_name = currentPage.$vm.xh_name || currentPage.$vm.model1.userInfo.xinghao.name
  177 +
175 console.log(this.model1.userInfo); 178 console.log(this.model1.userInfo);
176 }, 179 },
177 methods: { 180 methods: {
@@ -192,7 +195,7 @@ @@ -192,7 +195,7 @@
192 195
193 }, 196 },
194 submit() { 197 submit() {
195 - if(this.model1.userInfo.price == 0){ 198 + if(this.model1.userInfo.price && this.model1.userInfo.price==0){
196 uni.showToast({ 199 uni.showToast({
197 title:'设备预算需大于0', 200 title:'设备预算需大于0',
198 icon:'none' 201 icon:'none'
@@ -273,12 +276,12 @@ @@ -273,12 +276,12 @@
273 }, 276 },
274 goLogo() { 277 goLogo() {
275 uni.navigateTo({ 278 uni.navigateTo({
276 - url: '/pages/sellAndBuy/logo' 279 + url: '/pages/sellAndBuy/logo?category_id=' + this.model1.userInfo.category_id
277 }) 280 })
278 }, 281 },
279 goNum() { 282 goNum() {
280 uni.navigateTo({ 283 uni.navigateTo({
281 - url: '/pages/sellAndBuy/chooseNum' 284 + url: `/pages/sellAndBuy/chooseNum?category_id=${this.model1.userInfo.category_id}&brand_id=${this.model1.userInfo.brand_id}`
282 }) 285 })
283 } 286 }
284 } 287 }
@@ -79,7 +79,11 @@ @@ -79,7 +79,11 @@
79 }, 79 },
80 onLoad(option) { 80 onLoad(option) {
81 console.log(option); 81 console.log(option);
82 - uni.$u.http.get(`/api/index/brand_list?category_id=${option.category_id}`).then(res => { 82 + let category_id = ''
  83 + if(option && option.category_id !== 'undefined'){
  84 + category_id = option.category_id
  85 + }
  86 + uni.$u.http.get(`/api/index/brand_list?category_id=${category_id}`).then(res => {
83 console.log(res); 87 console.log(res);
84 this.indexList = res.data.word; 88 this.indexList = res.data.word;
85 this.itemArr = res.data.list 89 this.itemArr = res.data.list
@@ -3,8 +3,8 @@ @@ -3,8 +3,8 @@
3 <view class="box" v-for="(item,index) in fileList"> 3 <view class="box" v-for="(item,index) in fileList">
4 <u-upload :fileList="item.url" @afterRead="(event) => afterRead(event,item,index)" @delete="(event) => deletePic(event,index)" 4 <u-upload :fileList="item.url" @afterRead="(event) => afterRead(event,item,index)" @delete="(event) => deletePic(event,index)"
5 width="200rpx" height="200rpx" name="1" multiple :maxCount="1"> 5 width="200rpx" height="200rpx" name="1" multiple :maxCount="1">
6 - <image :src="imggList[index].url"  
7 - mode="widthFix" style="width: 220rpx;height:220rpx;"></image> 6 + <!-- <image :src="imggList[index].url"
  7 + mode="widthFix" style="width: 220rpx;height:220rpx;"></image> -->
8 </u-upload> 8 </u-upload>
9 9
10 <!-- <u-upload ref="uUpload" :action="action" :auto-upload="true" ></u-upload> --> 10 <!-- <u-upload ref="uUpload" :action="action" :auto-upload="true" ></u-upload> -->
@@ -27,7 +27,6 @@ @@ -27,7 +27,6 @@
27 data() { 27 data() {
28 return { 28 return {
29 action: config.baseUrl + '/api/common/upload', 29 action: config.baseUrl + '/api/common/upload',
30 - fileList1: [],  
31 imggList:[], 30 imggList:[],
32 info: {}, 31 info: {},
33 flag: null, 32 flag: null,
@@ -113,6 +112,7 @@ @@ -113,6 +112,7 @@
113 url: item.pic 112 url: item.pic
114 } 113 }
115 }) 114 })
  115 + if(this.fileList.length == 0){
116 this.fileList = res.data[0].image_arr.map(item => { 116 this.fileList = res.data[0].image_arr.map(item => {
117 return{ 117 return{
118 title: item.value, 118 title: item.value,
@@ -121,6 +121,7 @@ @@ -121,6 +121,7 @@
121 ] 121 ]
122 } 122 }
123 }) 123 })
  124 + }
124 125
125 }).catch(err => { 126 }).catch(err => {
126 uni.showToast({ 127 uni.showToast({
@@ -3,25 +3,33 @@ @@ -3,25 +3,33 @@
3 <image src="../../static/img-brand@2x.png" style="width: 100%; height: 438rpx;" mode=""></image> 3 <image src="../../static/img-brand@2x.png" style="width: 100%; height: 438rpx;" mode=""></image>
4 <view class="box"> 4 <view class="box">
5 <view class="" style="padding: 32rpx; background: white;position: relative;"> 5 <view class="" style="padding: 32rpx; background: white;position: relative;">
6 - <u--form labelPosition="left" :model="info" :rules="rules" ref="uForm">  
7 - <u-form-item label="公司名称" labelWidth="200rpx" prop="userInfo.name" borderBottom ref="item1"> 6 + <u--form labelPosition="left" :model="info" ref="uForm">
  7 + <u-form-item label="公司名称" labelWidth="200rpx" borderBottom ref="item1">
8 <u--input v-model="info.name" placeholder="请输入公司名称" border="none"></u--input> 8 <u--input v-model="info.name" placeholder="请输入公司名称" border="none"></u--input>
9 </u-form-item> 9 </u-form-item>
10 - <u-form-item label="公司类型" labelWidth="200rpx" prop="userInfo.contract_name" borderBottom 10 + <u-form-item label="公司类型" labelWidth="200rpx" borderBottom
11 ref="item1"> 11 ref="item1">
12 - <u--input v-model="info.contract_name" placeholder="请选择公司类型" border="none"></u--input> 12 + <picker @change="bindPickerChange" :value="index" :range="array">
  13 + <view class="" style="display: flex; align-items: center; justify-content: space-between; " :style="flag ? '' : 'color: #0d101366;'">
  14 + <view class="uni-input">{{info.cateName}}</view>
  15 + <u-icon slot="right" name="arrow-right"></u-icon>
  16 + </view>
  17 +
  18 + </picker>
13 </u-form-item> 19 </u-form-item>
14 - <u-form-item label="主营产品" labelWidth="200rpx" prop="userInfo.product_ids" borderBottom ref="item1">  
15 - <u--input v-model="info.product_ids" placeholder="请选择主营产品" border="none"></u--input> 20 + <u-form-item label="主营产品" labelWidth="200rpx" borderBottom ref="item1" @click="goChoose">
  21 + <u--input v-model="info.name1" disabled placeholder="请选择主营产品" disabledColor="#ffffffeb"
  22 + border="none"></u--input>
  23 + <u-icon slot="right" name="arrow-right"></u-icon>
16 </u-form-item> 24 </u-form-item>
17 - <u-form-item label="营业执照" labelWidth="200rpx" prop="userInfo.product_ids" borderBottom ref="item1"> 25 + <u-form-item label="营业执照" labelWidth="200rpx" borderBottom ref="item1">
18 <u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple 26 <u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
19 :maxCount="1" width="250" height="150"> 27 :maxCount="1" width="250" height="150">
20 <image src="/static/img-zhizhao@2x.png" mode="widthFix" style="width: 250px;height: 150px;"> 28 <image src="/static/img-zhizhao@2x.png" mode="widthFix" style="width: 250px;height: 150px;">
21 </image> 29 </image>
22 </u-upload> 30 </u-upload>
23 </u-form-item> 31 </u-form-item>
24 - <u-form-item label="公司资质" labelWidth="200rpx" prop="userInfo.product_ids" borderBottom ref="item1"> 32 + <u-form-item label="公司资质" labelWidth="200rpx" borderBottom ref="item1">
25 <u-upload :fileList="fileList2" @afterRead="afterRead" @delete="deletePic" name="2" multiple 33 <u-upload :fileList="fileList2" @afterRead="afterRead" @delete="deletePic" name="2" multiple
26 :maxCount="1" width="250" height="150"> 34 :maxCount="1" width="250" height="150">
27 <image src="/static/img-zhizhao@2x(1).png" mode="widthFix" 35 <image src="/static/img-zhizhao@2x(1).png" mode="widthFix"
@@ -42,22 +50,65 @@ @@ -42,22 +50,65 @@
42 export default { 50 export default {
43 data() { 51 data() {
44 return { 52 return {
45 - info:{}, 53 + info:{
  54 + name1:'',
  55 + cateName:'请选择公司类型'
  56 + },
  57 + flag:false,
46 action: config.baseUrl + '/api/common/upload', 58 action: config.baseUrl + '/api/common/upload',
47 fileList1: [], 59 fileList1: [],
48 fileList2: [], 60 fileList2: [],
  61 + array:[],
  62 + array1:[]
49 } 63 }
50 }, 64 },
51 onShow() { 65 onShow() {
52 let pagearr = getCurrentPages(); //获取应用页面栈 66 let pagearr = getCurrentPages(); //获取应用页面栈
53 let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息 67 let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息
54 console.log('option:', currentPage) //获取页面传递的信息 68 console.log('option:', currentPage) //获取页面传递的信息
55 - this.model1.userInfo.category_id = currentPage.$vm.category_id || (this.model1.userInfo.category && this.model1.userInfo.category.id) || ''  
56 - this.model1.userInfo.name = currentPage.$vm.name || (this.model1.userInfo.category && this.model1.userInfo.category.name) || '' 69 + this.info.product_ids = currentPage.$vm.category_id || ''
  70 + this.info.name1 = currentPage.$vm.name || ''
  71 + },
  72 + onLoad() {
  73 + uni.$u.http.get('/api/common/company_category').then(res => {
  74 + console.log(res);
  75 + this.array1 = res.data
  76 + this.array = res.data.map(item => {
  77 + return item.name
  78 + })
  79 + })
57 }, 80 },
58 methods: { 81 methods: {
  82 + goChoose() {
  83 + uni.navigateTo({
  84 + url: '/pages/subPages/more?val=2'
  85 + })
  86 + },
  87 + bindPickerChange(e){
  88 + console.log(e);
  89 + this.flag = true;
  90 + this.info.cateName = this.array1[e.detail.value].name
  91 + this.info.type_id = this.array1[e.detail.value].id
  92 + },
59 submit(){ 93 submit(){
60 - console.log(this.info); 94 + console.log(this.fileList1);
  95 + let p = {
  96 + ...this.info,
  97 + business_license: this.fileList1[0] && this.fileList1[0].url || '',
  98 + company_qualifications: this.fileList2[0] && this.fileList2[0].url || '',
  99 + }
  100 + delete p.name1
  101 + delete p.cateName
  102 + uni.$u.http.post('/api/common/join',p).then(res => {
  103 + console.log(res);
  104 + uni.showToast({
  105 + title: res.msg,
  106 + icon:'none'
  107 +
  108 + })
  109 + }).catch(err => {
  110 +
  111 + })
61 }, 112 },
62 goChoose(){ 113 goChoose(){
63 uni.navigateTo({ 114 uni.navigateTo({
@@ -100,6 +151,9 @@ @@ -100,6 +151,9 @@
100 formData: { 151 formData: {
101 user: 'test' 152 user: 'test'
102 }, 153 },
  154 + header: {
  155 + token: uni.getStorageSync('token')
  156 + },
103 success: (res) => { 157 success: (res) => {
104 setTimeout(() => { 158 setTimeout(() => {
105 resolve(JSON.parse(res.data).data.fullurl) 159 resolve(JSON.parse(res.data).data.fullurl)
@@ -130,7 +130,7 @@ @@ -130,7 +130,7 @@
130 </view> 130 </view>
131 </view> 131 </view>
132 <p style="color: #000000e6;font-size: 32rpx;font-weight: 500;margin-bottom: 24rpx;">相似设备</p> 132 <p style="color: #000000e6;font-size: 32rpx;font-weight: 500;margin-bottom: 24rpx;">相似设备</p>
133 - <view class="" v-if="resList && resList.length>0"> 133 + <view class="" v-if="resList && resList.length>0" style="padding-bottom: 100px;">
134 <view class="" v-for="item in resList "> 134 <view class="" v-for="item in resList ">
135 <item :info="item" :isBtn="false" v-if="item.type == 3 || item.type == 4"></item> 135 <item :info="item" :isBtn="false" v-if="item.type == 3 || item.type == 4"></item>
136 <item-sell v-else :info="item"></item-sell> 136 <item-sell v-else :info="item"></item-sell>
@@ -28,12 +28,12 @@ @@ -28,12 +28,12 @@
28 获取验证码 28 获取验证码
29 </view> 29 </view>
30 <view class="scode" @click="code" v-else> 30 <view class="scode" @click="code" v-else>
31 - {{newcode}} 31 + {{newcode}}s
32 </view> 32 </view>
33 </view> 33 </view>
34 </view> 34 </view>
35 - <view class="barbtn">  
36 - 保存 35 + <view class="" style="margin-top: 60rpx;">
  36 + <u-button style="width: 80%;" text="保存" type="primary" @click="submit"></u-button>
37 </view> 37 </view>
38 <!-- <view style="background-color: white;padding: 24rpx;"> 38 <!-- <view style="background-color: white;padding: 24rpx;">
39 <u--form labelPosition="left" :model="model1" :rules="rules" ref="uForm"> 39 <u--form labelPosition="left" :model="model1" :rules="rules" ref="uForm">
@@ -119,6 +119,11 @@ @@ -119,6 +119,11 @@
119 }) 119 })
120 }, 1500) 120 }, 1500)
121 } 121 }
  122 + }).catch(err => {
  123 + uni.showToast({
  124 + title:err.msg,
  125 + icon: 'none'
  126 + })
122 }) 127 })
123 }, 128 },
124 code() { 129 code() {
@@ -137,6 +142,10 @@ @@ -137,6 +142,10 @@
137 event: 'changemobile' 142 event: 'changemobile'
138 }).then(res => { 143 }).then(res => {
139 console.log(res); 144 console.log(res);
  145 + uni.showToast({
  146 + title: res.msg,
  147 + icon: 'none'
  148 + })
140 if (res.code == 1) { 149 if (res.code == 1) {
141 this.iscode = false 150 this.iscode = false
142 this.interval = setInterval(() => { 151 this.interval = setInterval(() => {
@@ -149,6 +158,11 @@ @@ -149,6 +158,11 @@
149 } 158 }
150 uni.hideLoading() 159 uni.hideLoading()
151 160
  161 + }).catch(err => {
  162 + uni.showToast({
  163 + title:err.msg,
  164 + icon: 'none'
  165 + })
152 }) 166 })
153 }, 167 },
154 codeChange(text) { 168 codeChange(text) {
@@ -166,7 +180,10 @@ @@ -166,7 +180,10 @@
166 } 180 }
167 </script> 181 </script>
168 182
169 -<style lang="scss"> 183 +<style lang="scss" scoped>
  184 + /deep/ .u-button{
  185 + width: 90%!important;
  186 + }
170 .page { 187 .page {
171 background-color: #F5F7FA; 188 background-color: #F5F7FA;
172 } 189 }
@@ -235,6 +235,7 @@ @@ -235,6 +235,7 @@
235 lat: '', 235 lat: '',
236 lng: '', 236 lng: '',
237 region: '', 237 region: '',
  238 + keywordId:'',
238 lat: '', 239 lat: '',
239 lng: '', 240 lng: '',
240 brand_name: '', 241 brand_name: '',
@@ -265,7 +266,7 @@ @@ -265,7 +266,7 @@
265 }, 266 },
266 goPP() { 267 goPP() {
267 uni.navigateTo({ 268 uni.navigateTo({
268 - url: "/pages/sellAndBuy/logo" 269 + url: '/pages/sellAndBuy/logo?category_id=' + this.keywordId
269 }) 270 })
270 }, 271 },
271 goQy() { 272 goQy() {
@@ -285,7 +286,7 @@ @@ -285,7 +286,7 @@
285 }, 286 },
286 goXh() { 287 goXh() {
287 uni.navigateTo({ 288 uni.navigateTo({
288 - url: "/pages/sellAndBuy/chooseNum" 289 + url: `/pages/sellAndBuy/chooseNum?category_id=${this.keywordId || ''}&brand_id=${this.brand_id || ''}`
289 }) 290 })
290 }, 291 },
291 del() { 292 del() {
@@ -328,7 +329,9 @@ @@ -328,7 +329,9 @@
328 329
329 }, 330 },
330 choose(e,item){ 331 choose(e,item){
  332 + console.log(item);
331 this.keyword = (item.name || item) 333 this.keyword = (item.name || item)
  334 + this.keywordId = (item.id || item)
332 this.flag = true 335 this.flag = true
333 this.getList() 336 this.getList()
334 }, 337 },
@@ -361,8 +364,9 @@ @@ -361,8 +364,9 @@
361 }, 364 },
362 onLoad(option) { 365 onLoad(option) {
363 console.log(option); 366 console.log(option);
364 - if(option && option.val !== '' && option.val !== "undefined"){ 367 + if(option && option.val !== '' && option.val !== "undefined" && option.valId !== '' && option.valId !== "undefined"){
365 this.keyword = option && option.val || '' 368 this.keyword = option && option.val || ''
  369 + this.keywordId = option && option.valId || ''
366 this.flag = true 370 this.flag = true
367 } 371 }
368 this.getList() 372 this.getList()