diff --git a/api/api.js b/api/api.js index df2fe70..1bbd6a2 100644 --- a/api/api.js +++ b/api/api.js @@ -3,6 +3,9 @@ import http from './http.js' let limit = {} let debounce = {} + +const models = ['score', 'boss', 'login'] + const config = { // 示例 // wxLogin : {url : '/api/wxLogin', method : 'POST', @@ -15,38 +18,6 @@ const config = { - - /** - * 登录的接口 - */ - // 微信登录接口 - wxLogin: { - url: '/api/login/login', - method: 'GET', - limit : 500, - showLoading : true, - }, - // 修改个人信息接口 - updateInfo: { - url: '/info/updateInfo', - method: 'POST', - auth: true, - limit : 500, - showLoading : true, - }, - //隐私政策 - getPrivacyPolicy: { - url: '/login/getPrivacyPolicy', - method: 'GET', - }, - //用户协议 - getUserAgreement: { - url: '/login/getUserAgreement', - method: 'GET', - }, - - - /** * 公共的接口 */ @@ -161,26 +132,31 @@ const config = { employeeQueryCollectionJobList: { url: '/api/employee/queryJobCollectionList', method: 'GET', + auth: true, }, //我的找活 employeeQueryResumeByUserId: { url: '/api/employee/queryResumeByUserId', method: 'GET', + auth: true, }, //联系记录-我看过谁 employeeQueryWatchWho: { url: '/api/employee/queryWatchWho', method: 'GET', + auth: true, }, //联系记录-谁看过我 employeeQueryWatchMe: { url: '/api/employee/queryWatchMe', method: 'GET', + auth: true, }, //电子合同-获取电子合同列表 employeeQueryContractList: { url: '/api/employee/queryContractList', method: 'GET', + auth: true, }, /** @@ -200,26 +176,31 @@ const config = { bossQueryContractList: { url: '/api/boss/queryContractList', method: 'GET', + auth: true, }, //我的收藏 bossQueryCollectionJobList: { url: '/api/boss/queryJobCollectionList', method: 'GET', + auth: true, }, //我的招工 bossQueryJobListByUserId: { url: '/api/boss/queryJobListByUserId', method: 'GET', + auth: true, }, //会员中心-联系记录-我看过谁 bossQueryWatchWho: { url: '/api/boss/queryWatchWho', method: 'GET', + auth: true, }, //会员中心-联系记录-谁看过我 bossQueryWatchMe: { url: '/api/boss/queryWatchMe', method: 'GET', + auth: true, }, } @@ -289,5 +270,20 @@ export function api(key, data, callback, loadingTitle) { } +function addApiModel(model, key){ + for(let k in model){ + if(config[`${k}`]){ + console.error(`重名api------model=${key},key=${k}`); + continue + } + config[`${k}`] = model[k] + // config[`${key}_${k}`] = model[k] + } +} + +models.forEach(key => { + addApiModel(require(`./model/${key}.js`).default, key) +}) + export default api \ No newline at end of file diff --git a/api/model/boss.js b/api/model/boss.js new file mode 100644 index 0000000..935f80e --- /dev/null +++ b/api/model/boss.js @@ -0,0 +1,25 @@ + +// 积分相关接口 + +const api = { + //会员中心-我的收藏(数量统计) + bossQueryCollectionCount: { + url: '/api/boss/queryCollectionCount', + method: 'GET', + auth: true, + }, + //会员中心-联系记录-谁看过我(数量统计) + bossQueryWatchMeCount: { + url: '/api/boss/queryWatchMeCount', + method: 'GET', + auth: true, + }, + //会员中心-联系记录-我看过谁(数量统计) + bossQueryWatchWhoCount: { + url: '/api/boss/queryWatchWhoCount', + method: 'GET', + auth: true, + }, +} + +export default api \ No newline at end of file diff --git a/api/model/login.js b/api/model/login.js new file mode 100644 index 0000000..7535d00 --- /dev/null +++ b/api/model/login.js @@ -0,0 +1,39 @@ + + +// 登录相关接口 + +const api = { + // 微信登录接口 + wxLogin: { + url: '/api/login/login', + method: 'GET', + limit : 500, + showLoading : true, + }, + // 修改个人信息接口 + updateInfo: { + url: '/info/updateInfo', + method: 'POST', + auth: true, + limit : 500, + showLoading : true, + }, + //隐私政策 + getPrivacyPolicy: { + url: '/login/getPrivacyPolicy', + method: 'GET', + }, + //用户协议 + getUserAgreement: { + url: '/login/getUserAgreement', + method: 'GET', + }, + // 获取个人信息 + getInfo: { + url: '/employ/user/updateUser', + method: 'GET', + auth: true, + }, +} + +export default api \ No newline at end of file diff --git a/api/model/score.js b/api/model/score.js new file mode 100644 index 0000000..1b1f8a6 --- /dev/null +++ b/api/model/score.js @@ -0,0 +1,14 @@ + +// 积分相关接口 + +const api = { + // 每日签到获取积分 + addScoreBySign: { + url: '/employ/score/addScoreBySign', + method: 'POST', + auth : true, + limit : 1500, + }, +} + +export default api \ No newline at end of file diff --git a/components/base/tabbar.vue b/components/base/tabbar.vue index 27176a9..5392cdf 100644 --- a/components/base/tabbar.vue +++ b/components/base/tabbar.vue @@ -87,7 +87,7 @@ flex-direction: row; height: 120rpx; padding-bottom: env(safe-area-inset-bottom); - z-index: 999999; + z-index: 999; bottom: 0; left: 0; color: #BCBCBC; diff --git a/components/checkinScore.vue b/components/checkinScore.vue new file mode 100644 index 0000000..8714550 --- /dev/null +++ b/components/checkinScore.vue @@ -0,0 +1,67 @@ + + + + + \ No newline at end of file diff --git a/pages.json b/pages.json index 70d6698..def26f7 100644 --- a/pages.json +++ b/pages.json @@ -139,6 +139,9 @@ }, { "path": "mine/redeemCode" + }, + { + "path": "work/bossDetail" } ] }], diff --git a/pages/index/center.vue b/pages/index/center.vue index e8d23ca..dc59307 100644 --- a/pages/index/center.vue +++ b/pages/index/center.vue @@ -189,9 +189,7 @@ diff --git a/pages/index/index.vue b/pages/index/index.vue index 548505a..335515a 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -61,6 +61,8 @@ + + @@ -73,16 +75,16 @@ import userList from '@/components/list/userList/index.vue' import tabber from '@/components/base/tabbar.vue' import screenWork from '@/components/screen/screenWork.vue' - import { - mapState, - } from 'vuex' + import checkinScore from '@/components/checkinScore.vue' + import { mapState } from 'vuex' export default { components : { PrivacyAgreementPoup, workList, tabber, screenWork, - userList + userList, + checkinScore, }, computed: { ...mapState([ diff --git a/pages_order/auth/wxUserInfo.vue b/pages_order/auth/wxUserInfo.vue index 0b31b48..738bc6d 100644 --- a/pages_order/auth/wxUserInfo.vue +++ b/pages_order/auth/wxUserInfo.vue @@ -1,7 +1,10 @@ @@ -104,9 +142,13 @@ 5、精通 PS、AI、CDR 等平面设计软件,能独立完成日常平面设计工作内容,熟练使用 PPT/Keynote,能完成提案内容的材料美化工作。 ` import userHead from '../components/user/userHead.vue' + import mixinList from '@/mixins/list.js' + import workItem from '@/components/list/workList/workItem.vue' export default { + mixins : [mixinList], components : { userHead, + workItem, }, data() { return { @@ -114,6 +156,7 @@ id : 0, detail : {}, collectionFlag : false, + mixinsListApi : 'employeeQueryJobList', } }, onLoad({id}) { @@ -121,10 +164,10 @@ }, onShow() { this.text = this.$utils.stringFormatHtml(text) - this.getData() + this.getDetail() }, methods: { - getData(){ + getDetail(){ let data = { jobId : this.id } @@ -144,10 +187,10 @@ diff --git a/static/image/home/12.png b/static/image/home/12.png new file mode 100644 index 0000000..ab22cc2 Binary files /dev/null and b/static/image/home/12.png differ diff --git a/store/store.js b/store/store.js index 1ae8208..44ce11a 100644 --- a/store/store.js +++ b/store/store.js @@ -72,7 +72,7 @@ const store = new Vuex.Store({ }) }, getUserInfo(state){ - api('infoGetInfo', res => { + api('getInfo', res => { if(res.code == 200){ state.userInfo = res.result }