diff --git a/app.js b/app.js index 0472230..b69c695 100644 --- a/app.js +++ b/app.js @@ -13,7 +13,8 @@ App({ if(options.referrerInfo.hasOwnProperty('extraData')){ this.globalData.navigate.mobile = options.referrerInfo.extraData.mobile, this.globalData.navigate.nickname = options.referrerInfo.extraData.nickname, - this.globalData.navigate.faceImg = options.referrerInfo.extraData.faceImg + this.globalData.navigate.faceImg = options.referrerInfo.extraData.faceImg, + this.globalData.navigate.id = options.referrerInfo.extraData.id } http.fetchAuthToken(res => { console.log('app登录--->',res) @@ -37,6 +38,7 @@ App({ mobile:'', nickname:'', faceImg:'', + id:'' }, windowHeight:'', screenHeight:'', diff --git a/config.js b/config.js index 42d1059..e4a26a5 100644 --- a/config.js +++ b/config.js @@ -1,5 +1,5 @@ const config = { - // api_url: 'http://10.10.11.107:7101/fqsb', // 服务器地址 + // api_url: 'http://10.10.11.44:7101/fqsb', // 服务器地址 api_url: 'https://shibeirencai.elinkit.com.cn:7101/fqsb' // 正式环境 // api_url: 'https://dingoa.elinkit.com.cn/fqsb', // 测试环境 } diff --git a/models/topic.js b/models/topic.js index 0ea3c5c..1878575 100644 --- a/models/topic.js +++ b/models/topic.js @@ -381,13 +381,18 @@ class TopicModel extends HTTP { this.request(params) } // 在线报名 - onlineSign(aId, success) { + onlineSign(aId,id,phone,nickName,company, success) { let params = { url: TopicBaseUrl.activity_online_url, success: success, method: Method.GET, data: { - activityId: aId + activityId: aId, + id:id, + phone:phone, + nickName:nickName, + company:company + } } this.request(params) diff --git a/pages/topics/activity/activitySign/index.js b/pages/topics/activity/activitySign/index.js index 9ae121d..2a116be 100644 --- a/pages/topics/activity/activitySign/index.js +++ b/pages/topics/activity/activitySign/index.js @@ -16,7 +16,8 @@ Page({ aId: '', username: '', company: '', - phone: '' + phone: '', + id:'' }, /** * 生命周期函数--监听页面加载 @@ -31,11 +32,14 @@ Page({ initFormData() { let { nickName, - phone + phone, + id } = store.readUserInfo() + console.log(store.readUserInfo()) this.setData({ username: nickName, - phone: phone + phone: phone, + id:id }) }, changeCompany: function (e) { @@ -93,7 +97,8 @@ Page({ }, //在线报名 onlineSignApi() { - topicModel.onlineSign(this.data.aId, res => { + console.log(this.data.aId,this.data.id,this.data.phone,this.data.username,this.data.company) + topicModel.onlineSign(this.data.aId,this.data.id,this.data.phone,this.data.username,this.data.company, res => { if (res.code == 200) { console.log(res.code); wx.showModal({ diff --git a/pages/topics/index.js b/pages/topics/index.js index 9fb04a0..2f55ab8 100644 --- a/pages/topics/index.js +++ b/pages/topics/index.js @@ -142,7 +142,7 @@ Page({ success(res) { if (res.confirm) { wx.redirectTo({ - url: '/pages/weChatAuth/index', + url: '/pages/weChatAuth/index?tabType=funeng', }) } else if (res.cancel) { wx.switchTab({ diff --git a/pages/user/index.js b/pages/user/index.js index 255e623..08e4bbc 100644 --- a/pages/user/index.js +++ b/pages/user/index.js @@ -124,24 +124,24 @@ Page({ id: 3, name: '政务服务' }, + // { + // id: 4, + // name: '学历教育' + // }, + // { + // id: 5, + // name: '场景开放' + // }, + // { + // id: 6, + // name: '企业招聘' + // }, + // { + // id: 7, + // name: '名人堂' + // }, { id: 4, - name: '学历教育' - }, - { - id: 5, - name: '场景开放' - }, - { - id: 6, - name: '企业招聘' - }, - { - id: 7, - name: '名人堂' - }, - { - id: 8, name: '法律服务' }, ], @@ -200,13 +200,15 @@ Page({ var params = { phone: app.globalData.navigate.mobile, nickName: app.globalData.navigate.nickname, - avatarUrl: app.globalData.navigate.faceImg + avatarUrl: app.globalData.navigate.faceImg, + id:app.globalData.navigate.id, } userModel.navigateUser(params, res => { store.saveUserInfo({ nickName: params.nickName, avatarUrl: params.avatarUrl, - phone: params.phone + phone: params.phone, + id:params.id }) wx.reLaunch({ @@ -252,13 +254,15 @@ Page({ var params = { phone: app.globalData.navigate.mobile, nickName: app.globalData.navigate.nickname, - avatarUrl: app.globalData.navigate.faceImg + avatarUrl: app.globalData.navigate.faceImg, + id:app.globalData.navigate.id } userModel.navigateUser(params, res => { store.saveUserInfo({ nickName: params.nickName, avatarUrl: params.avatarUrl, - phone: params.phone + phone: params.phone, + id:params.id }) wx.reLaunch({ @@ -291,20 +295,23 @@ Page({ store.saveUserInfo({ nickName: res.result.nickName, avatarUrl: res.result.avatarUrl, - phone: res.result.phone || '' + phone: res.result.phone || '', + id: res.result.id }) } else { if (app.globalData.navigate.mobile) { var params = { phone: app.globalData.navigate.mobile, nickName: app.globalData.navigate.nickname, - avatarUrl: app.globalData.navigate.faceImg + avatarUrl: app.globalData.navigate.faceImg, + id: app.globalData.navigate.id } userModel.navigateUser(params, res => { store.saveUserInfo({ nickName: params.nickName, avatarUrl: params.avatarUrl, - phone: params.phone + phone: params.phone, + id: params.id }) wx.reLaunch({ @@ -344,7 +351,6 @@ Page({ type } = e.currentTarget.dataset console.log('type-->',type) - if (this.data.isAuth) { if (type === 'myInfo') { console.log('进入个人信息页面'); @@ -359,7 +365,7 @@ Page({ } } else { wx.redirectTo({ - url: '/pages/weChatAuth/index', + url: '/pages/weChatAuth/index?tabType=login', }) } }, diff --git a/pages/user/index.wxml b/pages/user/index.wxml index 57b7268..719ffa2 100644 --- a/pages/user/index.wxml +++ b/pages/user/index.wxml @@ -35,7 +35,8 @@ - + + 人才服务 我的服务 - @@ -138,6 +139,8 @@ + + diff --git a/pages/user/index.wxss b/pages/user/index.wxss index dc750bf..52d069e 100644 --- a/pages/user/index.wxss +++ b/pages/user/index.wxss @@ -72,7 +72,10 @@ page{ height:410rpx; background-color: white; } - +.nav_public{ + height:200rpx; + background-color: white; +} .circular{ width: 70rpx; height: 70rpx; diff --git a/pages/weChatAuth/index.js b/pages/weChatAuth/index.js index 6310f94..09b4e7f 100644 --- a/pages/weChatAuth/index.js +++ b/pages/weChatAuth/index.js @@ -5,7 +5,7 @@ let userModel = new UserModel() import { AuthModel } from '../../models/auth.js' let authModel = new AuthModel() import { config } from '../../config.js' - +const app = getApp() Page({ /** @@ -20,7 +20,8 @@ Page({ type: Object, value: {} }, - type:1 + type:1, + tabType:"" }, /** @@ -28,7 +29,8 @@ Page({ */ onLoad: function (options) { this.setData({ - type:options.type + type:options.type, + tabType:options.tabType }) }, @@ -74,13 +76,27 @@ Page({ userInfo: res.result, avatarUrl: res.result.avatarUrl, nickName: res.result.nickName, + id:res.result.id, reAuth: true, isAuth: false }, () => { if (store.hasPhone()) { - //console.log('已经绑定手机号码') + console.log('已经绑定手机号码') + let tabType=this.data.tabType + console.log('tabType--',tabType) + if(tabType=='funeng'){ + app.globalData.currentTab = "1" + wx.switchTab({ + url: '/pages/topics/index' + }) + } + if(tabType=='login'){ + wx.switchTab({ + url: '/pages/user/index' + }) + } } else { - //console.log('未绑定手机号码') + console.log('未绑定手机号码') wx.showModal({ title: '温馨提示', content: '是否前往验证手机号码?', @@ -102,7 +118,8 @@ Page({ store.saveUserInfo({ nickName: res.result.nickName, avatarUrl: res.result.avatarUrl, - phone: res.result.phone || '' + phone: res.result.phone || '', + id:res.result.id, }) } else { //console.log('未授权') diff --git a/project.config.json b/project.config.json index d92ee5d..58e3a5f 100644 --- a/project.config.json +++ b/project.config.json @@ -1,7 +1,8 @@ { - "description": "项目配置文件", + "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "packOptions": { - "ignore": [] + "ignore": [], + "include": [] }, "setting": { "urlCheck": false, @@ -36,16 +37,15 @@ "packNpmManually": false, "packNpmRelationList": [], "minifyWXSS": true, - "showES6CompileOption": false + "showES6CompileOption": false, + "disableUseStrict": false, + "useStaticServer": true, + "useCompilerPlugins": false }, "compileType": "miniprogram", "libVersion": "2.8.1", "appid": "wx8f4ebf5537cf4962", "projectname": "fqsb_wx", - "debugOptions": { - "hidedInDevtools": [] - }, - "isGameTourist": false, "simulatorType": "wechat", "simulatorPluginLibVersion": {}, "condition": { @@ -174,5 +174,9 @@ } ] } + }, + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 2 } } \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index c6292d3..0c4236f 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,117 +1,93 @@ { "setting": {}, "condition": { - "plugin": { - "list": [] - }, - "game": { - "list": [] - }, - "gamePlugin": { - "list": [] - }, "miniprogram": { "list": [ { - "id": -1, "name": "Boillboard", "pathName": "pages/billboards/index", "query": "", "scene": null }, { - "id": -1, "name": "Park", "pathName": "pages/billboards/park/index", "query": "", "scene": null }, { - "id": -1, "name": "Policy", "pathName": "pages/billboards/policy/index", "query": "", "scene": null }, { - "id": -1, "name": "Artice", "pathName": "pages/article/index", "query": "", "scene": null }, { - "id": -1, "name": "policy-list", "pathName": "pages/billboards/policy/policy-list/index", "query": "", "scene": null }, { - "id": -1, "name": "Register", "pathName": "pages/register/index", "query": "", "scene": null }, { - "id": -1, "name": "User", "pathName": "pages/user/index", "query": "", "scene": null }, { - "id": -1, "name": "Topics", "pathName": "pages/topics/index", "query": "", "scene": null }, { - "id": -1, "name": "pages/weChatAuth/index", "pathName": "pages/weChatAuth/index", "query": "", "scene": null }, { - "id": -1, "name": "pages/topics/message/index", "pathName": "pages/topics/message/index", "query": "", "scene": null }, { - "id": -1, "name": "pages/user/myWhistle/evaluate/index", "pathName": "pages/user/myWhistle/evaluate/index", "query": "", "scene": null }, { - "id": -1, "name": "pages/user/myInfo/index", "pathName": "pages/user/myInfo/index", "query": "", "scene": null }, { - "id": -1, "name": "pages/user/myInfo/register/index", "pathName": "pages/user/myInfo/register/index", "query": "", "scene": null }, { - "id": -1, "name": "pages/resource/index", "pathName": "pages/resource/index", "query": "", "scene": null }, { - "id": 14, "name": "pages/resource/detail/index", "pathName": "pages/resource/detail/index", "query": "", @@ -161,5 +137,6 @@ } ] } - } + }, + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html" } \ No newline at end of file diff --git a/utils/http.js b/utils/http.js index 460871d..4f9361c 100644 --- a/utils/http.js +++ b/utils/http.js @@ -84,7 +84,7 @@ class HTTP { // 获取token this._fetchWXCode().then(res => { //console.log('啦啦啦啦凉啊') - //console.log(res) + console.log(res) if (!res) return let params = { url: HTTPConst.TokenURL,