diff --git a/App.vue b/App.vue
index b51eed2..f17a89b 100644
--- a/App.vue
+++ b/App.vue
@@ -2,18 +2,15 @@
//#ifdef APP-PLUS
const jpushModule = uni.requireNativePlugin("JG-JPush");
// #endif
-
+
export default {
onLaunch: function() {
console.log('App Launch')
// #ifdef APP-PLUS
- // 锁定屏幕方向 横屏正方向
- plus.screen.lockOrientation('landscape-primary');
- // #endif
- var main = plus.android.runtimeMainActivity();
- var pkName = main.getPackageName();
-
- console.log(pkName)
+ // 锁定屏幕方向 横屏正方向
+ plus.screen.lockOrientation('landscape-primary');
+ // #endif
+
},
onShow: function() {
console.log('App Show')
@@ -23,8 +20,7 @@
// 播放音频
//#ifdef APP-PLUS
jpushModule.addNotificationListener(res => {
- console.log(res,'111111')
-
+ // console.log(res, '111111')
if (res.notificationEventType == 'notificationOpened') return
audioContext.play()
uni.vibrateLong();
@@ -48,9 +44,8 @@
page {
background: #F3F4F8;
}
-
- @import "static/css/base.css";
+ @import "static/css/base.css";
@import url('static/iconfont/iconfont.css')
\ No newline at end of file
diff --git a/components/a-map-walking.vue b/components/a-map-walking.vue
index 25c3052..80e4e9c 100644
--- a/components/a-map-walking.vue
+++ b/components/a-map-walking.vue
@@ -12,43 +12,65 @@
},
endPoint: {
type: Array,
- default: () => [],
+ default: () => [116.40717,39.90469],
},
},
computed: {
points() {
- console.log(this.startPoint, this.endPoint)
+ // console.log(this.startPoint, this.endPoint)
return {
startPoint: this.startPoint,
endPoint: this.endPoint
};
}
- }
+ },
+
};
+
\ No newline at end of file
diff --git a/components/index/detaila.vue b/components/index/detaila.vue
index 22a5c6c..ba05276 100644
--- a/components/index/detaila.vue
+++ b/components/index/detaila.vue
@@ -18,7 +18,7 @@
:polyline="polyline" :markers='markers'>
-->
-
@@ -36,7 +36,7 @@
-
+
@@ -136,7 +136,7 @@
+
+
diff --git a/pages.json b/pages.json
index 81158fa..6b10a97 100644
--- a/pages.json
+++ b/pages.json
@@ -6,7 +6,7 @@
"style": {
"navigationBarTitleText": "首页",
"navigationStyle": "custom",
- "enablePullDownRefresh": true,
+
"app-plus": {
"subNVues": [{
"id": "concat", // 唯一标识
diff --git a/pages/index/detail.vue b/pages/index/detail.vue
index 8d83e70..9766c2b 100644
--- a/pages/index/detail.vue
+++ b/pages/index/detail.vue
@@ -108,7 +108,6 @@
},
onPullDownRefresh() {
-
uni.stopPullDownRefresh()
},
methods: {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index b226762..5d5d750 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -22,12 +22,9 @@
-
-
{{oaUserInfo.nickname ?'在线':'离线'}}
-
@@ -37,13 +34,12 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -78,7 +74,7 @@
indexc
},
data() {
-
+
return {
title: 'Hello',
BarHeight: '',
@@ -106,7 +102,24 @@
oaUserInfo() {
return this.$store.state.app.userInfo
},
-
+ showIndexComponent: function() {
+ return this.num === 0 && this.isshow;
+ },
+ showIndexAComponent: function() {
+ return this.num === 0 && !this.isshow;
+ },
+ showIndex1Component: function() {
+ return this.num === 1 && this.isshow1;
+ },
+ showIndexBComponent: function() {
+ return this.num === 1 && !this.isshow1;
+ },
+ showPIndexComponent: function() {
+ return this.num === 2 && this.isshow2;
+ },
+ showIndexCComponent: function() {
+ return this.num === 2 && !this.isshow2;
+ }
},
onLoad() {
@@ -114,21 +127,43 @@
},
- onPullDownRefresh() {
- if (this.num == 0) {
+
+ // onPullDownRefresh() {
+ // if (this.num == 0 && this.isshow) {
+ // this.$refs.list.refresh()
+ // uni.stopPullDownRefresh()
+ // } else if (this.num == 1 && this.isshow1) {
+ // this.$refs.list1.refresh()
+ // uni.stopPullDownRefresh()
+ // } else if (this.num == 2 && this.isshow2) {
+ // this.$refs.list2.refresh()
+ // uni.stopPullDownRefresh()
+ // }
+ // },
+ onShow() {
+ if (this.num == 0 && this.isshow) {
this.$refs.list.refresh()
uni.stopPullDownRefresh()
- } else if (this.num == 1) {
+ } else if (this.num == 1 && this.isshow1) {
this.$refs.list1.refresh()
uni.stopPullDownRefresh()
- } else {
+ } else if (this.num == 2 && this.isshow2) {
this.$refs.list2.refresh()
uni.stopPullDownRefresh()
}
-
},
- mounted() {
+ mounted() {
+ if (this.num == 0 && this.isshow) {
+ this.$refs.list.refresh()
+ uni.stopPullDownRefresh()
+ } else if (this.num == 1 && this.isshow1) {
+ this.$refs.list1.refresh()
+ uni.stopPullDownRefresh()
+ } else if (this.num == 2 && this.isshow2) {
+ this.$refs.list2.refresh()
+ uni.stopPullDownRefresh()
+ }
},
methods: {
login() {
@@ -137,59 +172,75 @@
})
},
logout() {
- uni.reLaunch({
- url: '/pages/oaLogin/oaLogin'
+
+ uni.showModal({
+ title: '提示',
+ content: '确定退出?',
+ cancelText: "取消", // 取消按钮的文字
+ confirmText: "确认", // 确认按钮的文字
+ showCancel: true, // 是否显示取消按钮,默认为 true
+ confirmColor: '#f55850',
+ cancelColor: '#39B54A',
+ success: (res) => {
+ if (res.confirm) {
+ uni.reLaunch({
+ url: '/pages/oaLogin/oaLogin'
+ })
+ console.log('comfirm') //点击确定之后执行的代码
+ } else {
+ console.log('cancel') //点击取消之后执行的代码
+ }
+ }
})
+
},
getlist(index) {
this.num = index
if (index == 1) {
-
+ this.$refs.list1.refresh()
this.isshow2 = true
this.isshow = true
}
if (index == 2) {
this.isshow1 = true
this.isshow = true
+ this.$refs.list2.refresh()
}
if (index == 0) {
+ this.$refs.list.refresh()
+
this.isshow1 = true
this.isshow2 = true
}
},
- onfunction(e) {
- if (e) {
-
+ onfunction(e,id) {
+ console.log(e,id)
+ if (id == 1) {
this.isshow = false
this.type = e
- }
- },
- onfunction1(e) {
- if (e) {
-
+ } else if (id == 2) {
this.isshow1 = false
this.type = e
- }
- },
- onfunction2(e) {
-
- if (e) {
+ } else {
this.isshow2 = false
this.type = e
}
+
},
+
+
outfun(e) {
if (e == 1) {
-
+ this.$refs.list.refresh()
this.isshow = true
} else if (e == 2) {
-
+ this.$refs.list1.refresh()
this.isshow1 = true
} else {
-
+ this.$refs.list2.refresh()
this.isshow2 = true
}
},
diff --git a/pages/oaLogin/oaLogin.vue b/pages/oaLogin/oaLogin.vue
index 848f669..00ffe00 100644
--- a/pages/oaLogin/oaLogin.vue
+++ b/pages/oaLogin/oaLogin.vue
@@ -104,7 +104,7 @@
jpushModule.getRegistrationID(result => {
console.log("设备----", result)
// 绑定极光设备id
- this.formData.register_id = result.registerID || 1
+ this.formData.register_id = result.registerID
console.log("设备----", this.formData)
})
// #endif
@@ -117,6 +117,7 @@
async login() {
if (!this.formData.account) return Toast('账号不能为空');
+
if (this.formData.scene == 1 && !this.formData.password) return Toast('密码不能为空');
if (this.formData.scene == 2 && !this.formData.code) return Toast('验证码不能为空');
@@ -126,7 +127,7 @@
// })
console.log(that.formData)
let res = await loginAccount(that.formData);
- console.log(res)
+ // console.log(res)
encrypt.encode('ACT', that.formData);
this.$store.commit('SET_USERINFO', {
@@ -139,8 +140,6 @@
// console.log(data, '11111111')
// this.$store.commit('setUserInfo', data);
-
-
uni.hideLoading()
if (res.data.token) {
// console.log('111111111')
diff --git a/static/pullDown.jpg b/static/pullDown.jpg
new file mode 100644
index 0000000..cd99f33
Binary files /dev/null and b/static/pullDown.jpg differ