Blame view

pages/my/my.vue 13.2 KB
290144e9   易尊强   第一次
1
2
3
4
5
6
7
  <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">
9b1c150c   “wangming”   1
8
  				<image src="../../static/logo_new.png" mode="widthFix"></image>
290144e9   易尊强   第一次
9
  			</view>
132aa3e8   易尊强   ss
10
  			<view class="mian-box" style="position: relative;z-index: 2;">
290144e9   易尊强   第一次
11
12
13
14
15
16
  				<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>
6c679290   易尊强   3/6a上午
17
  							<image src="../../static/790.jpg"></image>
290144e9   易尊强   第一次
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>
  						<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>
bd028579   易尊强   2/28
69
  						<view class="line"></view>
9b1c150c   “wangming”   1
70
71
  						<view class="list" @click="toMessage()" style="position: relative;">
  							<span class="notRead" v-show="msg1Show">{{msg1}}</span>
bd028579   易尊强   2/28
72
73
74
75
76
77
78
  							<view class="thumb">
  								{{message}}
  							</view>
  							<view class="name">
  								<text>消息</text>
  							</view>
  						</view>
e6b161ae   易尊强   2/23
79
  						<!-- <view class="line"></view>
132aa3e8   易尊强   ss
80
81
82
83
84
85
86
  						<view class="list" @click="toMyCom()">
  							<view class="thumb">
  								{{com}}
  							</view>
  							<view class="name">
  								<text>企业</text>
  							</view>
e6b161ae   易尊强   2/23
87
  						</view> -->
290144e9   易尊强   第一次
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
  					</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">
9b1c150c   “wangming”   1
123
  						<view class="icon-data" >
290144e9   易尊强   第一次
124
125
126
  							<view class="icon">
  								<image src="/static/my-icon2.png" mode=""></image>
  							</view>
9b1c150c   “wangming”   1
127
  							<view class="data" style="position: relative;">
290144e9   易尊强   第一次
128
129
130
  								<view class="title">
  									<text>信息回执</text>
  								</view>
9b1c150c   “wangming”   1
131
  								<span class="notRead" v-show="msg2Show" style="right: -30rpx;top: -10rpx;">{{msg2}}</span>
290144e9   易尊强   第一次
132
  							</view>
9b1c150c   “wangming”   1
133
  							
290144e9   易尊强   第一次
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
172
173
174
175
176
177
178
179
180
181
182
183
  						</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
184
  					<view class="list" @click="toMyCom" v-show="isAdmin">
132aa3e8   易尊强   ss
185
186
187
188
189
190
191
192
193
194
195
196
197
  						<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
198
  					</view>
290144e9   易尊强   第一次
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
238
239
240
241
242
243
  					<!-- <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,
9b1c150c   “wangming”   1
244
  				baseUrl: 'https://www.dygxq-es.cn',
290144e9   易尊强   第一次
245
246
247
248
249
  				// 产品数量
  				proCount: '',
  				// 需求数量
  				demandCount: '',
  				// 招聘数量
132aa3e8   易尊强   ss
250
251
  				zhaoPCount: '',
  				// 企业数量
e6b161ae   易尊强   2/23
252
  				com:'',
bd028579   易尊强   2/28
253
254
  				// 消息数量
  				message:'',
9b1c150c   “wangming”   1
255
256
257
258
259
260
261
262
  				isAdmin:false,
  				// 消息未读数量
  				msg1:0,
  				// 信息回执未回复数量
  				msg2:0,
  				// 是否显示消息提醒
  				msg1Show:false,
  				msg2Show:false,
290144e9   易尊强   第一次
263
264
  			};
  		},
