This commit is contained in:
曹辉 2023-03-15 10:35:06 +08:00
parent 0037d9af30
commit 5c1c2657f1
10 changed files with 147 additions and 61 deletions

19
main.js
View File

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

View File

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

View File

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

View File

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

View File

@ -82,7 +82,7 @@
uni.navigateBack({
delta: 1
})
}, 1500)
}, 500)
} else {
this.$refs.uToast.show({
title: '登录失败',

View File

@ -110,7 +110,7 @@
<style lang="scss">
.app {
padding: 110rpx 0 0;
padding: 10rpx 0 0;
background-color: #fff;
.card {

View File

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