Blame view

lvdao-miniapp/pages/advertisement/advertisement.vue 5.6 KB
3f535f30   杨鑫   '初始'
1
2
3
  <template>
  	<view class="page">
  		<!-- 搜索 -->
f692f3a5   wesley88   1
4
  <!-- 		<view class="head-search">
e5b57447   杨鑫   '分包问卷'
5
6
  			<u-search bg-color="#fff" placeholder="请输入关键词" v-model="query.advertisingName" :show-action="false" @search="search"></u-search>
  			<u-button type="success" @click="search">搜索</u-button>
f692f3a5   wesley88   1
7
8
9
  		</view> -->
  		<!-- 搜索 -->
  		<view style="margin: 20rpx 0;background-color: #FFFFFF;border-radius: 18rpx;border: 2rpx solid #E8E8E8;	margin: 22rpx 24rpx;overflow: hidden;" >
cfcb44ef   杨鑫   '改bug版'
10
  			<u-search :action-style="{'background':'#19be6b','color':'#fff','height':'32px','line-height':'32px','border-radius':'18rpx'}" bg-color="#fff" placeholder="请输入关键词" v-model="pageindex.advertisingName" action-text="搜索" @clear="search" @search="search" @custom="search"></u-search>
3f535f30   杨鑫   '初始'
11
12
  		</view>
  		<view class="screen-list">
e5b57447   杨鑫   '分包问卷'
13
  			<view class="list" @click="typeshow = true">
3f535f30   杨鑫   '初始'
14
  				<text>类型</text>
e5b57447   杨鑫   '分包问卷'
15
16
  				<image  :src="$imgUrl('/down.png')"></image>
  				<u-select v-model="typeshow" :list="typeList" @confirm="(v) => {queryChange('advertisingType', v)}"></u-select>
3f535f30   杨鑫   '初始'
17
  			</view>
e5b57447   杨鑫   '分包问卷'
18
  		<!-- 	<view class="list" @click="setList(1)">
3f535f30   杨鑫   '初始'
19
20
21
  				<text>租金</text>
  				<image :src="$imgUrl('/down.png')"></image>
  			</view>
e5b57447   杨鑫   '分包问卷'
22
  
3f535f30   杨鑫   '初始'
23
24
25
  			<view class="list" @click="setList(2)">
  				<text>筛选</text>
  				<image :src="$imgUrl('/down.png')"></image>
e5b57447   杨鑫   '分包问卷'
26
  			</view> -->
3f535f30   杨鑫   '初始'
27
28
29
30
  			<u-select v-model="show" :list="companys" @confirm="handleCompanyConfirm" mini borderless></u-select>
  		</view>
  		<!-- 订单列表 -->
  		<view class="goods-data">
d64cd58f   wesley88   上传验收小程序
31
  			<view v-if="tableData.length == 0" style="padding: 50rpx 0;text-align: center;">暂无数据</view>
3f535f30   杨鑫   '初始'
32
  			<view class="goods-list">
e5b57447   杨鑫   '分包问卷'
33
  				<view class="list" v-for="(item,index) in tableData" :key="index" @click="toDetail(item)">
3f535f30   杨鑫   '初始'
34
  					<view class="thumb">
440bccda   wesley88   1
35
  						<u-image width="20vw" height="20vw" border-radius="20" :src="item.locationDiagram.length>0?imgurl +item.locationDiagram.split(',')[0]:'' "></u-image>
e5b57447   杨鑫   '分包问卷'
36
  						<!-- <image :src="item.locationDiagram" mode="widthFix"></image> -->
3f535f30   杨鑫   '初始'
37
38
39
40
41
42
43
  					</view>
  					<view class="item">
  						<view class="title">
  							<text class="one-omit">{{item.advertisingName}}</text>
  						</view>
  						<view>
  							<view class="goods-list-text">
0fd8b750   杨鑫   '最新落地1'
44
  								<view class="goods-list-txt">广告位类型:{{item.advertisingType}}</view>
2210df30   wesley88   1
45
  								<view class="goods-list-txt">广告尺寸:{{item.dimensions || '--'}}</view>
0fd8b750   杨鑫   '最新落地1'
46
47
  							</view>
  							<view class="goods-list-text" v-if="item.advertisingType == '线上广告位'">
3f535f30   杨鑫   '初始'
48
49
50
  								<view class="goods-list-txt">轮播顺序:<text>{{item.rotationOrder}}</text></view>
  								<view class="goods-list-txt">所属移动端:<text>{{item.affiliation}}</text></view>
  							</view>
0fd8b750   杨鑫   '最新落地1'
51
52
53
  							<view class="goods-list-text" v-if="item.advertisingType == '实体广告位'">
  								<view class="goods-list-txt">位置信息:<text>{{item.detailedLocation}}</text></view>
  								<view class="goods-list-txt">广告材质:<text>{{item.advertisingMaterial}}</text></view>
3f535f30   杨鑫   '初始'
54
55
  							</view>
  						</view>
0fd8b750   杨鑫   '最新落地1'
56
  						
