Blame view

pages/my/my.vue 9.35 KB
290144e9   易尊强   第一次
1
2
3
4
5
6
7
8
9
  <template>
  	<view class="page">
  		<view style="position: absolute; top: 0; width: 100%;z-index: 0;">
  			<image src="../../static/bg.png" style="width: 100%; height: 450rpx;"></image>
  		</view>
  		<view class="main">
  			<view class="logo">
  				<image src="../../static/logo.png" mode="widthFix"></image>
  			</view>
132aa3e8   易尊强   ss
10
  			<view class="mian-box" style="position: relative;z-index: 2;">
290144e9   易尊强   第一次
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
  				<view class="my-top" @click="toPerson">
  					<view class="user-info" >
  						<view class="portrait" v-if="isHead">
  							<image :src="baseUrl + userIcon"></image>
  						</view>
  						<view class="portrait" v-else>
  							<image src="../../static/img/head.jpg"></image>
  						</view>
  						<view class="info">
  							<view class="nickname">
  								<text>{{userName}}</text>
  							</view>
  							<view class="rank">
  								<image src="../../static/copy.png"></image><text>{{userId}}</text>
  							</view>
  						</view>
  						<view class="user-right">
  							<image src="../../static/right2.png"></image>
  						</view>
  					</view>
  				</view>
  				<view class="my-service">
  					<view class="service-list">
  						<!-- <view class="list">
  						<view class="thumb">
  							0
  						</view>
  						<view class="name">
  							<text>收藏</text>
  						</view>
  					</view>
  					<view class="line"></view> -->
  						<view class="list" @click="supply">
  							<view class="thumb">
  								{{proCount}}
  							</view>
  							<view class="name">
  								<text>产品</text>
  							</view>
  						</view>
  						<view class="line"></view>
  						<view class="list" @click="demand">
  							<view class="thumb">
  								{{demandCount}}
  							</view>
  							<view class="name">
  								<text>需求</text>
  							</view>
  						</view>
  						<view class="line"></view>
  						<view class="list" @click="zhao">
  							<view class="thumb">
  								{{zhaoPCount}}
  							</view>
  							<view class="name">
  								<text>招聘</text>
  							</view>
  						</view>
e6b161ae   易尊强   2/23
69
  						<!-- <view class="line"></view>
132aa3e8   易尊强   ss
70
71
72
73
74
75
76
  						<view class="list" @click="toMyCom()">
  							<view class="thumb">
  								{{com}}
  							</view>
  							<view class="name">
  								<text>企业</text>
  							</view>
e6b161ae   易尊强   2/23
77
  						</view> -->
290144e9   易尊强   第一次
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
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
  					</view>
  				</view>
  
  				<!-- <view class="my-middle" v-show="isCompany">
  				<view class="my-middle-left">
  					<image src="../../static/img/logo.png" ></image>{{organizeName}}
  				</view>
  				<view class="my-middle-right">
  					<image src="../../static/right2.png"></image>
  				</view>
  				
  			</view> -->
  
  				<view class="message-list">
  					<view class="titleall-box">
  						<view class="titleall-left">
  							<view class="titleall-left-line"></view>服务与工具
  						</view>
  					</view>
  					<view class="list" @click="toPerson">
  						<view class="icon-data">
  							<view class="icon">
  								<image src="/static/my-icon1.png" mode=""></image>
  							</view>
  							<view class="data">
  								<view class="title">
  									<text>个人信息</text>
  								</view>
  							</view>
  						</view>
  						<view class="more">
  							<text class="iconfont icon-more"></text>
  						</view>
  					</view>
  					<view class="list" @click="toFileLook">
  						<view class="icon-data">
  							<view class="icon">
  								<image src="/static/my-icon2.png" mode=""></image>
  							</view>
  							<view class="data">
  								<view class="title">
  									<text>信息回执</text>
  								</view>
  							</view>
  						</view>
  						<view class="more">
  							<text class="iconfont icon-more"></text>
  						</view>
  					</view>
  					<view class="list" @click="demand">
  						<view class="icon-data">
  							<view class="icon">
  								<image src="/static/my-icon3.png" mode=""></image>
  							</view>
  							<view class="data">
  								<view class="title">
  									<text>我的需求</text>
  								</view>
  							</view>
  						</view>
  						<view class="more">
  							<text class="iconfont icon-more"></text>
  						</view>
  					</view>
  					<view class="list" @click="zhao()">
  						<view class="icon-data">
  							<view class="icon">
  								<image src="/static/my-icon4.png" mode=""></image>
  							</view>
  							<view class="data">
  								<view class="title">
  									<text>我的招聘</text>
  								</view>
  							</view>
  						</view>
  						<view class="more">
  							<text class="iconfont icon-more"></text>
  						</view>
  					</view>
  					<view class="list" @click="supply">
  						<view class="icon-data">
  							<view class="icon">
  								<image src="/static/my-icon5.png" mode=""></image>
  							</view>
  							<view class="data">
  								<view class="title">
  									<text>我的产品</text>
  								</view>
  							</view>
  						</view>
  						<view class="more">
  							<text class="iconfont icon-more"></text>
  						</view>
  					</view>
