Blame view

lvdao-miniapp/pages/advertisementDetail/advertisementDetail.vue 10.2 KB
e5b57447   杨鑫   '分包问卷'
1
  <template>
8f8dbfb8   wesley88   1
2
3
4
5
6
7
  	<view>
  		<view class="banner">
  			<view class="banner-item info">
  				<view class="info-title">
  					{{tableData.advertisingName}}
  				</view>
3f950a0f   wesley88   1
8
9
  				<!-- <view class="info-text">{{tableData.shopDescription}}</view> -->
  				<view class="info-racord" style="margin: 20rpx 0;" v-if="moban.length !=0">
84cb5fa7   wesley88   1
10
11
12
  					<view class="info-price" v-if="moban[0].rentalPrice"><span>{{moban[0].rentalPrice || ''}}</span>元/{{moban[0].leaseTerm || ''}}</view>
  					<view class="info-price" v-else>自营</view>
  					
8f8dbfb8   wesley88   1
13
14
15
16
17
18
  					<!-- <view class="info-intention">{{tableData.id}}人有意向</view> -->
  				</view>
  				<view class="" v-if="moban.length !=0" @click="moreZu">
  					查看更多租金优惠
  					<u-icon name="arrow-right"></u-icon>
  				</view>
e5b57447   杨鑫   '分包问卷'
19
  			</view>
8f8dbfb8   wesley88   1
20
21
22
23
24
25
26
27
28
29
  			<view class="banner-item field">
  				<view class="banner-item-title">基础信息</view>
  				<view class="banner-item-form">
  					<u-row gutter="16">
  						<u-col span="7">
  							<view class="form-item">
  								<view class="label">广告位类型:</view>
  								<text>{{tableData.advertisingType}}</text>
  							</view>
  						</u-col>
3f950a0f   wesley88   1
30
31
32
33
34
35
36
37
38
  						<view v-if="tableData.advertisingType == '线上广告位'">
  							<u-col span="5" >
  								<view class="form-item">
  									<view class="label">所属端:</view>
  									<text>{{tableData.affiliation || '--'}}</text>
  								</view>
  							</u-col>
  							<u-col span="5" >
  								<view class="form-item">
4723e225   杨鑫   最新代码
39
40
  									<view class="label">轮播顺序:</view>
  									<text>{{tableData.rotationOrder || '--'}}</text>
3f950a0f   wesley88   1
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
  								</view>
  							</u-col>
  					<!-- 		<u-col span="5" >
  								<view class="form-item">
  									<view class="label">广告尺寸:</view>
  									<text>{{tableData.dimensions || '--'}}</text>
  								</view>
  							</u-col> -->
  							<u-col span="5" >
  								<view class="form-item">
  									<view class="label">可上传大小:</view>
  									<text>{{tableData.size || '--'}}</text>
  								</view>
  							</u-col>
  							<u-col span="5" >
  								<view class="form-item">
4723e225   杨鑫   最新代码
57
  									<view class="label">播放时长(秒):</view>
3f950a0f   wesley88   1
58
59
60
  									<text>{{tableData.playDuration || '--'}}</text>
  								</view>
  							</u-col>
2210df30   wesley88   1
61
  							<u-col span="12" >
3f950a0f   wesley88   1
62
63
64
65
66
67
68
69
  								<view class="form-item">
  									<view class="label">推送地址:</view>
  									<text>{{tableData.pushAddress || '--'}}</text>
  								</view>
  							</u-col>
  							<u-col span="12">
  								<view class="form-item">
  									<view class="label">介绍:</view>
2210df30   wesley88   1
70
71
72
73
74
  									<text v-if="!tableData.memo">无</text>
  								</view>
  								<view style='flex: 1;'>
  									<rich-text v-if="tableData.memo" :nodes="tableData.memo"></rich-text>
  									
3f950a0f   wesley88   1
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
  								</view>
  							</u-col>
  						</view>
  						<view v-if="tableData.advertisingType == '实体广告位'">
  							<u-col span="5" >
  								<view class="form-item">
  									<view class="label">设备类型:</view>
  									<text>{{tableData.deviceType || '--'}}</text>
  								</view>
  							</u-col>
  							<u-col span="5" >
  								<view class="form-item">
  									<view class="label">设备大小:</view>
  									<text>{{tableData.equipmentSize || '--'}}</text>
  								</view>
  							</u-col>
  				<!-- 			<u-col span="5" >
  								<view class="form-item">
  									<view class="label">广告尺寸:</view>
  									<text>{{tableData.dimensions || '--'}}</text>
  								</view>
  							</u-col> -->
  							<u-col span="5" >
  								<view class="form-item">
  									<view class="label">广告材质:</view>
  									<text>{{tableData.advertisingMaterial || '--'}}</text>
  								</view>
  							</u-col>
  						
  						</view>
8f8dbfb8   wesley88   1
105
106
  					</u-row>
  				</view>
0fd8b750   杨鑫   '最新落地1'
107
  			</view>
