diff --git a/common/ApiConstant.js b/common/ApiConstant.js index 1c6a7ef..865c8ed 100644 --- a/common/ApiConstant.js +++ b/common/ApiConstant.js @@ -8,8 +8,8 @@ export default { majorList: '/yx/yxMajor/list',//获取专业信息表-分页列表查询 majorInfo: '/mini/major/majorInfo',//获取专业详情 miniMajorList: '/mini/major/miniMajorList',//专业列表 - calculateInvestment: '/mini/recommendMajor/calculateInvestment',//投档分测算 - testCultural: '/mini/recommendMajor/testCultural',//文化分测算 + calculateInvestment: '/mini/major/calculateInvestment',//投档分测算 + testCultural: '/mini/major/testCultural',//文化分测算 groupByBatchNumber:'/mini/major/groupByBatchNumber',//获取各个批次是否有专业 rulesEnrollrobabilityMenuList: '/mini/major/rulesEnrollrobabilityMenuList', schoolMajorListByBatchAndMajorType: '/mini/major/schoolMajorListByBatchAndMajorType',//智能填报页面获取专业列表 @@ -22,18 +22,18 @@ export default { //用户类 User: { exchangeVipCard: '/yx/yxVipCard/exchange',//兑换vip卡 - login:'/mini/user/login',//密码登录 + login:'/mini/user/v1/login',//密码登录 userInfo: '/wx/userInfo', - register:'/mini/user/register',//注册 + register:'/mini/user/v1/register',//注册 //微信 - wxLogin: '/mini/user/phoneLogin',//手机号快捷登录 + wxLogin: '/mini/user/v1/wechatLogin',//手机号快捷登录 wxQrCodeStatus:'/wx/user/getQrCodeStatus',//获取微信二维码登录 状态 wxQrCodeUpdateStatus:'/wx/user/updateQrCodeStatus',//更新微信二维码登录 状态 wxQrCodeExit:'/wx/user/cancelQrCode',//取消微信二维码登录 //=================================================================抖音 - dyLogin:'/mini/user/dy/login',//抖音登录 - dyCheckBindPhone :'/mini/user/dy/checkBindPhone',//抖音判断手机号绑定 - dyBindPhone :'/mini/user/dy/bindPhone',//抖音判断手机号绑定 + dyLogin:'/mini/user/v1/dyLogin',//抖音登录 + dyCheckBindPhone :'/mini/user/v1/dyCheckBindPhone',//抖音判断手机号绑定 + dyBindPhone :'/mini/user/v1/dyBindPhone',//抖音判断手机号绑定 }, System: { findPassWord: '/sys/findPassWord',//找回密码 @@ -80,11 +80,11 @@ export default { vip1: '/mini/pay/v1/jsApiPay',//支付类型1 }, VIP: { - cardActivation: '/mini/vip/card/activation',//卡密兑换 + cardActivation: '/mini/vip/v1/card/activation',//卡密兑换 orderList:'/mini/order/orderList',//获取订单列表 orderDetail: '/mini/order/orderDetail',//获取订单信息 - skuList: '/mini/vip/sku/all',//获取全部商品 - vipInfo: '/mini/vip/getVipInfo',//获取当前用户vip信息 + skuList: '/mini/vip/v1/sku/all',//获取全部商品 + vipInfo: '/mini/vip/v1/getVipInfo',//获取当前用户vip信息 }, Article: { articlePage: '/mini/article/page',//文章列表 diff --git a/common/StaticConstant.js b/common/StaticConstant.js index d9e93e5..d82f24a 100644 --- a/common/StaticConstant.js +++ b/common/StaticConstant.js @@ -1,5 +1,4 @@ import ImagesConstant from "@/common/ImagesConstant"; - export default { systemName: '艺体志愿宝', email:'yitisheng@163.com', @@ -33,7 +32,7 @@ export default { ], //专业选项 professionalCategoryList: [ - {value: '美术与设计类', label: '美术与设计类', scoreMax: 300,}, + {value: '美术与设计类', label: '美术与设计类', scoreMax: 300}, { value: '音乐类', label: '音乐类', scoreMax: 300, children: [ {label: '音乐表演声乐', value: '音乐表演声乐', exclude: '音乐表演器乐'}, @@ -41,8 +40,8 @@ export default { {label: '音乐教育', value: '音乐教育'} ] }, - {value: '舞蹈类', label: '舞蹈类', scoreMax: 300,}, - {value: '播音与主持类', label: '播音与主持类', scoreMax: 300,}, + {value: '舞蹈类', label: '舞蹈类', scoreMax: 300}, + {value: '播音与主持类', label: '播音与主持类', scoreMax: 300}, { value: '表演类', label: '表演类', scoreMax: 300, children: [ {label: '服装表演', value: '服装表演'}, @@ -50,7 +49,7 @@ export default { {label: '戏剧影视表演', value: '戏剧影视表演'} ] }, - {value: '书法类', label: '书法类', scoreMax: 300,}, + {value: '书法类', label: '书法类', scoreMax: 300}, {value: '戏曲类', label: '戏曲类', scoreMax: 300}, {value: '体育类', label: '体育类', scoreMax: 150,}, /*{value: '艺术舞蹈类', label: '艺术舞蹈类', scoreMax: 200}, diff --git a/common/js/commonTool.js b/common/js/commonTool.js index f79bbc9..6986c76 100644 --- a/common/js/commonTool.js +++ b/common/js/commonTool.js @@ -1,4 +1,6 @@ -import Request from '@/common/request' +import Request from '@/common/request'; +import ENV_CONFIG from '@/config/env.js'; +import ApiConstant from "../ApiConstant"; let request = new Request() export default { //调试vip信息 @@ -11,22 +13,29 @@ export default { } }, //刷新vip信息 - reloadVipInfo() { - return request.post('/api/static/data/getJson', { key: key }, { showLoad: false }).then(r => { + reloadVipInfo() { + request.get(ApiConstant.VIP.vipInfo,{},{showLoad:false}).then(r => { + console.log(r) + if (r.success) { + this.checkVipInfo(r.result) + } + }).catch(err => { + }).finally(() => { + }); + }, + async loadStaticConfig(key){ + return request.post('/api/static/data/getJson',{key:key},{showLoad:false}).then(r => { + console.log(r) if (r.success) { - return r.result; - } else { - return {}; + return r.result } }).catch(err => { - console.log('请求:'+key+"时出错:") - console.log(err) - return {}; + return {} }).finally(() => { }); }, - async loadStaticConfig(key){ - return request.post('/api/static/data/getJson',{key:key},{showLoad:false}).then(r => { + async loadStaticConfigParams(key,params){ + return request.post('/api/static/data/getJson',{key:key,...params},{showLoad:false}).then(r => { console.log(r) if (r.success) { return r.result @@ -50,4 +59,10 @@ export default { // return year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds; return year + "-" + month + "-" + day; }, + getSystemName(){ + return ENV_CONFIG[process.env.NAME].name + }, + getPlayerType(){ + return this.getSystemName()==='体育志愿宝'?'体育类':'艺术类' + }, } diff --git a/common/js/jumpTool.js b/common/js/jumpTool.js index 3cc0917..aa45d0e 100644 --- a/common/js/jumpTool.js +++ b/common/js/jumpTool.js @@ -9,6 +9,7 @@ export default{ this.goto('/pages/zyb/login') }, goArticleDetail(e){ + console.log(e) this.goto('/pages/zyb/article/detail?articleId='+e.id) }, /*打开成绩修改界面*/ diff --git a/common/request.js b/common/request.js index 5e4d333..91b24f8 100644 --- a/common/request.js +++ b/common/request.js @@ -1,5 +1,6 @@ /*网络请求*/ -import operate from '@/common/operate' +// import operate from '@/common/operate'; +import ENV_CONFIG from '@/config/env.js'; import {stringIsNotEmpty} from "@/common/util"; import ApiConstant from "@/common/ApiConstant"; // vuex 的使用 详情参考官网 https://uniapp.dcloud.io/vue-vuex @@ -18,15 +19,20 @@ export default class Request { if (param.showLoad===false) { showLoading = false; } - /*hideLoading = param.hideLoading || false; - token = param.token || "",*/ //拼接完整请求地址 - var requestUrl = operate.api + url; - //console.log(requestUrl) + var requestUrl = ENV_CONFIG[process.env.NAME].requestBaseUrl + url; + //拼接完整请求地址(根据环境切换) //请求方式:GET或POST(POST需配置 if (method) { + if(process.env.NAME){ + if(process.env.NAME === 'dy_tiyu_prod'){ + data['programType'] = '体育志愿宝' + }else{ + data['programType'] = '艺体志愿宝' + } + } method = method.toUpperCase(); //小写改为大写 if (method === "POST") { header = {"content-type":'application/json',...header} diff --git a/common/util.js b/common/util.js index b807016..586b54c 100644 --- a/common/util.js +++ b/common/util.js @@ -116,6 +116,7 @@ function yearAbridge(year){ return '未知' } + export { formatTime, formatLocation, diff --git a/main.js b/main.js index be05ed1..6483825 100644 --- a/main.js +++ b/main.js @@ -23,6 +23,7 @@ app.$mount() import { createSSRApp } from 'vue' +import {setSystemName} from "./common/util"; export function createApp() { const app = createSSRApp(App) app.use(store) diff --git a/manifest.json b/manifest.json index 6d10517..1a21a2f 100644 --- a/manifest.json +++ b/manifest.json @@ -135,7 +135,7 @@ "uniStatistics" : { "enable" : true }, - "appid" : "tt59a72f1ac6964bfa01" + "appid" : "tt9a2bec96051c14c001" }, "mp-jd" : { "usingComponents" : true, diff --git a/package-lock.json b/package-lock.json index 733bc2a..2f847bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,26 @@ { "name": "hello-uniapp", "version": "3.4.5", - "lockfileVersion": 1, + "lockfileVersion": 3, "requires": true, - "dependencies": { - "@dcloudio/uni-helper-json": { + "packages": { + "": { + "name": "hello-uniapp", + "version": "3.4.5", + "license": "MIT", + "dependencies": { + "@dcloudio/uni-helper-json": "^1.0.13", + "hello-uniapp": "file:" + } + }, + "node_modules/@dcloudio/uni-helper-json": { "version": "1.0.13", "resolved": "https://registry.npmmirror.com/@dcloudio/uni-helper-json/-/uni-helper-json-1.0.13.tgz", "integrity": "sha512-FO9Iu4zW4td3Tr+eiCDWuele2ehkJ4qxQ/UhpAMLjso+ZdWz6NagK5Syh6cdy1hoDqbxpNoqnLynuJXe81Ereg==" + }, + "node_modules/hello-uniapp": { + "resolved": "", + "link": true } } } diff --git a/package.json b/package.json index a943ffe..0a8ed93 100644 --- a/package.json +++ b/package.json @@ -107,10 +107,32 @@ "define": { "H5-DEMO": true } + }, + "wx-yitisheng": { + "title": "微信小程序-艺体志愿宝", + "env": { + "UNI_PLATFORM": "mp-weixin", + "NAME": "wx_yitisheng_prod" + } + }, + "dy-yitisheng": { + "title": "抖音小程序-艺体志愿宝", + "env": { + "UNI_PLATFORM": "mp-toutiao", + "NAME": "dy_yitisheng_prod" + } + }, + "dy-tiyu": { + "title": "抖音小程序-体育志愿宝", + "env": { + "UNI_PLATFORM": "mp-toutiao", + "NAME": "dy_tiyu_prod" + } } } }, "dependencies": { - "@dcloudio/uni-helper-json": "^1.0.13" + "@dcloudio/uni-helper-json": "^1.0.13", + "hello-uniapp": "file:" } } diff --git a/pages.json b/pages.json index e636434..62efad6 100644 --- a/pages.json +++ b/pages.json @@ -17,7 +17,7 @@ { "path": "pages/zyb/home", "style": { - "navigationBarTitleText": "艺体志愿宝", + "navigationBarTitleText": " ", "app-plus": { "bounce": "none", "titleNView": { @@ -42,7 +42,7 @@ { "path": "pages/zyb/qrcodeLogin", "style": { - "navigationBarTitleText": "艺体志愿宝" + "navigationBarTitleText": "扫码登录" } }, @@ -81,7 +81,7 @@ { "path": "pages/zyb/login", "style": { - "navigationBarTitleText": "艺体志愿宝" + "navigationBarTitleText": "登录账号" } }, { @@ -365,7 +365,7 @@ { "path": "pages/zyb/other/web-view", "style": { - "navigationBarTitleText": "艺体志愿宝" + "navigationBarTitleText": "在线预览" } }, @@ -404,6 +404,12 @@ "style": { "navigationBarTitleText": "招生章程" } + }, + { + "path": "pages/zyb/tiyujisuan/index", + "style": { + "navigationBarTitleText": "体育成绩计算器" + } } ], "subPackages": [ diff --git a/pages/zyb/fillVolunteer/detail.vue b/pages/zyb/fillVolunteer/detail.vue index a1be7b1..cd08e2e 100644 --- a/pages/zyb/fillVolunteer/detail.vue +++ b/pages/zyb/fillVolunteer/detail.vue @@ -20,6 +20,7 @@ export default { }, data() { return { + vipInfo:{}, paneFlag: false, scoreStatus: true, moveVolunteer: { @@ -86,6 +87,7 @@ export default { this.scoreStatus = true } } + this.vipInfo = uni.getStorageSync('vipInfo') } else { //没有登录,跳转到登录页 this.goto('/pages/zyb/login') @@ -444,7 +446,7 @@ export default { {{ scoreInfo.province }} - {{ scoreInfo.cognitioPolyclinic }} + {{ scoreInfo.cognitioPolyclinic === '文科'?'历史组':'物理组' }} {{ scoreInfo.professionalCategory }} @@ -529,7 +531,12 @@ export default { {{ item.majorName }} - {{ item.enrollProbability.toString().substring(0,4) }}% + + {{ item.enrollProbability.toString().substring(0,4) }}% + + + ??% + diff --git a/pages/zyb/fillVolunteer/index.vue b/pages/zyb/fillVolunteer/index.vue index ec77863..e129a0f 100644 --- a/pages/zyb/fillVolunteer/index.vue +++ b/pages/zyb/fillVolunteer/index.vue @@ -3,9 +3,9 @@ import StaticConstant from "@/common/StaticConstant"; import ApiConstant from "@/common/ApiConstant"; import Request from '@/common/request' import ImagesConstant from "@/common/ImagesConstant"; -import {arrayIsNotEmpty} from "@/common/util"; +import {arrayIsNotEmpty,stringIsNotEmpty} from "@/common/util"; import vip from "../vip/index.vue"; -import {stringIsNotEmpty} from "../../../common/util"; +import CommonTool from "@/common/js/commonTool"; let request = new Request() // 缓存每页最多 @@ -29,6 +29,7 @@ export default { data() { return { /// + systemName:'', num: {kcj: 0, jwt: 0, nlq: 0, kbd: 0,}, circle: {kcj: 0, jwt: 0, nlq: 0, kbd: 0,},//百分比 modelVale: 0, @@ -97,6 +98,7 @@ export default { this.userInfo = uni.getStorageSync('userInfo') }, onLoad(e) { + this.systemName = CommonTool.getSystemName() this.vipInfo = uni.getStorageSync('vipInfo') if (e.batch && e.volunteerId) { //从我的志愿 点击跳转而来 @@ -124,14 +126,14 @@ export default { }, onShareAppMessage() { return { - title: '艺体志愿宝-测一测你能上的大学', //分享标题 + title: systemName+'-测一测你能上的大学', //分享标题 path: "/pages/zyb/fillVolunteer/index" } }, // 分享到微信朋友圈 onShareTimeline(res) { return { - title: '测一测你能上的大学', //分享标题 + title: systemName+'测一测你能上的大学', //分享标题 path: "/pages/zyb/fillVolunteer/index" } }, @@ -800,7 +802,7 @@ export default { 省份:{{ scoreInfo.province }} - 选科:{{ scoreInfo.cognitioPolyclinic }} + 选科:{{ scoreInfo.cognitioPolyclinic ==='文科'?'历史组':'物理组' }} 类别:{{ scoreInfo.professionalCategory }} diff --git a/pages/zyb/fillVolunteer/mockList.vue b/pages/zyb/fillVolunteer/mockList.vue index 9c85c0d..b039a55 100644 --- a/pages/zyb/fillVolunteer/mockList.vue +++ b/pages/zyb/fillVolunteer/mockList.vue @@ -155,7 +155,7 @@ export default { }, onShareAppMessage() { return { - title: '艺体志愿宝-测一测你能上的大学', //分享标题 + title: '测一测你能上的大学', //分享标题 path: "/pages/zyb/fillVolunteer/index" } }, @@ -881,7 +881,7 @@ export default { 省份:{{ scoreInfo.province }} - 选科:{{ scoreInfo.cognitioPolyclinic }} + 选科:{{ scoreInfo.cognitioPolyclinic ==='文科'?'历史组':'物理组' }} 类别:{{ scoreInfo.professionalCategory }} diff --git a/pages/zyb/fillVolunteer/my-detail.vue b/pages/zyb/fillVolunteer/my-detail.vue index 3e3e701..4ba06ba 100644 --- a/pages/zyb/fillVolunteer/my-detail.vue +++ b/pages/zyb/fillVolunteer/my-detail.vue @@ -448,7 +448,7 @@ export default { {{ scoreInfo.province }} - {{ scoreInfo.cognitioPolyclinic }} + {{ scoreInfo.cognitioPolyclinic === '文科'?'历史组':'物理组' }} {{ scoreInfo.professionalCategory }} diff --git a/pages/zyb/fillVolunteer/my.vue b/pages/zyb/fillVolunteer/my.vue index 8919be5..f95b145 100644 --- a/pages/zyb/fillVolunteer/my.vue +++ b/pages/zyb/fillVolunteer/my.vue @@ -153,7 +153,7 @@ export default { {{ - item.userScoreInfo.cognitioPolyclinic + item.userScoreInfo.cognitioPolyclinic === '文科'?'历史组':'物理组' }}  |  {{ item.userScoreInfo.professionalCategory }} diff --git a/pages/zyb/fillVolunteer/old-detail.vue b/pages/zyb/fillVolunteer/old-detail.vue index 9ccc410..b2f1883 100644 --- a/pages/zyb/fillVolunteer/old-detail.vue +++ b/pages/zyb/fillVolunteer/old-detail.vue @@ -494,7 +494,7 @@ export default { {{ scoreInfo.province }} - {{ scoreInfo.cognitioPolyclinic }} + {{ scoreInfo.cognitioPolyclinic === '文科'?'历史组':'物理组' }} {{ scoreInfo.professionalCategory }} diff --git a/pages/zyb/home.vue b/pages/zyb/home.vue index b0646d4..6d8be07 100644 --- a/pages/zyb/home.vue +++ b/pages/zyb/home.vue @@ -4,22 +4,21 @@ import ImagesConstant from "@/common/ImagesConstant"; import ApiConstant from "@/common/ApiConstant"; import Request from "@/common/request"; import JumpTool from "@/common/js/jumpTool"; -import jumpTool from "@/common/js/jumpTool"; +import CommonTool from "@/common/js/commonTool"; let request = new Request() export default { name: "home", components: {}, computed: { - jumpTool() { - return jumpTool - }, StaticConstant() { return StaticConstant } }, data() { return { + systemName:"", + playerType:'艺体考生', userStatus: false, scoreInfo: null, zyNum: null,//专业数量 @@ -48,6 +47,23 @@ export default { currentTab: 0, } }, + onLoad(){ + this.systemName = CommonTool.getSystemName() + if(this.systemName === '体育志愿宝'){ + this.playerType = '体育考生' + for (let i = 0; i < this.options.length; i++) { + if(this.options[i].title === '艺考考研'){ + this.options[i].title = '体育计分器' + this.options[i].url = '/pages/zyb/tiyujisuan/index' + } + } + } + // 动态设置标题 + uni.setNavigationBarTitle({ + title: this.systemName + }); + this.getAdmissionsRegulationsList() + }, onShow() { //进入页面后,判断是否登录了 let userInfo = uni.getStorageSync('userInfo') @@ -62,9 +78,6 @@ export default { } } }, - onLoad() { - this.getAdmissionsRegulationsList() - }, onReachBottom() { this.loadMore() }, @@ -74,14 +87,14 @@ export default { }, onShareAppMessage() { return { - title: StaticConstant.systemName, //分享标题 + title: '测一测你能上的大学', //分享标题 path: "/pages/zyb/home" } }, // 分享到微信朋友圈 onShareTimeline(res) { return { - title: StaticConstant.systemName, //分享标题 + title: '测一测你能上的大学', //分享标题 path: "/pages/zyb/home" } }, @@ -222,7 +235,9 @@ export default { console.log(this.scrollLeft, 60, id) } }, - + goArticleDetail(e){ + JumpTool.goArticleDetail(e) + }, } } @@ -232,8 +247,8 @@ export default { - {{ StaticConstant.systemName }} - 河南艺体考生专属VIP + {{ systemName }} + 河南{{playerType}}专属VIP 订单号 {{ order.orderCode }} - {{ getTextByStatus(order.orderStatus) }} + + {{ order.orderStatusName }} @@ -24,7 +26,7 @@ 下单时间:{{ order.createTime }} - + 付款时间:{{ order.paymentTime }} @@ -36,6 +38,12 @@ ¥{{ order.totalAmount }} + + + + 去付款 + + @@ -88,10 +96,15 @@ export default { this.getOrderList() }, openDetail(e){ - uni.navigateTo({ - url: '/pages/zyb/order/detail?orderCode='+e.orderCode - }) + uni.navigateTo({ + url: '/pages/zyb/order/detail?orderCode='+e.orderCode + }) }, + goPay(e){ + uni.navigateTo({ + url: '/pages/zyb/vip/checkoutCounter?orderCode='+e.orderCode + }) + }, getOrderList(){ request.get(ApiConstant.VIP.orderList,{}).then(r => { console.log(r) @@ -104,12 +117,10 @@ export default { }); }, getColorByStatus(status){ - if (status === '1') { + if (status === '待支付') { return '#f96543'; - }else if (status === '2') { + }else if (status === '已支付') { return '#85e689'; - }else if (status === '5') { - return '#f2891b'; }else{ return '#bb0303'; } diff --git a/pages/zyb/other/calculateInvestment.vue b/pages/zyb/other/calculateInvestment.vue index 3031c69..845a566 100644 --- a/pages/zyb/other/calculateInvestment.vue +++ b/pages/zyb/other/calculateInvestment.vue @@ -213,7 +213,7 @@ export default { 文理 - {{this.scoreInfo.cognitioPolyclinic}} + {{this.scoreInfo.cognitioPolyclinic === '文科'?'历史组':'物理组'}}