3f535f30   杨鑫   '初始'
57
58
59
60
61
62
63
64
65
66
67
68
  					</view>
  				</view>
  			</view>
  		</view>
  	</view>
  </template>
  
  <script>
  	export default {
  		data() {
  			return {
  				tableData: [],
e5b57447   杨鑫   '分包问卷'
69
  				query: {
cfcb44ef   杨鑫   '改bug版'
70
  				
0fd8b750   杨鑫   '最新落地1'
71
  					  publishStatus:2
e5b57447   杨鑫   '分包问卷'
72
  				},
3f535f30   杨鑫   '初始'
73
  				pageindex: {
cfcb44ef   杨鑫   '改bug版'
74
75
  					advertisingName: '',
  					advertisingType: '',
0fd8b750   杨鑫   '最新落地1'
76
  				  pageNumber: 0,
3f535f30   杨鑫   '初始'
77
  				  pageSize: 10,
0fd8b750   杨鑫   '最新落地1'
78
  				  publishStatus:2
3f535f30   杨鑫   '初始'
79
  				},
e5b57447   杨鑫   '分包问卷'
80
81
82
83
84
  				typeshow: false,
  				typeList: [
  					{ value: '线上广告位', label: '线上广告位'},
  					{ value: '实体广告位', label: '实体广告位'},
  				],
3f535f30   杨鑫   '初始'
85
  				show:false,
e5b57447   杨鑫   '分包问卷'
86
  				
3f535f30   杨鑫   '初始'
87
88
89
90
91
92
93
  				companys:[
  					{
  						value: '1',
  						label: '线上广告位'
  					},
  					{
  						value: '2',
0fd8b750   杨鑫   '最新落地1'
94
  						label: '实体广告位'
3f535f30   杨鑫   '初始'
95
  					}
f692f3a5   wesley88   1
96
97
  				],
  				imgurl:''
3f535f30   杨鑫   '初始'
98
99
  			};
  		},
f692f3a5   wesley88   1
100
101
102
  		onLoad() {
  			this.imgurl = this.$img
  		},
3f535f30   杨鑫   '初始'
103
104
105
106
  		mounted() {
  		this.getAll()
  		  },
  		methods: {
3f535f30   杨鑫   '初始'
107
  			//查询全数据
e5b57447   杨鑫   '分包问卷'
108
  			getAll() {
cfcb44ef   杨鑫   '改bug版'
109
110
  				
  				this.$http.sendRequest('/cereAdvertisingInformation/queryByPage', 'POST', this.pageindex, 1).then(res => {
e5b57447   杨鑫   '分包问卷'
111
112
113
114
  				    //成功回调
  					this.tableData = res.data.data.content;
  				}).catch(err => {
  				    console.log(err)
3f535f30   杨鑫   '初始'
115
  				     	//请求失败
e5b57447   杨鑫   '分包问卷'
116
  				})
0fd8b750   杨鑫   '最新落地1'
117
118
119
120
121
122
123
124
125
126
127
128
  				// let pages ={
  				// 	pageNumber:0,
  				// 	pageSize:10,
  				// 	resourcesId:`gg${}`
  				// }
  				// this.$http.sendRequest('/cereResourceStrategy/queryByResources', 'POST', pages, 1).then(res => {
  				//     //成功回调
  				// 	this.tableData = res.data.data.content;
  				// }).catch(err => {
  				//     console.log(err)
  				//      	//请求失败
  				// })
e5b57447   杨鑫   '分包问卷'
129
130
  			},
  			search() {
cfcb44ef   杨鑫   '改bug版'
131
  				this.pageindex.advertisingType = '' 
e5b57447   杨鑫   '分包问卷'
132
133
134
  				this.getAll()
  			},
  			queryChange(key, val) {
cfcb44ef   杨鑫   '改bug版'
135
136
  				this.pageindex[`${key}`] = val[0].value;
  				this.getAll()
e5b57447   杨鑫   '分包问卷'
137
138
139
  			},
  			toDetail(item) {
  				let items = JSON.stringify(item)
3c4666ce   杨鑫   '最新'
140
  				console.log(items)
e5b57447   杨鑫   '分包问卷'
141
  				uni.navigateTo({
2210df30   wesley88   1
142
  					url: `/pages/advertisementDetail/advertisementDetail?item=${encodeURIComponent(items)}`
e5b57447   杨鑫   '分包问卷'
143
  				})
3f535f30   杨鑫   '初始'
144
  			},
e5b57447   杨鑫   '分包问卷'
145
146
147
148
149
150
151
  			
  			
  			// advertisementTime() {
  			// 	uni.navigateTo({
  			// 		url: '/pages/advertisementTime/advertisementTime'
  			// 	})
  			// },
3f535f30   杨鑫   '初始'
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
  			setList(val){
  				console.log(val)
  				if(val == 0){
  					this.companys=[
  					{
  						value: '1',
  						label: '线上广告位'
  					},
  					{
  						value: '2',
  						label: '线下广告位'
  					}
  				]
  				}else if(val ==1){
  					this.companys = []
  				}else if(val ==2){
  					this.companys = []
  				}
  				
  				this.show = true
  			},
  			handleCompanyConfirm(val){
3f535f30   杨鑫   '初始'
174
  				let page = {
cfcb44ef   杨鑫   '改bug版'
175
  					pageNumber: 0,
3f535f30   杨鑫   '初始'
176
  					pageSize: 10,
cfcb44ef   杨鑫   '改bug版'
177
  					publishStatus:2,
3f535f30   杨鑫   '初始'
178
179
  					advertisingType:val[0].label
  				}
844aa73a   杨鑫   '最新'
180
  				this.$http.sendRequest('/cereAdvertisingInformation/queryByPage', 'POST', page, 1).then(res => {
3f535f30   杨鑫   '初始'
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
  					//成功回调
  					this.tableData = res.data.data.content
  				})
  			},
  			sousu(){
  				if(this.keyword != ''){
  				}
  			},
  		}
  	}
  </script>
  
  <style scoped lang="scss">
  	@import 'advertisement.scss';
  </style>