This commit is contained in:
曹辉 2023-02-23 09:54:22 +08:00
parent 4ece20347d
commit af9f7a8a72
14 changed files with 225 additions and 116 deletions

37
androidPrivacy.json Normal file
View File

@ -0,0 +1,37 @@
{
"version" : "1",
"prompt" : "template",
"title" : "服务协议和隐私政策",
"message" : "请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"\">《服务协议》</a>和<a href=\"\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意并接受",
"buttonRefuse" : "暂不同意",
"hrefLoader" : "system|default",
"second" : {
"title" : "确认提示",
"message" : "进入应用前,你需先同意<a href=\"\">《服务协议》</a>和<a href=\"\">《隐私政策》</a>,否则将退出应用。",
"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"
}
}
}

View File

@ -7,3 +7,10 @@ export function appLogin(phonenumber, stationPersonPassword) {
method: 'POST'
})
}
export function createMobileToken() {
return request({
url: `/nurseApplet/authorization/createMobileToken`,
method: 'GET'
})
}

View File

@ -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)
},

View File

@ -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" : {

View File

@ -4,6 +4,13 @@
},
"pages": [ //pageshttps://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": {

View File

@ -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

View File

@ -36,7 +36,7 @@
<view class="names">{{item.serviceDate}} {{item.serviceStartTime}}-{{item.serviceEndTime}}
<span>已完成</span>
</view>
<image src="../../static/fuwutu.png" mode=""></image>
<image :src="baseurl+item.itemPictureUrl" mode=""></image>
<view class="detailsinfo">
<view class="change">
{{item.nurseItemName}}

View File

@ -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
},

View File

@ -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: '密码输入不一致,请重新输入',

View File

@ -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',

View File