6c679290   易尊强   3/6a上午
265
266
267
268
269
270
271
272
273
274
275
276
277
  		// onLoad() {
  		// 	this.getUser()
  		// 	this.getSelfProCount()
  		// 	this.getSelfDemandCount()
  		// 	this.getSelfZhaoCount()
  		// 	this.getSelfCom()
  		// 	if(this.isAdmin){
  		// 		this.getAdminNoticeTell()
  		// 	}else{
  		// 		this.getNoticeTell()
  		// 	}
  		// },
  		onShow() {
290144e9   易尊强   第一次
278
279
280
281
  			this.getUser()
  			this.getSelfProCount()
  			this.getSelfDemandCount()
  			this.getSelfZhaoCount()
132aa3e8   易尊强   ss
282
  			this.getSelfCom()
5bbfac44   易尊强   28号下午提交
283
284
  			if(this.isAdmin){
  				this.getAdminNoticeTell()
9b1c150c   “wangming”   1
285
  				this.getAdminAppealList()
5bbfac44   易尊强   28号下午提交
286
287
  			}else{
  				this.getNoticeTell()
9b1c150c   “wangming”   1
288
  				this.getAppealList()
5bbfac44   易尊强   28号下午提交
289
  			}
290144e9   易尊强   第一次
290
291
292
293
294
295
296
297
298
299
300
  		},
  		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
301
302
303
  					if(this.userId === 'admin'){
  						this.isAdmin = true
  					}
290144e9   易尊强   第一次
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
  					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'
  						})
  					})
  				}
  			},
bd028579   易尊强   2/28
321
322
323
324
325
  			// 获取消息通知
  			getNoticeTell(){
  				request({
  					url:'/api/extend/demo/GetMyMessage',
  					method:'get',
6c679290   易尊强   3/6a上午
326
327
328
  					data:{
  						pageSize:10000
  					}
bd028579   易尊强   2/28
329
330
331
332
  				}).then(res=>{
  					console.log('通知列表',res)
  					if(res.code == 200){
  						this.message = res.data.length
9b1c150c   “wangming”   1
333
334
335
336
337
338
339
340
341
  						let arr = res.data.filter(it=>{
  							return it.MessageInfo.IsRead == 0
  						})
  						this.msg1 = arr.length
  						if(arr.length == 0){
  							this.msg1Show = false
  						}else{
  							this.msg1Show = true
  						}
bd028579   易尊强   2/28
342
343
344
  					}
  				})
  			},
5bbfac44   易尊强   28号下午提交
345
346
347
348
349
  			// 获取消息通知
  			getAdminNoticeTell(){
  				request({
  					url:'/api/extend/demo/GetMessageList',
  					method:'get',
6c679290   易尊强   3/6a上午
350
351
352
  					data:{
  						pageSize:10000
  					}
5bbfac44   易尊强   28号下午提交
353
354
355
356
  				}).then(res=>{
  					console.log('通知列表',res)
  					if(res.code == 200){
  						this.message = res.data.length
9b1c150c   “wangming”   1
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
  						let arr = res.data.filter(it=>{
  							return it.MessageReceiveEntity.IsRead == 0
  						})
  						console.log('arr长度',arr)
  						this.msg1 = arr.length
  						if(arr.length == 0){
  							this.msg1Show = false
  						}else{
  							this.msg1Show = true
  						}
  					}
  				})
  			},
  			// 获取诉求列表
  			getAppealList(){
  				request({
  					url:'/api/Extend/baseappealinformation/GetListByCurrent',
  					method:'get',
  					data:{
  						pageSize:10000,
  						// status:status
  					}
  				}).then(res=>{
  					console.log(res)
  					if(res.code === 200){
  						this.appealList = res.data.list
  						let arr = res.data.list.filter(it=>{
  							return it.status == null
  						})
  						
  						if(arr.length == 0){
  							this.msg2Show = false
  						}else{
  							this.msg2 = arr.length
  							this.msg2Show = true
  						}
  					}
  				})
  			},
  			// 获取诉求列表
  			getAdminAppealList(){
  				request({
  					url:'/api/Extend/baseappealinformation',
  					method:'get',
  					data:{
  						pageSize:10000,
  						// status:status
  					}
  				}).then(res=>{
  					console.log(res)
  					if(res.code === 200){
  						this.appealList = res.data.list
  						let arr = res.data.list.filter(it=>{
  							return it.status == null
  						})
  						
  						if(arr.length == 0){
  							this.msg2Show = false
  						}else{
  							this.msg2 = arr.length
  							this.msg2Show = true
  						}
5bbfac44   易尊强   28号下午提交
419
420
421
  					}
  				})
  			},
