正在显示
8 个修改的文件
包含
209 行增加
和
46 行删除
1 | <template> | 1 | <template> |
2 | <view> | 2 | <view> |
3 | - <view class="listBox" @click="goDetail"> | ||
4 | - <view class="listBox_top"> | 3 | + <view class="listBox" :style="info.image ? 'min-height: 340rpx;' : 'min-height: 0'" @click="goDetail"> |
4 | + <view class="listBox_top" v-if="info.image"> | ||
5 | <view class="" style="margin-right: 24rpx;position: relative;"> | 5 | <view class="" style="margin-right: 24rpx;position: relative;"> |
6 | <image :src="info.image" style="width: 202rpx; height: 202rpx;" mode=""> | 6 | <image :src="info.image" style="width: 202rpx; height: 202rpx;" mode=""> |
7 | </image> | 7 | </image> |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | </view> | 14 | </view> |
15 | <view class="listBox_right" > | 15 | <view class="listBox_right" > |
16 | <view class="flexBox"> | 16 | <view class="flexBox"> |
17 | - <p style=" color: #000000e6;font-size: 34rpx;font-weight: 600;">{{ info.brand.name + info.xinghao.name + info.category.name}}</p> | 17 | + <p :class="isBtn ? 'oneh' : ''" :style="isBtn ? 'width: 75%;' : ''" style=" color: #000000e6;font-size: 34rpx;font-weight: 600;">{{ info.brand.name + info.xinghao.name + info.category.name}}</p> |
18 | <view v-if="isBtn"> | 18 | <view v-if="isBtn"> |
19 | <p style="font-size: 28rpx; color: #3375D8;" v-if="info.status == 2">已发布</p> | 19 | <p style="font-size: 28rpx; color: #3375D8;" v-if="info.status == 2">已发布</p> |
20 | <p style="font-size: 28rpx; color: #3375D8;" v-if="info.status == 1">审核中</p> | 20 | <p style="font-size: 28rpx; color: #3375D8;" v-if="info.status == 1">审核中</p> |
@@ -48,6 +48,35 @@ | @@ -48,6 +48,35 @@ | ||
48 | 48 | ||
49 | </view> | 49 | </view> |
50 | </view> | 50 | </view> |
51 | + <view class="noPhoto" v-else> | ||
52 | + <view class="flexBox" style="margin-right: 8rpx;justify-content: space-between"> | ||
53 | + <view class="flexBox" style="justify-content: start;"> | ||
54 | + <view class="chuzu" style="position: relative;margin-right: 8rpx;" v-if="info.type == 3"> | ||
55 | + 出租 | ||
56 | + </view> | ||
57 | + <view class="chushou" style="position: relative;margin-right: 8rpx;" v-else> | ||
58 | + 出售 | ||
59 | + </view> | ||
60 | + <p class="oneh" style=" color: #000000e6;font-size: 34rpx;font-weight: 600;">{{ info.brand.name + info.xinghao.name + info.category.name}}</p> | ||
61 | + </view> | ||
62 | + | ||
63 | + <view class="font" style="justify-content: flex-end;" v-if="info.price"> | ||
64 | + <text>{{info.price}}</text> <text style="font-size: 26rpx;">/月</text> | ||
65 | + </view> | ||
66 | + </view> | ||
67 | + <view class="flexBox"> | ||
68 | + <image src="../../static/image/2.png" style="width: 164rpx; height: 44rpx;" mode="" v-if="info.is_license == 1"> | ||
69 | + </image> | ||
70 | + <view style="display: flex; align-items: center; margin-bottom: 8rpx;" v-if="info.tag_list && info.tag_list.length> 0"> | ||
71 | + <view style="margin:0 5rpx " v-for="item in info.tag_list"> | ||
72 | + <u-tag :text="item.name" plain size="mini" type="info"></u-tag> | ||
73 | + </view> | ||
74 | + </view> | ||
75 | + </view> | ||
76 | + <view class="oneh" style="width: 85%; color: #00000099;font-size: 26rpx;font-weight: 400;" v-if="info.bright"> | ||
77 | + {{info.bright}} | ||
78 | + </view> | ||
79 | + </view> | ||
51 | <view class="line"> | 80 | <view class="line"> |
52 | 81 | ||
53 | </view> | 82 | </view> |
@@ -180,7 +209,6 @@ | @@ -180,7 +209,6 @@ | ||
180 | } | 209 | } |
181 | 210 | ||
182 | .listBox { | 211 | .listBox { |
183 | - min-height: 340rpx; | ||
184 | border-radius: 8rpx; | 212 | border-radius: 8rpx; |
185 | opacity: 1; | 213 | opacity: 1; |
186 | background: #ffffffff; | 214 | background: #ffffffff; |
@@ -190,7 +218,7 @@ | @@ -190,7 +218,7 @@ | ||
190 | .oneh{ | 218 | .oneh{ |
191 | display: inline-block; | 219 | display: inline-block; |
192 | white-space: nowrap; | 220 | white-space: nowrap; |
193 | - width: 100%; | 221 | + width: 85%; |
194 | overflow: hidden; | 222 | overflow: hidden; |
195 | text-overflow:ellipsis; | 223 | text-overflow:ellipsis; |
196 | } | 224 | } |
@@ -56,7 +56,11 @@ | @@ -56,7 +56,11 @@ | ||
56 | }, | 56 | }, |
57 | methods: { | 57 | methods: { |
58 | checkboxChange(e){ | 58 | checkboxChange(e){ |
59 | - if(e.length>3){ | 59 | + if(e.length == 0){ |
60 | + uni.showToast({ | ||
61 | + title:'请勾选选项后重试' | ||
62 | + }) | ||
63 | + }else if(e.length>3){ | ||
60 | this.checkboxValue1 = e.pop() | 64 | this.checkboxValue1 = e.pop() |
61 | uni.showToast({ | 65 | uni.showToast({ |
62 | title:'最多勾选三项' | 66 | title:'最多勾选三项' |
@@ -65,7 +69,12 @@ | @@ -65,7 +69,12 @@ | ||
65 | } | 69 | } |
66 | }, | 70 | }, |
67 | goIndex(val) { | 71 | goIndex(val) { |
68 | - if(this.checkboxValue1.length > 3){ | 72 | + console.log(this.checkboxValue1) |
73 | + if(this.checkboxValue1.length == 0){ | ||
74 | + uni.showToast({ | ||
75 | + title:'请勾选后重试' | ||
76 | + }) | ||
77 | + }else if(this.checkboxValue1.length > 3){ | ||
69 | uni.showToast({ | 78 | uni.showToast({ |
70 | title:'最多勾选三项,请取消多余勾选后重试' | 79 | title:'最多勾选三项,请取消多余勾选后重试' |
71 | }) | 80 | }) |
@@ -60,9 +60,16 @@ | @@ -60,9 +60,16 @@ | ||
60 | }, | 60 | }, |
61 | click(e){ | 61 | click(e){ |
62 | console.log(e); | 62 | console.log(e); |
63 | - uni.navigateTo({ | ||
64 | - url: `/pages/subPages/outer?url=${this.imgList[e].image}` | ||
65 | - }) | 63 | + if(this.imgList[e].type == 2){ |
64 | + uni.navigateTo({ | ||
65 | + url: `/pages/subPages/outer?url=${this.imgList[e].image}` | ||
66 | + }) | ||
67 | + }else{ | ||
68 | + uni.navigateTo({ | ||
69 | + url: `/pages/subPages/detail?id=${this.imgList[e].equip_id}` | ||
70 | + }) | ||
71 | + } | ||
72 | + | ||
66 | }, | 73 | }, |
67 | getList() { | 74 | getList() { |
68 | uni.$u.http.post('/api/message/msg_list', { | 75 | uni.$u.http.post('/api/message/msg_list', { |
@@ -88,7 +95,9 @@ | @@ -88,7 +95,9 @@ | ||
88 | this.imgList = res.data.map(item => { | 95 | this.imgList = res.data.map(item => { |
89 | return{ | 96 | return{ |
90 | url: item.image_url, | 97 | url: item.image_url, |
91 | - image: item.url | 98 | + image: item.url, |
99 | + equip_id: item.equip_id, | ||
100 | + type: item.type | ||
92 | } | 101 | } |
93 | }) | 102 | }) |
94 | }).catch(err => { | 103 | }).catch(err => { |
@@ -80,7 +80,7 @@ | @@ -80,7 +80,7 @@ | ||
80 | </view> | 80 | </view> |
81 | </view> | 81 | </view> |
82 | <view class=""> | 82 | <view class=""> |
83 | - <p style=" color: #000000e6;font-size: 28rpx;font-weight: 400;"> | 83 | + <p class="oneh" style=" color: #000000e6;font-size: 28rpx;font-weight: 400;"> |
84 | {{item.category.name + item.brand.name + item.xinghao.name}}</p> | 84 | {{item.category.name + item.brand.name + item.xinghao.name}}</p> |
85 | <view class="flexBox" style="margin: 8rpx 0 24rpx 0;"> | 85 | <view class="flexBox" style="margin: 8rpx 0 24rpx 0;"> |
86 | <p class="font" style="border-right: 1px solid #00000042; padding: 0 8rpx;"> | 86 | <p class="font" style="border-right: 1px solid #00000042; padding: 0 8rpx;"> |
@@ -71,7 +71,6 @@ | @@ -71,7 +71,6 @@ | ||
71 | </view> | 71 | </view> |
72 | </view> | 72 | </view> |
73 | </view> | 73 | </view> |
74 | - | ||
75 | </u-popup> | 74 | </u-popup> |
76 | </view> | 75 | </view> |
77 | 76 | ||
@@ -135,7 +134,7 @@ | @@ -135,7 +134,7 @@ | ||
135 | }, | 134 | }, |
136 | editPhone(){ | 135 | editPhone(){ |
137 | uni.navigateTo({ | 136 | uni.navigateTo({ |
138 | - url:`/pages/subPages/editPhone?mobile=${this.info.cooperation_phone}` | 137 | + url:`/pages/subPages/editPhone?mobile=${this.info.mobile}` |
139 | }) | 138 | }) |
140 | }, | 139 | }, |
141 | getList(){ | 140 | getList(){ |
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | <u--input v-model="model1.userInfo.brand_name" disabled disabledColor="#ffffff" | 19 | <u--input v-model="model1.userInfo.brand_name" disabled disabledColor="#ffffff" |
20 | placeholder="请选择" border="none"></u--input> | 20 | placeholder="请选择" border="none"></u--input> |
21 | <u-icon slot="right" name="arrow-right"></u-icon> | 21 | <u-icon slot="right" name="arrow-right"></u-icon> |
22 | - <view class="posBox" style="top:12.5%; left:32rpx"> | 22 | + <view class="posBox" style="top:112rpx; left:32rpx"> |
23 | <image src="../../static/Group 193@2x.png" style="width: 40rpx;height: 24rpx;" mode=""></image> | 23 | <image src="../../static/Group 193@2x.png" style="width: 40rpx;height: 24rpx;" mode=""></image> |
24 | </view> | 24 | </view> |
25 | </u-form-item> | 25 | </u-form-item> |
@@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
28 | <u--input v-model="model1.userInfo.xh_name" disabled disabledColor="#ffffff" placeholder="请选择" | 28 | <u--input v-model="model1.userInfo.xh_name" disabled disabledColor="#ffffff" placeholder="请选择" |
29 | border="none"></u--input> | 29 | border="none"></u--input> |
30 | <u-icon slot="right" name="arrow-right"></u-icon> | 30 | <u-icon slot="right" name="arrow-right"></u-icon> |
31 | - <view class="posBox" style="top:22%; left:32rpx"> | 31 | + <view class="posBox" style="top:194rpx; left:32rpx"> |
32 | <image src="../../static/Group 193@2x.png" style="width: 40rpx;height: 24rpx;" mode=""></image> | 32 | <image src="../../static/Group 193@2x.png" style="width: 40rpx;height: 24rpx;" mode=""></image> |
33 | </view> | 33 | </view> |
34 | </u-form-item> | 34 | </u-form-item> |
@@ -36,11 +36,13 @@ | @@ -36,11 +36,13 @@ | ||
36 | <u--input v-model="model1.userInfo.region" disabled disabledColor="#ffffff" placeholder="请选择" | 36 | <u--input v-model="model1.userInfo.region" disabled disabledColor="#ffffff" placeholder="请选择" |
37 | border="none"></u--input> | 37 | border="none"></u--input> |
38 | <u-icon slot="right" name="arrow-right"></u-icon> | 38 | <u-icon slot="right" name="arrow-right"></u-icon> |
39 | - <view class="posBox" style="top:31.5%; left:32rpx"> | 39 | + <view class="posBox" style="top:276rpx; left:32rpx"> |
40 | <image src="../../static/Group 193@2x.png" style="width: 40rpx;height: 24rpx;" mode=""></image> | 40 | <image src="../../static/Group 193@2x.png" style="width: 40rpx;height: 24rpx;" mode=""></image> |
41 | </view> | 41 | </view> |
42 | </u-form-item> | 42 | </u-form-item> |
43 | - <u-form-item label="出厂年限" labelWidth="200rpx" prop="userInfo.year" borderBottom @click="show = true;" ref="item1"> | 43 | + |
44 | + | ||
45 | + <!-- <u-form-item label="出厂年限" labelWidth="200rpx" prop="userInfo.year" borderBottom @click="show = true;" ref="item1"> | ||
44 | <picker mode="date" :value="model1.userInfo.year" :start="startDate" :end="endDate" @change="bindDateChange"> | 46 | <picker mode="date" :value="model1.userInfo.year" :start="startDate" :end="endDate" @change="bindDateChange"> |
45 | <view class="uni-input"> | 47 | <view class="uni-input"> |
46 | <view class="" :style="model1.userInfo.year == '请选择' ? 'color: rgb(192, 196, 204);' : 'color: #303133;'"> | 48 | <view class="" :style="model1.userInfo.year == '请选择' ? 'color: rgb(192, 196, 204);' : 'color: #303133;'"> |
@@ -50,26 +52,52 @@ | @@ -50,26 +52,52 @@ | ||
50 | <u-icon name="arrow-right"></u-icon> | 52 | <u-icon name="arrow-right"></u-icon> |
51 | </view> | 53 | </view> |
52 | </view> | 54 | </view> |
53 | - </picker> | 55 | + </picker> --> |
54 | <!-- <u--input v-model="model1.userInfo.year" placeholder="请输入" border="none"></u--input> --> | 56 | <!-- <u--input v-model="model1.userInfo.year" placeholder="请输入" border="none"></u--input> --> |
55 | <!-- <u--input v-model="model1.userInfo.year" disabled disabledColor="#ffffff" placeholder="请选择" | 57 | <!-- <u--input v-model="model1.userInfo.year" disabled disabledColor="#ffffff" placeholder="请选择" |
56 | border="none"></u--input> | 58 | border="none"></u--input> |
57 | <u-icon slot="right" name="arrow-right"></u-icon> --> | 59 | <u-icon slot="right" name="arrow-right"></u-icon> --> |
58 | - </u-form-item> | ||
59 | - <!-- <u-datetime-picker | ||
60 | - :show="show" | ||
61 | - v-model="model1.userInfo.year" | ||
62 | - mode="year-month" | ||
63 | - ></u-datetime-picker> --> | ||
64 | - <u-form-item label="表显小时数" labelWidth="200rpx" prop="userInfo.hours" borderBottom ref="item1"> | 60 | + <!-- </u-form-item> --> |
61 | + | ||
62 | + <!-- <u-form-item label="表显小时数" labelWidth="200rpx" prop="userInfo.hours" borderBottom ref="item1"> | ||
65 | <u--input v-model="model1.userInfo.hours" border="none"></u--input> | 63 | <u--input v-model="model1.userInfo.hours" border="none"></u--input> |
66 | - </u-form-item> | 64 | + </u-form-item> --> |
67 | <u-form-item label="意向价格" labelWidth="200rpx" prop="userInfo.price" borderBottom ref="item1"> | 65 | <u-form-item label="意向价格" labelWidth="200rpx" prop="userInfo.price" borderBottom ref="item1"> |
68 | <u--input type="number" v-model="model1.userInfo.price" border="none"></u--input> | 66 | <u--input type="number" v-model="model1.userInfo.price" border="none"></u--input> |
69 | </u-form-item> | 67 | </u-form-item> |
70 | <u-form-item label="设备亮点" labelWidth="200rpx" prop="userInfo.bright" labelPosition="top" borderBottom ref="item1"> | 68 | <u-form-item label="设备亮点" labelWidth="200rpx" prop="userInfo.bright" labelPosition="top" borderBottom ref="item1"> |
71 | <u--input v-model="model1.userInfo.bright" border="none"></u--input> | 69 | <u--input v-model="model1.userInfo.bright" border="none"></u--input> |
72 | </u-form-item> | 70 | </u-form-item> |
71 | + | ||
72 | + | ||
73 | + <u-form-item v-for="item in model1.userInfo.dList" :label="item.name" labelWidth="200rpx" borderBottom ref="item1"> | ||
74 | + <view class="flexb"> | ||
75 | + <u--input :type="item.type === 1 ? 'number' : item.type === 2 ? 'digit' : 'text'" v-model="item.value" border="none"></u--input> | ||
76 | + <view class="" v-if="item.unit"> | ||
77 | + {{item.unit}} | ||
78 | + </view> | ||
79 | + </view> | ||
80 | + <!-- <u--input v-model="model1.userInfo.region" disabled disabledColor="#ffffff" placeholder="请选择" | ||
81 | + border="none"></u--input> | ||
82 | + <u-icon slot="right" name="arrow-right"></u-icon> | ||
83 | + <view class="posBox" style="top:39%; left:32rpx"> | ||
84 | + <image src="../../static/Group 193@2x.png" style="width: 40rpx;height: 24rpx;" mode=""></image> | ||
85 | + </view> --> | ||
86 | + </u-form-item> | ||
87 | + <u-form-item v-for="item in model1.userInfo.xhList" :label="item.name" labelWidth="200rpx" borderBottom ref="item1"> | ||
88 | + <view class="flexb"> | ||
89 | + <u--input :type="item.type === 1 ? 'number' : item.type === 2 ? 'digit' : 'text'" v-model="item.value" border="none"></u--input> | ||
90 | + <view class="" v-if="item.unit"> | ||
91 | + {{item.unit}} | ||
92 | + </view> | ||
93 | + </view> | ||
94 | + <!-- <u--input :type="item.type == 1 ? number : text" v-model="model1.userInfo[item.id]" border="none"></u--input> --> <!-- <u--input v-model="model1.userInfo.region" disabled disabledColor="#ffffff" placeholder="请选择" | ||
95 | + border="none"></u--input> | ||
96 | + <u-icon slot="right" name="arrow-right"></u-icon> | ||
97 | + <view class="posBox" style="top:39%; left:32rpx"> | ||
98 | + <image src="../../static/Group 193@2x.png" style="width: 40rpx;height: 24rpx;" mode=""></image> | ||
99 | + </view> --> | ||
100 | + </u-form-item> | ||
73 | </u--form> | 101 | </u--form> |
74 | <view class="" v-if="flag == 1" style="width: 60%;margin-top: 50rpx;display: flex;justify-content: center;margin-left: 20%;"> | 102 | <view class="" v-if="flag == 1" style="width: 60%;margin-top: 50rpx;display: flex;justify-content: center;margin-left: 20%;"> |
75 | <u-button shape="circle" text="上传设备照片" style="color: white;" color="linear-gradient(to right, #46BAEC,#2F67D3)" | 103 | <u-button shape="circle" text="上传设备照片" style="color: white;" color="linear-gradient(to right, #46BAEC,#2F67D3)" |
@@ -98,14 +126,15 @@ import loadingPage from '../../uni_modules/uview-ui/libs/config/props/loadingPag | @@ -98,14 +126,15 @@ import loadingPage from '../../uni_modules/uview-ui/libs/config/props/loadingPag | ||
98 | showSex: false, | 126 | showSex: false, |
99 | userInfo: { | 127 | userInfo: { |
100 | name: '', | 128 | name: '', |
101 | - year: '请选择', | ||
102 | region: '', | 129 | region: '', |
103 | price: 0, | 130 | price: 0, |
104 | day: '', | 131 | day: '', |
105 | hours:'', | 132 | hours:'', |
106 | bright: "", | 133 | bright: "", |
107 | brand_name:'', | 134 | brand_name:'', |
108 | - xh_name:'' | 135 | + xh_name:'', |
136 | + dList:[], | ||
137 | + xhList:[], | ||
109 | }, | 138 | }, |
110 | }, | 139 | }, |
111 | actions: [{ | 140 | actions: [{ |
@@ -146,7 +175,10 @@ import loadingPage from '../../uni_modules/uview-ui/libs/config/props/loadingPag | @@ -146,7 +175,10 @@ import loadingPage from '../../uni_modules/uview-ui/libs/config/props/loadingPag | ||
146 | console.log(this.model1.userInfo); | 175 | console.log(this.model1.userInfo); |
147 | } | 176 | } |
148 | 177 | ||
178 | + | ||
179 | + | ||
149 | }, | 180 | }, |
181 | + | ||
150 | onShow() { | 182 | onShow() { |
151 | let pagearr = getCurrentPages(); //获取应用页面栈 | 183 | let pagearr = getCurrentPages(); //获取应用页面栈 |
152 | let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息 | 184 | let currentPage = pagearr[pagearr.length - 1]; //获取当前页面信息 |
@@ -158,6 +190,11 @@ import loadingPage from '../../uni_modules/uview-ui/libs/config/props/loadingPag | @@ -158,6 +190,11 @@ import loadingPage from '../../uni_modules/uview-ui/libs/config/props/loadingPag | ||
158 | this.model1.userInfo.xinghao_id = currentPage.$vm.xh_id || (this.model1.userInfo.xinghao && this.model1.userInfo.xinghao.id) || '' | 190 | this.model1.userInfo.xinghao_id = currentPage.$vm.xh_id || (this.model1.userInfo.xinghao && this.model1.userInfo.xinghao.id) || '' |
159 | this.model1.userInfo.xh_name = currentPage.$vm.xh_name || (this.model1.userInfo.xinghao && this.model1.userInfo.xinghao.name) || '' | 191 | this.model1.userInfo.xh_name = currentPage.$vm.xh_name || (this.model1.userInfo.xinghao && this.model1.userInfo.xinghao.name) || '' |
160 | console.log(this.model1.userInfo); | 192 | console.log(this.model1.userInfo); |
193 | + if(currentPage.$vm.isFlash !== 1){ | ||
194 | + this.getCate() | ||
195 | + this.getXh() | ||
196 | + } | ||
197 | + | ||
161 | }, | 198 | }, |
162 | methods: { | 199 | methods: { |
163 | goLogo() { | 200 | goLogo() { |
@@ -165,6 +202,30 @@ import loadingPage from '../../uni_modules/uview-ui/libs/config/props/loadingPag | @@ -165,6 +202,30 @@ import loadingPage from '../../uni_modules/uview-ui/libs/config/props/loadingPag | ||
165 | url: '/pages/sellAndBuy/logo' | 202 | url: '/pages/sellAndBuy/logo' |
166 | }) | 203 | }) |
167 | }, | 204 | }, |
205 | + getCate(){ | ||
206 | + uni.$u.http.post('/api/equip/get_category_fields',{ | ||
207 | + category_id: this.model1.userInfo.category_id | ||
208 | + }).then(res => { | ||
209 | + this.model1.userInfo.dList = [] | ||
210 | + console.log(res); | ||
211 | + res && res.data && res.data.forEach(item => { | ||
212 | + this.model1.userInfo.dList.push({...item, value:''}) | ||
213 | + }) | ||
214 | + console.log(this.model1.userInfo.dList); | ||
215 | + }) | ||
216 | + | ||
217 | + }, | ||
218 | + getXh(){ | ||
219 | + uni.$u.http.post('/api/equip/get_xinghao_fields',{ | ||
220 | + xinghao_id: this.model1.userInfo.xinghao_id | ||
221 | + }).then(res => { | ||
222 | + console.log(res); | ||
223 | + this.model1.userInfo.xhList = [] | ||
224 | + res && res.data && res.data.forEach(item => { | ||
225 | + this.model1.userInfo.xhList.push({...item, value:''}) | ||
226 | + }) | ||
227 | + }) | ||
228 | + }, | ||
168 | getDate(type) { | 229 | getDate(type) { |
169 | const date = new Date(); | 230 | const date = new Date(); |
170 | let year = date.getFullYear(); | 231 | let year = date.getFullYear(); |
@@ -236,6 +297,10 @@ import loadingPage from '../../uni_modules/uview-ui/libs/config/props/loadingPag | @@ -236,6 +297,10 @@ import loadingPage from '../../uni_modules/uview-ui/libs/config/props/loadingPag | ||
236 | height: 24rpx; | 297 | height: 24rpx; |
237 | position: absolute; | 298 | position: absolute; |
238 | } | 299 | } |
300 | +.flexb{ | ||
301 | + display: flex; | ||
302 | + align-items: center; | ||
303 | +} | ||
239 | .uni-input{ | 304 | .uni-input{ |
240 | 305 | ||
241 | font-size: 30rpx; | 306 | font-size: 30rpx; |
@@ -80,6 +80,10 @@ | @@ -80,6 +80,10 @@ | ||
80 | } | 80 | } |
81 | }, | 81 | }, |
82 | onLoad(option) { | 82 | onLoad(option) { |
83 | + let pages = getCurrentPages(); //获取所有页面栈实例列表 | ||
84 | + let prevPage = pages[ pages.length - 2 ]; //上一页页面实例 | ||
85 | + prevPage.$vm.isFlash = 1; | ||
86 | + | ||
83 | console.log(option); | 87 | console.log(option); |
84 | this.flag = option.val | 88 | this.flag = option.val |
85 | if (option.info) { | 89 | if (option.info) { |
@@ -93,6 +97,13 @@ | @@ -93,6 +97,13 @@ | ||
93 | category_id: this.info.category_id | 97 | category_id: this.info.category_id |
94 | }).then(res => { | 98 | }).then(res => { |
95 | console.log(res); | 99 | console.log(res); |
100 | + if(res.code == 0){ | ||
101 | + uni.showToast({ | ||
102 | + title:res.msg, | ||
103 | + icon:'none' | ||
104 | + }) | ||
105 | + } | ||
106 | + | ||
96 | this.fileList = res.data[0].image_arr.map(item => { | 107 | this.fileList = res.data[0].image_arr.map(item => { |
97 | return{ | 108 | return{ |
98 | title: item.value, | 109 | title: item.value, |
@@ -104,6 +115,10 @@ | @@ -104,6 +115,10 @@ | ||
104 | } | 115 | } |
105 | }) | 116 | }) |
106 | 117 | ||
118 | + }).catch(err => { | ||
119 | + uni.showToast({ | ||
120 | + title:err.msg | ||
121 | + }) | ||
107 | }) | 122 | }) |
108 | // this.fileList = JSON.parse(this.info.images_json) | 123 | // this.fileList = JSON.parse(this.info.images_json) |
109 | // console.log(this.fileList); | 124 | // console.log(this.fileList); |
@@ -119,7 +134,7 @@ | @@ -119,7 +134,7 @@ | ||
119 | }, | 134 | }, |
120 | methods: { | 135 | methods: { |
121 | submit() { | 136 | submit() { |
122 | - let p = this.info | 137 | + let p = JSON.parse(JSON.stringify(this.info)) |
123 | delete p.name | 138 | delete p.name |
124 | delete p.brand_name | 139 | delete p.brand_name |
125 | delete p.xh_name | 140 | delete p.xh_name |
@@ -128,11 +143,33 @@ | @@ -128,11 +143,33 @@ | ||
128 | // [item.title]: item.url && item.url[0] && item.url[0].thumb || '' | 143 | // [item.title]: item.url && item.url[0] && item.url[0].thumb || '' |
129 | // } | 144 | // } |
130 | // }); | 145 | // }); |
131 | - let ads = JSON.parse(JSON.stringify(p)) | ||
132 | - p.address = ads.region | ||
133 | - p.province = ads.region.slice(0, 3) | ||
134 | - p.city = ads.region.slice(3, 6) | ||
135 | - p.region = ads.region.slice(6, 9) | 146 | + let curAds = this.info |
147 | + if((uni.getStorageSync('detailAds') == '') || (uni.getStorageSync('detailAds') !== curAds) ){ | ||
148 | + uni.setStorageSync('detailAds',this.info.region) | ||
149 | + } | ||
150 | + let ads = uni.getStorageSync('detailAds') | ||
151 | + p.dList.forEach(item => { | ||
152 | + if(item.type == 1 ){ | ||
153 | + item.value = parseInt(item.value) | ||
154 | + }else if(item.type == 2){ | ||
155 | + item.value = parseFloat(item.value) | ||
156 | + } | ||
157 | + }) | ||
158 | + p.xhList.forEach(item => { | ||
159 | + if(item.type == 1 ){ | ||
160 | + item.value = parseInt(item.value) | ||
161 | + }else if(item.type == 2){ | ||
162 | + item.value = parseFloat(item.value) | ||
163 | + } | ||
164 | + }) | ||
165 | + p.category_fields_json = JSON.stringify(p.dList) | ||
166 | + p.xinghao_fields_json = JSON.stringify(p.xhList) | ||
167 | + delete p.dList | ||
168 | + delete p.xhList | ||
169 | + p.address = ads | ||
170 | + p.province = ads.slice(0, 3) | ||
171 | + p.city = ads.slice(3, 6) | ||
172 | + p.region = ads.slice(6, 9) | ||
136 | uni.$u.http.post(this.flag === "sale" ? '/api/equip/add_equip_sale' : '/api/equip/add_equip_hire', { | 173 | uni.$u.http.post(this.flag === "sale" ? '/api/equip/add_equip_sale' : '/api/equip/add_equip_hire', { |
137 | ...p, | 174 | ...p, |
138 | images_json: JSON.stringify(this.fileList) | 175 | images_json: JSON.stringify(this.fileList) |
@@ -175,27 +175,27 @@ | @@ -175,27 +175,27 @@ | ||
175 | </image> | 175 | </image> |
176 | </view> | 176 | </view> |
177 | </u-popup> --> | 177 | </u-popup> --> |
178 | - <u-overlay :show="preImg" @click="preImg = false"> | 178 | + <u-overlay :show="preImg" @click="onClose"> |
179 | <view class="warp" > | 179 | <view class="warp" > |
180 | <image :src="imgDes" mode="" style="max-height: 80vh;"> | 180 | <image :src="imgDes" mode="" style="max-height: 80vh;"> |
181 | </image> | 181 | </image> |
182 | </view> | 182 | </view> |
183 | - <view class="bbox" style=" margin: 10px 0 0 46%; text-align: center; padding-top: 2;" @click="show = false"> | 183 | + <view class="bbox" style=" margin: 10px 0 0 46%; text-align: center; padding-top: 2;" @click="onClose"> |
184 | <image src="../../static/close@2x.png" style="width: 40rpx;height: 40rpx;margin-top: 20rpx;" mode=""></image> | 184 | <image src="../../static/close@2x.png" style="width: 40rpx;height: 40rpx;margin-top: 20rpx;" mode=""></image> |
185 | </view> | 185 | </view> |
186 | </u-overlay> | 186 | </u-overlay> |
187 | 187 | ||
188 | - <u-overlay :show="show" @click="show = false"> | 188 | + <u-overlay :show="show" @click="onClose1"> |
189 | <view class="warp"> | 189 | <view class="warp"> |
190 | <view class=""> | 190 | <view class=""> |
191 | - <image src="http://equiphappy.shs.broing.cn/assets/miniprogram/Group1822@2x.png" mode="" style="max-height: 80vh;"> | 191 | + <image src="http://equiphappy.shs.broing.cn/assets/miniprogram/Group1822@2x.png" mode="" style="height: 950rpx;"> |
192 | </image> | 192 | </image> |
193 | </view> | 193 | </view> |
194 | 194 | ||
195 | - <image :src="wechat.qrcode_url" @longpress="saveImgInner(wechat.qrcode_url)" style="position: absolute;top:330rpx;left: 23%; width: 350rpx;height: 350rpx;" mode=""></image> | 195 | + <image :src="wechat.qrcode_url" @longpress="saveImgInner(wechat.qrcode_url)" style="position: absolute;top:330rpx;left: 148rpx; width: 350rpx;height: 350rpx;" mode=""></image> |
196 | 196 | ||
197 | </view> | 197 | </view> |
198 | - <view class="bbox" style=" margin: 10px 0 0 46%; text-align: center; padding-top: 2;" @click="show = false"> | 198 | + <view class="bbox" style=" margin: 10px 0 0 46%; text-align: center; padding-top: 2;" @click="onClose1"> |
199 | <image src="../../static/close@2x.png" style="width: 40rpx;height: 40rpx;margin-top: 20rpx;" mode=""></image> | 199 | <image src="../../static/close@2x.png" style="width: 40rpx;height: 40rpx;margin-top: 20rpx;" mode=""></image> |
200 | </view> | 200 | </view> |
201 | </u-overlay> | 201 | </u-overlay> |
@@ -229,13 +229,24 @@ | @@ -229,13 +229,24 @@ | ||
229 | methods: { | 229 | methods: { |
230 | //咨询 | 230 | //咨询 |
231 | gophone() { | 231 | gophone() { |
232 | - uni.makePhoneCall({ | ||
233 | - phoneNumber: this.call1 //仅为示例 | ||
234 | - }); | 232 | + if(this.call1){ |
233 | + uni.makePhoneCall({ | ||
234 | + phoneNumber: this.call1 //仅为示例 | ||
235 | + }); | ||
236 | + }else{ | ||
237 | + uni.showToast({ | ||
238 | + title:'暂无联系电话', | ||
239 | + icon: 'none' | ||
240 | + }) | ||
241 | + } | ||
242 | + | ||
235 | }, | 243 | }, |
236 | onClose() { | 244 | onClose() { |
237 | this.preImg = false | 245 | this.preImg = false |
238 | }, | 246 | }, |
247 | + onClose1() { | ||
248 | + this.show = false | ||
249 | + }, | ||
239 | //立即联系 | 250 | //立即联系 |
240 | call(val) { | 251 | call(val) { |
241 | uni.makePhoneCall({ | 252 | uni.makePhoneCall({ |
@@ -319,13 +330,19 @@ | @@ -319,13 +330,19 @@ | ||
319 | lng: '' | 330 | lng: '' |
320 | }).then(res => { | 331 | }).then(res => { |
321 | console.log(res); | 332 | console.log(res); |
333 | + if(res.code == 0){ | ||
334 | + uni.showToast({ | ||
335 | + title:res.msg, | ||
336 | + icon: 'none' | ||
337 | + }) | ||
338 | + } | ||
322 | this.info = res.data.data | 339 | this.info = res.data.data |
323 | console.log(this.info); | 340 | console.log(this.info); |
324 | this.wechat = res.data.wechat | 341 | this.wechat = res.data.wechat |
325 | this.phone = res.data.contract | 342 | this.phone = res.data.contract |
326 | this.resList = res.data.rec_list.data | 343 | this.resList = res.data.rec_list.data |
327 | this.call2 = res.data.contract | 344 | this.call2 = res.data.contract |
328 | - this.call1 = res.data.ask_phone || res.data.contract | 345 | + this.call1 = res.data.ask_phone |
329 | let imgs = JSON.parse(res.data.data.images_json) | 346 | let imgs = JSON.parse(res.data.data.images_json) |
330 | this.isFill = res.data.data | 347 | this.isFill = res.data.data |
331 | imgs.forEach(item => { | 348 | imgs.forEach(item => { |
@@ -474,7 +491,6 @@ | @@ -474,7 +491,6 @@ | ||
474 | display: flex; | 491 | display: flex; |
475 | position: relative; | 492 | position: relative; |
476 | justify-content: center; | 493 | justify-content: center; |
477 | - backdrop-filter: blur(24rpx); | ||
478 | margin-top: 8%; | 494 | margin-top: 8%; |
479 | margin-left: 64rpx; | 495 | margin-left: 64rpx; |
480 | margin-right: 64rpx; | 496 | margin-right: 64rpx; |
-
请 注册 或 登录 后发表评论