This commit is contained in:
曹辉 2022-12-01 17:05:15 +08:00
parent c61114b4e2
commit 4ece20347d
12 changed files with 244 additions and 43 deletions

View File

@ -14,7 +14,6 @@
}
.app {
width: 100%;
// position: relative;
color: #000000;
padding: 30rpx 0 200rpx 0;

9
api/startup.js Normal file
View File

@ -0,0 +1,9 @@
import request from "./request.js"
export function appFileInfoByOneId() {
return request({
url: `/nurseApplet/uploadFile/appFileInfoByOneId`,
method: 'GET'
})
}

View File

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

@ -1,5 +1,5 @@
{
"name": "Attendantapp",
"name": "NurseStationPersonApp",
"lockfileVersion": 2,
"requires": true,
"packages": {

View File

@ -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"
]
}

View File

@ -62,9 +62,9 @@
"path": "pages/Mymission/Mymission",
"style": {
"navigationBarTitleText": "我的任务",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff" //
"navigationBarBackgroundColor": "#ffffff", //
"onReachBottomDistance": 20, // px
"enablePullDownRefresh": true //true
}
}, {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -72,7 +72,6 @@
taskDetailsinfo(orderDetailsId) {
taskDetails(orderDetailsId).then(res => {
this.list = res.data
console.log(this.list)
})
},
goreturn() {