修改
This commit is contained in:
parent
6daa22814f
commit
f26d56d927
19
main.js
19
main.js
@ -6,18 +6,21 @@ import uView from "uview-ui";
|
||||
Vue.use(uView);
|
||||
Vue.config.productionTip = false
|
||||
App.mpType = 'app'
|
||||
import store from "@/store/index.js"
|
||||
const app = new Vue({
|
||||
...App
|
||||
store,
|
||||
...App
|
||||
})
|
||||
app.$mount()
|
||||
// #endif
|
||||
|
||||
// #ifdef VUE3
|
||||
import { createSSRApp } from 'vue'
|
||||
import {
|
||||
createSSRApp
|
||||
} from 'vue'
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
return {
|
||||
app
|
||||
}
|
||||
const app = createSSRApp(App)
|
||||
return {
|
||||
app
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
11
pages.json
11
pages.json
@ -71,7 +71,16 @@
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
],
|
||||
,{
|
||||
"path" : "pages/template/template",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "模板消息订阅",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarTitleText": "",
|
||||
|
||||
@ -25,6 +25,9 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="TemplateMessage" @tap='goTemplate' v-if="personRoleLoginFlag=='护理站'">
|
||||
管理员模板消息订阅
|
||||
</view>
|
||||
<view class="centerfloat">
|
||||
<view class="title">
|
||||
在线学习
|
||||
@ -69,18 +72,23 @@
|
||||
beijingurl: null, //背景
|
||||
nurserStationPresonId: 35, //护理员id
|
||||
selectOrderByNursePersonCountlist: {}, //项目数量对象
|
||||
personRoleLoginFlag: null, //身份认证
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.beijingurl = baseurl + '/profile/nursePersonAppletPicture/person_center.png'
|
||||
this.OrderByNursePersonCount();
|
||||
var that = this
|
||||
const value = uni.getStorageSync('personRoleLoginFlag');
|
||||
if (value) {
|
||||
that.personRoleLoginFlag = value
|
||||
} else {}
|
||||
},
|
||||
methods: {
|
||||
//项目数量
|
||||
OrderByNursePersonCount() {
|
||||
selectOrderByNursePersonCount(this.nurserStationPresonId).then(res => {
|
||||
this.selectOrderByNursePersonCountlist = res
|
||||
console.log(this.selectOrderByNursePersonCountlist)
|
||||
})
|
||||
},
|
||||
goMymission(item) {
|
||||
@ -88,6 +96,12 @@
|
||||
url: `/pages/Mymission/Mymission?orderStatus=${item}`
|
||||
})
|
||||
},
|
||||
//跳转到模板消息订阅界面
|
||||
goTemplate() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/template/template"
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@ -99,6 +113,16 @@
|
||||
.app {
|
||||
position: relative;
|
||||
|
||||
.TemplateMessage {
|
||||
width: 94%;
|
||||
margin: 40rpx auto;
|
||||
background-color: #f4f6f7;
|
||||
height: 150rpx;
|
||||
line-height: 150rpx;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.bottomfloat {
|
||||
position: relative;
|
||||
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
getPersonWeChatUserInfo(this.logincode, this.phonecode).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.setStorageSync("nursePersonId", res.data.nurseStationPersonId)
|
||||
uni.setStorageSync("personRoleLoginFlag", res.data.personRoleLoginFlag)
|
||||
this.$refs.uToast.show({
|
||||
title: '登录成功',
|
||||
type: 'success',
|
||||
|
||||
68
pages/template/template.vue
Normal file
68
pages/template/template.vue
Normal file
@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="item" @tap='openPopup'>
|
||||
<image src="../../static/temple.png" mode=""></image>
|
||||
<view class="text">
|
||||
预约订单接受消息通知
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" @tap='integralopenPopup'>
|
||||
<image src="../../static/temple.png" mode=""></image>
|
||||
<view class="text">
|
||||
预约订单拒绝消息通知
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapActions
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
...mapActions(["openPopup"]),
|
||||
...mapActions(["integralopenPopup"]),
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
padding: 0;
|
||||
|
||||
.item {
|
||||
width: 94%;
|
||||
margin: 0 auto;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 5rpx;
|
||||
height: 110rpx;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
margin-top: 25rpx;
|
||||
|
||||
.text {
|
||||
font-size: 40rpx;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 130rpx;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
image {
|
||||
width: 55rpx;
|
||||
height: 55rpx;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 35rpx;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
static/temple.png
Normal file
BIN
static/temple.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
73
store/index.js
Normal file
73
store/index.js
Normal file
@ -0,0 +1,73 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
Vue.use(Vuex)
|
||||
const store = new Vuex.Store({
|
||||
state: {
|
||||
//公共的变量,这里的变量不能随便修改,只能通过触发mutations的方法才能改变
|
||||
},
|
||||
mutations: {
|
||||
//相当于同步的操作
|
||||
//点击确认
|
||||
//预约订单接受消息通知
|
||||
subscribesuccess(state) {
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: [
|
||||
't6PZuAOalg6RTh_dzORsHsO8Q1meZcgnI-aBmaWo0T8',
|
||||
'sQQCAXGLyDsQOKfZCGibhSmcamlbc7wKeGBt1pKCyBM',
|
||||
'LeOiaoAggUK5eEtz8vVs8Pjp0O2lf0T75nc8vTYtfiQ',
|
||||
],
|
||||
success(res) {},
|
||||
fail(err) {},
|
||||
complete(scc) {}
|
||||
})
|
||||
},
|
||||
//预约订单拒绝消息通知
|
||||
integralsubscribesuccess(state) {
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: [
|
||||
'-3YtSqNtujio6XeJ3Ax95wmWSZL6k7ozp9eSk5ZUM30',
|
||||
'fmZMOW9dq4kKBH-BEpcVIltbG0C9-aiQUVG3USVfgR8',
|
||||
'foVV7Gke-8JdzgzHQ7QQrDV5lK1L5xLkuUyZurQC8L4',
|
||||
],
|
||||
success(res) {},
|
||||
fail(err) {},
|
||||
complete(scc) {}
|
||||
})
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
//预约订单拒绝消息通知
|
||||
//相当于异步的操作,不能直接改变state的值,只能通过触发mutations的方法才能改变
|
||||
integralopenPopup(contxt) {
|
||||
const nursePersonIds = uni.getStorageSync('nursePersonId');
|
||||
// 获取用户的当前设置,判断是否点击了“总是保持以上,不在询问”
|
||||
wx.getSetting({
|
||||
withSubscriptions: true, // 是否获取用户订阅消息的订阅状态,默认false不返回
|
||||
success(res) {
|
||||
console.log(res.authSetting['scope.subscribeMessage'])
|
||||
if (res.authSetting['scope.subscribeMessage']) {} else {
|
||||
//因为没有选择总是保持,所以需要调起授权弹窗再次授权
|
||||
contxt.commit('integralsubscribesuccess')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//预约订单接受消息通知
|
||||
// 是否设置过授权
|
||||
openPopup(contxt) {
|
||||
const nursePersonIds = uni.getStorageSync('nursePersonId');
|
||||
// 获取用户的当前设置,判断是否点击了“总是保持以上,不在询问”
|
||||
wx.getSetting({
|
||||
withSubscriptions: true, // 是否获取用户订阅消息的订阅状态,默认false不返回
|
||||
success(res) {
|
||||
console.log(res.authSetting['scope.subscribeMessage'])
|
||||
if (res.authSetting['scope.subscribeMessage']) {} else {
|
||||
//因为没有选择总是保持,所以需要调起授权弹窗再次授权
|
||||
contxt.commit('subscribesuccess')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
})
|
||||
export default store
|
||||
Loading…
Reference in New Issue
Block a user