e6b161ae   易尊强   2/23
172
  					<view class="list" @click="toMyCom" v-show="isAdmin">
132aa3e8   易尊强   ss
173
174
175
176
177
178
179
180
181
182
183
184
185
  						<view class="icon-data">
  							<view class="icon">
  								<image src="/static/my-icon5.png" mode=""></image>
  							</view>
  							<view class="data">
  								<view class="title">
  									<text>我的企业</text>
  								</view>
  							</view>
  						</view>
  						<view class="more">
  							<text class="iconfont icon-more"></text>
  						</view>
e6b161ae   易尊强   2/23
186
  					</view>
290144e9   易尊强   第一次
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
  					<!-- <view class="list">
  					<view class="icon-data">
  						<view class="icon">
  							<image src="/static/my-icon6.png" mode=""></image>
  						</view>
  						<view class="data">
  							<view class="title">
  								<text>意见反馈</text>
  							</view>
  						</view>
  					</view>
  					<view class="more">
  						<text class="iconfont icon-more"></text>
  					</view>
  				</view> -->
  
  				</view>
  			</view>
  		</view>
  		<!-- tabbar -->
  		<TabBar :tabBarShow="1"></TabBar>
  	</view>
  </template>
  
  <script>
  	import request from '@/utils/request.js'
  	import TabBar from '../../components/TabBar/TabBar.vue';
  	export default {
  		components: {
  			TabBar,
  		},
  		data() {
  			return {
  				scrollTop: 0,
  				isHotline: false,
  				userId: '',
  				userName: '',
  				userIcon: '',
  				organizeName: '',
  				// 判断用户是否是公司成员
  				// isCompany:false,
  				// 判断用户是否有公司logo
  				isLogo: false,
  				// 是否有头像
  				isHead: false,
  				baseUrl: 'http://deyanggaoxin.fengshiyun.com',
  				// 产品数量
  				proCount: '',
  				// 需求数量
  				demandCount: '',
  				// 招聘数量
132aa3e8   易尊强   ss
238
239
  				zhaoPCount: '',
  				// 企业数量
e6b161ae   易尊强   2/23
240
241
  				com:'',
  				isAdmin:false
290144e9   易尊强   第一次
242
243
244
245
246
247
248
  			};
  		},
  		onLoad() {
  			this.getUser()
  			this.getSelfProCount()
  			this.getSelfDemandCount()
  			this.getSelfZhaoCount()
132aa3e8   易尊强   ss
249
  			this.getSelfCom()
290144e9   易尊强   第一次
250
251
252
253
254
255
256
257
258
259
260
  		},
  		onReady() {
  			uni.hideTabBar();
  		},
  		methods: {
  			// 获取用户信息
  			getUser() {
  				if (uni.getStorageSync('user')) {
  					let userCode = uni.getStorageSync('user')
  					// console.log("用户的code", this.userCode)
  					this.userId = userCode.userInfo.userId
e6b161ae   易尊强   2/23
261
262
263
  					if(this.userId === 'admin'){
  						this.isAdmin = true
  					}
290144e9   易尊强   第一次
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
  					this.userName = userCode.userInfo.userAccount
  					this.userIcon = userCode.userInfo.headIcon
  					this.organizeName = userCode.userInfo.organizeName
  					this.isCompany = userCode.userInfo.isCompany
  					console.log(userCode)
  				} else {
  					uni.showToast({
  						title: '请登录',
  						icon: 'none'
  					})
  					setTimeout(() => {
  						uni.reLaunch({
  							url: '/pages/login/index'
  						})
  					})
  				}
  			},
  			// 跳转到个人信息页面
  			toPerson(){
  				uni.navigateTo({
  					url:"/pages/my/personalData/index"
  				})
  			},
  			// 跳转到个人产品页面
  			supply() {
  				uni.navigateTo({
  					url: "/pages/my/myPro/myPro"
  				})
  			},
  			// 跳转到个人需求页面
  			demand() {
  				uni.navigateTo({
  					url: '/pages/my/myDemand/myDemand'
  				})
  			},
  			// 跳转到个人招聘页面
  			zhao() {
  				uni.navigateTo({
  					url: '/pages/my/myZhao/myZhao'
  				})
  			},
  			toFileLook() {
  				uni.navigateTo({
  					url: '/pages/fileLook/fileLook'
  				})
  			},
132aa3e8   易尊强   ss
310
311
312
313
314
315
  			// 发布企业列表页面
  			toMyCom(){
  				uni.navigateTo({
  					url:'/pages/my/myCom/myCom'
  				})
  			},
290144e9   易尊强   第一次
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
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
  			// 获取自己发布的产品
  			getSelfProCount() {
  				request({
  					url: this.baseUrl + '/api/Extend/baseproduct',
  					method: 'get',
  					data: {}
  				}).then(res => {
  					if (res.code === 200) {
  						console.log(res)
  						this.proCount = res.data.list.length
  					} else {
  						uni.showToast({
  							icon: "error",
  							title: res.msg
  						})
  					}
  				})
  			},
  
  			// 获取自己发布的需求
  			getSelfDemandCount() {
  				request({
  					url: this.baseUrl + '/api/Extend/demandrelease',
  					method: 'get',
  					data: {}
  				}).then(res => {
  					if (res.code === 200) {
  						// console.log(res.data.list.length ,"需求数量")
  						this.demandCount = res.data.list.length
  					} else {
  						uni.showToast({
  							icon: "error",
  							title: res.msg
  						})
  					}
  				})
  			},
  			// 获取自己发布的招聘
  			getSelfZhaoCount() {
  				request({
  					url: this.baseUrl + '/api/Extend/basetalentrecruitment',
  					method: 'get',
  					data: {}
  				}).then(res => {
  					if (res.code === 200) {
  						console.log(res)
  						this.zhaoPCount = res.data.list.length
  					} else {
  						uni.showToast({
  							icon: "error",
  							title: res.msg
  						})
  					}
  				})
  			},
132aa3e8   易尊强   ss
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
  			// 获取自己发布的企业
  			getSelfCom() {
  				request({
  					url: this.baseUrl + '/api/SubDev/baseenterprisemanager',
  					method: 'get',
  					data: {}
  				}).then(res => {
  					if (res.code === 200) {
  						console.log(res)
  						this.com = res.data.list.length
  					} else {
  						uni.showToast({
  							icon: "error",
  							title: res.msg
  						})
  					}
  				})
  			},
290144e9   易尊强   第一次
389
390
391
392
393
394
395
  		}
  	}
  </script>
  
  <style scoped lang="scss">
  	@import 'my.scss';
  </style>