From e0a0f1ac1e8eeee179c88561daac54665a015749 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=98=BF=E6=80=AA?= <690927457@qq.com>
Date: Sun, 5 Nov 2023 18:19:14 +0800
Subject: [PATCH] =?UTF-8?q?11.5=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 7 +
api/index.js | 1 +
config/index.js | 2 +-
pages.json | 2 +-
pages/index/done.vue | 222 ++++++++++++-
pages/index/index.vue | 45 ++-
pages/user/star.vue | 66 ++--
store/index.js | 20 ++
uni_modules/cc-newsTabs/changelog.md | 4 +
.../components/cc-newsTabs/cc-newsTabs.vue | 192 ++++++++++++
uni_modules/cc-newsTabs/package.json | 85 +++++
uni_modules/cc-newsTabs/readme.md | 132 ++++++++
uni_modules/uni-combox/changelog.md | 15 +
.../components/uni-combox/uni-combox.vue | 295 ++++++++++++++++++
uni_modules/uni-combox/package.json | 90 ++++++
uni_modules/uni-combox/readme.md | 11 +
16 files changed, 1131 insertions(+), 58 deletions(-)
create mode 100644 uni_modules/cc-newsTabs/changelog.md
create mode 100644 uni_modules/cc-newsTabs/components/cc-newsTabs/cc-newsTabs.vue
create mode 100644 uni_modules/cc-newsTabs/package.json
create mode 100644 uni_modules/cc-newsTabs/readme.md
create mode 100644 uni_modules/uni-combox/changelog.md
create mode 100644 uni_modules/uni-combox/components/uni-combox/uni-combox.vue
create mode 100644 uni_modules/uni-combox/package.json
create mode 100644 uni_modules/uni-combox/readme.md
diff --git a/App.vue b/App.vue
index e8346d4..5d102bc 100644
--- a/App.vue
+++ b/App.vue
@@ -27,6 +27,13 @@
if(operation_info) {
store.operation_info = operation_info
}
+ uni.getSystemInfo({
+ success:function(res){
+ // console.log(res.screenHeight)
+ store.systemInfo = res
+ // sHeight.value = res.screenHeight
+ }
+ })
})
\ No newline at end of file
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 716d171..6867caf 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -2,14 +2,14 @@
// 引入依赖
import uniDatetimePicker from '@/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue'
import uniEasyinput from '@/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue'
- import { onLoad } from "@dcloudio/uni-app"
+ import { onLoad,onShow } from "@dcloudio/uni-app"
import mySwiper from "@/components/mySwiper.vue"
import {ref,onMounted,nextTick,watch} from "vue"
import api from '@/api/index.js'
import {useStore} from '@/store/index.js'
// import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
const store = useStore()
- onLoad((e) => {
+ onShow((e) => {
getLbtList()
if(store.userInfo && !store.operation_info) { //登录过 且 未填写手术信息
// getHospitalList()
@@ -67,7 +67,7 @@
}
const hValue = ref('') // 医院
const hValueId = ref('') // 医院id
- function onClickH(e) {
+ function onClickH() {
h_queryParams.value.key = hValue.value
getHospitalList()
@@ -78,9 +78,10 @@
})
}
function toChooseH(item) {
+ // console.log(item)
choosed_h.value = item
hValue.value = item.name
- hospitals.value = null
+ // hospitals.value = null
}
// function blurFunc() {
// blur_h.value = 1
@@ -104,7 +105,7 @@
}
let user_info = JSON.parse(uni.getStorageSync('userInfo'))
let h_query = {
- isSurgery:isSurgery.value,
+ isSurgery:parseInt(isSurgery.value),
surgery_time:surgery_time.value,
userId:user_info.userId,
hospitalId:choosed_h.value?.ID
@@ -122,17 +123,31 @@
}
else{
uni.showToast({
- title:"操作失败",
+ title:res.msg,
icon:"error",
- duration:2000
+ duration:2000,
+ success() {
+ if(res.code === 7) // 登录失败
+ {
+ // // 清空缓存
+ // uni.removeStorageSync('userInfo');
+ // uni.removeStorageSync('access_token');
+ // uni.removeStorageSync('avatarUrl');
+ // uni.switchTab({
+ // url:'/pages/user/index'
+ // })
+ store.afterFailLogin()
+ }
+ }
})
}
}
- function todoFunc(state) {
+ function todoFunc(state_index) {
let url = '/pages/index/todo'
- if(state === 2) {
- url = '/pages/index/done'
- }
+ url = '/pages/index/done?state_index='+state_index
+ // if(state_index === 0) {
+ // url = '/pages/index/done?state_index='+state_index
+ // }
uni.navigateTo({
url
})
@@ -170,7 +185,7 @@
-
+
已完成事项
@@ -221,12 +236,13 @@
医院名称
-
+
+
提交
@@ -294,6 +310,7 @@
// justify-content: space-between;
.pb-item-left{
width: 30%;
+ color: gray;
}
.pb-item-right{
position: relative;
diff --git a/pages/user/star.vue b/pages/user/star.vue
index e1e335a..9a6f4ff 100644
--- a/pages/user/star.vue
+++ b/pages/user/star.vue
@@ -5,45 +5,47 @@
import {useStore} from '@/store/index.js'
import api from "@/api/index.js"
const store = useStore()
+ import emptyCard from "@/components/emptyCard.vue"
// 生命周期
onLoad((e) => {
let userinfo = JSON.parse(store.userInfo)
// console.log(userinfo)
queryParams.value.userId = userinfo.userId
-
getList()
})
onPullDownRefresh(()=> { // 下拉刷新
+ init()
getList()
})
onReachBottom(() => { // 上滑触底
+ queryParams.value.page ++
getList()
})
// 变量
// const user_info = ref(null)
const list = ref([
- {
- id:1,
- cover_img:'https://gwjxb.oss-cn-chengdu.aliyuncs.com/logo.png',
- title:'金秋相逢 共叙合作',
- reading_num:100,
- content:`
- 新华社北京10月18日电 金秋时节,北京再迎盛会:第三届“一带一路”国际合作高峰论坛隆重举行。
- 春发其华,秋收其实。
- 共建“一带一路”走过了第一个蓬勃十年,正值风华正茂,务当昂扬奋进,奔向下一个金色十年!
- `
- },
- {
- id:2,
- cover_img:'https://ms.bdimg.com/pacific/0/pic/1083217647_-478899572.png?x=0&y=0&h=340&w=510&vh=340.00&vw=510.00&oh=340.00&ow=510.00',
- title:'金秋相逢 共叙合作',
- reading_num:100,
- content:`
- 新华社北京10月18日电 金秋时节,北京再迎盛会:第三届“一带一路”国际合作高峰论坛隆重举行。
- 春发其华,秋收其实。
- 共建“一带一路”走过了第一个蓬勃十年,正值风华正茂,务当昂扬奋进,奔向下一个金色十年!
- `
- }
+ // {
+ // id:1,
+ // cover_img:'https://gwjxb.oss-cn-chengdu.aliyuncs.com/logo.png',
+ // title:'金秋相逢 共叙合作',
+ // reading_num:100,
+ // content:`
+ // 新华社北京10月18日电 金秋时节,北京再迎盛会:第三届“一带一路”国际合作高峰论坛隆重举行。
+ // 春发其华,秋收其实。
+ // 共建“一带一路”走过了第一个蓬勃十年,正值风华正茂,务当昂扬奋进,奔向下一个金色十年!
+ // `
+ // },
+ // {
+ // id:2,
+ // cover_img:'https://ms.bdimg.com/pacific/0/pic/1083217647_-478899572.png?x=0&y=0&h=340&w=510&vh=340.00&vw=510.00&oh=340.00&ow=510.00',
+ // title:'金秋相逢 共叙合作',
+ // reading_num:100,
+ // content:`
+ // 新华社北京10月18日电 金秋时节,北京再迎盛会:第三届“一带一路”国际合作高峰论坛隆重举行。
+ // 春发其华,秋收其实。
+ // 共建“一带一路”走过了第一个蓬勃十年,正值风华正茂,务当昂扬奋进,奔向下一个金色十年!
+ // `
+ // }
])
const queryParams = ref({
page:1,
@@ -51,9 +53,21 @@
userId:0
})
// 方法
+ function init() {
+ queryParams.page = 1
+ queryParams.pageSize = 10
+ list.value = []
+ }
async function getList() {
const res = await api.getStarList(queryParams.value)
-
+ if(res.code === 0) {
+ if( res.data.list.length>0) {
+ list.value.push(...res.data.list)
+ }
+ else{
+ queryParams.page-=1
+ }
+ }
}
function toDetail(item) {
let info = encodeURIComponent(JSON.stringify(item))
@@ -66,7 +80,7 @@
-
+
@@ -75,7 +89,9 @@
{{item.content}}
+
+
\ No newline at end of file
diff --git a/uni_modules/cc-newsTabs/package.json b/uni_modules/cc-newsTabs/package.json
new file mode 100644
index 0000000..873cd0e
--- /dev/null
+++ b/uni_modules/cc-newsTabs/package.json
@@ -0,0 +1,85 @@
+{
+ "id": "cc-newsTabs",
+ "displayName": "自定义可自由滚动新闻栏tabs选项卡标签栏标题栏组件(适配vue3 小程序)",
+ "version": "2.0",
+ "description": "自定义可自由滚动新闻栏tabs选项卡标签栏标题栏组件(适配vue3 小程序)",
+ "keywords": [
+ "tabs",
+ "新闻栏",
+ "选项卡",
+ "标题栏",
+ "标签栏"
+],
+ "repository": "",
+ "engines": {
+ "HBuilderX": "^3.8.0"
+ },
+ "dcloudext": {
+ "type": "component-vue",
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": ""
+ },
+ "uni_modules": {
+ "dependencies": [],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ },
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "y"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y",
+ "钉钉": "y",
+ "快手": "y",
+ "飞书": "y",
+ "京东": "y"
+ },
+ "快应用": {
+ "华为": "y",
+ "联盟": "y"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/uni_modules/cc-newsTabs/readme.md b/uni_modules/cc-newsTabs/readme.md
new file mode 100644
index 0000000..0e45a43
--- /dev/null
+++ b/uni_modules/cc-newsTabs/readme.md
@@ -0,0 +1,132 @@
+# cc-newsTabs
+
+
+#### 使用方法
+```使用方法
+
+
+
+//初始化数据
+tabArr: [{
+ name: '关注',
+ id: '1',
+ },
+ {
+ name: '推荐',
+ id: '2'
+ },
+ {
+ name: '体育',
+ id: '3'
+ },
+ {
+ name: '热点',
+ id: '4'
+ },
+ {
+ name: '财经',
+ id: '5'
+ },
+ {
+ name: '娱乐',
+ id: '6'
+ },
+ {
+ name: '军事',
+ id: '7'
+ },
+ {
+ name: '历史',
+ id: '8'
+ },
+ {
+ name: '本地',
+ id: '9'
+ }],
+
+// tab标签栏改变事件
+tabChange(currentIndex) {
+
+ uni.showModal({
+ title: "当前选择序列",
+ content: "当前选择序列 = " + currentIndex
+ })
+ }
+
+```
+
+#### HTML代码实现部分
+```html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
\ No newline at end of file
diff --git a/uni_modules/uni-combox/changelog.md b/uni_modules/uni-combox/changelog.md
new file mode 100644
index 0000000..15256a2
--- /dev/null
+++ b/uni_modules/uni-combox/changelog.md
@@ -0,0 +1,15 @@
+## 1.0.1(2021-11-23)
+- 优化 label、label-width 属性
+## 1.0.0(2021-11-19)
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-combox](https://uniapp.dcloud.io/component/uniui/uni-combox)
+## 0.1.0(2021-07-30)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 0.0.6(2021-05-12)
+- 新增 组件示例地址
+## 0.0.5(2021-04-21)
+- 优化 添加依赖 uni-icons, 导入后自动下载依赖
+## 0.0.4(2021-02-05)
+- 优化 组件引用关系,通过uni_modules引用组件
+## 0.0.3(2021-02-04)
+- 调整为uni_modules目录规范
diff --git a/uni_modules/uni-combox/components/uni-combox/uni-combox.vue b/uni_modules/uni-combox/components/uni-combox/uni-combox.vue
new file mode 100644
index 0000000..836417a
--- /dev/null
+++ b/uni_modules/uni-combox/components/uni-combox/uni-combox.vue
@@ -0,0 +1,295 @@
+
+
+
+ {{label}}
+
+
+
+
+
+
+
+
+
+
+ {{emptyTips}}
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uni-combox/package.json b/uni_modules/uni-combox/package.json
new file mode 100644
index 0000000..3fed614
--- /dev/null
+++ b/uni_modules/uni-combox/package.json
@@ -0,0 +1,90 @@
+{
+ "id": "uni-combox",
+ "displayName": "uni-combox 组合框",
+ "version": "1.0.1",
+ "description": "可以选择也可以输入的表单项 ",
+ "keywords": [
+ "uni-ui",
+ "uniui",
+ "combox",
+ "组合框",
+ "select"
+],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": ""
+ },
+ "directories": {
+ "example": "../../temps/example_temps"
+ },
+ "dcloudext": {
+ "category": [
+ "前端组件",
+ "通用组件"
+ ],
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+ },
+ "uni_modules": {
+ "dependencies": [
+ "uni-scss",
+ "uni-icons"
+ ],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "n"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y"
+ },
+ "快应用": {
+ "华为": "u",
+ "联盟": "u"
+ },
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/uni_modules/uni-combox/readme.md b/uni_modules/uni-combox/readme.md
new file mode 100644
index 0000000..d9f08d5
--- /dev/null
+++ b/uni_modules/uni-combox/readme.md
@@ -0,0 +1,11 @@
+
+
+## Combox 组合框
+> **组件名:uni-combox**
+> 代码块: `uCombox`
+
+
+组合框组件。
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-combox)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file