修改
This commit is contained in:
parent
0037d9af30
commit
5c1c2657f1
19
main.js
19
main.js
@ -4,23 +4,24 @@ import App from './App'
|
||||
import Vue from 'vue'
|
||||
import uView from "uview-ui";
|
||||
Vue.use(uView);
|
||||
// import share from './share.js'
|
||||
// Vue.mixin(share)
|
||||
|
||||
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
|
||||
|
||||
40
pages.json
40
pages.json
@ -17,7 +17,7 @@
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
}, {
|
||||
"path": "pages/medicine/medicine",
|
||||
"style": {
|
||||
"navigationBarTitleText": "健康咨询",
|
||||
@ -25,22 +25,21 @@
|
||||
"navigationBarBackgroundColor": "#ffffff",
|
||||
"disableScroll": true
|
||||
}
|
||||
},{
|
||||
}, {
|
||||
"path": "pages/integral/integral",
|
||||
"style": {
|
||||
"navigationBarTitleText": "积分",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#ffffff"
|
||||
}
|
||||
},{
|
||||
"path" : "pages/confirmation/confirmation",
|
||||
"style" :
|
||||
{
|
||||
}, {
|
||||
"path": "pages/confirmation/confirmation",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarTitleText": "预约时间"
|
||||
}
|
||||
},{
|
||||
}, {
|
||||
"path": "pages/information/information",
|
||||
"style": {
|
||||
"navigationBarTitleText": "完善个人信息",
|
||||
@ -143,8 +142,7 @@
|
||||
"navigationBarTitleText": "医路优品",
|
||||
"navigationBarBackgroundColor": "#ffffff",
|
||||
"onReachBottomDistance": 40, //距离底部多远时触发 单位为px
|
||||
"enablePullDownRefresh": true, //设置参数为true
|
||||
"navigationStyle": "custom"
|
||||
"enablePullDownRefresh": true //设置参数为true
|
||||
}
|
||||
}, {
|
||||
"path": "pages/CommodityOrder/CommodityOrder",
|
||||
@ -359,17 +357,15 @@
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#ffffff"
|
||||
}
|
||||
}
|
||||
,{
|
||||
"path" : "pages/Healthrecords/Healthrecords",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "健康档案",
|
||||
}, {
|
||||
"path": "pages/Healthrecords/Healthrecords",
|
||||
"style": {
|
||||
"navigationBarTitleText": "健康档案",
|
||||
"navigationBarBackgroundColor": "#ffffff",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "",
|
||||
@ -388,12 +384,6 @@
|
||||
"selectedIconPath": "static/homepagews.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/shopping/shopping",
|
||||
"iconPath": "static/shoping.png",
|
||||
"selectedIconPath": "static/shopingw.png",
|
||||
"text": "商城"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/Personal/Personal",
|
||||
"iconPath": "static/userw.png",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<!-- <u-tabs :list="tabList" :current="tabcurrent" @change="change"></u-tabs>
|
||||
<u-tabs :list="tabList" :current="tabcurrent" @change="change"></u-tabs>
|
||||
<view class="items">
|
||||
<view class="item" @tap='godiseasemanagement'>
|
||||
<image src="../../static/zbglzbgl.png" mode=""></image>
|
||||
@ -14,8 +14,8 @@
|
||||
国家老年病中心
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="concent">
|
||||
</view>
|
||||
<!-- <view class="concent">
|
||||
<view class="background">
|
||||
<image src="/static/logo.png" mode=""></image>
|
||||
<view>
|
||||
@ -28,7 +28,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="Welfarecustomerservice">
|
||||
<image class="shoping" src="../../static/shoping.png" mode="" @tap='goshopping'></image>
|
||||
<image src="../../static/fuli.png" mode="" @tap='gomaterialbenefits'></image>
|
||||
<image src="../../static/kefu.png" mode="" @tap='gocustomerservice'></image>
|
||||
</view>
|
||||
@ -78,6 +79,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState,
|
||||
mapActions
|
||||
} from "vuex";
|
||||
import {
|
||||
getPoserInfoListByType
|
||||
} from '@/api/homepage/index.js'
|
||||
@ -96,9 +101,17 @@
|
||||
informationCategorytotal: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 5,
|
||||
poster: '' //视频封面
|
||||
poster: '', //视频封面
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
//1.获取state数据的第一种方法
|
||||
// getcount(){
|
||||
// return this.$store.state.count;
|
||||
// },
|
||||
//2.获取State的第二种方法---映射
|
||||
// ...mapState(["name"])
|
||||
},
|
||||
onShow() {
|
||||
this.pageNum = 1
|
||||
this.swiperImgUrls = []
|
||||
@ -179,15 +192,21 @@
|
||||
},
|
||||
//专病管理
|
||||
godiseasemanagement() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/diseasemanagement/diseasemanagement'
|
||||
})
|
||||
// this.openPopup();
|
||||
setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/diseasemanagement/diseasemanagement'
|
||||
})
|
||||
}, 0)
|
||||
},
|
||||
//健康咨询
|
||||
gomedicine() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/medicine/medicine'
|
||||
})
|
||||
// this.openPopup();
|
||||
setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/medicine/medicine'
|
||||
})
|
||||
}, 0)
|
||||
},
|
||||
//跳转客服
|
||||
gocustomerservice() {
|
||||
@ -197,9 +216,12 @@
|
||||
},
|
||||
//跳转护理站页面
|
||||
gosite() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/site/site'
|
||||
})
|
||||
// this.openPopup();
|
||||
setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/site/site'
|
||||
})
|
||||
}, 0)
|
||||
},
|
||||
//健康常识
|
||||
gohealth() {
|
||||
@ -208,10 +230,26 @@
|
||||
})
|
||||
},
|
||||
//新人福利
|
||||
// 第一种 直接映射
|
||||
...mapActions(["openPopup"]),
|
||||
gomaterialbenefits() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/materialbenefits/materialbenefits'
|
||||
})
|
||||
// 第二种引入
|
||||
// this.$store.dispatch("openPopup");
|
||||
// this.openPopup();
|
||||
setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/materialbenefits/materialbenefits'
|
||||
})
|
||||
}, 0)
|
||||
},
|
||||
//跳转商城
|
||||
goshopping() {
|
||||
// this.openPopup();
|
||||
setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/shopping/shopping'
|
||||
})
|
||||
}, 0)
|
||||
},
|
||||
},
|
||||
// onReachBottom() { //下滑加载
|
||||
@ -390,19 +428,29 @@
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
padding: 30rpx 0;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
image:nth-child(1) {
|
||||
margin: 0 5rpx 0 0;
|
||||
image:nth-child(2) {
|
||||
margin: 0 10rpx 0 0;
|
||||
}
|
||||
|
||||
image:nth-child(2) {
|
||||
margin: 0 0 0 5rpx;
|
||||
image:nth-child(3) {
|
||||
margin: 0 0 0 10rpx;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 350rpx;
|
||||
height: 200rpx;
|
||||
width: 340rpx;
|
||||
height: 195rpx;
|
||||
}
|
||||
|
||||
image:nth-child(1) {
|
||||
width: 700rpx;
|
||||
height: 240rpx;
|
||||
}
|
||||
|
||||
.shoping {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}, 1500)
|
||||
}, 500)
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: '登录失败',
|
||||
|
||||
@ -110,7 +110,7 @@
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
padding: 110rpx 0 0;
|
||||
padding: 10rpx 0 0;
|
||||
background-color: #fff;
|
||||
|
||||
.card {
|
||||
|
||||
@ -103,7 +103,7 @@
|
||||
lengthlist(item) {
|
||||
uni.showLoading({
|
||||
title: '',
|
||||
duration: 1000
|
||||
duration: 500
|
||||
});
|
||||
setTimeout((e) => {
|
||||
this.lengthlistshow = !this.lengthlistshow
|
||||
@ -113,7 +113,7 @@
|
||||
this.nurseItemClassifyInfoList = this.nurseItemClassifyInfolistlength.slice(0, 7)
|
||||
}
|
||||
uni.hideLoading();
|
||||
}, 1000)
|
||||
}, 500)
|
||||
},
|
||||
//点击护理项目分类
|
||||
tapitemclass(item) {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 77 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 834 B |
47
store/index.js
Normal file
47
store/index.js
Normal file
@ -0,0 +1,47 @@
|
||||
import Vue from 'vue'
|
||||
|
||||
import Vuex from 'vuex'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
const store = new Vuex.Store({
|
||||
state: {
|
||||
//公共的变量,这里的变量不能随便修改,只能通过触发mutations的方法才能改变
|
||||
name: '111',
|
||||
},
|
||||
mutations: {
|
||||
//相当于同步的操作
|
||||
},
|
||||
actions: {
|
||||
//相当于异步的操作,不能直接改变state的值,只能通过触发mutations的方法才能改变
|
||||
// 是否设置过授权
|
||||
openPopup(contxt) {
|
||||
// 获取用户的当前设置,判断是否点击了“总是保持以上,不在询问”
|
||||
wx.getSetting({
|
||||
withSubscriptions: true, // 是否获取用户订阅消息的订阅状态,默认false不返回
|
||||
success(res) {
|
||||
console.log('res.authSetting', res.authSetting)
|
||||
if (res.authSetting['scope.subscribeMessage']) {
|
||||
console.log('用户点击了“总是保持以上,不再询问”')
|
||||
} else {
|
||||
console.log('用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息')
|
||||
//因为没有选择总是保持,所以需要调起授权弹窗再次授权
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: [
|
||||
'-IxZeEkkXFhoSwGtBHbipKQ6kjEmkdTkswKeOypSsNQ',
|
||||
'e1JRZaw1OfTz2b6X9DTqqaJtV4rXEt7uhwXoZLDb_eA',
|
||||
'nUB9HRbqQXOVuTpkKBIHMgzWlNq6touzxf5QYBiMkbU'
|
||||
],
|
||||
success(res) {},
|
||||
fail(err) {},
|
||||
complete(scc) {
|
||||
console.log(scc)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
})
|
||||
export default store
|
||||
Loading…
Reference in New Issue
Block a user