@ -27,8 +27,9 @@
</template>
<script>
import {
appLogin
} from '../../api/login/index.js'
appLogin,
createMobileToken
} from '@/api/login/index.js'
export default {
data() {
return {
@ -46,8 +47,7 @@
}
},
methods: {
//
pwdlogin() {
login() {
var that = this
appLogin(this.phonenumber, this.password).then(res => {
console.log(res)
@ -55,7 +55,7 @@
uni.setStorageSync("phonenumber", that.phonenumber)
uni.setStorageSync("password", that.password)
uni.setStorageSync("nursePersonId", res.data.nursePersonId)
this.$refs.uToast.show({
that.$refs.uToast.show({
title: '登录成功',
type: 'success',
duration: '1500'
@ -66,13 +66,21 @@
})
}, 1500);
} else {
this.$refs.uToast.show({
that.$refs.uToast.show({
title: res.msg,
type: 'error'
})
}
})
},
//
pwdlogin() {
var that = this
createMobileToken().then(res => {
uni.setStorageSync("token", res.data.token)
that.login();
})
},
//
goregister() {
uni.navigateTo({

View File

@ -27,7 +27,10 @@
</view>
<view class="item" style="border:none;border-radius:0 0 20rpx 20rpx;line-height:50rpx;padding: 20rpx 3%;"
v-if="appPersonallist.nurseStationSysUserVOList">
护理站: {{appPersonallist.nurseStationSysUserVOList[0].nurseStationName}}
护理站
<text v-for='(uitem,index) in appPersonallist.nurseStationSysUserVOList'> {{uitem.nurseStationName}}
<text v-if="index!=appPersonallist.nurseStationSysUserVOList.length-1"></text>
</text>
</view>
<view class="signout" @tap='remove'>
退出账号
@ -45,7 +48,6 @@
</view>
<image src="../../static/jiantou.png" mode=""></image>
</view> -->
<u-toast ref="uToast" />
</view>
</template>
@ -66,7 +68,6 @@
appPersonallist: [], //
nurseStationSysUserVOList: [],
}
},
onShow() {
this.baseurl = baseurl;

View File

@ -22,85 +22,84 @@
};
},
onShow() {
this.info();
//
// var that = this;
// plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
// this.apknumber = wgtinfo.version
// appFileInfoByOneId().then(res => {
// if (res.fileVersion > this.apknumber) {
// uni.showToast({
// title: '',
// mask: false,
// duration: 5000,
// icon: "none"
// });
// var dtask = plus.downloader.createDownload(
// res.fileUrl, {},
// function(d, status) {
// //
// if (status == 200) {
// plus.runtime.install(plus.io.convertLocalFileSystemURL(d
// .filename), {}, {}, function(error) {
// uni.showToast({
// title: '',
// mask: false,
// duration: 1500
// });
// })
// } else {
// uni.showToast({
// title: '',
// mask: false,
// duration: 1500
// });
// }
// });
// try {
// dtask.start(); //
// var prg = 0;
// var showLoading = plus.nativeUI.showWaiting(
// ""); //showWaiting
// dtask.addEventListener('statechanged', function(
// task,
// status
// ) {
// //
// switch (task.state) {
// case 1:
// showLoading.setTitle("");
// break;
// case 2:
// showLoading.setTitle("");
// break;
// case 3:
// prg = parseInt(
// (parseFloat(task.downloadedSize) /
// parseFloat(task.totalSize)) *
// 100
// );
// showLoading.setTitle(" " + prg + "% ");
// break;
// case 4:
// plus.nativeUI.closeWaiting();
// //
// break;
// }
// });
// } catch (err) {
// plus.nativeUI.closeWaiting();
// uni.showToast({
// title: '',
// mask: false,
// duration: 1500
// });
// that.info();
// }
// } else {
// that.info();
// }
// })
// })
var that = this;
plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
this.apknumber = wgtinfo.version
appFileInfoByOneId().then(res => {
if (res.fileVersion > this.apknumber) {
uni.showToast({
title: '有新的版本发布,程序已启动自动更新。新版本下载完成后将自动弹出安装程序。',
mask: false,
duration: 5000,
icon: "none"
});
var dtask = plus.downloader.createDownload(
res.fileUrl, {},
function(d, status) {
//
if (status == 200) {
plus.runtime.install(plus.io.convertLocalFileSystemURL(d
.filename), {}, {}, function(error) {
uni.showToast({
title: '安装失败',
mask: false,
duration: 1500
});
})
} else {
uni.showToast({
title: '更新失败',
mask: false,
duration: 1500
});
}
});
try {
dtask.start(); //
var prg = 0;
var showLoading = plus.nativeUI.showWaiting(
"正在下载"); //showWaiting
dtask.addEventListener('statechanged', function(
task,
status
) {
//
switch (task.state) {
case 1:
showLoading.setTitle("正在下载");
break;
case 2:
showLoading.setTitle("已连接到服务器");
break;
case 3:
prg = parseInt(
(parseFloat(task.downloadedSize) /
parseFloat(task.totalSize)) *
100
);
showLoading.setTitle(" 正在下载" + prg + "% ");
break;
case 4:
plus.nativeUI.closeWaiting();
//
break;
}
});
} catch (err) {
plus.nativeUI.closeWaiting();
uni.showToast({
title: '更新失败',
mask: false,
duration: 1500
});
that.info();
}
} else {
that.info();
}
})
})
},
methods: {
info() {

View File

@ -25,19 +25,19 @@
地址{{list.serviceAddress}}
</view>
</view>
<view class="img" v-if="list.orderStatus=='COMPLETE'">
<view class="img" v-if="list.orderStatus=='COMPLETE'||list.orderStatus=='EVALUATED'">
<view class="">
护理员到岗照片
</view>
<image :src="baseurl+list.onDutyPictureUrl" mode=""></image>
</view>
<view class="img" v-if="list.orderStatus=='COMPLETE'">
<view class="img" v-if="list.orderStatus=='COMPLETE'||list.orderStatus=='EVALUATED'">
<view class="" >
服务结束照片
</view>
<image :src="baseurl+list.serviceEndPictureUrl" mode=""></image>
</view>
<view class="img" v-if="list.orderStatus=='COMPLETE'">
<view class="img" v-if="list.orderStatus=='COMPLETE'||list.orderStatus=='EVALUATED'">
<view class="">
签名
</view>