init version kelfy-mini for new gitea

This commit is contained in:
terry.wang
2025-11-13 13:38:59 +08:00
commit 493fa4f1e1
763 changed files with 55626 additions and 0 deletions

472
pages/index/index.js Normal file
View File

@@ -0,0 +1,472 @@
// index.js
// 获取应用实例
const app = getApp()
let common = require('../../config/common.js')
Page({
data: {
// releaseData: ['o-ZxO4-oIddDT0ecgxNEkvApJ-N0', 'o-ZxO47Otvo5Rsq7kN-4PHvZIOt8', 'o-ZxO47fz4FjMvL5ESLKcl0YqVJ8', 'o-ZxO40Qxe6oCekxLWLuwLwraG4Y', 'o-ZxO40USy1Wnwc24hRL5SWX7XEw', 'o-ZxO49XU81BKOSnDzKVGWrAZXGg', 'o-ZxO47o9FYvO-Eor_JPCwzXS3ig', 'o-ZxO476Ml4-QsCeDDUDbI3frVFU'],
releaseData: [],
isComprehensive: false,
imgUrls: [],
url: '',
name: '',
showOver: false, //满意度弹窗是否显示
display: '',
list: [{
name: '报告查询',
icon: 'icon1',
id: '0'
},
{
name: '门诊费用',
icon: 'icon2',
id: "2"
},
{
name: '充值记录',
icon: 'icon3',
id: '3'
},
{
name: '电子健康卡',
icon: 'icon8',
id: "zc"
},
{
name: '门诊医保结算',
icon: 'icon12',
id: "zc1"
},
{
name: '就诊卡退费',
icon: 'icon28',
id: "tf"
},
],
serviceList: [{
name: '医院介绍',
icon: 'icon4',
SRC: '/pages/introduction/introduction'
},
{
name: '医院导航',
icon: 'icon5',
SRC: '/pages/navigation/navigation'
},
{
name: '妇幼云影像',
icon: 'icon11',
id: "fy"
},
{
name: '电子票夹',
icon: 'icon10',
id: "dzpj"
},
{
name: '患者智能随访',
icon: 'icon13',
id: "hz"
},
{
name: '门诊排队查询',
icon: 'icon22',
SRC: '/pages/callnumber/callnumbers'
},
{
name: '智能导诊',
icon: 'icon21',
SRC: '/pages/intelligentGuidance/intelligentGuidance'
},
{
name: '满意度',
icon: 'icon9',
id: "my"
},
{
name: '就医指南',
icon: 'icon6',
SRC: '/pages/medicalGuide/medicalGuide'
},
{
name: '健康百科',
icon: 'icon7',
SRC: '/pages/healthEncyclopedia/healthEncyclopedia'
},
{
name: '下园体检',
icon: 'icon25',
SRC: '/pages/xytj/xytj'
},
{
name: '妇幼到您家',
icon: 'icon24',
SRC: '/pages/kfdj/kfdj'
},
{
name: '住院日结单',
icon: 'icon27',
SRC: '/pages/onehospitalization/onehospitalization'
},
// {
// name: '院内统计',
// icon: 'icon23',
// SRC: '/pages/inHospitalStatistics/inHospitalStatistics'
// },
],
managerList: [{
name: '综合统计',
icon: 'icon26',
SRC: '/pages/inHospitalStatistics/inHospitalStatistics'
}],
isShowSetModel: false,
indicatorDots: false,
autoplay: true,
interval: 3000,
duration: 500,
circular: true,
canIUse: wx.canIUse('button.open-type.getUserInfo'),
canIUseGetUserProfile: false,
canIUseOpenData: wx.canIUse('open-data.type.userAvatarUrl') && wx.canIUse('open-data.type.userNickName') // 如需尝试获取用户信息可改为false
},
imgClick(e) {
console.log(e, "图片点击")
let item = e.currentTarget.dataset.item
let title = e.currentTarget.dataset.item.TITLE
let state = 3
let imgId = item.HOS_NOTICE_ID
if (title != 'NOLINK') {
wx.navigateTo({
url: '/pages/message/message?state=' + state + '&imgId=' + imgId,
})
}
},
naviTo(e) {
if (app.globalData.openId == '') {
wx.showToast({
title: '用户信息未获取到',
icon: "none"
})
} else {
let id = e.currentTarget.dataset.item.id
if (id == 0) {
wx.navigateTo({
url: '/pages/selectBg/selectBg',
})
} else if (id == 'zc') {
console.log(app.globalData.openId, "登录未过期")
wx.navigateToMiniProgram({
appId: 'wx8cd9ae88f7c92d6f',
// path: '目标小程序页面路径',
//develop开发版trial体验版release正式版
envVersion: 'release',
success(res) {
// 打开成功
console.log("跳转小程序成功!", res);
}
})
} else if (id == 'zc1') {
wx.navigateTo({
url: '/pages/payment/payment',
})
} else if (id == 'tf'){
wx.navigateTo({
url: '/pages/userRefund/userRefund',
})
}else {
wx.navigateTo({
url: '/pages/record/record?id=' + id,
})
}
}
},
closeOver() {
this.setData({
showOver: false
})
},
closeOver1() {
this.setData({
showOver1: false
})
},
openOver() {
this.setData({
showOver: true
})
},
openOver1() {
this.setData({
showOver1: true
})
},
closeOverhz() {
this.setData({
showOverhz: false
})
},
naviToCz() {
wx.showModal({
title: '提示',
content: '此功能暂停使用',
success: function (res) {
if (res.confirm) {//这里是点击了确定以后
console.log('用户点击确定')
} else {//这里是点击了取消以后
console.log('用户点击取消')
}
}
})
// 临时关掉充值
// if (app.globalData.openId == '') {
// wx.showToast({
// title: '用户信息未获取到',
// icon: "none"
// })
// } else {
// wx.navigateTo({
// url: '/pages/money/money',
// })
// }
},
naviToHos(e) {
if (e.currentTarget.dataset.item.name == '满意度') {
this.setData({
showOver: true
})
} else if (e.currentTarget.dataset.item.name == '电子票夹') {
// this.setData({
// showOver1:true
// })
wx.navigateToMiniProgram({
appId: 'wx8e0b79a7f627ca18',
path: "pages/index/index?agencyCode=ef91b9c3de0b4abcb1a6fccb5e05990a",
//develop开发版trial体验版release正式版
// envVersion: 'trial',
success(res) {
// console.log("跳转小程序成功!",res);
}
})
} else if (e.currentTarget.dataset.item.name == '妇幼云影像') {
let url = encodeURIComponent('https://fycloud.btlsoln.com:802/#/verify?orgCode=841000')
wx.navigateTo({
url: '/pages/webwiew/webview?url=' + url,
});
} else if (e.currentTarget.dataset.item.name == '患者智能随访') {
this.setData({
showOverhz: true
})
} else {
let url = e.currentTarget.dataset.item.SRC
wx.navigateTo({
url: url,
})
}
},
naviToManager(e) {
let url = e.currentTarget.dataset.item.SRC
wx.navigateTo({
url: url,
})
},
hzd() {
wx.navigateToMiniProgram({
appId: 'wx450ece464470b037',
path: "pages/hello/hello",
success(res) {
// 打开成功
console.log("跳转小程序成功!", res);
}
})
},
ysd() {
wx.navigateToMiniProgram({
appId: 'wx551c946891b46cf5',
path: "pages/hello/hello",
success(res) {
// 打开成功
console.log("跳转小程序成功!", res);
}
})
},
// 事件处理函数
bindViewTap() {
wx.navigateTo({
url: '../logs/logs'
})
},
formSubmit(e) {
console.log(e.detail.value)
},
bindDateChange: function (e) {
console.log('picker发送选择改变携带值为', e.detail.value)
this.setData({
date: e.detail.value
})
},
guaH() {
if (app.globalData.openId == '') {
wx.showToast({
title: '用户信息未获取到',
icon: "none"
})
} else {
wx.navigateTo({
url: '/pages/selsecPer/selsecPer',
})
}
},
upLoad() {
},
getImgList() {
wx.request({
url: 'https://fy.btlsoln.com:8443/findHospitalNotice',
method: "GET",
data: {},
header: {
'content-type': 'application/json'
},
success: (res) => {
console.log(res, 'lunbotu')
this.setData({
imgUrls: res.data
})
}
})
},
setRightRed() {
wx.request({
url: 'https://fy.btlsoln.com:8443/findMessageNotice?openid',
method: "GET",
data: {
openid: app.globalData.openId
},
header: {
'content-type': 'application/json'
},
success: (res) => {
if (res.data.length > 0) {
wx.showTabBarRedDot({
index: 1,
});
} else {
wx.hideTabBarRedDot({
index: 1,
})
}
}
})
},
getReleaseData(){
// console.log("aaa")
wx.request({
url: 'https://fy.btlsoln.com:8443/countAutho/getAuther',
method: "GET",
data: {},
header: {
'content-type': 'application/json'
},
success: (res) => {
// console.log(res)
this.setData({
releaseData: res.data.data
})
const tempData = this.data.releaseData
if (tempData.includes(app.globalData.openId)) {
this.setData({
isComprehensive: true
})
}
}
})
},
onLoad() {
if (app.globalData.openId == "" || app.globalData.openId == null) {
wx.showToast({
title: '加载中',
icon: 'loading',
duration: 10000
});
common.checkGlobalOpenId().then(res => {
app.globalData.openId = res
// wx.setStorageSync("openid", res)
this.setData({
url: app.globalData.url2,
})
this.getImgList()
this.setRightRed()
this.getReleaseData()
if (wx.getUserProfile) {
this.setData({
canIUseGetUserProfile: true
})
}
// const tempData = this.data.releaseData
// if (tempData.includes(res)) {
// this.setData({
// isComprehensive: true
// })
// }
wx.setNavigationBarTitle({
title: "库尔勒市妇幼保健院"
})
wx.hideToast();
},
err => {
//初始化失败,弹框提示
})
} else {
// wx.setStorageSync("openid", res)
this.setData({
url: app.globalData.url2,
})
this.getImgList()
this.setRightRed()
this.getReleaseData()
if (wx.getUserProfile) {
this.setData({
canIUseGetUserProfile: true
})
}
// const tempData = this.data.releaseData
wx.setNavigationBarTitle({
title: "库尔勒市妇幼保健院"
})
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function (e) {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
getUserProfile(e) {
// 推荐使用wx.getUserProfile获取用户信息开发者每次通过该接口获取用户个人信息均需用户确认
// 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
wx.getUserProfile({
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (res) => {
console.log(res, "登录信息")
this.setData({
userInfo: res.userInfo,
hasUserInfo: true
})
}
})
},
})

10
pages/index/index.json Normal file
View File

@@ -0,0 +1,10 @@
{
"navigationBarBackgroundColor": "#50CEBB",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "首页",
"backgroundColor": "#fff",
"backgroundTextStyle": "light",
"usingComponents": {
"van-overlay": "@vant/weapp/overlay/index"
}
}

102
pages/index/index.wxml Normal file
View File

@@ -0,0 +1,102 @@
<!--index.wxml-->
<view class="container1">
<view class="banner">
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" indicator-dots="true" circular="true">
<block wx:for="{{imgUrls}}" wx:key="item">
<swiper-item>
<image src="{{url}}{{item.IMG}}" data-item="{{item}}" class="slide-image" bindtap="imgClick" />
</swiper-item>
</block>
</swiper>
</view>
<view class="wrap">
<view class="service">
<icon></icon>
<text>门诊服务</text>
</view>
<view class="service_con">
<view class="gh" bindtap="guaH">
<view class="title">
<text>预约就诊</text>
<view>在线预约就诊</view>
</view>
<view class="ghIcon"></view>
<!-- <image src=""></image> -->
</view>
<view class="pay" bindtap="naviToCz">
<view class="title">
<text>在线充值</text>
<view>就诊卡预存充值</view>
</view>
<view class="payIcon"></view>
<!-- <image src=""></image> -->
</view>
</view>
<view class="serviceList">
<view wx:for="{{list}}" wx:key="item" data-item="{{item}}" bindtap="naviTo">
<!-- <image src="{{item.icon}}"></image> -->
<view class="iconWrap {{item.icon}}"></view>
<text>{{item.name}}</text>
</view>
</view>
<view class="service">
<icon></icon>
<text>医院服务</text>
</view>
<view class="hospitalList">
<view wx:for="{{serviceList}}" wx:key="item" data-item="{{item}}" bindtap="naviToHos">
<!-- <image src="{{item.icon}}"></image> -->
<view class="iconWrap {{item.icon}}"></view>
<text>{{item.name}}</text>
</view>
</view>
<view wx:if="{{isComprehensive}}">
<view class="service">
<icon></icon>
<text>医院管理</text>
</view>
<view class="hospitalList">
<view wx:for="{{managerList}}" wx:key="item" data-item="{{item}}" bindtap="naviToManager">
<view class="iconWrap {{item.icon}}"></view>
<text>{{item.name}}</text>
</view>
</view>
</view>
</view>
<van-overlay show="{{ showOver }}" bindtap="closeOver">
<view class="an">
<view class="du">
<image src='../../images/ma.jpg' class="showImg" show-menu-by-longpress="{{true}}" />
<view catchtap='openOver' class="over_title">长按二维码进入国家满意度平台</view>
</view>
</view>
</van-overlay>
<van-overlay show="{{ showOver1 }}" bindtap="closeOver1">
<view class="an">
<view class="du">
<image src='../../images/dzpj.jpg' class="showImg" show-menu-by-longpress="{{true}}" />
</view>
</view>
</van-overlay>
<van-overlay show="{{ showOverhz }}" bindtap="closeOverhz">
<view class="an">
<view class="select_box">
<view class="select_one" bindtap="hzd">患者端</view>
<view class="select_one" bindtap="ysd">医生端</view>
</view>
</view>
</van-overlay>
</view>
<!-- <view class="bg" bindtap='hideview' style='display:{{display}}'></view>
<view class="showImg" style='display:{{display}}'>
</view>
</view> -->

314
pages/index/index.wxss Normal file

File diff suppressed because one or more lines are too long