290144e9   易尊强   第一次
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
  			// 跳转到个人信息页面
  			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'
  				})
  			},
5bbfac44   易尊强   28号下午提交
446
  			// 跳转到用户诉求回复信息查看
290144e9   易尊强   第一次
447
448
  			toFileLook() {
  				uni.navigateTo({
5bbfac44   易尊强   28号下午提交
449
  					url: '/pages/my/userReponse/userReponse'
290144e9   易尊强   第一次
450
451
  				})
  			},
132aa3e8   易尊强   ss
452
453
454
455
456
457
  			// 发布企业列表页面
  			toMyCom(){
  				uni.navigateTo({
  					url:'/pages/my/myCom/myCom'
  				})
  			},
bd028579   易尊强   2/28
458
459
460
  			// 跳转到自己的消息列表
  			toMessage(){
  				console.log('111')
5bbfac44   易尊强   28号下午提交
461
462
463
464
465
466
467
468
469
470
  				if(!this.isAdmin){
  					uni.navigateTo({
  						url:'/pages/my/messageList/messageList'
  					})
  				}else{
  					uni.navigateTo({
  						url:'/pages/my/adminMessageList/adminMessageList'
  					})
  				}
  				
bd028579   易尊强   2/28
471
  			},
290144e9   易尊强   第一次
472
473
474
475
476
  			// 获取自己发布的产品
  			getSelfProCount() {
  				request({
  					url: this.baseUrl + '/api/Extend/baseproduct',
  					method: 'get',
6c679290   易尊强   3/6a上午
477
478
479
  					data: {
  						pageSize:10000
  					}
290144e9   易尊强   第一次
480
481
  				}).then(res => {
  					if (res.code === 200) {
290144e9   易尊强   第一次
482
  						this.proCount = res.data.list.length
6c679290   易尊强   3/6a上午
483
  						console.log('产品数量',this.proCount,res.data.list)
290144e9   易尊强   第一次
484
485
486
487
488
489
490
491
492
493
494
495
496
497
  					} else {
  						uni.showToast({
  							icon: "error",
  							title: res.msg
  						})
  					}
  				})
  			},
  
  			// 获取自己发布的需求
  			getSelfDemandCount() {
  				request({
  					url: this.baseUrl + '/api/Extend/demandrelease',
  					method: 'get',
6c679290   易尊强   3/6a上午
498
499
500
  					data: {
  						pageSize:10000
  					}
290144e9   易尊强   第一次
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
  				}).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',
6c679290   易尊强   3/6a上午
518
519
520
  					data: {
  						pageSize:10000
  					}
290144e9   易尊强   第一次
521
522
523
524
525
526
527
528
529
530
531
532
  				}).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
533
534
535
536
537
  			// 获取自己发布的企业
  			getSelfCom() {
  				request({
  					url: this.baseUrl + '/api/SubDev/baseenterprisemanager',
  					method: 'get',
6c679290   易尊强   3/6a上午
538
539
540
  					data: {
  						pageSize:10000
  					}
132aa3e8   易尊强   ss
541
542
543
544
545
546
547
548
549
550
551
552
  				}).then(res => {
  					if (res.code === 200) {
  						console.log(res)
  						this.com = res.data.list.length
  					} else {
  						uni.showToast({
  							icon: "error",
  							title: res.msg
  						})
  					}
  				})
  			},
290144e9   易尊强   第一次
553
554
555
556
557
558
  		}
  	}
  </script>
  
  <style scoped lang="scss">
  	@import 'my.scss';
9b1c150c   “wangming”   1
559
560
561
562
563
564
565
566
567
568
569
  	.notRead{
  		position: absolute;
  		top: 0;
  		right: 30rpx;
  		background-color: #e60012;
  		border-radius: 50%;
  		font-size: 18rpx;
  		padding: 4rpx 8rpx;
  		color: white;
  		font-weight: bold;
  	}
290144e9   易尊强   第一次
570
  </style>