修改
This commit is contained in:
parent
c61114b4e2
commit
4ece20347d
1
App.vue
1
App.vue
@ -14,7 +14,6 @@
|
|||||||
}
|
}
|
||||||
.app {
|
.app {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// position: relative;
|
|
||||||
color: #000000;
|
color: #000000;
|
||||||
padding: 30rpx 0 200rpx 0;
|
padding: 30rpx 0 200rpx 0;
|
||||||
|
|
||||||
|
|||||||
9
api/startup.js
Normal file
9
api/startup.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import request from "./request.js"
|
||||||
|
|
||||||
|
|
||||||
|
export function appFileInfoByOneId() {
|
||||||
|
return request({
|
||||||
|
url: `/nurseApplet/uploadFile/appFileInfoByOneId`,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -2,8 +2,8 @@
|
|||||||
"name" : "泉医到家护理员APP",
|
"name" : "泉医到家护理员APP",
|
||||||
"appid" : "__UNI__EE607B0",
|
"appid" : "__UNI__EE607B0",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.0",
|
"versionName" : "1.0.1",
|
||||||
"versionCode" : "100",
|
"versionCode" : 101,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
@ -104,5 +104,7 @@
|
|||||||
"uniStatistics" : {
|
"uniStatistics" : {
|
||||||
"enable" : false
|
"enable" : false
|
||||||
},
|
},
|
||||||
"vueVersion" : "2"
|
"vueVersion" : "2",
|
||||||
|
"locale" : "zh-Hans",
|
||||||
|
"fallbackLocale" : "zh-Hans"
|
||||||
}
|
}
|
||||||
|
|||||||
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "Attendantapp",
|
"name": "NurseStationPersonApp",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
|||||||
12
package.json
12
package.json
@ -1,5 +1,9 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"id": "sin-signature",
|
||||||
"uview-ui": "^1.8.4"
|
"name": "签名组件-兼容H5、小程序、APP",
|
||||||
}
|
"version": "1.0.0",
|
||||||
}
|
"description": "用于uni-app的签名组件,支持H5、小程序、APP,可导出svg矢量图片。",
|
||||||
|
"keywords": [
|
||||||
|
"签名,签字,svg,canvas"
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -62,9 +62,9 @@
|
|||||||
"path": "pages/Mymission/Mymission",
|
"path": "pages/Mymission/Mymission",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的任务",
|
"navigationBarTitleText": "我的任务",
|
||||||
|
"navigationBarBackgroundColor": "#ffffff", //背景颜色
|
||||||
"enablePullDownRefresh": false,
|
"onReachBottomDistance": 20, //距离底部多远时触发 单位为px
|
||||||
"navigationBarBackgroundColor": "#ffffff" //背景颜色
|
"enablePullDownRefresh": true //设置参数为true
|
||||||
}
|
}
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
|
|||||||
@ -87,8 +87,13 @@
|
|||||||
onDutyPictureUrl: null,
|
onDutyPictureUrl: null,
|
||||||
serviceEndPictureUrl: null,
|
serviceEndPictureUrl: null,
|
||||||
userSignaturePictureUrl: null,
|
userSignaturePictureUrl: null,
|
||||||
|
serveLocationLatitude: null,
|
||||||
|
serveLocationLongitude: null,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//签名
|
//签名
|
||||||
@ -173,7 +178,10 @@
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
duration: '1500',
|
duration: '1500',
|
||||||
})
|
})
|
||||||
setTimeout(e => {
|
if (that.timer) {
|
||||||
|
clearTimeout(that.timer)
|
||||||
|
}
|
||||||
|
that.timer = setTimeout(e => {
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1
|
delta: 1
|
||||||
})
|
})
|
||||||
@ -203,6 +211,42 @@
|
|||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.list.id = options.orderDetailsId
|
this.list.id = options.orderDetailsId
|
||||||
this.orderNo = options.orderNo
|
this.orderNo = options.orderNo
|
||||||
|
var that = this
|
||||||
|
uni.getLocation({
|
||||||
|
type: 'wgs84',
|
||||||
|
success: function(res) {
|
||||||
|
that.list.serveLocationLatitude = res.latitude
|
||||||
|
that.list.serveLocationLongitude = res.longitude
|
||||||
|
},
|
||||||
|
fail: error => {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '获取定位失败,是否授权打开定位',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.getSystemInfo({
|
||||||
|
success: (sys) => {
|
||||||
|
if (sys.platform == 'ios') {
|
||||||
|
plus.runtime.openURL(
|
||||||
|
"app-settings://");
|
||||||
|
} else {
|
||||||
|
var main = plus.android
|
||||||
|
.runtimeMainActivity();
|
||||||
|
var Intent = plus.android.importClass(
|
||||||
|
"android.content.Intent");
|
||||||
|
//可能应该直接进入应用列表的权限设置?=> android.settings.APPLICATION_SETTINGS
|
||||||
|
var mIntent = new Intent(
|
||||||
|
'android.settings.LOCATION_SOURCE_SETTINGS'
|
||||||
|
);
|
||||||
|
main.startActivity(mIntent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -71,7 +71,10 @@
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
duration: '1500'
|
duration: '1500'
|
||||||
})
|
})
|
||||||
setTimeout(e => {
|
if (that.timer) {
|
||||||
|
clearTimeout(that.timer)
|
||||||
|
}
|
||||||
|
that.timer = setTimeout(e => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/login/login?phonenumber=${this.phonenumber}&password=${this.password}`
|
url: `/pages/login/login?phonenumber=${this.phonenumber}&password=${this.password}`
|
||||||
})
|
})
|
||||||
|
|||||||
@ -7,22 +7,38 @@
|
|||||||
我的任务
|
我的任务
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class=" item" style="background: #4C7BC9; "@tap='gopersonal'>
|
<view class=" item" style="background: #4C7BC9; " @tap='gopersonal'>
|
||||||
<image src="../../static/user.png" mode=""></image>
|
<image src="../../static/user.png" mode=""></image>
|
||||||
<view class="title">
|
<view class="title">
|
||||||
个人信息
|
个人信息
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
nursePerson,
|
||||||
|
} from '@/api/personnal/personal.js';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {
|
||||||
|
phonenumber: null,
|
||||||
|
password: null,
|
||||||
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onShow() {
|
||||||
|
let that = this
|
||||||
|
try {
|
||||||
|
const value = uni.getStorageSync('phonenumber');
|
||||||
|
const value2 = uni.getStorageSync('password');
|
||||||
|
if (value && value2) {
|
||||||
|
that.phonenumber = value
|
||||||
|
that.password = value2
|
||||||
|
}
|
||||||
|
} catch (e) {}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
gomymission() {
|
gomymission() {
|
||||||
@ -30,15 +46,28 @@
|
|||||||
url: '/pages/Mymission/Mymission'
|
url: '/pages/Mymission/Mymission'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
gopersonal(){
|
gopersonal() {
|
||||||
uni.navigateTo({
|
nursePerson(this.phonenumber, this.password).then(res => {
|
||||||
url: '/pages/personal/personal'
|
if (res.code == 200) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/personal/personal'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '账号异常,请重新登录',
|
||||||
|
type: 'error',
|
||||||
|
duration: '1000'
|
||||||
|
})
|
||||||
|
setTimeout(e => {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
})
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -116,12 +116,23 @@
|
|||||||
},
|
},
|
||||||
myInfo() {
|
myInfo() {
|
||||||
nursePerson(this.phonenumber, this.password).then(res => {
|
nursePerson(this.phonenumber, this.password).then(res => {
|
||||||
this.appPersonallist = res.data
|
if (res.code == 200) {
|
||||||
console.log(this.appPersonallist)
|
this.appPersonallist = res.data
|
||||||
|
} else {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '账号异常,请重新登录',
|
||||||
|
type: 'error',
|
||||||
|
duration: '1500'
|
||||||
|
})
|
||||||
|
setTimeout(e => {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
})
|
||||||
|
}, 1500)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
updatainfo() {
|
updatainfo() {
|
||||||
console.log()
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/Modifyinformation/Modifyinformation`
|
url: `/pages/Modifyinformation/Modifyinformation`
|
||||||
})
|
})
|
||||||
|
|||||||
@ -4,41 +4,142 @@
|
|||||||
<view class="title">
|
<view class="title">
|
||||||
泉医到家
|
泉医到家
|
||||||
</view>
|
</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
appLogin
|
||||||
|
} from '@/api/login/index.js'
|
||||||
|
import {
|
||||||
|
appFileInfoByOneId
|
||||||
|
} from '@/api/startup.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
apknumber: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
let that = this
|
this.info();
|
||||||
try {
|
//自动更新
|
||||||
const value = uni.getStorageSync('nursePersonId');
|
// var that = this;
|
||||||
if (value) {
|
// plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
|
||||||
setTimeout(() => {
|
// this.apknumber = wgtinfo.version
|
||||||
uni.reLaunch({
|
// appFileInfoByOneId().then(res => {
|
||||||
url: '/pages/homepage/homepage'
|
// if (res.fileVersion > this.apknumber) {
|
||||||
});
|
// uni.showToast({
|
||||||
}, 2000);
|
// title: '有新的版本发布,程序已启动自动更新。新版本下载完成后将自动弹出安装程序。',
|
||||||
} else {
|
// 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() {
|
||||||
|
var that = this
|
||||||
|
try {
|
||||||
|
const value = uni.getStorageSync('phonenumber');
|
||||||
|
const value2 = uni.getStorageSync('password');
|
||||||
|
if (value && value2) {
|
||||||
|
appLogin(value, value2).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/homepage/homepage',
|
||||||
|
})
|
||||||
|
}, 2000);
|
||||||
|
} else {
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
});
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
});
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
});
|
});
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/login/login'
|
|
||||||
});
|
|
||||||
}, 2000);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -72,7 +72,6 @@
|
|||||||
taskDetailsinfo(orderDetailsId) {
|
taskDetailsinfo(orderDetailsId) {
|
||||||
taskDetails(orderDetailsId).then(res => {
|
taskDetails(orderDetailsId).then(res => {
|
||||||
this.list = res.data
|
this.list = res.data
|
||||||
console.log(this.list)
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goreturn() {
|
goreturn() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user