修改
This commit is contained in:
parent
c61114b4e2
commit
4ece20347d
1
App.vue
1
App.vue
@ -14,7 +14,6 @@
|
||||
}
|
||||
.app {
|
||||
width: 100%;
|
||||
// position: relative;
|
||||
color: #000000;
|
||||
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",
|
||||
"appid" : "__UNI__EE607B0",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"versionName" : "1.0.1",
|
||||
"versionCode" : 101,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
@ -104,5 +104,7 @@
|
||||
"uniStatistics" : {
|
||||
"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,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
||||
10
package.json
10
package.json
@ -1,5 +1,9 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"uview-ui": "^1.8.4"
|
||||
}
|
||||
"id": "sin-signature",
|
||||
"name": "签名组件-兼容H5、小程序、APP",
|
||||
"version": "1.0.0",
|
||||
"description": "用于uni-app的签名组件,支持H5、小程序、APP,可导出svg矢量图片。",
|
||||
"keywords": [
|
||||
"签名,签字,svg,canvas"
|
||||
]
|
||||
}
|
||||
@ -62,9 +62,9 @@
|
||||
"path": "pages/Mymission/Mymission",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的任务",
|
||||
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#ffffff" //背景颜色
|
||||
"navigationBarBackgroundColor": "#ffffff", //背景颜色
|
||||
"onReachBottomDistance": 20, //距离底部多远时触发 单位为px
|
||||
"enablePullDownRefresh": true //设置参数为true
|
||||
}
|
||||
|
||||
}, {
|
||||
|
||||
@ -87,8 +87,13 @@
|
||||
onDutyPictureUrl: null,
|
||||
serviceEndPictureUrl: null,
|
||||
userSignaturePictureUrl: null,
|
||||
serveLocationLatitude: null,
|
||||
serveLocationLongitude: null,
|
||||
},
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
//签名
|
||||
@ -173,7 +178,10 @@
|
||||
type: 'success',
|
||||
duration: '1500',
|
||||
})
|
||||
setTimeout(e => {
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
@ -203,6 +211,42 @@
|
||||
onLoad(options) {
|
||||
this.list.id = options.orderDetailsId
|
||||
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>
|
||||
|
||||
@ -71,7 +71,10 @@
|
||||
type: 'success',
|
||||
duration: '1500'
|
||||
})
|
||||
setTimeout(e => {
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/login/login?phonenumber=${this.phonenumber}&password=${this.password}`
|
||||
})
|
||||
|
||||
@ -7,22 +7,38 @@
|
||||
我的任务
|
||||
</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>
|
||||
<view class="title">
|
||||
个人信息
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
nursePerson,
|
||||
} from '@/api/personnal/personal.js';
|
||||
export default {
|
||||
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: {
|
||||
gomymission() {
|
||||
@ -30,15 +46,28 @@
|
||||
url: '/pages/Mymission/Mymission'
|
||||
})
|
||||
},
|
||||
gopersonal(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/personal/personal'
|
||||
gopersonal() {
|
||||
nursePerson(this.phonenumber, this.password).then(res => {
|
||||
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>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
|
||||
@ -116,12 +116,23 @@
|
||||
},
|
||||
myInfo() {
|
||||
nursePerson(this.phonenumber, this.password).then(res => {
|
||||
this.appPersonallist = res.data
|
||||
console.log(this.appPersonallist)
|
||||
if (res.code == 200) {
|
||||
this.appPersonallist = res.data
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: '账号异常,请重新登录',
|
||||
type: 'error',
|
||||
duration: '1500'
|
||||
})
|
||||
setTimeout(e => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}, 1500)
|
||||
}
|
||||
})
|
||||
},
|
||||
updatainfo() {
|
||||
console.log()
|
||||
uni.navigateTo({
|
||||
url: `/pages/Modifyinformation/Modifyinformation`
|
||||
})
|
||||
|
||||
@ -4,41 +4,142 @@
|
||||
<view class="title">
|
||||
泉医到家
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
appLogin
|
||||
} from '@/api/login/index.js'
|
||||
import {
|
||||
appFileInfoByOneId
|
||||
} from '@/api/startup.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
apknumber: null,
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
let that = this
|
||||
try {
|
||||
const value = uni.getStorageSync('nursePersonId');
|
||||
if (value) {
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/homepage/homepage'
|
||||
});
|
||||
}, 2000);
|
||||
} else {
|
||||
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();
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
},
|
||||
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(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
}, 2000);
|
||||
}
|
||||
} catch (e) {
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
}, 2000);
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -72,7 +72,6 @@
|
||||
taskDetailsinfo(orderDetailsId) {
|
||||
taskDetails(orderDetailsId).then(res => {
|
||||
this.list = res.data
|
||||
console.log(this.list)
|
||||
})
|
||||
},
|
||||
goreturn() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user