Blame view

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