From af9f7a8a721b3fa6ba3407a1614215d0f0a87c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Thu, 23 Feb 2023 09:54:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- androidPrivacy.json | 37 +++++ api/login/index.js | 9 +- api/request.js | 32 +++- manifest.json | 24 ++- pages.json | 14 +- pages/Modifyinformation/Modifyinformation.vue | 3 - pages/Mymission/Mymission.vue | 2 +- pages/confirmCompletion/confirmCompletion.vue | 9 +- pages/forgotPassword/forgotPassword.vue | 2 + pages/homepage/homepage.vue | 21 ++- pages/login/login.vue | 20 ++- pages/personal/personal.vue | 7 +- pages/startup/startup.vue | 155 +++++++++--------- pages/taskDetails/taskDetails.vue | 6 +- 14 files changed, 225 insertions(+), 116 deletions(-) create mode 100644 androidPrivacy.json diff --git a/androidPrivacy.json b/androidPrivacy.json new file mode 100644 index 0000000..2dd0b22 --- /dev/null +++ b/androidPrivacy.json @@ -0,0 +1,37 @@ +{ + "version" : "1", + "prompt" : "template", + "title" : "服务协议和隐私政策", + "message" : "请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。
  你可阅读《服务协议》《隐私政策》了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", + "buttonAccept" : "同意并接受", + "buttonRefuse" : "暂不同意", + "hrefLoader" : "system|default", + "second" : { + "title" : "确认提示", + "message" : "进入应用前,你需先同意《服务协议》《隐私政策》,否则将退出应用。", + "buttonAccept" : "同意并继续", + "buttonRefuse" : "退出应用" + }, + "disagreeMode" : { + "support" : false, + "loadNativePlugins" : false, + "visitorEntry" : true, + "showAlways" : true + }, + "styles" : { + "backgroundColor" : "#ffffff", + "borderRadius" : "5px", + "title" : { + "color" : "#000000" + }, + "buttonAccept" : { + "color" : "#000000" + }, + "buttonRefuse" : { + "color" : "#000000" + }, + "buttonVisitor" : { + "color" : "#000000" + } + } +} diff --git a/api/login/index.js b/api/login/index.js index 7d8b512..5864355 100644 --- a/api/login/index.js +++ b/api/login/index.js @@ -6,4 +6,11 @@ export function appLogin(phonenumber, stationPersonPassword) { url: `/nurseApp/personLogin/appLogin?phonenumber=${phonenumber}&stationPersonPassword=${stationPersonPassword}`, method: 'POST' }) -} \ No newline at end of file +} + +export function createMobileToken() { + return request({ + url: `/nurseApplet/authorization/createMobileToken`, + method: 'GET' + }) +} diff --git a/api/request.js b/api/request.js index 77c0197..31de474 100644 --- a/api/request.js +++ b/api/request.js @@ -10,10 +10,36 @@ var request = function(config) { data: config.data, method: config.method, timeout: 10000, - // header: { - // token: uni.getStorageSync('token') - // }, + header: { + Authorization: 'Bearer' + ' ' + uni.getStorageSync('token') + }, success(res) { + if (res.data.code == 9999) { + uni.removeStorageSync('token'); + // uni.reLaunch({ + // url: '/pages/login/login' + // }) + uni.showModal({ + title: "登录提示", + content: '登录失效,请重新登录', + success(res1) { + if (res1.confirm) { + uni.navigateTo({ + url: '/pages/login/login' + }) + } else if (res1.cancel) { + uni.reLaunch({ + url: '/pages/homepage/homepage' + }) + } + }, + fail(err1) { + uni.reLaunch({ + url: '/pages/homepage/homepage' + }) + } + }) + } uni.hideLoading(); resolve(res.data) }, diff --git a/manifest.json b/manifest.json index 0411e58..2e69341 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "泉医到家护理员APP", "appid" : "__UNI__EE607B0", "description" : "", - "versionName" : "1.0.1", - "versionCode" : 101, + "versionName" : "1.0.5", + "versionCode" : 105, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { @@ -17,7 +17,10 @@ "delay" : 0 }, /* 模块配置 */ - "modules" : {}, + "modules" : { + "Geolocation" : {}, + "Maps" : {} + }, /* 应用发布信息 */ "distribute" : { /* android打包配置 */ @@ -46,7 +49,20 @@ }, /* SDK配置 */ "sdkConfigs" : { - "ad" : {} + "ad" : {}, + "geolocation" : { + "amap" : { + "__platform__" : [ "ios", "android" ], + "appkey_ios" : "fa38860a5159a551b6819ea3092a68f3", + "appkey_android" : "fa38860a5159a551b6819ea3092a68f3" + } + }, + "maps" : { + "amap" : { + "appkey_ios" : "fa38860a5159a551b6819ea3092a68f3", + "appkey_android" : "fa38860a5159a551b6819ea3092a68f3" + } + } }, "icons" : { "android" : { diff --git a/pages.json b/pages.json index 43da1c4..77b1a02 100644 --- a/pages.json +++ b/pages.json @@ -4,6 +4,13 @@ }, "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages { + "path": "pages/login/login", + "style": { + "navigationBarTitleText": "登录", + "navigationBarBackgroundColor": "#ffffff", //背景颜色 + "navigationStyle": "custom" + } + },{ "path": "pages/startup/startup", "style": { "navigationBarTitleText": "启动页", @@ -16,13 +23,6 @@ "navigationBarTitleText": "完成确认", "navigationBarBackgroundColor": "#ffffff" //背景颜色 } - }, { - "path": "pages/login/login", - "style": { - "navigationBarTitleText": "登录", - "navigationBarBackgroundColor": "#ffffff", //背景颜色 - "navigationStyle": "custom" - } }, { "path": "pages/personal/personal", "style": { diff --git a/pages/Modifyinformation/Modifyinformation.vue b/pages/Modifyinformation/Modifyinformation.vue index a571a8f..fa174e1 100644 --- a/pages/Modifyinformation/Modifyinformation.vue +++ b/pages/Modifyinformation/Modifyinformation.vue @@ -116,9 +116,6 @@ formData: { //多余值 'userId': that.appPersonallist.userId, }, - header: { - 'content-type': 'multipart/form-data' - }, timeout: 5000, success(res) { that.appPersonallist.avatar = JSON.parse(res.data).imgUrl diff --git a/pages/Mymission/Mymission.vue b/pages/Mymission/Mymission.vue index f4a03c6..bf5d6a9 100644 --- a/pages/Mymission/Mymission.vue +++ b/pages/Mymission/Mymission.vue @@ -36,7 +36,7 @@ {{item.serviceDate}} {{item.serviceStartTime}}-{{item.serviceEndTime}} 已完成 - + {{item.nurseItemName}} diff --git a/pages/confirmCompletion/confirmCompletion.vue b/pages/confirmCompletion/confirmCompletion.vue index 20e8e41..0280440 100644 --- a/pages/confirmCompletion/confirmCompletion.vue +++ b/pages/confirmCompletion/confirmCompletion.vue @@ -83,7 +83,9 @@ serviceEndPictureUrl: null, userSignaturePictureUrl: null, list: { + res: {}, id: null, + serviceLocationName:null, onDutyPictureUrl: null, serviceEndPictureUrl: null, userSignaturePictureUrl: null, @@ -91,9 +93,6 @@ serveLocationLongitude: null, }, } - }, - onShow() { - }, methods: { //签名 @@ -213,8 +212,10 @@ this.orderNo = options.orderNo var that = this uni.getLocation({ - type: 'wgs84', + type: 'gcj02', + geocode: true, success: function(res) { + that.list.serviceLocationName = res.address.poiName that.list.serveLocationLatitude = res.latitude that.list.serveLocationLongitude = res.longitude }, diff --git a/pages/forgotPassword/forgotPassword.vue b/pages/forgotPassword/forgotPassword.vue index f30744b..6076e1a 100644 --- a/pages/forgotPassword/forgotPassword.vue +++ b/pages/forgotPassword/forgotPassword.vue @@ -48,6 +48,7 @@ newpassword: '', getCodeText: '获取验证码', //获取验证码的文字 getCodeBtnColor: "#4C7BC9", //获取验证码的color + timer: null, } }, onLoad(options) { @@ -57,6 +58,7 @@ }, methods: { pwdlogin() { + var that = this if (this.password !== this.newpassword) { this.$refs.uToast.show({ title: '密码输入不一致,请重新输入', diff --git a/pages/homepage/homepage.vue b/pages/homepage/homepage.vue index 3de8888..4100759 100644 --- a/pages/homepage/homepage.vue +++ b/pages/homepage/homepage.vue @@ -42,8 +42,23 @@ }, methods: { gomymission() { - uni.navigateTo({ - url: '/pages/Mymission/Mymission' + nursePerson(this.phonenumber, this.password).then(res => { + if (res.code == 200) { + uni.navigateTo({ + url: '/pages/Mymission/Mymission' + }) + } else if (res.code == 9999) {} else { + this.$refs.uToast.show({ + title: '账号异常,请重新登录', + type: 'error', + duration: '1000' + }) + setTimeout(e => { + uni.reLaunch({ + url: '/pages/login/login' + }) + }, 1000) + } }) }, gopersonal() { @@ -52,7 +67,7 @@ uni.navigateTo({ url: '/pages/personal/personal' }) - } else { + } else if (res.code == 9999) {} else { this.$refs.uToast.show({ title: '账号异常,请重新登录', type: 'error', diff --git a/pages/login/login.vue b/pages/login/login.vue index a7fc06f..02eff99 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -27,8 +27,9 @@