8f8dbfb8   wesley88   1
108
109
110
111
112
113
114
115
116
117
  			<view class="banner-item">
  				<view class="banner-item-title">广告信息</view>
  				<view class="banner-item-form">
  					<u-row gutter="16">
  						<u-col span="7">
  							<view class="form-item">
  								<view class="label">广告尺寸:</view>
  								<text>{{tableData.dimensions || '--'}}</text>
  							</view>
  						</u-col>
3f950a0f   wesley88   1
118
  				<!-- 		<u-col span="5">
8f8dbfb8   wesley88   1
119
120
121
122
  							<view class="form-item">
  								<view class="label">可上传大小:</view>
  								<text>{{tableData.size || '--'}}</text>
  							</view>
3f950a0f   wesley88   1
123
  						</u-col> -->
8f8dbfb8   wesley88   1
124
125
126
127
128
129
130
  						<u-col span="7">
  							<view class="form-item">
  								<view class="label">位置示意图:</view>
  							</view>
  						</u-col>
  						<u-col span="12">
  							<view style="display: flex;flex-wrap: wrap;">
440bccda   wesley88   1
131
132
  								<u-image @click="openimg(tableData.locationDiagram,index)" :showLoading="true" v-for="(item,index) in list(tableData.locationDiagram)"
  									v-if="tableData.locationDiagram" :src="imgUrl+item" width="90px" height="90px"
8f8dbfb8   wesley88   1
133
134
135
136
137
138
139
  									border-radius="20" style="margin-bottom:25rpx;margin-left: 25rpx;"></u-image>
  								<text v-else>暂无</text>
  							</view>
  							<!-- <image :src="imgurl+tableData.locationDiagram" width="100%"></image> -->
  						</u-col>
  					</u-row>
  				</view>
e5b57447   杨鑫   '分包问卷'
140
  			</view>
3f950a0f   wesley88   1
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
  			<view class="banner-item position" v-if="tableData.advertisingType == '实体广告位'">
  				<view class="banner-item-title">位置信息</view>
  				<view style="margin-top: 16rpx;">
  					<map style="width: 100%; height: 200rpx;">
  						<view class="position-info" @click="gomapApp(latitude,longitude)">
  							<u-image :showLoading="true" :src="$imgUrl('/location-icon.png')" width="20rpx"
  								height="20rpx"></u-image>
  							<view>
  								<text >{{tableData.detailedLocation}}</text>
  							</view>
  			
  			
  						</view>
  					</map>
  				</view>
  			</view>
e5b57447   杨鑫   '分包问卷'
157
  		</view>
3f950a0f   wesley88   1
158
  
8f8dbfb8   wesley88   1
159
160
161
162
  		<view style="height: 100rpx;"></view>
  		<!-- 底部 -->
  		<view class="page-footer">
  			<!-- <view class="footer-service">
e5b57447   杨鑫   '分包问卷'
163
164
165
  			<u-image :showLoading="true" :src="$imgUrl('/sevice-icon.png')"  width="30rpx" height="30rpx"></u-image>
  			<text>客服</text>
  		</view> -->
8f8dbfb8   wesley88   1
166
167
168
169
170
171
172
  			<view class="footer-btn">
  				<!-- <u-button type="primary" @click="leaseAdd('/pages/intentionApply/intentionApply')"  style="margin-right:10px;height: 35px;">意向申请</u-button> -->
  				<u-button type="success" style="width: 100%;border-radius: 10px;"
  					@click="leaseAdd('/pages/advertisementAdd/advertisementAdd')">租赁申请</u-button>
  				<!-- <u-button type="success" style="margin-left: unset;" @click="leaseAdd">广告申请</u-button> -->
  			</view>
  			<!-- <view class="footer-service">
e5b57447   杨鑫   '分包问卷'
173
174
175
  			<u-image :showLoading="true"  :src="$imgUrl('/share-icon.png')"  width="30rpx" height="30rpx"></u-image>
  			<text>分享</text>
  		</view> -->
8f8dbfb8   wesley88   1
176
177
178
  
  		</view>
  	</view>
e5b57447   杨鑫   '分包问卷'
179
180
181
  </template>
  
  <script>
