From 1a3572800f3e18a026a4114b4834d534b32edf11 Mon Sep 17 00:00:00 2001 From: zhangwentao <09094219www> Date: Tue, 29 Oct 2024 16:00:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/train.js | 9 +++ components/zx-video/zx-video.vue | 15 ++-- pages/home/home.vue | 22 +++--- pages/mine/edit-info.vue | 76 ++++++++++++++++++-- pages/mine/mine.vue | 45 +++++++++--- pages/news/course.vue | 8 ++- pages/news/news-topic-cate.vue | 4 +- utils/lib/code.js | 118 +++++++++++++++++++++++-------- utils/lib/request.js | 108 +++++++++++++++++++++------- 9 files changed, 314 insertions(+), 91 deletions(-) diff --git a/api/train.js b/api/train.js index ec3fe5c..6897c66 100644 --- a/api/train.js +++ b/api/train.js @@ -50,3 +50,12 @@ export const assetInfo = (query) => { } +// 轮播图 +export const bannerList = (query) => { + return apiResquest({ + url: 'v1/banner.list', + method: 'get', + query: query + }) +} + diff --git a/components/zx-video/zx-video.vue b/components/zx-video/zx-video.vue index 5b9471e..fe58236 100644 --- a/components/zx-video/zx-video.vue +++ b/components/zx-video/zx-video.vue @@ -63,7 +63,7 @@ // 唤起倍速操作 showSpeedOptions() { this.showSpeedModal = true; - }, + }, // 隐藏倍速操作 hideSpeedOptions() { this.showSpeedModal = false; @@ -100,11 +100,11 @@ orientation: 'portrait' }); } - uni.showToast({ - title: that.fullScreen ? '开启全屏' : '关闭全屏', - icon: 'none', - duration: 1500 - }); + // uni.showToast({ + // title: that.fullScreen ? '开启全屏' : '关闭全屏', + // icon: 'none', + // duration: 1500 + // }); }, } } @@ -134,7 +134,8 @@ } .video-heizith-menu { - position: absolute; + /* position: absolute; */ + position: fixed; right: 30rpx; bottom: 20%; z-index: 998; diff --git a/pages/home/home.vue b/pages/home/home.vue index 53b6f62..79a408f 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -2,7 +2,7 @@ - + { + this.swiperList = res.data + }) + }, search() { this.page = 1 this.assetList = [] @@ -151,7 +157,7 @@ if (!res.data.train) { uni.showModal({ title: '提示', - content: '请先选择技能培训意向表', + content: '请选择技能培训意向', success: function(res) { uni.navigateTo({ url: '/pages/home/train' diff --git a/pages/mine/edit-info.vue b/pages/mine/edit-info.vue index 1f5ac74..fcf2ac9 100644 --- a/pages/mine/edit-info.vue +++ b/pages/mine/edit-info.vue @@ -5,6 +5,10 @@ + + * + 姓名 + @@ -12,6 +16,10 @@ + + * + 身份证号 + @@ -19,6 +27,10 @@ + + * + 手机号 + @@ -26,6 +38,10 @@ + + * + 性别 + {{userInfo.sex?sexList[userInfo.sex-1]:''}} @@ -33,6 +49,10 @@ + + * + 生日 + {{userInfo.birthday}} @@ -40,6 +60,10 @@ + + * + 学历 + {{userInfo.degree?educationList[userInfo.degree-1]:''}} @@ -47,6 +71,10 @@ + + * + 政治面貌 + {{userInfo.political?politicalList[userInfo.political-1]:''}} @@ -54,6 +82,10 @@ + + * + 安置地 + {{userInfo.to_province_name}}{{userInfo.to_city_name}}{{userInfo.to_area_name}} @@ -62,6 +94,10 @@ + + * + 现居住地 + {{userInfo.reside_province_name}}{{userInfo.reside_city_name}}{{userInfo.reside_area_name}} @@ -69,6 +105,10 @@ + + * + 详细地址 + @@ -76,6 +116,10 @@ + + * + 入伍时间 + {{userInfo.join_time}} @@ -83,6 +127,10 @@ + + * + 退役时间 + {{userInfo.retire_time}} @@ -90,6 +138,10 @@ + + * + 人员类别 + {{userInfo.category?categoryList[userInfo.category-1]:''}} @@ -97,6 +149,10 @@ + + * + 健康状态 + {{ userInfo.health?healthList[userInfo.health-1]:''}} @@ -104,7 +160,11 @@ - + + * + 职业技能培训意向 + + @@ -219,11 +279,17 @@ } }, onLoad(options) { - console.log(options, ''); + var that = this if (options.type && options.type == 'register') { - this.userInfo.org_id = 1 - this.userInfo.code = options.code - this.pageType = options.type + that.userInfo.org_id = 1 + that.pageType = options.type + uni.login({ + success(res) { + if (res.errMsg == "login:ok") { + that.userInfo.code = res.code + } + } + }) uni.setNavigationBarTitle({ title: '用户注册' }); diff --git a/pages/mine/mine.vue b/pages/mine/mine.vue index 24d7c2b..1fcc921 100644 --- a/pages/mine/mine.vue +++ b/pages/mine/mine.vue @@ -4,8 +4,9 @@ - - + + {{userInfo.name}} @@ -25,8 +26,10 @@ --> - - + + + @@ -42,8 +45,10 @@ import { userInfo, fileGet, - } from '@/api/login.js' + import { + bannerList + } from '@/api/train.js' export default { data() { return { @@ -81,7 +86,7 @@ { icon: 'iconshezhi1', - name: '我的设置', + name: '修改资料', url: 'set' }, { @@ -97,9 +102,13 @@ } ], userInfo: {}, - flieList: {} + flieList: {}, + swiperList: [], } }, + onLoad() { + this.getBannerList() + }, onShow() { this.getUserInfo() this.getFileGet() @@ -109,11 +118,20 @@ this.goSet() }, methods: { + + getBannerList() { + bannerList({ + position: 'mine', + org_id: getApp().globalData.org_id + }).then(res => { + this.swiperList = res.data + }) + }, getFileGet() { fileGet().then(res => { this.flieList = res.data - - + + }) }, getUserInfo() { @@ -123,7 +141,7 @@ }) }, goSet() { - this.$u.route('/pages/mine/set') + this.$u.route('/pages/mine/edit-info') }, goPage(type) { switch (type) { @@ -131,7 +149,7 @@ this.$u.route('/pages/mine/' + type) break; case 'set': - this.$u.route('/pages/mine/' + type) + this.$u.route('/pages/mine/edit-info') break; case 'file2': this.downloadFile(this.flieList.file2) @@ -227,6 +245,11 @@ border-radius: 100%; } + .wrap-cards { + width: 92%; + margin: 0 auto; + } + .adv-img { height: 200rpx; width: 100%; diff --git a/pages/news/course.vue b/pages/news/course.vue index 4dc1da6..7c9b665 100644 --- a/pages/news/course.vue +++ b/pages/news/course.vue @@ -1,6 +1,9 @@