diff --git a/api/pages/homepage/homepage.js b/api/pages/homepage/homepage.js index 9f1b049..a823ba2 100644 --- a/api/pages/homepage/homepage.js +++ b/api/pages/homepage/homepage.js @@ -4,14 +4,31 @@ import request from "../../request.js" export function getOpenId(code) { return request({ url: `/applet/register/getOpenId/${code}`, - method: 'GET' + method: 'GET', + header: { + // Authorization: 'Bearer' + ' ' + uni.getStorageSync('token') + }, }) } // 获取当前注册居民 -export function getCurrentUser(data) { +export function getCurrentUser(openid, cityCode) { return request({ - url: `/applet/register/getCurrentResident/${data.openid}/${data.cityCode}`, - method: 'GET' + url: `/applet/register/getCurrentResident/${openid}/${cityCode}`, + method: 'GET', + header: { + // Authorization: 'Bearer' + ' ' + uni.getStorageSync('token') + }, + }) +} +// 获取签约信息 +export function detail(identity,region) { + return request({ + url: `/applet/signinfo/detail/${identity}`, + method: 'GET', + header: { + region: region, + // Authorization: 'Bearer' + ' ' + uni.getStorageSync('token') + }, }) } \ No newline at end of file diff --git a/api/pages/login/index.js b/api/pages/login/index.js index 436fb0c..5bde163 100644 --- a/api/pages/login/index.js +++ b/api/pages/login/index.js @@ -1,8 +1,8 @@ import request from "../../request.js" -export function getWeChatUser(loginCode, phoneCode) { +export function getWeChatUser(code) { return request({ - url: `/nurseApplet/login/getWeChatUserInfo?loginCode=${loginCode}&phoneCode=${phoneCode}`, + url: `/applet/register/getOpenId/${code}`, method: 'GET' }) } diff --git a/api/pages/register/register.js b/api/pages/register/register.js index 1ffdea0..7ae65cc 100644 --- a/api/pages/register/register.js +++ b/api/pages/register/register.js @@ -1,9 +1,9 @@ import request from "../../request.js" // 注册 -export function register(data) { +export function registerdata(data) { return request({ - url: `/applet/register`, + url: '/applet/register', method: 'POST', data: data }) diff --git a/api/request.js b/api/request.js index 84212e3..42b620c 100644 --- a/api/request.js +++ b/api/request.js @@ -1,5 +1,6 @@ import baseurl from './baseurl.js' + // Authorization: 'Bearer' + ' ' + uni.getStorageSync('token') var request = function(config) { return new Promise((resolve, rejected) => { uni.showLoading({ @@ -10,9 +11,7 @@ var request = function(config) { data: config.data, method: config.method, timeout: 10000, - header: { - Authorization: 'Bearer' + ' ' + uni.getStorageSync('token') - }, + header:config.header, success(res) { uni.hideLoading(); resolve(res.data) diff --git a/components/ld-select/ld-select.vue b/components/ld-select/ld-select.vue new file mode 100644 index 0000000..aa60fee --- /dev/null +++ b/components/ld-select/ld-select.vue @@ -0,0 +1,340 @@ + + + + + diff --git a/manifest.json b/manifest.json index 5f4842e..eecaccc 100644 --- a/manifest.json +++ b/manifest.json @@ -50,7 +50,7 @@ "quickapp" : {}, /* 小程序特有相关 */ "mp-weixin" : { - "appid" : "wxdc32268eca6b78f9", + "appid" : "wxccb16a452ab5e4b4", "setting" : { "urlCheck" : false, "postcss" : true, diff --git a/pages.json b/pages.json index 1c2ac8a..160a666 100644 --- a/pages.json +++ b/pages.json @@ -260,24 +260,23 @@ }, { "path": "ProductList/ProductList", //商品列表 "style": { - "navigationStyle": "custom", // 隐藏系统导航栏 "navigationBarTitleText": "医路优品", - "onReachBottomDistance": 20, //距离底部多远时触发 单位为px + "navigationStyle": "custom", // 隐藏系统导航栏 + "onReachBottomDistance": 40, //距离底部多远时触发 单位为px "enablePullDownRefresh": true //设置参数为true } }, { "path": "nursestation/nursestation", "style": { - "navigationBarTitleText": "护理服务详情" - // "onReachBottomDistance": 40, //距离底部多远时触发 单位为px - // "enablePullDownRefresh": true //设置参数为true + "navigationBarTitleText": "护理机构详情", + "onReachBottomDistance": 100, //距离底部多远时触发 单位为px + "enablePullDownRefresh": true //设置参数为true } }, { "path": "site/site", "style": { - "navigationStyle": "custom", // 隐藏系统导航栏 - "navigationBarTitleText": "护理服务", - "onReachBottomDistance": 40, //距离底部多远时触发 单位为px + "navigationBarTitleText": "护理机构", + "onReachBottomDistance": 100, //距离底部多远时触发 单位为px "enablePullDownRefresh": true //设置参数为true } }, { @@ -367,14 +366,12 @@ "navigationBarTitleText": "筛查结果", "enablePullDownRefresh": false } - }, { "path": "screeningRecord/screeningRecord", "style": { "navigationBarTitleText": "筛查记录", "enablePullDownRefresh": false } - }, { "path": "SelectItem/SelectItem", "style": { @@ -387,7 +384,26 @@ "navigationBarTitleText": "我的签约", "enablePullDownRefresh": false } + }, { + "path": "myfamilydoctorteam/myfamilydoctorteam", + "style": { + "navigationBarTitleText": "我的家庭医生团队", + "enablePullDownRefresh": false + } + }, { + "path": "performancedetails/performancedetails", + "style": { + "navigationBarTitleText": "履约详情", + "enablePullDownRefresh": false + } + }, { + "path": "contractsigningprotocol/contractsigningprotocol", + "style": { + "navigationBarTitleText": "签约协议", + "enablePullDownRefresh": false + } } + ] }, { "root": "pagesC", diff --git a/pages/facecollection/facecollection.vue b/pages/facecollection/facecollection.vue index d908462..64974f1 100644 --- a/pages/facecollection/facecollection.vue +++ b/pages/facecollection/facecollection.vue @@ -9,6 +9,7 @@ 请拍摄本人头像 + @@ -16,6 +17,7 @@ flash="off" resolution='high' /> {{ tipsText }} + @@ -157,6 +159,7 @@ if (this.tipsText != "" && this.tipsText != "请拍照") { return; } + uni.getSetting({ success: (res) => { if (!res.authSetting['scope.camera']) { @@ -177,6 +180,9 @@ tempImagePath }) => { this.tempImg = tempImagePath + //全局事件订阅只要注册的页面都可以收到回调值 + // uni.$emit("headPictureUrl",this.tempImg) + console.log("=======tempImg:", this.tempImg) } }) @@ -197,10 +203,14 @@ duration: 2000, }) }, 2000); + uni.navigateTo({ + url:`/pages/register/register?headPictureUrl=${this.tempImg}` + }) }, // 点击 - 取消上传 handleCancelClick() { + console.log(this.tempImg) this.tempImg = '' } } diff --git a/pages/homepage/homepage.vue b/pages/homepage/homepage.vue index 2dfd073..7dda4e7 100644 --- a/pages/homepage/homepage.vue +++ b/pages/homepage/homepage.vue @@ -2,9 +2,10 @@ - + - 你好,请登录 + {{patientName}} + 你好,请登录 @@ -26,7 +27,7 @@ 服务预约 - + 积分兑换 @@ -59,29 +60,72 @@ - + diff --git a/pages/login/login.vue b/pages/login/login.vue index f63a0b8..d90d490 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -21,6 +21,7 @@ return { phonecode: undefined, logincode: undefined, + code:undefined, timer: undefined, scenenurseStationId: undefined }; @@ -28,6 +29,7 @@ onShow() { this.phonecode = undefined this.logincode = undefined + this.code = undefined this.scenenurseStationId = uni.getStorageSync('scenenurseStationId'); }, methods: { @@ -38,16 +40,19 @@ wx.login({ provider: 'weixin', success: function(loginRes) { - that.logincode = loginRes.code + console.log(loginRes) + + // uni.$emit('code',loginRes.code) + that.code = loginRes.code that.pwdlogin(); } }); } }, login() { - getWeChatUser(this.logincode, this.phonecode).then(res => { + getWeChatUser(this.code).then(res => { if (res.code == 200) { - uni.setStorageSync("openid", res.data.openid) + uni.setStorageSync("openid", res.data) uni.setStorageSync("patientId", res.data.id) uni.setStorageSync("phone", res.data.phone) this.$refs.uToast.show({ @@ -55,17 +60,18 @@ type: 'success', duration: '1500' }) + console.log(this.logincode) this.phonecode = undefined this.logincode = undefined uni.setStorageSync("Refresh", 'Refresh') if (this.timer) { clearTimeout(this.timer) } - this.timer = setTimeout(e => { - uni.navigateBack({ - delta: 1 - }) - }, 500) + // this.timer = setTimeout(e => { + // uni.navigateBack({ + // delta: 1 + // }) + // }, 500) } else { this.$refs.uToast.show({ title: '登录失败', @@ -78,13 +84,17 @@ pwdlogin() { var that = this uni.clearStorageSync(); - createMobileToken().then(res => { - uni.setStorageSync("token", res.data.token) - if (this.scenenurseStationId) { - uni.setStorageSync("scenenurseStationId", this.scenenurseStationId) - } - that.login() + uni.navigateTo({ + url:`/pages/register/register?code=${this.logincode}` }) + that.login() + // createMobileToken().then(res => { + // uni.setStorageSync("token", res.data.token) + // if (this.scenenurseStationId) { + // uni.setStorageSync("scenenurseStationId", this.scenenurseStationId) + // } + // that.login() + // }) }, }, //1.分享给朋友 onShareAppMessage(res) { diff --git a/pages/register/register.vue b/pages/register/register.vue index d8fd9aa..8defce8 100644 --- a/pages/register/register.vue +++ b/pages/register/register.vue @@ -1,48 +1,49 @@