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 Vue from 'vue'
import uView from "uview-ui"; import uView from "uview-ui";
Vue.use(uView); Vue.use(uView);
// import share from './share.js'
// Vue.mixin(share)
Vue.config.productionTip = false Vue.config.productionTip = false
App.mpType = 'app' App.mpType = 'app'
import store from "@/store/index.js"
const app = new Vue({ const app = new Vue({
...App store,
...App
}) })
app.$mount() app.$mount()
// #endif // #endif
// #ifdef VUE3 // #ifdef VUE3
import { createSSRApp } from 'vue' import {
createSSRApp
} from 'vue'
export function createApp() { export function createApp() {
const app = createSSRApp(App) const app = createSSRApp(App)
return { return {
app app
} }
} }
// #endif // #endif

View File

@ -17,7 +17,7 @@
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},{ }, {
"path": "pages/medicine/medicine", "path": "pages/medicine/medicine",
"style": { "style": {
"navigationBarTitleText": "健康咨询", "navigationBarTitleText": "健康咨询",
@ -25,22 +25,21 @@
"navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#ffffff",
"disableScroll": true "disableScroll": true
} }
},{ }, {
"path": "pages/integral/integral", "path": "pages/integral/integral",
"style": { "style": {
"navigationBarTitleText": "积分", "navigationBarTitleText": "积分",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff" "navigationBarBackgroundColor": "#ffffff"
} }
},{ }, {
"path" : "pages/confirmation/confirmation", "path": "pages/confirmation/confirmation",
"style" : "style": {
{
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTitleText": "预约时间" "navigationBarTitleText": "预约时间"
} }
},{ }, {
"path": "pages/information/information", "path": "pages/information/information",
"style": { "style": {
"navigationBarTitleText": "完善个人信息", "navigationBarTitleText": "完善个人信息",
@ -143,8 +142,7 @@
"navigationBarTitleText": "医路优品", "navigationBarTitleText": "医路优品",
"navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#ffffff",
"onReachBottomDistance": 40, // px "onReachBottomDistance": 40, // px
"enablePullDownRefresh": true, //true "enablePullDownRefresh": true //true
"navigationStyle": "custom"
} }
}, { }, {
"path": "pages/CommodityOrder/CommodityOrder", "path": "pages/CommodityOrder/CommodityOrder",
@ -359,17 +357,15 @@
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff" "navigationBarBackgroundColor": "#ffffff"
} }
} }, {
,{ "path": "pages/Healthrecords/Healthrecords",
"path" : "pages/Healthrecords/Healthrecords", "style": {
"style" : "navigationBarTitleText": "健康档案",
{
"navigationBarTitleText": "健康档案",
"navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#ffffff",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "", "navigationBarTitleText": "",
@ -388,12 +384,6 @@
"selectedIconPath": "static/homepagews.png", "selectedIconPath": "static/homepagews.png",
"text": "首页" "text": "首页"
}, },
{
"pagePath": "pages/shopping/shopping",
"iconPath": "static/shoping.png",
"selectedIconPath": "static/shopingw.png",
"text": "商城"
},
{ {
"pagePath": "pages/Personal/Personal", "pagePath": "pages/Personal/Personal",
"iconPath": "static/userw.png", "iconPath": "static/userw.png",

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="app"> <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="items">
<view class="item" @tap='godiseasemanagement'> <view class="item" @tap='godiseasemanagement'>
<image src="../../static/zbglzbgl.png" mode=""></image> <image src="../../static/zbglzbgl.png" mode=""></image>
@ -14,8 +14,8 @@
国家老年病中心 国家老年病中心
</view> </view>
</view> </view>
</view> --> </view>
<view class="concent"> <!-- <view class="concent">
<view class="background"> <view class="background">
<image src="/static/logo.png" mode=""></image> <image src="/static/logo.png" mode=""></image>
<view> <view>
@ -28,7 +28,7 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view> -->
</view> </view>
</template> </template>

View File

@ -49,6 +49,7 @@
</view> </view>
</view> </view>
<view class="Welfarecustomerservice"> <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/fuli.png" mode="" @tap='gomaterialbenefits'></image>
<image src="../../static/kefu.png" mode="" @tap='gocustomerservice'></image> <image src="../../static/kefu.png" mode="" @tap='gocustomerservice'></image>
</view> </view>
@ -78,6 +79,10 @@
</template> </template>
<script> <script>
import {
mapState,
mapActions
} from "vuex";
import { import {
getPoserInfoListByType getPoserInfoListByType
} from '@/api/homepage/index.js' } from '@/api/homepage/index.js'
@ -96,9 +101,17 @@
informationCategorytotal: 0, informationCategorytotal: 0,
pageNum: 1, pageNum: 1,
pageSize: 5, pageSize: 5,
poster: '' // poster: '', //
}; };
}, },
computed: {
//1.state
// getcount(){
// return this.$store.state.count;
// },
//2.State---
// ...mapState(["name"])
},
onShow() { onShow() {
this.pageNum = 1 this.pageNum = 1
this.swiperImgUrls = [] this.swiperImgUrls = []
@ -179,15 +192,21 @@
}, },
// //
godiseasemanagement() { godiseasemanagement() {
uni.navigateTo({ // this.openPopup();
url: '/pages/diseasemanagement/diseasemanagement' setTimeout(e => {
}) uni.navigateTo({
url: '/pages/diseasemanagement/diseasemanagement'
})
}, 0)
}, },
// //
gomedicine() { gomedicine() {
uni.navigateTo({ // this.openPopup();
url: '/pages/medicine/medicine' setTimeout(e => {
}) uni.navigateTo({
url: '/pages/medicine/medicine'
})
}, 0)
}, },
// //
gocustomerservice() { gocustomerservice() {
@ -197,9 +216,12 @@
}, },
// //
gosite() { gosite() {
uni.navigateTo({ // this.openPopup();
url: '/pages/site/site' setTimeout(e => {
}) uni.navigateTo({
url: '/pages/site/site'
})
}, 0)
}, },
// //
gohealth() { gohealth() {
@ -208,10 +230,26 @@
}) })
}, },
// //
//
...mapActions(["openPopup"]),
gomaterialbenefits() { 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() { // // onReachBottom() { //
@ -390,19 +428,29 @@
background-color: #fff; background-color: #fff;
width: 100%; width: 100%;
padding: 30rpx 0; padding: 30rpx 0;
flex-wrap: wrap;
margin-bottom: 20rpx; margin-bottom: 20rpx;
image:nth-child(1) { image:nth-child(2) {
margin: 0 5rpx 0 0; margin: 0 10rpx 0 0;
} }
image:nth-child(2) { image:nth-child(3) {
margin: 0 0 0 5rpx; margin: 0 0 0 10rpx;
} }
image { image {
width: 350rpx; width: 340rpx;
height: 200rpx; height: 195rpx;
}
image:nth-child(1) {
width: 700rpx;
height: 240rpx;
}
.shoping {
margin-bottom: 20rpx;
} }
} }

View File

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

View File

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

View File

@ -103,7 +103,7 @@
lengthlist(item) { lengthlist(item) {
uni.showLoading({ uni.showLoading({
title: '', title: '',
duration: 1000 duration: 500
}); });
setTimeout((e) => { setTimeout((e) => {
this.lengthlistshow = !this.lengthlistshow this.lengthlistshow = !this.lengthlistshow
@ -113,7 +113,7 @@
this.nurseItemClassifyInfoList = this.nurseItemClassifyInfolistlength.slice(0, 7) this.nurseItemClassifyInfoList = this.nurseItemClassifyInfolistlength.slice(0, 7)
} }
uni.hideLoading(); uni.hideLoading();
}, 1000) }, 500)
}, },
// //
tapitemclass(item) { 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