8f8dbfb8   wesley88   1
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
  	export default {
  		data() {
  			return {
  				tableData: {},
  				swiperList: [{
  					id: 0,
  					type: 'image',
  					url: this.$imgUrl('/img/1.jpg')
  				}],
  				latitude: 39.909,
  				longitude: 116.39742,
  				moban: [],
  				resourcesId: '',
  				imgurl: '',
  				imgUrl: this.$img,
  			};
  		},
  		onLoad(option) {
  			this.imgurl = this.$img
2210df30   wesley88   1
201
  			let data = JSON.parse(decodeURIComponent(option.item))
8f8dbfb8   wesley88   1
202
  			console.log(data)
3c4666ce   杨鑫   '最新'
203
  			this.tableData = data
8f8dbfb8   wesley88   1
204
205
206
207
208
  			this.resourcesId = `gg${data.id}`
  			let paesize = {
  				pageNumber: 0,
  				pageSize: 10,
  				resourcesId: `gg${data.id}`
e5b57447   杨鑫   '分包问卷'
209
  			}
8f8dbfb8   wesley88   1
210
211
212
213
214
215
216
  			this.$http.sendRequest('/cereResourceStrategy/queryByResources', 'POST', paesize, 1).then(res => {
  
  				this.moban = res.data.data
  			}).catch(err => {
  				console.log(err)
  				//请求失败
  			})
3f950a0f   wesley88   1
217
218
219
220
  			if (data.mapPunctuation) {
  				this.latitude = parseFloat(data.mapPunctuation.split(',')[0])
  				this.longitude = parseFloat(data.mapPunctuation.split(',')[1])
  			}
8f8dbfb8   wesley88   1
221
222
  		},
  		methods: {
3f950a0f   wesley88   1
223
224
225
226
227
228
229
230
231
232
  			gomapApp(latitude, longitude, ) {
  				let url = "";
  				uni.openLocation({
  					latitude: latitude,
  					longitude: longitude,
  					success: function() {
  						console.log('success');
  					}
  				});
  			},
440bccda   wesley88   1
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
  			openimg(urls,index) {
  				urls =urls.split(',')
  				let list = urls.map(item=>{
  					return this.imgUrl + item
  				})
  				uni.previewImage({
  					current:index,
  					urls: list,
  					longPressActions: {
  						itemList: ['发送给朋友', '保存图片', '收藏'],
  						success: function(data) {
  							console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  						},
  						fail: function(err) {
  							console.log(err.errMsg);
  						}
  					}
  				});
  			},
8f8dbfb8   wesley88   1
252
253
254
255
  			list(list) {
  				const imgs = list.split(',')
  				return imgs
  			},
84cb5fa7   wesley88   1
256
  			async leaseAdd(url) {
249d13ce   杨鑫   最新
257
258
259
260
261
262
263
264
265
266
267
268
269
  				if(!uni.getStorageSync('user').phone){
  					uni.showToast({
  						icon: 'none',
  						title: '请登录',
  						duration: 2000
  					});
  					setTimeout(() => {
  						uni.navigateTo({
  							url: '/pages/login/login'
  						})
  					}, 2000)
  					return
  				}
84cb5fa7   wesley88   1
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
  				let c1 = await this.$http.sendRequest('/cereAdvertiserInfo/queryByPage', 'POST', {
  					"pageNumber": 0,
  					"pageSize": 10,
  					"auditStatus": "1",
  					"applicant": uni.getStorageSync('user').phone,
  					"rentalResourcesId":this.tableData.id
  				}, 1).then(res => {
  					return res.data.data.content
  				})
  				console.error(c1)
  				if (c1.length > 0) {
  					uni.showToast({
  						icon: 'none',
  						title: '已申请,请勿重复提交'
  					})
  					return
  				}
8f8dbfb8   wesley88   1
287
288
289
290
  				this.$http.sendRequest('/cerePlatformMerchant/queryByPage', 'POST', {
  					"pageSize": 10,
  					pageNumber: 0,
  					phone: uni.getStorageSync('user').phone
e94be901   wesley88   1
291
  				},1).then(res => {
8f8dbfb8   wesley88   1
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
  					if (res.data.code == '20004' || res.data.code == '20003') {
  						uni.navigateTo({
  							url: '/pages/login/login'
  						})
  
  					}
  					if (res.data.data.content.length > 0) {
  						let c1 = res.data.data.content[0]
  
  						if (c1.checkState == '1') {
  							uni.showToast({
  								icon: 'none',
  								title: '商家申请正在审核中',
  								duration: 3000
  							});
  						} else if (c1.checkState == '3') {
  							uni.showToast({
  								icon: 'none',
  								title: '商家申请审核已被拒绝 请重新提交',
  								duration: 3000
  							});
  							setTimeout(() => {
  								uni.navigateTo({
  									url: '/pagesA/leaseAdd/leaseAdd'
  								})
  							}, 3000)
  						} else if (c1.checkState == '2') {
  							uni.navigateTo({
  								url: `${url}?ids=${this.tableData.id}&type=${this.tableData.advertisingType}`
  							})
  						}
  					} else {
  						uni.showToast({
  							icon: 'none',
  							title: '请先申请成为商家',
  							duration: 3000
  						});
  						setTimeout(() => {
  							uni.navigateTo({
  								url: '/pagesA/leaseAdd/leaseAdd'
  							})
  						}, 3000)
  					}
  				})
  			},
  			moreZu() {
  				uni.navigateTo({
  					url: `/pagesA/moreZu/moreZu?resourcesId=${this.resourcesId}`
  				})
  			},
0fd8b750   杨鑫   '最新落地1'
342
  		}
8f8dbfb8   wesley88   1
343
  	};
e5b57447   杨鑫   '分包问卷'
344
345
346
  </script>
  
  <style scoped lang="scss">
8f8dbfb8   wesley88   1
347
348
  	@import 'advertisementDetail.scss';
  </style>