From f5998f8dc5b9820ec889dd62fb6bb1f90dcf453f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B2=B3=E9=B9=8F=E9=BE=99?= <1547476325@qq.com> Date: Sat, 17 May 2025 18:18:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .env.production | 4 +- src/api/index.ts | 67 +++++ src/api/learningCenter.ts | 62 ++++ src/api/login.ts | 30 +- src/api/mine.ts | 19 ++ src/api/user.ts | 41 +-- src/manifest.json | 7 +- src/pages.json | 366 ++++++++++++----------- src/pages/index/ChatDialog.vue | 263 ++++++++++++++++ src/pages/index/index.vue | 80 ++++- src/pages/index/specialSubject.vue | 380 ++++++++++++++++-------- src/pages/index/ztdetail.vue | 47 +-- src/pages/learningCenter/detail.vue | 58 ++-- src/pages/learningCenter/index.vue | 179 +++++++---- src/pages/learningCenter/useTimeDiff.js | 31 ++ src/pages/login/login.vue | 27 +- src/pages/memberCenter/index.vue | 166 ++++++++++- src/pages/mine/associatedDetail.vue | 93 ++++++ src/pages/mine/associatedEnterprise.vue | 76 +++++ src/pages/mine/completeInformation.vue | 279 +++++++++++++++++ src/pages/mine/index.vue | 77 ++++- src/pages/mine/myApplication.vue | 187 ++++++++++++ src/pages/mine/myCourses.vue | 103 +++++++ src/pages/mine/porsonalinfo.vue | 255 ++++++++++++---- src/static/img/aiicon.png | Bin 0 -> 93492 bytes src/static/img/daan.png | Bin 0 -> 505 bytes src/static/img/timeicon.png | Bin 0 -> 732 bytes src/static/img/yyzz.png | Bin 0 -> 473 bytes src/store/user.ts | 189 ++++++------ src/utils/http.ts | 9 +- 31 files changed, 2427 insertions(+), 670 deletions(-) create mode 100644 src/api/index.ts create mode 100644 src/api/learningCenter.ts create mode 100644 src/api/mine.ts create mode 100644 src/pages/index/ChatDialog.vue create mode 100644 src/pages/learningCenter/useTimeDiff.js create mode 100644 src/pages/mine/associatedDetail.vue create mode 100644 src/pages/mine/associatedEnterprise.vue create mode 100644 src/pages/mine/completeInformation.vue create mode 100644 src/pages/mine/myApplication.vue create mode 100644 src/pages/mine/myCourses.vue create mode 100644 src/static/img/aiicon.png create mode 100644 src/static/img/daan.png create mode 100644 src/static/img/timeicon.png create mode 100644 src/static/img/yyzz.png diff --git a/.env.development b/.env.development index 4ed7ec7..b4395db 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ ENV='development' # base api -VITE_APP_BASE_URL = 'https://evote.truescloud.com' +VITE_APP_BASE_URL = 'https://hqt.truescloud.com' VITE_APP_BASE_PRE = '/dev-api' VITE_APP_BASE_NAME = 'POS' diff --git a/.env.production b/.env.production index 6ca60a8..3ef55db 100644 --- a/.env.production +++ b/.env.production @@ -1,6 +1,6 @@ ENV='production' # base api -VITE_APP_BASE_URL = 'http://pos-api.lingji.vip' -VITE_APP_BASE_PRE = 'http://pos-api.lingji.vip' +VITE_APP_BASE_URL = 'https://hqt.truescloud.com' +VITE_APP_BASE_PRE = 'https://hqt.truescloud.com' VITE_APP_BASE_NAME = 'POS' diff --git a/src/api/index.ts b/src/api/index.ts new file mode 100644 index 0000000..3108710 --- /dev/null +++ b/src/api/index.ts @@ -0,0 +1,67 @@ +import { request } from '@/utils/http' + +//首页专题 +export function homeSpecial() { + return request.http({ + url: '/api/huiqitong/home_special', + method: 'GET' + }) +} + +//banner列表 +export function bannerList() { + return request.http({ + url: '/api/huiqitong/banner_list', + method: 'GET' + }) +} + +//banner详情 +export function bannerInfo(id:string) { + return request.http({ + url: '/api/huiqitong/banner_info/'+id, + method: 'GET' + }) +} + +//活动列表 +export function activityList(page: string,limit: string) { + return request.http({ + url: '/api/huiqitong/activity_list?page='+page+'&limit='+limit, + method: 'GET' + }) +} + +//专题详情 +export function specialInfo(id: string) { + return request.http({ + url: '/api/huiqitong/special_info?special_id='+id, + method: 'GET' + }) +} + +//专题内容列表 +export function specialList(id: string) { + return request.http({ + url: '/api/huiqitong/special_list?special_id=1&page=1&limit=10', + method: 'GET' + }) +} + +//专题内容详情 +export function specialListInfo(id: string) { + return request.http({ + url: '/api/huiqitong/special_list_info/'+id, + method: 'GET' + }) +} + +//ai客服 +export function ai(data: any) { + return request.http({ + url: '/api/huiqitong/ai', + method: 'POST', + data + }) +} + diff --git a/src/api/learningCenter.ts b/src/api/learningCenter.ts new file mode 100644 index 0000000..bef21e9 --- /dev/null +++ b/src/api/learningCenter.ts @@ -0,0 +1,62 @@ +import { request } from '@/utils/http' + +//我的学习清单 +export function myStudy() { + return request.http({ + url: '/api/huiqitong/my_study', + method: 'GET' + }) +} + +//学习中心列表 +export function studyCenter(recommend:string,title:string,type:string,page:string,limit:string) { + return request.http({ + url: '/api/huiqitong/study_center?recommend='+recommend+'&title='+title+'&s_type='+type+'&page='+page+'&limit='+limit, + method: 'GET' + }) +} + +//学习中心详情 +export function studyCenterDetail(id:string) { + return request.http({ + url: '/api/huiqitong/study_center/'+id, + method: 'GET' + }) +} + +//收藏学习 +export function collect(data:{item_id:string}) { + return request.http({ + url: '/api/huiqitong/collect', + method: 'POST', + data + }) +} + +//取消收藏 +export function removeCollect(data:{item_id:string}) { + return request.http({ + url: '/api/huiqitong/remove_collect', + method: 'POST', + data + }) +} + +//增加观看次数 +export function watchCount(data:{id:string}) { + return request.http({ + url: '/api/huiqitong/watch_count', + method: 'POST', + data + }) +} + +//观看进度记录 +export function studyRecord(data:any) { + return request.http({ + url: '/api/huiqitong/study_record', + method: 'POST', + data + }) +} + diff --git a/src/api/login.ts b/src/api/login.ts index a98c560..60af2c7 100644 --- a/src/api/login.ts +++ b/src/api/login.ts @@ -2,38 +2,14 @@ import { request } from '@/utils/http' export function getOpenid(data: { code: string }) { return request.http({ - url: '/api/openid', + url: '/api/huiqitong/get_openid', data }) } -export function getMobile(data: { code: string; openid: string }) { +export function mobileAuth(data: { code: string; openid: string }) { return request.http({ - url: '/api/mobile', + url: '/api/huiqitong/mobile_auth', data }) } - -export function getAdminPhone() { - return request.http({ - url: '/api/admin_mobile', - method: 'GET' - }) -} -//用户签到 -export function getSign(data: { meetId: string; openid: string }) { - return request.http({ - url: '/api/sign', - method: 'GET', - data - }) -} - -//扫码时手机号获取用户信息 -export function getmemberMobileGet(data: { meetId: string; openid: string; mobile: string }) { - return request.http({ - url: '/api/member_mobile_get', - method: 'GET', - data - }) -} \ No newline at end of file diff --git a/src/api/mine.ts b/src/api/mine.ts new file mode 100644 index 0000000..beefd1c --- /dev/null +++ b/src/api/mine.ts @@ -0,0 +1,19 @@ +import { request } from '@/utils/http' + +//修改用户信息(单项) +export function modifyField(field:string,value:string) { + return request.http({ + url: '/api/huiqitong/modify/'+ field +'?value=' + value, + method: 'PUT' + }) +} + +//图片上传 +export function updataImage(data:any) { + return request.http({ + url: '/api/file/image', + method: 'POST', + data + }) +} + diff --git a/src/api/user.ts b/src/api/user.ts index 81ce8ce..6668734 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -14,48 +14,17 @@ export interface dateListtype extends listType { id: number } -export function infoForOpenid(data: { openid: string; mobile: string ; meetId: string }) { +export function infoForOpenid() { return request.http({ - url: '/api/member_mobile_get', + url: '/api/huiqitong/member/info', method: 'GET', - data }) } - -// 手机号获取用户信息 -export function getMember_mobile(data: any) { +export function logout() { return request.http({ - url: '/api/member_mobile', - method: 'GET', - data + url: '/api/huiqitong/logout', + method: 'PUT', }) } -export function list(data: { name: string, meetId: string }) { - return request.http({ - url: '/api/member_name', - method: 'GET', - data - }) -} -export function update(data: { [n: string]: string }, openid: string) { - return request.http({ - url: '/api/member_update', - data: Object.assign(data, { openid }) - }) -} - -export function bind(data: { id: number; openid: string }) { - return request.http({ - url: '/api/name_sub', - data - }) -} - -export function add(data: listType) { - return request.http({ - url: '/api/member_add', - data - }) -} diff --git a/src/manifest.json b/src/manifest.json index 39cca9f..05e431a 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -113,7 +113,12 @@ "postcss" : false, "minified" : true }, - "usingComponents" : true + "usingComponents" : true, + "permission" : { + "scope.userLocation" : { + "desc" : "定位" + } + } }, "mp-alipay" : { "usingComponents" : true diff --git a/src/pages.json b/src/pages.json index 447cd4e..6d4ed84 100644 --- a/src/pages.json +++ b/src/pages.json @@ -1,182 +1,210 @@ { - "easycom": { - "autoscan": true, - "custom": { - "^ex-(.*)": "feng-uniapp-exploit/components/ex-$1/ex-$1.vue", - "^u-(.*)": "uview-plus/components/u-$1/u-$1.vue" - } - }, - "pages": [ - { - "path": "pages/index/index", - "style": { - "navigationBarTitleText": "首页", - "enablePullDownRefresh": true, - "navigationStyle": "custom" - - } - }, - { - "path": "pages/memberCenter/index", - "style": { - "navigationBarTitleText": "会员中心", - "enablePullDownRefresh": true - } - }, - { - "path": "pages/learningCenter/index", - "style": { - "navigationBarTitleText": "学习中心", - "enablePullDownRefresh": true - } - }, - { - "name": "user", - "path": "pages/mine/index", - "style": { - "navigationBarTitleText": "个人中心", - "enablePullDownRefresh": true - } - }, - { - "path": "pages/login/login", - "style": { - "navigationBarTitleText": "登录", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - }, - { - "path" : "pages/index/specialSubject", - "style" : - { - "navigationBarTitleText" : "专题", + "easycom": { + "autoscan": true, + "custom": { + "^ex-(.*)": "feng-uniapp-exploit/components/ex-$1/ex-$1.vue", + "^u-(.*)": "uview-plus/components/u-$1/u-$1.vue" + } + }, + "pages": [{ + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "首页", + "enablePullDownRefresh": false, "navigationStyle": "custom" - } - }, - { - "path" : "pages/index/ztdetail", - "style" : - { - "navigationBarTitleText" : "专题详情页", + + } + }, + { + "path": "pages/memberCenter/index", + "style": { + "navigationBarTitleText": "会员中心", + "enablePullDownRefresh": true + } + }, + { + "path": "pages/learningCenter/index", + "style": { + "navigationBarTitleText": "学习中心", + "enablePullDownRefresh": true + } + }, + { + "name": "user", + "path": "pages/mine/index", + "style": { + "navigationBarTitleText": "个人中心", + "enablePullDownRefresh": true + } + }, + { + "path": "pages/login/login", + "style": { + "navigationBarTitleText": "登录", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + { + "path": "pages/index/specialSubject", + "style": { + "navigationBarTitleText": "专题", "navigationStyle": "custom" - } - }, - { - "path" : "pages/index/shoppage/shopHelp", - "style" : - { - "navigationBarTitleText" : "小店帮", + } + }, + { + "path": "pages/index/ztdetail", + "style": { + "navigationBarTitleText": "专题详情页", "navigationStyle": "custom" - } - }, - { - "path" : "pages/index/shoppage/shophelpDetail", - "style" : - { - "navigationBarTitleText" : "小店帮详情", + } + }, + { + "path": "pages/index/shoppage/shopHelp", + "style": { + "navigationBarTitleText": "小店帮", "navigationStyle": "custom" - } - }, - { - "path" : "pages/index/shoppage/interactiveZone", - "style" : - { - "navigationBarTitleText" : "互动专区", + } + }, + { + "path": "pages/index/shoppage/shophelpDetail", + "style": { + "navigationBarTitleText": "小店帮详情", "navigationStyle": "custom" - } - }, - { - "path" : "pages/index/shoppage/financialAssistance", - "style" : - { - "navigationBarTitleText" : "金融帮", + } + }, + { + "path": "pages/index/shoppage/interactiveZone", + "style": { + "navigationBarTitleText": "互动专区", + "navigationStyle": "custom" + } + }, + { + "path": "pages/index/shoppage/financialAssistance", + "style": { + "navigationBarTitleText": "金融帮", "navigationStyle": "custom" - } - }, - { - "path" : "pages/index/shoppage/jrbDetail", - "style" : - { - "navigationBarTitleText" : "金融帮详情", + } + }, + { + "path": "pages/index/shoppage/jrbDetail", + "style": { + "navigationBarTitleText": "金融帮详情", "navigationStyle": "custom" - } - }, - { - "path" : "pages/index/shoppage/mediaHelp", - "style" : - { - "navigationBarTitleText" : "媒体帮", + } + }, + { + "path": "pages/index/shoppage/mediaHelp", + "style": { + "navigationBarTitleText": "媒体帮", "navigationStyle": "custom" - } - }, - { - "path" : "pages/index/shoppage/mediaDetail", - "style" : - { - "navigationBarTitleText" : "媒体帮详情", + } + }, + { + "path": "pages/index/shoppage/mediaDetail", + "style": { + "navigationBarTitleText": "媒体帮详情", "navigationStyle": "custom" - } - }, - { - "path" : "pages/index/shoppage/mtbmakeMessage", - "style" : - { - "navigationBarTitleText" : "媒体帮发布信息", + } + }, + { + "path": "pages/index/shoppage/mtbmakeMessage", + "style": { + "navigationBarTitleText": "媒体帮发布信息", "navigationStyle": "custom" - } - }, + } + }, //视频图文详情 - { - "path" : "pages/learningCenter/detail", - "style" : - { - "navigationBarTitleText" : "" - } - }, - { - "path" : "pages/mine/porsonalinfo", - "style" : - { - "navigationBarTitleText" : "个人信息" - } - } - ], - "globalStyle": { - "navigationBarTextStyle": "black", - "navigationBarBackgroundColor": "#F1F3F9", - "backgroundColor": "#F8F8F8" - }, - "tabBar": { - "color": "#9CA3AF", - "selectedColor": "#007FFF", - "borderStyle": "white", - "backgroundColor": "#FFFFFF", - "list": [ - { - "pagePath": "pages/index/index", - "iconPath": "static/tabbar/index.png", - "selectedIconPath": "static/tabbar/index_select.png", - "text": "首页" - }, - { - "pagePath": "pages/memberCenter/index", - "iconPath": "static/tabbar/hyzx.png", - "selectedIconPath": "static/tabbar/hyzx_select.png", - "text": "会员中心" - }, - { - "pagePath": "pages/learningCenter/index", - "iconPath": "static/tabbar/xxzx.png", - "selectedIconPath": "static/tabbar/xxzx_select.png", - "text": "学习中心" - }, - { - "pagePath": "pages/mine/index", - "iconPath": "static/tabbar/grzx.png", - "selectedIconPath": "static/tabbar/grzx_select.png", - "text": "个人中心" - } - ] - } + { + "path": "pages/learningCenter/detail", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "pages/mine/porsonalinfo", + "style": { + "navigationBarTitleText": "个人信息" + } + }, + { + "path": "pages/mine/myCourses", + "style": { + "navigationBarTitleText": "我的课程" + } + }, + { + "path": "pages/mine/myApplication", + "style": { + "navigationBarTitleText": "我的申请" + } + }, + { + "path": "pages/mine/associatedEnterprise", + "style": { + "navigationBarTitleText": "关联企业" + } + }, + { + "path": "pages/mine/associatedDetail", + "style": { + "navigationBarTitleText": "关联企业详情" + } + }, + { + "path" : "pages/mine/completeInformation", + "style" : + { + "navigationBarTitleText" : "信息完善" + } + } + ], + "permission": { + "scope.userLocation": { + "desc": "获取位置" + } + }, + "requiredPrivateInfos": [ + "getLocation", + "onLocationChange", + "startLocationUpdateBackground", + "chooseAddress" + ], + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarBackgroundColor": "#F1F3F9", + "backgroundColor": "#F8F8F8" + }, + "tabBar": { + "color": "#9CA3AF", + "selectedColor": "#007FFF", + "borderStyle": "white", + "backgroundColor": "#FFFFFF", + "list": [{ + "pagePath": "pages/index/index", + "iconPath": "static/tabbar/index.png", + "selectedIconPath": "static/tabbar/index_select.png", + "text": "首页" + }, + { + "pagePath": "pages/memberCenter/index", + "iconPath": "static/tabbar/hyzx.png", + "selectedIconPath": "static/tabbar/hyzx_select.png", + "text": "会员中心" + }, + { + "pagePath": "pages/learningCenter/index", + "iconPath": "static/tabbar/xxzx.png", + "selectedIconPath": "static/tabbar/xxzx_select.png", + "text": "学习中心" + }, + { + "pagePath": "pages/mine/index", + "iconPath": "static/tabbar/grzx.png", + "selectedIconPath": "static/tabbar/grzx_select.png", + "text": "个人中心" + } + ] + } } \ No newline at end of file diff --git a/src/pages/index/ChatDialog.vue b/src/pages/index/ChatDialog.vue new file mode 100644 index 0000000..4121e63 --- /dev/null +++ b/src/pages/index/ChatDialog.vue @@ -0,0 +1,263 @@ + + + + + \ No newline at end of file diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 4541538..6d7739c 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -3,7 +3,7 @@ @leftClick="leftClick"> - + diff --git a/src/pages/index/specialSubject.vue b/src/pages/index/specialSubject.vue index 7407f69..b6d217d 100644 --- a/src/pages/index/specialSubject.vue +++ b/src/pages/index/specialSubject.vue @@ -1,8 +1,8 @@