Compare commits

..

No commits in common. "c4edb4ec3dbeea8532c856fbde8787c04141912c" and "d4a6e9b1cd2268cce80c8fcc12f88605c8bdca70" have entirely different histories.

44 changed files with 242 additions and 3638 deletions

1
.gitignore vendored
View File

@ -2,4 +2,3 @@ node_modules/*
package-lock.json package-lock.json
yarn.lock yarn.lock
unpackage unpackage
.hbuilderx

59
App.vue
View File

@ -1,41 +1,18 @@
<!-- // <script> <script>
// import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
// export default { export default {
// onLaunch: function() { onLaunch: function() {
// console.log('App Launch') console.log('App Launch')
// }, },
// onShow: function() { onShow: function() {
// console.log('App Show') console.log('App Show')
// }, },
// onHide: function() { onHide: function() {
// console.log('App Hide') console.log('App Hide')
// } }
// } }
// </script> -->
<script setup>
import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
import { onLoad,onLaunch } from "@dcloudio/uni-app"
import {useStore} from '@/store/index.js'
const store = useStore()
onLaunch((e) => {
console.log('App onLaunch')
let userInfo = uni.getStorageSync('userInfo')
let operation_info = uni.getStorageSync('operation_info')
if(userInfo) { //
store.userInfo = userInfo
}
if(operation_info) {
store.operation_info = operation_info
}
uni.getSystemInfo({
success:function(res){
// console.log(res.screenHeight)
store.systemInfo = res
// sHeight.value = res.screenHeight
}
})
})
</script> </script>
<style lang="scss"> <style lang="scss">
/*每个页面公共css */ /*每个页面公共css */
.page-bg-gray{ .page-bg-gray{
@ -60,14 +37,6 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
/* min-height: 38rpx; */ /* min-height: 38rpx; */
} }
.text-ellipsis-2{ /*超出部分省略号 双行*/
overflow:hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
/* min-height: 38rpx; */
}
.icon-custom{ .icon-custom{
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;

View File

@ -3,27 +3,16 @@ import net from './request.js';
// import store from '../store'; // import store from '../store';
const API = { const API = {
//微信登录 //微信登录
getToken: data => net.POST('/login/token',data,true,{"Content-Type":"application/x-www-form-urlencoded"}), // 获取token getToken: data => net.POST('/login/token',data), // 获取token
wx_login: (data,userId) => net.POST('/user/binding/wechat',data,true,{"userId":userId}), // 微信登录 wx_login: (data,userId) => net.POST('/user/binding/wechat',data,true,{"userId":userId}), // 微信登录
// upload: (data) => net.POST('/user/upload',data), // 文件上传 // upload: (data) => net.POST('/user/upload',data), // 文件上传
userinfoUpdae:data => net.PUT('/user/info',data,true,{"Content-Type":"application/x-www-form-urlencoded"}), // 更新用户信息 userinfoUpdae:data => net.PUT('/user/info',data), // 更新用户信息
// ai 客服
getAikefuList:data => net.GET('/akefu/list',data), // 获取获取客服列表
getReply:data => net.POST('/ai',data), // 获取客服回复
// 首页 // 首页
getHospitalList:data => net.GET('/hospital/list',data), // 获取医院信息 getHospitalList:data => net.GET('/hospital/list',data), // 获取医院信息
saveVision:data => net.POST("/vision",data),// 保存视力测试结果
getLbtList:data => net.GET("/banner/list",data),// 获取轮播图
hospital:data => net.PUT("/user/hospital",data),// 修改医院信息
getHospitalInfo:id => net.GET("/hospital/"+id),// 根据ID获取医院信息
getTodoist:data => net.GET("/user/todo",data),// 获取待办事项
getVisionList:data => net.GET("/vision/list",data),// 获取测试记录
todoFinished:data => net.PUT("/user/todo",data),// 修改待办列表状态
// 百科 // 百科
getArticleList:data => net.GET("/article/list",data),// 百科列表 getArticleList:data => net.GET("/article/list",data),// 百科列表
getArticleDetail:data => net.GET("/article/"+data.id),// 文章详情 getArticleDetail:data => net.GET("/article/"+data.id),// 百科列表
// 我的
getStarList:data => net.GET("/favorite/list",data),// 收藏列表
/* /*
首页信息 首页信息
*/ */
@ -415,7 +404,7 @@ const API = {
transfer: data => net.POST('/api/v1/wxpay/transfer', data), transfer: data => net.POST('/api/v1/wxpay/transfer', data),
// 获取我的收藏分页列表 // 获取我的收藏分页列表
// getStarList: data => net.POST('/api/v1/favorite/get', data), getStarList: data => net.POST('/api/v1/favorite/get', data),
// 取消收藏 // 取消收藏
cancelStar: data => net.DELETE('/api/v1/favorite',data), cancelStar: data => net.DELETE('/api/v1/favorite',data),
//添加收藏 //添加收藏

View File

@ -19,27 +19,21 @@ export default {
let token = uni.getStorageSync('access_token') || 'Basic ZGV2OmRldjEyMw=='; let token = uni.getStorageSync('access_token') || 'Basic ZGV2OmRldjEyMw==';
const headers = { const headers = {
// "Content-Type": "application/json", // "Content-Type": "application/json",
// "Content-Type": "application/x-www-form-urlencoded", "Content-Type": "application/x-www-form-urlencoded",
"Authorization": token, "Authorization": token,
"x-token": token, "x-token": token,
"token":token, "token":token,
// "X-Forwarded-For":'client_ip' // "X-Forwarded-For":'client_ip'
// 'Referer':'twzxjy.com' // 'Referer':'twzxjy.com'
} }
if(!header) {
headers["Content-Type"] = "application/json"
}
if(header && !header["Content-Type"]) {
header["Content-Type"] = "application/x-www-form-urlencoded"
}
var pages = getCurrentPages(); var pages = getCurrentPages();
var page = pages[pages.length - 1]; var page = pages[pages.length - 1];
return uni.request({ return uni.request({
url: config.baseUrl + url, url: config.baseUrl + url,
method, method,
header: { header: {
...headers, ...header,
...header ...headers
}, },
data data
}).then(res => { }).then(res => {

View File

@ -1,47 +0,0 @@
<template>
<view class="aikefuBox">
<!-- 这是ai客服!!!! -->
<unFab ref="fab" :pattern="pattern" horizontal="left" vertical="bottom"
direction="horizontal" @fabClick="fabClick" />
</view>
</template>
<script setup>
import unFab from '@/uni_modules/uni-fab/components/uni-fab/uni-fab.vue'
import { onLoad } from "@dcloudio/uni-app"
// import mySwiper from "@/components/mySwiper.vue"
import {ref,onMounted,nextTick,computed} from "vue"
// import unCombox from '@/uni_modules/uni-combox/components/uni-combox/uni-combox.vue'
import {useStore} from '@/store/index.js'
const store = useStore()
import api from "@/api/index.js"
const pattern = ref({
color: '#7A7E83',
backgroundColor: '#fff',
selectedColor: '#26758d',
buttonColor: '#26758d',
iconColor: '#fff',
icon:'headphones'
})
// const content = ref([{
// iconPath: '/static/image.png',
// selectedIconPath: '/static/image-active.png',
// text: '',
// active: false
// }])
function fabClick() {
// uni.showToast({
// title: '',
// icon: 'none'
// })
uni.navigateTo({
url:"/pages/index/aikefu"
})
}
</script>
<style scoped lang="scss">
.aikefuBox{
margin-top: 200rpx;
}
</style>

View File

@ -21,7 +21,7 @@
function lbtFunc(item) { function lbtFunc(item) {
// //
uni.navigateTo({ uni.navigateTo({
url:item.link url:item.url
}); });
return return
@ -47,7 +47,7 @@
<swiper-item @click="lbtFunc(item)" v-for="(item,i) in lbt_list"> <swiper-item @click="lbtFunc(item)" v-for="(item,i) in lbt_list">
<view class="swiper-item uni-bg-red"> <view class="swiper-item uni-bg-red">
<!-- <img style="width: 100%;" :src="item.url" alt=""> --> <!-- <img style="width: 100%;" :src="item.url" alt=""> -->
<image :src="item.imgUrl" style="width: 100%;" mode="widthFix"></image> <image :src="item.image" style="width: 100%;" mode="widthFix"></image>
</view> </view>
</swiper-item> </swiper-item>
</swiper> </swiper>

View File

@ -1,6 +1,6 @@
// isdev 为 true 表示开发环境 false 表示发布环境 // isdev 为 true 表示开发环境 false 表示发布环境
const isdev = true; const isdev = true;
const baseUrl = isdev ? 'https://api.jimingyiliao.com' : 'http://eb467b6.r19.cpolar.top';// 办公室接口 & 测试环境 const baseUrl = isdev ? 'https://62bafc5f.r16.cpolar.top' : 'http://niunai.zhitou1688.com';// 办公室接口 & 测试环境
// const baseUrl = isdev ? 'http://192.168.1.133:8899' : 'https://api.gwkjxb.com';// 办公室接口 & 正式环境 // const baseUrl = isdev ? 'http://192.168.1.133:8899' : 'https://api.gwkjxb.com';// 办公室接口 & 正式环境
// const baseUrl = 'https://api.gwkjxb.com';// 正式环境(由于本地测试后台没有启动,暂时通用正式服) // const baseUrl = 'https://api.gwkjxb.com';// 正式环境(由于本地测试后台没有启动,暂时通用正式服)
@ -18,4 +18,4 @@ const config = {
appID:'wx2a050f9a5c87a6dc', appID:'wx2a050f9a5c87a6dc',
isdev isdev
} }
export default config export default config

View File

@ -60,66 +60,6 @@
"style": { "style": {
"navigationBarTitleText": "视力测试" "navigationBarTitleText": "视力测试"
} }
},
{
"path": "pages/index/todo",
"style": {
"navigationBarTitleText": "待办事项",
"enablePullDownRefresh": true
}
},
{
"path": "pages/index/done",
"style": {
"navigationBarTitleText": "事务处理",
"enablePullDownRefresh": true
}
},
{
"path": "pages/index/visionList",
"style": {
"navigationBarTitleText": "测试记录",
"enablePullDownRefresh": true
}
},
{
"path": "pages/index/note_list",
"style": {
"navigationBarTitleText": "注意事项",
"enablePullDownRefresh": true
}
},
{
"path": "pages/user/setting/userAgreement",
"style": {
"navigationBarTitleText": "用户协议"
}
},
{
"path": "pages/user/setting/privacyPolicy",
"style": {
"navigationBarTitleText": "隐私政策"
}
},{
"path": "pages/user/setting/phone_list",
"style": {
"navigationBarTitleText": "个人信息手机清单"
}
},{
"path": "pages/user/setting/aboutUs",
"style": {
"navigationBarTitleText": "关于我们"
}
},{
"path": "pages/index/aikefu",
"style": {
"navigationBarTitleText": "客服中心"
}
},{
"path": "pages/index/result",
"style": {
"navigationBarTitleText": "测试结果"
}
} }
], ],
"globalStyle": { "globalStyle": {

View File

@ -1,203 +0,0 @@
<script setup>
//
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 unCombox from '@/uni_modules/uni-combox/components/uni-combox/uni-combox.vue'
import { onLoad,onShow } from "@dcloudio/uni-app"
import mySwiper from "@/components/mySwiper.vue"
import aikefu from "@/components/aikefu.vue"
import {ref,onMounted,nextTick,watch,getCurrentInstance} 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) => {
uni.createSelectorQuery().in(instance).select('.show-part').boundingClientRect((res)=>{
w_h.value = res.height
// console.log(res)
}).exec()
})
//
const w_h = ref(0)
const records = ref([
{
content:'您好,很高兴为您服务!',
type:1,//1-2-
}
])
const scrollContainer = ref()
const in_content = ref('')
const scrollTop = ref(0.01) //0
const instance = getCurrentInstance(); //
const is_loading = ref(false)
//
async function sendFunc() {
if(is_loading.value) {
return
}
is_loading.value = true
if(!in_content.value) {
uni.showToast({
title:"请填写内容",
icon:'error',
duration:2000,
mask:true
})
is_loading.value = false
return
}
records.value.push({
content:in_content.value,
type:2
})
const res = await api.getReply({msg:in_content.value})
is_loading.value = false
if(res.code === 0) {
in_content.value = ''
//
if(res.data.content) {
records.value.push({
content:res.data.content,
type:1
})
}
else{
records.value.push({
content:'请输入正确的关键词',
type:-1
})
}
}
else{
uni.showToast({
title:res.msg,
icon:"error",
duration:2000
})
}
//
uni.createSelectorQuery().in(instance).select('#scroll-view-content').boundingClientRect((res)=>{
let top = res.height-w_h.value+100;
if(top>0){
scrollTop.value = top;
}
// console.log(res.height,w_h.value)
}).exec()
}
</script>
<template>
<view class="aikefuBox page-box page-bg-gray" style="height: 100%;">
<!-- 信息展示区域 -->
<!-- <view class="ac-part show-part" id="show-part" ref="scrollContainer" :style="{scrollTop:scrollTop}"> -->
<scroll-view :scroll-with-animation="true" :scroll-y="true" class="ac-part show-part" scroll-y="true" :scroll-top="scrollTop">
<view class="ac-listt-box" id="scroll-view-content">
<view class="r_list-card" v-for="(item,i) in records">
<view v-if="item.type!=-1" class="r-row" :class="item.type === 1?'row-left':'row-right'">
<view class="r-avatar" v-if="item.type === 1">
<image src="../../static/kefu.png" mode="widthFix"></image>
</view>
<view class="r-content" :class="{'r-content-right':item.type==2}">{{item.content}}</view>
</view>
<!-- 错误提示 -->
<view class="r-row wrong-text" v-if="item.type==-1" style="color: #bfbfbf;text-align: center">
{{item.content}}
</view>
</view>
</view>
</scroll-view>
<!-- </view> -->
<!-- 输入区域 -->
<view class="as-part input-part">
<view class="input-box">
<view class="ib-left">
<input v-model="in_content" type="text" placeholder="输入您想咨询的内容">
</view>
<view class="ib-right">
<view class="send_btn" @tap="sendFunc">发送</view>
</view>
</view>
</view>
</view>
</template>
<style scoped lang="scss">
.aikefuBox{
height: 100%;
.show-part{
height: 88%;
// overflow-y: auto;
.ac-listt-box{
padding: 20rpx;
.r_list-card{
margin: 40rpx 0;
.r-row{
overflow: hidden;
.r-avatar{
float: left;
width: 80rpx;
height: 80rpx;
image{
width: 100%;
}
margin-right: 10rpx;
}
.r-content{
background-color: white;
display: inline-block;
padding: 20rpx;
border-radius:0 20rpx 20rpx 20rpx;
box-shadow: 10rpx 10rpx 10rpx #efefef;
}
.r-content-right{
float: right;
border-radius: 20rpx 0 20rpx 20rpx;
background-color: #26758d;
color: white;
}
}
}
}
}
.input-part{
height: 12%;
background: white;
position: fixed;
bottom: 0px;
width: 100%;
.input-box{
padding: 20rpx;
display: flex;
align-content: center;
.ib-left{
width: 88%;
margin-right: 20rpx;
input{
width: 100%;
border: 2rpx solid #c3c3c3;
padding: 10rpx 8rpx;
border-radius: 20rpx;
box-sizing: border-box;
display: block;
height: 100%;
}
}
.ib-right{
width: 12%;
display: flex;
align-items: center;
.send_btn{
padding: 10rpx;
background: #26758d;
color: white;
border-radius: 10rpx;
width: 100%;
text-align: center;
}
}
}
}
.ac-part{
}
}
</style>

View File

@ -1,266 +0,0 @@
<script setup>
//
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,onPullDownRefresh,onReachBottom } from "@dcloudio/uni-app"
// import mySwiper from "@/components/mySwiper.vue"
import {ref,onMounted,nextTick,watch} from "vue"
import api from '@/api/index.js'
import util from "@/utils/index.js"
import {useStore} from '@/store/index.js'
import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
import ccNewsTabs from '@/uni_modules/cc-newsTabs/components/cc-newsTabs/cc-newsTabs.vue'
const store = useStore()
//
onLoad((e) => {
c_index.value = parseInt(e.state_index)
list_box.value[c_index.value].queryParams.isFinish = c_index.value?0:1
if(store.systemInfo) {
swiper_h.value = store.systemInfo.windowHeight
}
getList()
})
onPullDownRefresh(()=> { //
init()
getList()
})
onReachBottom(() => { //
list_box.value[c_index.value].queryParams.page++
getList()
})
//
const inputDialog = ref()
const state_index = ref(0)
const swiper_h = ref(0)
const list = ref([])
const list_box = ref([
{
show_index:0,
state:1,
list:[],
queryParams:{
page:1,
pageSize:10,
isFinish:1
}
},
{
show_index:1,
state:0,
list:[],
queryParams:{
page:1,
pageSize:10,
isFinish:1
}
}
])
const queryParams = ref({
page:1,
pageSize:10,
isFinish:1
})
const c_index = ref(-1)
const tabArr = ref([
{
name: '已完成',
id: '1',
},
{
name: '待完成',
id: '2',
}
])
//
function init(){
// list.value = []
list_box.value[c_index.value].list = []
list_box.value[c_index.value].queryParams.page = 1
list_box.value[c_index.value].queryParams.pageSize = 10
}
function queryStateInitFunc() {
list_box.value[c_index.value].queryParams.isFinish = c_index.value?0:1
}
async function getList() {
uni.showLoading({
mask:true
})
const res = await api.getTodoist(list_box.value[c_index.value].queryParams)
uni.hideLoading();
if(res.code === 0) {
if(res.data && res.data.length > 0) {
// list.value.push(...res.data)
list_box.value[c_index.value].list.push(...res.data)
}
else{
list_box.value[c_index.value].queryParams.page--
}
}
else{
uni.showToast({
title:res.msg,
icon:"error",
duration:2000,
mask:true,
success() {
if(res.code === 7) //
{
store.afterFailLogin(2000)
}
}
})
}
}
function tabChange(currentIndex) {
c_index.value = currentIndex
// if(list_box.value[c_index.value].list.length === 0) {
// queryStateInitFunc()
// getList()
// }
}
function scroll_func(e) {
c_index.value = e.detail.current
if(list_box.value[c_index.value].list.length === 0) {
queryStateInitFunc()
getList()
}
}
const handle_info = ref(null)
const handle_info_index = ref(0)
function handle_func(item,i) {
handle_info.value = item
handle_info_index.value = i
inputDialog.value.open()
}
function finishFunc() {
// api.todoFinished
uni.showModal({
title:'温馨提示',
content:"确定要完成该事务吗?",
success:async function(res) {
if(res.confirm) {
const res_ = await api.todoFinished({
id:handle_info.value.ID,
isFinish:1
})
uni.showToast({
title:res_.msg,
icon:"error",
duration:2000,
mask:true,
success() {
if(res_.code === 0) {
list_box.value[c_index.value].list.splice(handle_info_index.value,1)
list_box.value[0].list = []
inputDialog.value.close()
}
}
})
}
}
})
}
</script>
<template>
<view class="todoBox page-box">
<cc-newsTabs :tabArr="tabArr" :o_index="c_index" @tabChange="tabChange"></cc-newsTabs>
<swiper :current="c_index" @change="scroll_func" :style="{'--size':swiper_h+'px'}" class="swiper" circular :indicator-dots="false" :autoplay="false" >
<swiper-item v-for="(item1,i1) in list_box">
<view class="todoBox">
<view v-for="(item,i) in item1.list" @tap="handle_func(item,i)" class="td-item swiper-item uni-bg-green">
<view class="td-content text-ellipsis-2">
{{item.content}}
</view>
<view class="td-info small-text">
{{util.timestampToDate(item.CreatedAt)}}
</view>
</view>
</view>
</swiper-item>
</swiper>
<uni-popup ref="inputDialog" >
<view class="pop-box">
<view class="pb-title">完善手术信息</view>
<view class="pb-content">
<view class="pb-item">
<view class="pb-item-left">事项说明</view>
<view class="pb-item-right">
{{handle_info?.content}}
</view>
</view>
<view class="pb-item">
<view class="pb-item-left">创建时间</view>
<view class="pb-item-right">
{{util.timestampToDate(handle_info?.CreatedAt)}}
</view>
</view>
<view v-if="!handle_info?.isFinish" class="pb-item pb-item-btn" @tap="finishFunc">完成该事务</view>
</view>
</view>
</uni-popup>
</view>
</template>
<style scoped lang="scss">
.swiper{
height: var(--size);
}
.todoBox{
padding: 20rpx;
.td-item{
padding: 20rpx 0;
border-bottom: 2rpx solid #eaeaea;
margin-bottom: 20rpx;
.td-content{
padding-bottom:20rpx;
}
.td-info{
text-align: right;
}
}
}
.pb-item-btn{
padding: 20rpx 0;
text-align: center;
color: white;
background: #26758d;
justify-content: center;
width: 66%;
margin: 0 auto;
border-radius: 10rpx;
}
.pop-box{
.pb-title{
text-align: center;
margin-bottom: 40rpx;
padding-top: 20rpx;
font-size: 32rpx;
font-weight: 900;
}
background-color: white;
padding: 20rpx;
width: 80%;
margin: 0 auto;
border-radius: 20rpx;
}
.pb-item{
display: flex;
align-items: center;
margin-bottom: 40rpx;
// justify-content: space-between;
.pb-item-left{
width: 30%;
color: gray;
}
.pb-item-right{
position: relative;
margin-left: 10rpx;
width: 75%;
}
}
:deep(){
.uni-popup__wrapper{
width: 100%;
}
}
</style>

View File

@ -2,169 +2,68 @@
// //
import uniDatetimePicker from '@/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue' 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 uniEasyinput from '@/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue'
import unCombox from '@/uni_modules/uni-combox/components/uni-combox/uni-combox.vue' import { onLoad } from "@dcloudio/uni-app"
import { onLoad,onShow } from "@dcloudio/uni-app"
import mySwiper from "@/components/mySwiper.vue" import mySwiper from "@/components/mySwiper.vue"
import aikefu from "@/components/aikefu.vue" import {ref,onMounted,nextTick} from "vue"
import {ref,onMounted,nextTick,watch} from "vue"
import api from '@/api/index.js'
import {useStore} from '@/store/index.js' import {useStore} from '@/store/index.js'
// import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue' // import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
const store = useStore() const store = useStore()
onShow((e) => { onLoad((e) => {
getLbtList() if(!store.userInfo?.has_operation) { //
if(store.userInfo && !store.operation_info) { // operation_flag.value = true
// getHospitalList()
setTimeout(()=>{ setTimeout(()=>{
console.log(inputDialog.value)
inputDialog.value.open() inputDialog.value.open()
},0) },0)
} }
}) })
// //
const hospitals = ref(null)
// const hospitals_show = ref(false)
const inputDialog = ref() const inputDialog = ref()
const inputClose = ref() const inputClose = ref()
const choosed_h = ref(null) const operation_flag = ref(false)
const blur_h = ref(0) const lbt_list = ref([
const surgery_time = ref(null) // {
const isSurgery = ref(-1) // 01 banner_name: "首页轮播2",
const lbt_list = ref([]) createtime: 1694851490,
// deletetime: null,
// watch(blur_h,(val1,val2) => { id: 6,
// // hospitals.value = null image: "http://niunai.zhitou1688.com/uploads/20230922/ea3b3348df5d2b41eb49ddbf86b83516.png",
// if(!choosed_h) { // is_show: 1,
type: "index",
// } url: "",
// }) weigh: 6,
const h_queryParams = ref({ },{
page:1, banner_name: "首页轮播2",
pageSize:1000, createtime: 1694851490,
key:'' deletetime: null,
}) id: 6,
// image: "/static/vip2.png",
async function getHospitalList() { is_show: 1,
const res = await api.getHospitalList(h_queryParams.value) type: "index",
if(res.code == 0) { url: "",
hospitals.value = res.data.list weigh: 6,
} }
} ])
async function getLbtList() { //
const res = await api.getLbtList()
if(res.code == 0) {
if(res.data.list) {
lbt_list.value = res.data.list
}
}
}
function toClose() { function toClose() {
inputDialog.value.close() inputDialog.value.close()
} }
function radioChange(e) { function radioChange(e) {
isSurgery.value = e.detail.value console.log(e)
} }
const single = ref('') const single = ref('')
function maskClick(e){ function maskClick(e){
// console.log('maskClick:', e);
} }
const hValue = ref('') // const hValue = ref('') //
const hValueId = ref('') // id const hValueId = ref('') // id
function onClickH() { function onClickH(e) {
h_queryParams.value.key = hValue.value // console.log(hValue.value)
getHospitalList()
} }
function toExam() { // function toExam() { //
uni.navigateTo({ uni.navigateTo({
url:"/pages/index/visionTest" url:"/pages/index/visionTest"
}) })
} }
function toChooseH(item) {
// console.log(item)
choosed_h.value = item
hValue.value = item.name
// hospitals.value = null
}
// function blurFunc() {
// blur_h.value = 1
// hospitals.value = null
// }
function focusFunc() {
// blur_h.value = 0
}
function toBlur(){
hospitals.value = null
}
async function toSave() {
if(isSurgery.value == -1) {
return
}
if(!surgery_time.value) {
return
}
if(!choosed_h.value || !choosed_h.value.ID) {
return
}
let user_info = JSON.parse(uni.getStorageSync('userInfo'))
let h_query = {
isSurgery:parseInt(isSurgery.value),
surgery_time:surgery_time.value,
userId:user_info.userId,
hospitalId:choosed_h.value?.ID
}
// console.log(h_query);return
const res = await api.hospital(h_query)
if(res.code == 0) {
uni.showToast({
title:"保存成功",
icon:"success",
duration:2000
})
uni.setStorageSync('operation_info',JSON.stringify(h_query))
store.operation_info = JSON.stringify(h_query)
toClose()
}
else{
uni.showToast({
title:res.msg,
icon:"error",
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_index) {
let url = '/pages/index/todo'
url = '/pages/index/done?state_index='+state_index
// if(state_index === 0) {
// url = '/pages/index/done?state_index='+state_index
// }
uni.navigateTo({
url
})
}
function toVisionList() {
uni.navigateTo({
url:"/pages/index/visionList"
})
}
function toNote(index) {
uni.navigateTo({
url:"/pages/index/note_list?index="+index
})
}
</script> </script>
<template> <template>
<view class="content page-box"> <view class="content page-box">
@ -176,28 +75,12 @@
<uni-icons type="forward" color="#9bc027" size="20"></uni-icons> <uni-icons type="forward" color="#9bc027" size="20"></uni-icons>
</view> </view>
</view> </view>
<view class="attention-card">
<view class="part-title">
测试记录
</view>
<view class="ac-parts">
<view @tap="toVisionList" class="ac-part" style="color: gray;" >
视力测试记录
<uni-icons type="forward" color="gray" size="20"></uni-icons>
</view>
</view>
</view>
<view class="attention-card">
<view class="part-title">
事务处理
</view>
</view>
<view class="main-cards"> <view class="main-cards">
<view @tap="todoFunc(0)" class="mc-part" style="margin-left: 0;"> <view class="mc-part" style="margin-left: 0;">
<view class="mc-part-text">已完成事项</view> <view class="mc-part-text">已完成事项</view>
<image src="../../static/done.png" mode="widthFix"></image> <image src="../../static/done.png" mode="widthFix"></image>
</view> </view>
<view @tap="todoFunc(1)" class="mc-part mc-part2" style="margin-right: 0;"> <view class="mc-part mc-part2" style="margin-right: 0;">
<view class="mc-part-text">待完成事项</view> <view class="mc-part-text">待完成事项</view>
<image style="transform: rotate(0deg);" src="../../static/undone.png" mode="widthFix"></image> <image style="transform: rotate(0deg);" src="../../static/undone.png" mode="widthFix"></image>
</view> </view>
@ -207,21 +90,21 @@
注意事项 注意事项
</view> </view>
<view class="ac-parts"> <view class="ac-parts">
<view @tap="toNote(0)" class="ac-part" style="background: linear-gradient(45deg, #ffa2a2,#ffd3d3, #ffffff00);"> <view class="ac-part" style="background: linear-gradient(45deg, #ffa2a2,#ffd3d3, #ffffff00);">
术前注意事项 术前注意事项
<uni-icons type="forward" color="#ffa2a2" size="20"></uni-icons> <uni-icons type="forward" color="#ffa2a2" size="20"></uni-icons>
</view> </view>
<view @tap="toNote(1)" class="ac-part" style="background: linear-gradient(45deg, #f9b275,#fff3e9, #ffffff00);"> <view class="ac-part" style="background: linear-gradient(45deg, #f9b275,#fff3e9, #ffffff00);">
术中注意事项 术中注意事项
<uni-icons type="forward" color="#f9b275" size="20"></uni-icons> <uni-icons type="forward" color="#f9b275" size="20"></uni-icons>
</view> </view>
<view @tap="toNote(2)" class="ac-part" style="background: linear-gradient(45deg, #8fdc8a,#fdfdfd, #ffffff00);"> <view class="ac-part" style="background: linear-gradient(45deg, #8fdc8a,#fdfdfd, #ffffff00);">
术后注意事项 术后注意事项
<uni-icons type="forward" color="#8fdc8a" size="20"></uni-icons> <uni-icons type="forward" color="#8fdc8a" size="20"></uni-icons>
</view> </view>
</view> </view>
</view> </view>
<uni-popup ref="inputDialog" @tap="toBlur" :is-mask-click='false'> <uni-popup ref="inputDialog" :is-mask-click='false'>
<view class="pop-box"> <view class="pop-box">
<view class="pb-title">完善手术信息</view> <view class="pb-title">完善手术信息</view>
<view class="pb-content"> <view class="pb-content">
@ -238,22 +121,15 @@
<view class="pb-item-left">手术时间</view> <view class="pb-item-left">手术时间</view>
<view class="pb-item-right"> <view class="pb-item-right">
<!-- <uni-datetime-picker type="date" :clear-icon="false" v-model="single" @maskClick="maskClick" /> --> <!-- <uni-datetime-picker type="date" :clear-icon="false" v-model="single" @maskClick="maskClick" /> -->
<uniDatetimePicker type="date" :clear-icon="false" v-model="surgery_time" @maskClick="maskClick" ></uniDatetimePicker> <uniDatetimePicker type="date" :clear-icon="false" v-model="single" @maskClick="maskClick" ></uniDatetimePicker>
</view> </view>
</view> </view>
<view class="pb-item"> <view class="pb-item">
<view class="pb-item-left">医院名称</view> <view class="pb-item-left">医院名称</view>
<view class="pb-item-right"> <view class="pb-item-right">
<!-- <uniEasyinput @tap.stop="focusFunc" suffixIcon="search" v-model="hValue" focus placeholder="请输入内容" @iconClick="onClickH"></uniEasyinput> <uniEasyinput suffixIcon="search" v-model="hValue" focus placeholder="请输入内容" @iconClick="onClickH"></uniEasyinput>
<view class="h_res_show_aprt" v-if="hospitals">
<view v-for="(item,i) in hospitals" @tap.stop="toChooseH(item)" class="h_res_show_aprt_row text-ellipsis-1">
{{item.name}}
</view>
</view> -->
<uni-combox @input="onClickH" :candidates="hospitals" placeholder="请选择医院" @choosed="toChooseH" v-model="hValue"></uni-combox>
</view> </view>
</view> </view>
<view class="pb-item pb-item-btn" @tap="toSave">提交</view>
</view> </view>
</view> </view>
<view class="pop-close" @tap="toClose"> <view class="pop-close" @tap="toClose">
@ -262,40 +138,9 @@
<!-- <uni-popup-dialog ref="inputClose" mode="input" title="输入内容" value="对话框预置提示内容!" <!-- <uni-popup-dialog ref="inputClose" mode="input" title="输入内容" value="对话框预置提示内容!"
placeholder="请输入内容" @confirm="dialogInputConfirm"></uni-popup-dialog> --> placeholder="请输入内容" @confirm="dialogInputConfirm"></uni-popup-dialog> -->
</uni-popup> </uni-popup>
<aikefu />
</view> </view>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
.pb-item-btn{
padding: 20rpx 0;
text-align: center;
color: white;
background: #26758d;
justify-content: center;
width: 66%;
margin: 0 auto;
border-radius: 10rpx;
}
.h_res_show_aprt{
position: absolute;
bottom: 100%;
width: 100%;
background: white;
z-index: 10;
box-shadow: 1px 2px 10px #02020236;
border: 1px solid #e3e3e3;
max-height: 400rpx;
overflow-y: auto;
left: 0;
.h_res_show_aprt_row{
padding: 20rpx 10rpx;
border-bottom: 2rpx #e3e3e3 solid;
color: gray;
}
.h_res_show_aprt_row:last-child{
border-bottom:unset
}
}
.mc-row{ .mc-row{
display:flex; display:flex;
// width: 100%; // width: 100%;
@ -319,10 +164,8 @@
// justify-content: space-between; // justify-content: space-between;
.pb-item-left{ .pb-item-left{
width: 30%; width: 30%;
color: gray;
} }
.pb-item-right{ .pb-item-right{
position: relative;
margin-left: 10rpx; margin-left: 10rpx;
width: 75%; width: 75%;
} }

View File

@ -1,281 +0,0 @@
<script setup>
//
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,onPullDownRefresh,onReachBottom } from "@dcloudio/uni-app"
// import mySwiper from "@/components/mySwiper.vue"
import {ref,onMounted,nextTick,watch} from "vue"
import api from '@/api/index.js'
import util from "@/utils/index.js"
import {useStore} from '@/store/index.js'
import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
import ccNewsTabs from '@/uni_modules/cc-newsTabs/components/cc-newsTabs/cc-newsTabs.vue'
const store = useStore()
//
onLoad((e) => {
c_index.value = parseInt(e.index)
list_box.value[c_index.value].queryParams.state = c_index.value==0?1:c_index.value==1?2:3
if(store.systemInfo) {
swiper_h.value = store.systemInfo.windowHeight
}
getList()
})
onPullDownRefresh(()=> { //
init()
getList()
})
onReachBottom(() => { //
list_box.value[c_index.value].queryParams.page++
getList()
})
//
const inputDialog = ref()
const state_index = ref(0)
const swiper_h = ref(0)
const list = ref([])
const list_box = ref([
{
show_index:0,
state:1,
list:[],
queryParams:{
page:1,
pageSize:10,
statet:1
}
},
{
show_index:1,
state:2,
list:[],
queryParams:{
page:1,
pageSize:10,
statet:2
}
},
{
show_index:1,
state:3,
list:[],
queryParams:{
page:1,
pageSize:10,
statet:3
}
}
])
const queryParams = ref({
page:1,
pageSize:10,
state:1
})
const c_index = ref(-1)
const tabArr = ref([
{
name: '手术前',
id: '1',
},
{
name: '手术中',
id: '2',
},
{
name: '手术后',
id: '3',
}
])
//
function init(){
// list.value = []
list_box.value[c_index.value].list = []
list_box.value[c_index.value].queryParams.page = 1
list_box.value[c_index.value].queryParams.pageSize = 10
}
function queryStateInitFunc() {
list_box.value[c_index.value].queryParams.state = c_index.value?0:1
}
async function getList() {
uni.showLoading({
mask:true
})
const res = await api.getTodoist(list_box.value[c_index.value].queryParams)
uni.hideLoading();
if(res.code === 0) {
if(res.data && res.data.length > 0) {
// list.value.push(...res.data)
list_box.value[c_index.value].list.push(...res.data)
}
else{
list_box.value[c_index.value].queryParams.page--
}
}
else{
uni.showToast({
title:res.msg,
icon:"error",
duration:2000,
mask:true,
success() {
if(res.code === 7) //
{
store.afterFailLogin(2000)
}
}
})
}
}
function tabChange(currentIndex) {
c_index.value = currentIndex
// if(list_box.value[c_index.value].list.length === 0) {
// queryStateInitFunc()
// getList()
// }
}
function scroll_func(e) {
c_index.value = e.detail.current
if(list_box.value[c_index.value].list.length === 0) {
queryStateInitFunc()
getList()
}
}
const handle_info = ref(null)
const handle_info_index = ref(0)
function handle_func(item,i) {
handle_info.value = item
handle_info_index.value = i
inputDialog.value.open()
}
function finishFunc() {
// api.todoFinished
uni.showModal({
title:'温馨提示',
content:"确定要完成该事务吗?",
success:async function(res) {
if(res.confirm) {
const res_ = await api.todoFinished({
id:handle_info.value.ID,
state:1
})
uni.showToast({
title:res_.msg,
icon:"error",
duration:2000,
mask:true,
success() {
if(res_.code === 0) {
list_box.value[c_index.value].list.splice(handle_info_index.value,1)
list_box.value[0].list = []
inputDialog.value.close()
}
}
})
}
}
})
}
</script>
<template>
<view class="todoBox page-box">
<cc-newsTabs :tabArr="tabArr" :o_index="c_index" @tabChange="tabChange"></cc-newsTabs>
<swiper :current="c_index" @change="scroll_func" :style="{'--size':swiper_h+'px'}" class="swiper" circular :indicator-dots="false" :autoplay="false" >
<swiper-item v-for="(item1,i1) in list_box">
<view class="todoBox">
<view v-for="(item,i) in item1.list" @tap="handle_func(item,i)" class="td-item swiper-item uni-bg-green">
<view class="td-content text-ellipsis-2">
{{item.content}}
</view>
<view class="td-info small-text">
{{util.timestampToDate(item.CreatedAt)}}
</view>
</view>
</view>
</swiper-item>
</swiper>
<uni-popup ref="inputDialog" >
<view class="pop-box">
<view class="pb-title">注意事项</view>
<view class="pb-content">
<view class="pb-item">
<!-- <view class="pb-item-left">事项说明</view> -->
<view class="pb-item-right">
{{handle_info?.content}}
</view>
</view>
<!-- <view class="pb-item">
<view class="pb-item-left">创建时间</view>
<view class="pb-item-right">
{{util.timestampToDate(handle_info?.CreatedAt)}}
</view>
</view> -->
<!-- <view v-if="!handle_info?.state" class="pb-item pb-item-btn" @tap="finishFunc">完成该事务</view> -->
</view>
</view>
</uni-popup>
</view>
</template>
<style scoped lang="scss">
.swiper{
height: var(--size);
}
.todoBox{
padding: 20rpx;
.td-item{
padding: 20rpx 0;
border-bottom: 2rpx solid #eaeaea;
margin-bottom: 20rpx;
.td-content{
padding-bottom:20rpx;
}
.td-info{
text-align: right;
}
}
}
.pb-item-btn{
padding: 20rpx 0;
text-align: center;
color: white;
background: #26758d;
justify-content: center;
width: 66%;
margin: 0 auto;
border-radius: 10rpx;
}
.pop-box{
.pb-title{
text-align: center;
margin-bottom: 40rpx;
padding-top: 20rpx;
font-size: 32rpx;
font-weight: 900;
}
background-color: white;
padding: 20rpx;
width: 80%;
margin: 0 auto;
border-radius: 20rpx;
}
.pb-item{
display: flex;
align-items: center;
margin-bottom: 40rpx;
// justify-content: space-between;
.pb-item-left{
width: 30%;
color: gray;
}
.pb-item-right{
position: relative;
margin-left: 10rpx;
width: 75%;
}
}
:deep(){
.uni-popup__wrapper{
width: 100%;
}
}
</style>

View File

@ -1,163 +0,0 @@
<script setup>
//
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 mySwiper from "@/components/mySwiper.vue"
import {ref,onMounted,nextTick} from "vue"
import {useStore} from '@/store/index.js'
import api from "@/api/index.js"
const store = useStore()
onLoad((e) => {
res_.value = JSON.parse(decodeURIComponent(e.res))
console.log(res_.value)
randomFunc()
})
//
const res_ = ref(null)
const userInfo = ref(null)
const bg_imgs = ref([
'https://jmyl-app.oss-cn-chengdu.aliyuncs.com/miniapp/result/result1.jpg',
'https://jmyl-app.oss-cn-chengdu.aliyuncs.com/miniapp/result/result2.jpg',
'https://jmyl-app.oss-cn-chengdu.aliyuncs.com/miniapp/result/result3.jpg',
])
const bg_index = ref(0)
const avatarUrl = ref(null)
const info = ref({left:'',right:''})
const show_ = ref(false)
//
function randomFunc() {
bg_index.value = parseInt((Math.random()*3))
uni.getImageInfo({
src:bg_imgs.value[bg_index.value],
success:function(res) {
avatarUrl.value = uni.getStorageSync('avatarUrl')
info.value.left = res_.value.leftEyeVision
info.value.right = res_.value.rightEyeVision
show_.value = true
},
fail(err) {
console.log(err)
}
})
}
</script>
<template>
<view class="visionTestBox page-box">
<!-- <view class="actionBox" :style="{background:`url(${bg_imgs[bg_index]})`}">
测试
</view> -->
<view class="actionBox">
<view class="img-box">
<image style="width: 100%;" :src="bg_imgs[bg_index]" mode="widthFix"></image>
<view v-if="show_" class="avatar-box">
<image :src="avatarUrl" mode="widthFix"></image>
</view>
<view v-if="show_" class="res-text-row">
<view class="rtr-left">{{info.left}}</view>
<view class="rtr-right">{{info.right}}</view>
</view>
</view>
</view>
</view>
</template>
<style scoped lang="scss">
.avatar-box{
width: 100%;
position: absolute;
top:280rpx;
image{
width: 260rpx;
margin: 0px auto;
display: block;
border-radius: 50%;
}
}
.img-box{
position: relative;
.res-text-row{
width: 100%;
display: flex;
justify-content: space-around;
align-items: center;
position: absolute;
top: 47%;
font-weight: 900;
color:gray;
.rtr-left{
margin-left: 20%;
}
}
}
.visionTestBox,.actionBox{
height: 100%;
}
.actionBox{
.ab-show-box{
// width: 100%;
height: 50%;
border: 2rpx solid #d0d0d0;
margin: 10rpx;
margin-top: 0px;
display: flex;
align-items: center;
justify-content: center;
image{
height: auto;
}
}
.ab-action-box{
.ac-row{
display: flex;
align-items: center;
justify-content: center;
.ac-row-card-text{
padding: 10rpx !important;
width: 80rpx !important;
height: 80rpx !important;
display: flex;
align-items: center;
justify-content: center;
}
.ac-row-card{
// white-space: nowrap;
margin: 20rpx;
font-size: 24rpx;
border-radius: 50%;
width: 40rpx;
height: 40rpx;
padding: 30rpx;
box-shadow: 2rpx 20rpx 40rpx #dfdfdf;
}
}
}
}
.content-text{
margin-bottom: 20rpx;
.ct-title{
text-align: center;
font-size: 34px;
color: #26758d;
}
}
.okBtn{
width: 100%;
color: white;
background-color: #26758d;
padding: 20rpx;
text-align: center;
box-sizing: border-box;
border-radius: 20rpx;
}
.pop-box{
.pb-title{
text-align: center;
margin-bottom: 40rpx;
}
background-color: white;
padding: 20rpx;
width: 80%;
margin: 0 auto;
border-radius: 20rpx;
}
</style>

View File

@ -1,84 +0,0 @@
<script setup>
//
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,onPullDownRefresh,onReachBottom } from "@dcloudio/uni-app"
// import mySwiper from "@/components/mySwiper.vue"
import {ref,onMounted,nextTick,watch} from "vue"
import api from '@/api/index.js'
import util from "@/utils/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) => {
getList()
})
onPullDownRefresh(()=> { //
init()
getList()
})
onReachBottom(() => { //
queryParams.value.page++
getList()
})
//
const list = ref([])
const queryParams = ref({
page:1,
pageSize:10,
isFinish:0
})
//
function init(){
list.value = []
queryParams.value.page = 1
queryParams.value.pageSize = 10
}
async function getList() {
const res = await api.getTodoist(queryParams.value)
if(res.code === 0) {
if(res.data && res.data.length > 0) {
list.value.push(...res.data)
}
else{
queryParams.value.page--
}
}
else{
uni.showToast({
title:"获取失败",
icon:"error",
duration:2000
})
}
}
</script>
<template>
<view class="todoBox page-box">
<view class="td-item" v-for="(item,i) in list">
<view class="td-content text-ellipsis-2">
{{item.content}}
</view>
<view class="td-info small-text">
{{util.timestampToDate(item.CreatedAt)}}
</view>
</view>
</view>
</template>
<style scoped lang="scss">
.todoBox{
padding: 20rpx;
.td-item{
padding: 20rpx 0;
border-bottom: 2rpx solid #eaeaea;
margin-bottom: 20rpx;
.td-content{
padding-bottom:20rpx;
}
.td-info{
text-align: right;
}
}
}
</style>

View File

@ -1,104 +0,0 @@
<script setup>
//
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,onPullDownRefresh,onReachBottom } from "@dcloudio/uni-app"
import emptyCard from "@/components/emptyCard.vue"
import {ref,onMounted,nextTick,watch} from "vue"
import api from '@/api/index.js'
import util from "@/utils/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) => {
if(store.userInfo){
let user_info = JSON.parse(store.userInfo)
queryParams.value.userId = user_info.userId
}
getList()
})
onPullDownRefresh(()=> { //
init()
getList()
})
onReachBottom(() => { //
queryParams.value.page++
getList()
})
//
const list = ref([])
const queryParams = ref({
page:1,
pageSize:10,
userId:0
})
//
function init(){
list.value = []
queryParams.value.page = 1
queryParams.value.pageSize = 10
}
async function getList() {
const res = await api.getVisionList(queryParams.value)
if(res.code === 0) {
if(res.data.list && res.data.list.length > 0) {
list.value.push(...res.data.list)
}
else{
queryParams.value.page--
}
}
else{
uni.showToast({
title:"获取失败",
icon:"error",
duration:2000
})
}
}
</script>
<template>
<view class="visinoListBox page-box">
<view class="vl-item-box" v-if="list.length > 0">
<view class="vl-item" v-for="(item,i) in list">
<view class="vl-title">{{util.timestampToDate(item.CreatedAt)}}</view>
<view class="vl-row-box">
<view class="vl-row">
<view class="vlr-left">右眼</view>
<view class="vlr-left">{{item.rightEyeVision}}</view>
</view>
<view class="vl-row">
<view class="vlr-left">左眼</view>
<view class="vlr-left">{{item.leftEyeVision}}</view>
</view>
</view>
</view>
</view>
<emptyCard v-else></emptyCard>
</view>
</template>
<style scoped lang="scss">
.visinoListBox{
.vl-item-box{
padding: 20rpx;
.vl-item{
.vl-title{
border-left: 4rpx solid red;
}
.vl-row-box{
.vl-row{
display: flex;
align-items: center;
.vlr-left{
}
.vlr-right{
margin-left: 20rpx;
}
}
}
}
}
}
</style>

View File

@ -6,31 +6,22 @@
// import mySwiper from "@/components/mySwiper.vue" // import mySwiper from "@/components/mySwiper.vue"
import {ref,onMounted,nextTick} from "vue" import {ref,onMounted,nextTick} from "vue"
import {useStore} from '@/store/index.js' import {useStore} from '@/store/index.js'
import api from "@/api/index.js"
const store = useStore() const store = useStore()
onLoad((e) => { onLoad((e) => {
userInfo.value = JSON.parse(store.userInfo) if(!store.userInfo?.has_operation) { //
countDown.value = countDown_init setTimeout(()=>{
// if(!store.userInfo?.has_operation) { // // console.log(inputDialog.value)
// setTimeout(()=>{ inputDialog.value.open()
// // console.log(inputDialog.value) },0)
// inputDialog.value.open() }
// },0)
// }
setTimeout(()=>{
// console.log(inputDialog.value)
inputDialog.value.open()
},0)
}) })
// //
const userInfo = ref(null)
const inputDialog = ref() const inputDialog = ref()
const inputDialog2 = ref() const inputDialog2 = ref()
const inputDialog3 = ref() const inputDialog3 = ref()
const step1 = ref('先测右眼,请遮住左眼') const step1 = ref('先测右眼,请遮住左眼')
const step2 = ref('请遮住右眼') const step2 = ref('请遮住右眼')
const countDown = ref(null) // const countDown = ref(5)
const countDown_init = 3
const scale_ = ref(1) const scale_ = ref(1)
const current_img = ref("") // const current_img = ref("") //
const current_img_index = ref(null) const current_img_index = ref(null)
@ -68,19 +59,13 @@
width:'29px' width:'29px'
}) })
const num = ref(0) const num = ref(0)
const now = ref(1); // 1-2- const now = ref(1)
const vision_info = ref({ const vision_info = ref({
left:4, left:4,
right:4 right:4.1
}) })
const is_test = ref(true)
// //
function toStart() { // function toStart() { //
// if(is_test.value) {
// uni.navigateTo({
// url:'/pages/index/result'
// })
// }
inputDialog.value.close() inputDialog.value.close()
inputDialog2.value.open() inputDialog2.value.open()
let s = setInterval(() => { let s = setInterval(() => {
@ -108,31 +93,22 @@
} }
function chooseFunc(index) { function chooseFunc(index) {
// //
if(!index || index!=current_img_index.value){ // if(!index){ //
}
else{ //
if(now.value == 1) { //
vision_info.value.right+=0.1
vision_info.value.right = Number(vision_info.value.right.toFixed(1))
}
else{ //
vision_info.value.left+=0.1
vision_info.value.left = Number(vision_info.value.left.toFixed(1))
}
} }
// //
randomFunc() randomFunc()
// //
if(num.value>8) { // if(num.value>8) { //
if(now.value == 2) { // if(now.value == 2) { //
inputDialog3.value.open()
return return
} }
show_size.value.width = '29px' show_size.value.width = '29px'
countDown.value = countDown_init countDown.value = 5
step1.value = '测左眼,请遮住右眼' step1.value = '测左眼,请遮住右眼'
num.value = 0 num.value = 8
now.value = 2 now.value = 2
toStart() toStart()
} }
@ -141,32 +117,8 @@
num.value++ num.value++
} }
} }
async function okFunc() { // function okFunc() { //
// inputDialog3.value.open() inputDialog3.value.open()
uni.showLoading({
mask:true
})
const params = {
leftEyeVision:vision_info.value.left+'',
rightEyeVision:vision_info.value.right+'',
userId:userInfo.value.userId
}
const res = await api.saveVision(params)
uni.hideLoading()
if(res.code == 0) {
uni.showToast({
title:"保存成功",
icon:"success",
duration:2000,
success: function (res1){
// uni.navigateBack()
uni.redirectTo({
url:"/pages/index/result?res="+encodeURIComponent(JSON.stringify(params))
})
}
})
}
} }
</script> </script>
<template> <template>
@ -195,10 +147,8 @@
<view class="pop-box"> <view class="pop-box">
<view class="pb-title">测试须知</view> <view class="pb-title">测试须知</view>
<view class="pb-content"> <view class="pb-content">
<view class="content-text" style="color: gray;"> <view class="content-text">
1.适应室内光纤两分钟左右 使用uni-app自带的editor组件该组件支持AppH5微信小程序其他家小程序自身未提供这类解决方案
2.取坐位或站立正对手机检查者眼部跟手机平行保持手机距离40厘米
3.先测右眼后测左眼测试时请遮挡另一只眼睛
</view> </view>
<view class="okBtn" @tap="toStart">确定</view> <view class="okBtn" @tap="toStart">确定</view>
</view> </view>
@ -216,16 +166,12 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<uni-popup ref="inputDialog3" :is-mask-click='false'> <uni-popup ref="inputDialog3" :is-mask-click='true'>
<view class="pop-box"> <view class="pop-box">
<view class="pb-title">测试结束</view> <view class="pb-title">测试结束</view>
<view class="pb-content"> <view class="pb-content">
<view class="content-text"> <view class="content-text">
测试结束当前视力为{{vision_info.left}}(){{vision_info.right}}() 测试结束当前视力为{{vision_info.left}}(){{vision_info.right}}()
<view style="opacity: 0;">
使用uni-app自带的editor组件该组件支持AppH5微信小程序其他家小程序自身未提供这类解决方案
</view>
</view> </view>
<view class="okBtn" @tap="okFunc">确定</view> <view class="okBtn" @tap="okFunc">确定</view>
</view> </view>
@ -248,7 +194,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
image{ image{
height: auto; // width: 29px;
} }
} }
.ab-action-box{ .ab-action-box{

View File

@ -7,14 +7,12 @@
const store = useStore() const store = useStore()
import api from "@/api/index" import api from "@/api/index"
import custom from "@/utils/index.js" import custom from "@/utils/index.js"
onLoad((e) => { onLoad(() => {
token_info.value = JSON.parse(decodeURIComponent(e.token_info))
// is_login.value = custom.checkLogin() // is_login.value = custom.checkLogin()
// console.log(is_login.value) // console.log(is_login.value)
}) })
// //
const token_info = ref(null)
const avatarUrl = ref(null) const avatarUrl = ref(null)
const nickname = ref('') const nickname = ref('')
const res_form = ref(null) const res_form = ref(null)
@ -36,47 +34,28 @@
// console.log(e.detail.errMsg) // // console.log(e.detail.errMsg) //
// console.log(e.detail.errno) // // console.log(e.detail.errno) //
} }
async function getAccess_token(code){// async function getAccess_token(params={}){//token
//token //token
// wx.clearStorageSync(); // wx.clearStorageSync();
if(!avatarUrl.value) {
uni.showToast({
title:"请选择头像!",
icon:"error",
duration:1500
})
return
}
if(!nickname.value) {
uni.showToast({
title:"请填写昵称!",
icon:"error",
duration:1500
})
return
}
//访 //访
// console.log(code.value);return const data={
// const data={ username:params.code,//code
// username:code,//code type:'wechat_mini_app',
// type:'wechat_mini_app', identity:'user',
// identity:'user', password:'111',
// password:'111', avatarUrl:avatarUrl.value,
// avatarUrl:avatarUrl.value, nickName:nickname.value
// nickName:nickname.value }
// }
// console.log(':',data);return; // console.log(':',data);return;
// const res = await api.getToken(data) const res = await api.getToken(data)
// if(res.code === 200) { if(res.code === 200) {
// uni.setStorageSync('avatarUrl', avatarUrl.value);//avatarUrl uni.setStorageSync('avatarUrl', avatarUrl.value);//avatarUrl
// res_form.value = res.data res_form.value = res.data
// res_form.value.access_token = 'Bearer '+res.data.access_token res_form.value.access_token = 'Bearer '+res.data.access_token
// let userId = res.data.userId let userId = res.data.userId
// uni.setStorageSync('access_token',res_form.value.access_token);// token uni.setStorageSync('access_token',res_form.value.access_token);// token
// wx_login(userId) wx_login(userId)
// } }
uni.setStorageSync('avatarUrl', avatarUrl.value);//avatarUrl
wx_login(userId)
} }
async function wx_login(userId){ async function wx_login(userId){
let res=await new Promise(resolve=>{ let res=await new Promise(resolve=>{
@ -98,7 +77,6 @@
avatarUrl.value = file.data.file.url avatarUrl.value = file.data.file.url
uni.setStorageSync('avatarUrl', file.data.file.url);// uni.setStorageSync('avatarUrl', file.data.file.url);//
const up_res = await updateFunc() // const up_res = await updateFunc() //
// isInfo // 使
uni.switchTab({ uni.switchTab({
url:"/pages/user/index" url:"/pages/user/index"
}) })
@ -120,39 +98,6 @@
// console.log('',e) // console.log('',e)
// console.log('nickname:',nickname.value) // console.log('nickname:',nickname.value)
} }
async function updateInfoFunc() {
if(!avatarUrl.value) {
uni.showToast({
title:"请选择头像!",
icon:"error",
duration:1500
})
return
}
if(!nickname.value) {
uni.showToast({
title:"请填写昵称!",
icon:"error",
duration:1500
})
return
}
// let user_info = JSON.parse(uni.getStorageSync('userInfo'))
await custom.uploadImage(avatarUrl.value,async (file)=>{
avatarUrl.value = file.data.file.url
uni.setStorageSync('avatarUrl', file.data.file.url);//
token_info.value.nickname = nickname.value
token_info.value.avatar = avatarUrl.value
uni.setStorageSync('userInfo',JSON.stringify(token_info.value))
const up_res = await updateFunc() //
uni.setStorageSync('access_token','Bearer '+token_info.value.access_token);// token
uni.switchTab({
url:"/pages/user/index"
})
})
}
</script> </script>
<template> <template>
<view class="loginBox page-box img-part card-part" style="text-align:center"> <view class="loginBox page-box img-part card-part" style="text-align:center">
@ -164,8 +109,7 @@
<input type="nickname" @blur="nameInput" class="weui-input" placeholder="请输入昵称" v-model="nickname" /> <input type="nickname" @blur="nameInput" class="weui-input" placeholder="请输入昵称" v-model="nickname" />
</view> </view>
<view class="btn-part"> <view class="btn-part">
<!-- <button class="buy-btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">立即登录</button> --> <button class="buy-btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">立即登录</button>
<button class="buy-btn" @tap="updateInfoFunc">立即登录</button>
</view> </view>
</view> </view>
</template> </template>

View File

@ -8,7 +8,7 @@
<template> <template>
<view class="feedbackBox"> <view class="feedbackBox">
<view class="writeBox"> <view class="writeBox">
<textarea placeholder="输入您的问题" class="textarea" v-model="txt"></textarea> <textarea class="textarea" v-model="txt"></textarea>
</view> </view>
<view class="btn-part"> <view class="btn-part">
<view class="btn">提交</view> <view class="btn">提交</view>

View File

@ -8,29 +8,73 @@
import api from "@/api/index" import api from "@/api/index"
import custom from "@/utils/index.js" import custom from "@/utils/index.js"
onShow(() => { onShow(() => {
getInfo() is_login.value = custom.checkLogin()
// console.log(is_login.value)
if(is_login.value) {
userinfo.value = uni.getStorageSync('userInfo')
avatar.value = uni.getStorageSync('avatarUrl')
userinfo.value = JSON.parse(userinfo.value)
// console.log(userinfo.value)
}
}) })
// //
const avatar = ref('') const avatar = ref('')
const res_form = ref(null) const res_form = ref(null)
const is_login = ref(null) const is_login = ref(null)
const userinfo = ref(null) const userinfo = ref(null)
const newUser = ref(null)
// const avatarUrl = ref(null)
const nickname = ref('')
// //
function getInfo(){ function getPhoneNumber (e) {
is_login.value = custom.checkLogin() // tel_code.value = e.detail.code
// store.checkLogin() // console.log(e)
// console.log(is_login.value) getAccess_token({code:e.detail.code})
if(is_login.value) { // console.log(e.detail.code) //
avatar.value = uni.getStorageSync('avatarUrl') // console.log(e.detail.errMsg) //
userinfo.value = JSON.parse(uni.getStorageSync('userInfo')) // console.log(e.detail.errno) //
}
async function getAccess_token(params={}){//token
//token
// wx.clearStorageSync();
//访
const data={
username:params.code,//code
type:'wechat_mini_app',
identity:'user',
password:'111'
}
// console.log(':',data)
const res = await api.getToken(data)
if(res.code === 200) {
res_form.value = res.data
res_form.value.access_token = 'Bearer '+res.data.access_token
let userId = res.data.userId
uni.setStorageSync('access_token',res_form.value.access_token);// token
wx_login(userId)
} }
} }
function toLogin(token_info) { async function wx_login(userId){
let res=await new Promise(resolve=>{
uni.login({
provider: 'weixin', //使
success: function (loginRes) {
resolve(loginRes);
console.log(loginRes,'微信登录返回信息');
}
});
});
let res2=await api.wx_login({code:res.code},userId);
if(res2.code === 0) {
// for(let prop in res_form.value) {
// uni.setStorageSync(prop,res_form.value[prop])
// }
uni.setStorageSync(userInfo,JSON.stringify(res_form.value))
}
else{
uni.clearStorage();
}
}
function toLogin() {
uni.navigateTo({ uni.navigateTo({
url:"/pages/login/login?token_info="+token_info url:"/pages/login/login"
}) })
} }
function toDetail(type) { function toDetail(type) {
@ -57,93 +101,9 @@
}) })
} }
function toUserInfo() { function toUserInfo() {
if(is_login.value) { uni.navigateTo({
uni.navigateTo({ url:"/pages/user/userInfo"
url:"/pages/user/userInfo" })
})
}
}
function getPhoneNumber (e) {
// tel_code.value = e.detail.code
console.log(e)
getAccess_token({code:e.detail.code})
// console.log(e.detail.code) //
// console.log(e.detail.errMsg) //
// console.log(e.detail.errno) //
}
async function getAccess_token(params={}){//token
//token
// wx.clearStorageSync();
//访
const data={
username:params.code,//code
type:'wechat_mini_app',
identity:'user',
password:'111'
}
// console.log(':',data);return;
const res = await api.getToken(data)
if(res.code === 200) {
// newUser.value = res.data.newUser
if(res.data.newUser) { //
let userId = res.data.userId
let res_p=await new Promise(resolve=>{
uni.login({
provider: 'weixin', //使
success: function (loginRes) {
resolve(loginRes);
console.log(loginRes,'微信登录返回信息');
}
});
});
uni.setStorageSync('access_token','Bearer '+res.data.access_token);// token
let res2=await api.wx_login({code:res_p.code},userId);
if(res2.code === 0) {
store.checkLogin()
toLogin(encodeURIComponent(JSON.stringify(res.data)))
}
}
else{
uni.setStorageSync('avatarUrl', res.data.avatar);//avatarUrl
res_form.value = res.data
res_form.value.access_token = 'Bearer '+res.data.access_token
let userId = res.data.userId
uni.setStorageSync('access_token',res_form.value.access_token);// token
wx_login(userId)
}
}
else{
uni.showToast({
icon:"error",
title:res.msg,
duration:2000
})
}
}
async function wx_login(userId){
let res=await new Promise(resolve=>{
uni.login({
provider: 'weixin', //使
success: function (loginRes) {
resolve(loginRes);
console.log(loginRes,'微信登录返回信息');
}
});
});
let res2=await api.wx_login({code:res.code},userId);
if(res2.code === 0) {
uni.setStorageSync('userInfo',JSON.stringify(res_form.value))
// is_login.value = custom.checkLogin()
store.checkLogin()
getInfo()
// if(newUser.value) {
// toLogin()
// }
}
else{
uni.clearStorage();
}
} }
</script> </script>
<template> <template>
@ -155,12 +115,8 @@
</view> </view>
<uni-icons style="position: absolute;right:20rpx;top: 40%;" v-if="is_login" type="forward" color="white" size="20"></uni-icons> <uni-icons style="position: absolute;right:20rpx;top: 40%;" v-if="is_login" type="forward" color="white" size="20"></uni-icons>
</view> </view>
<!-- <view class="btn-box" @tap="toLogin" v-if="!is_login"> --> <view class="btn-box" @tap="toLogin" v-if="!is_login">
<view class="btn-box" v-if="!is_login"> <view class="btn">登录</view>
<!-- <view class="btn">登录</view> -->
<view class="btn-part">
<button class="buy-btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">立即登录</button>
</view>
</view> </view>
<view class="row-box" v-else> <view class="row-box" v-else>
<view class="rb-card" @tap="toDetail(1)" style="margin-bottom: 10px;"> <view class="rb-card" @tap="toDetail(1)" style="margin-bottom: 10px;">
@ -210,17 +166,6 @@
</view> </view>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
.buy-btn{
display: inline-block;
margin-top:1rem;
background-color: #26758d;
color: white;
border-radius: 50rpx;
font-weight: 200;
font-size: 24rpx;
width: 50%;
padding: 10rpx 0;
}
.rbc-content-left-box{ .rbc-content-left-box{
uni-icons{ uni-icons{
margin-right: 20rpx; margin-right: 20rpx;

View File

@ -4,7 +4,6 @@
import {ref,onMounted,nextTick} from "vue" import {ref,onMounted,nextTick} from "vue"
import {useStore} from '@/store/index.js' import {useStore} from '@/store/index.js'
import api from "@/api/index.js" import api from "@/api/index.js"
const store = useStore()
onLoad(() => { onLoad(() => {
// console.log(useStore.userInfo) // console.log(useStore.userInfo)
userinfo.value = JSON.parse(uni.getStorageSync('userInfo')) userinfo.value = JSON.parse(uni.getStorageSync('userInfo'))
@ -15,39 +14,7 @@
const avatar = ref(null) const avatar = ref(null)
// //
function toDetail(type) { function toDetail(type) {
let url = ''
switch(type) {
case 1:
url = '/pages/user/setting/userAgreement'
break;
case 2:
url = '/pages/user/setting/privacyPolicy'
break;
case 3:
url = '/pages/user/setting/phone_list'
break;
case 4:
url = '/pages/user/setting/aboutUs'
break;
case 5: // 退
uni.showModal({
title:"提示",
content:"确认要退出登录吗?",
success:async function(res) {
if(res.confirm) {
store.logout()
}
}
})
break;
default:
break;
}
if(url) {
uni.navigateTo({
url
})
}
} }
</script> </script>
<template> <template>
@ -63,7 +30,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="rb-card" @tap="toDetail(2)"> <view class="rb-card" @tap="toDetail(1)">
<view class="rbc-content"> <view class="rbc-content">
<view class="rbc-content-row rbc-content-left rbc-content-left-box"> <view class="rbc-content-row rbc-content-left rbc-content-left-box">
<!-- <uni-icons type="phone" color="gray" size="26"></uni-icons> --> <!-- <uni-icons type="phone" color="gray" size="26"></uni-icons> -->
@ -73,7 +40,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="rb-card" @tap="toDetail(3)"> <view class="rb-card" @tap="toDetail(1)">
<view class="rbc-content"> <view class="rbc-content">
<view class="rbc-content-row rbc-content-left rbc-content-left-box"> <view class="rbc-content-row rbc-content-left rbc-content-left-box">
<!-- <uni-icons type="calendar" color="gray" size="26"></uni-icons> --> <!-- <uni-icons type="calendar" color="gray" size="26"></uni-icons> -->
@ -83,7 +50,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="rb-card" @tap="toDetail(4)"> <view class="rb-card" @tap="toDetail(1)">
<view class="rbc-content"> <view class="rbc-content">
<view class="rbc-content-row rbc-content-left rbc-content-left-box"> <view class="rbc-content-row rbc-content-left rbc-content-left-box">
<!-- <uni-icons type="paperplane" color="gray" size="26"></uni-icons> --> <!-- <uni-icons type="paperplane" color="gray" size="26"></uni-icons> -->
@ -93,7 +60,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="rb-card" @tap="toDetail(5)"> <view class="rb-card" @tap="toDetail(1)">
<view class="rbc-content"> <view class="rbc-content">
<view class="rbc-content-row rbc-content-left rbc-content-left-box"> <view class="rbc-content-row rbc-content-left rbc-content-left-box">
<!-- <uni-icons type="paperplane" color="gray" size="26"></uni-icons> --> <!-- <uni-icons type="paperplane" color="gray" size="26"></uni-icons> -->

View File

@ -1,11 +0,0 @@
<script setup>
</script>
<template>
<view class="aboutUs page-box page-bg-gray">
</view>
</template>
<style scoped lang="scss">
</style>

View File

@ -1,11 +0,0 @@
<script setup>
</script>
<template>
<view class="phone_list page-box page-bg-gray">
</view>
</template>
<style scoped lang="scss">
</style>

View File

@ -1,11 +0,0 @@
<script setup>
</script>
<template>
<view class="privacyPolicy page-box page-bg-gray">
</view>
</template>
<style scoped lang="scss">
</style>

View File

@ -1,11 +0,0 @@
<script setup>
</script>
<template>
<view class="userAgreement page-box page-bg-gray">
</view>
</template>
<style scoped lang="scss">
</style>

View File

@ -4,71 +4,39 @@
import {ref,onMounted,nextTick} from "vue" import {ref,onMounted,nextTick} from "vue"
import {useStore} from '@/store/index.js' import {useStore} from '@/store/index.js'
import api from "@/api/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(()=> { // onPullDownRefresh(()=> { //
init()
getList()
}) })
onReachBottom(() => { // onReachBottom(() => { //
queryParams.value.page ++
getList()
}) })
// //
// const user_info = ref(null)
const list = ref([ const list = ref([
// { {
// id:1, id:1,
// cover_img:'https://gwjxb.oss-cn-chengdu.aliyuncs.com/logo.png', cover_img:'https://gwjxb.oss-cn-chengdu.aliyuncs.com/logo.png',
// title:' ', title:'金秋相逢 共叙合作',
// reading_num:100, reading_num:100,
// content:` content:`
// 1018 新华社北京10月18日电 金秋时节北京再迎盛会第三届一带一路国际合作高峰论坛隆重举行
// 春发其华秋收其实
// 共建一带一路走过了第一个蓬勃十年正值风华正茂务当昂扬奋进奔向下一个金色十年
// ` `
// }, },
// { {
// id:2, 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', 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:' ', title:'金秋相逢 共叙合作',
// reading_num:100, reading_num:100,
// content:` content:`
// 1018 新华社北京10月18日电 金秋时节北京再迎盛会第三届一带一路国际合作高峰论坛隆重举行
// 春发其华秋收其实
// 共建一带一路走过了第一个蓬勃十年正值风华正茂务当昂扬奋进奔向下一个金色十年
// ` `
// }
])
const queryParams = ref({
page:1,
pageSize:10,
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) { function toDetail(item) {
let info = encodeURIComponent(JSON.stringify(item)) let info = encodeURIComponent(JSON.stringify(item))
// console.log(info) // console.log(info)
@ -80,7 +48,7 @@
<template> <template>
<view class="starBox page-box page-bg-gray"> <view class="starBox page-box page-bg-gray">
<view class="list-box"> <view class="list-box">
<view class="lb-card" v-if="list.length > 0" v-for="(item,i) in list" @tap="toDetail(item)"> <view class="lb-card" v-for="(item,i) in list" @tap="toDetail(item)">
<view class="lb-left"> <view class="lb-left">
<image :src="item.cover_img" mode="aspectFill"></image> <image :src="item.cover_img" mode="aspectFill"></image>
</view> </view>
@ -89,9 +57,7 @@
<view class="lb-content text-ellipsis-1 small-text">{{item.content}}</view> <view class="lb-content text-ellipsis-1 small-text">{{item.content}}</view>
</view> </view>
</view> </view>
<emptyCard v-else></emptyCard>
</view> </view>
</view> </view>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -1,167 +1,20 @@
<script setup> <script setup>
import { onLoad } from "@dcloudio/uni-app" import { onLoad } from "@dcloudio/uni-app"
// import mySwiper from "@/components/mySwiper.vue" // import mySwiper from "@/components/mySwiper.vue"
import {ref,onMounted,nextTick,computed} from "vue" import {ref,onMounted,nextTick} from "vue"
import unCombox from '@/uni_modules/uni-combox/components/uni-combox/uni-combox.vue'
import {useStore} from '@/store/index.js' import {useStore} from '@/store/index.js'
const store = useStore()
import api from "@/api/index.js" import api from "@/api/index.js"
onLoad(() => { onLoad(() => {
// console.log(useStore.userInfo) // console.log(useStore.userInfo)
userinfo.value = JSON.parse(uni.getStorageSync('userInfo')) userinfo.value = JSON.parse(uni.getStorageSync('userInfo'))
console.log(userinfo.value) console.log(userinfo.value)
avatar.value = uni.getStorageSync('avatarUrl') avatar.value = uni.getStorageSync('avatarUrl')
if(uni.getStorageSync('operation_info')) {
h_info.value = JSON.parse(uni.getStorageSync('operation_info'))
if(h_info.value) {
// console.log(h_info.value)
getHospital(h_info.value.hospitalId)
}
}
}) })
// const userinfo = ref(null)
const h_queryParams = ref({
page:1,
pageSize:1000,
key:''
})
const hospitals = ref(null)
const userinfo = ref({})
const avatar = ref(null) const avatar = ref(null)
const h_info = ref({})
const inputDialog = ref(null)
const input_title = ref(null)
const hValue = ref('') //
const hValueId = ref('') // id
// const form_data = ref({})
// const userForm = ref(null)
// //
async function getHospitalList() {
const res = await api.getHospitalList(h_queryParams.value)
if(res.code == 0) {
hospitals.value = res.data.list
}
}
function onClickH() {
h_queryParams.value.key = hValue.value
getHospitalList()
}
async function getHospital(id) {
const res = await api.getHospitalInfo(id)
if(res.code === 0) {
h_info.value.name = res.data.name
}
else{
uni.showToast({
title:res.msg,
icon:"error",
duration:2000,
mask:true,
success() {}
})
}
}
const edit_type= ref(null)
function toDetail(type) { function toDetail(type) {
edit_type.value = type
switch(type){
case 1: //
inputDialog.value.open()
input_title.value = '修改昵称'
break;
case 2: //
inputDialog.value.open()
input_title.value = '修改电话'
break;
default:
break;
}
}
function finishFunc() {
inputDialog.value.close()
}
const startDate = computed(() => getDate('start'))
const endDate = computed(() => getDate('end'))
const choosed_h = ref(null)
const date = ref(null)
function getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 2;
}
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
}
function bindDateChange(e) {
console.log(e)
h_info.value.surgery_time = e.detail.value
}
function toChooseH(item) {
console.log(item)
choosed_h.value = item
hValue.value = item.name
// hospitals.value = null
}
async function sumbmitFunc() {
// console.log(choosed_h.value,h_info.value,userinfo.value)
let obj = {
id: userinfo.value.userId,
// isSurgery: 1, // 01
surgery_time: h_info.value?.surgery_time, //
nickname: userinfo.value.nickname,
// avatar: '',
phone: userinfo.value.phone,
hospitalId:choosed_h.value?.ID
}
const res = await api.userinfoUpdae(obj)
// console.log('res is ',res)
if(res.code === 0) {
uni.showToast({
title:res.msg,
icon:"success",
duration:2000,
async success() {
await wx_login(userinfo.value.userId)
uni.navigateBack()
}
})
}
else{
uni.showToast({
title:res.msg,
icon:"error",
duration:2000
})
}
}
async function wx_login(userId){
let res=await new Promise(resolve=>{
uni.login({
provider: 'weixin', //使
success: function (loginRes) {
resolve(loginRes);
console.log(loginRes,'微信登录返回信息');
}
});
});
let res2=await api.wx_login({code:res.code},userId);
if(res2.code === 0) {
uni.setStorageSync('userInfo',JSON.stringify(userinfo.value))
// is_login.value = custom.checkLogin()
store.checkLogin()
}
else{
uni.clearStorage();
}
} }
</script> </script>
<template> <template>
@ -181,7 +34,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="rb-card" @tap="toDetail(2)"> <view class="rb-card" @tap="toDetail(1)">
<view class="rbc-content"> <view class="rbc-content">
<view class="rbc-content-row rbc-content-left rbc-content-left-box"> <view class="rbc-content-row rbc-content-left rbc-content-left-box">
<uni-icons type="phone" color="gray" size="26"></uni-icons> <uni-icons type="phone" color="gray" size="26"></uni-icons>
@ -192,54 +45,29 @@
</view> </view>
</view> </view>
</view> </view>
<view class="rb-card" @tap="toDetail(3)"> <view class="rb-card" @tap="toDetail(1)">
<view class="rbc-content"> <view class="rbc-content">
<view class="rbc-content-row rbc-content-left rbc-content-left-box"> <view class="rbc-content-row rbc-content-left rbc-content-left-box">
<uni-icons type="calendar" color="gray" size="26"></uni-icons> <uni-icons type="calendar" color="gray" size="26"></uni-icons>
手术时间</view> 手术时间</view>
<view class="rbc-content-row rbc-content-right"> <view class="rbc-content-row rbc-content-right">
<!-- {{h_info?.surgery_time}} --> 2023-10-1
<picker mode="date" :value="h_info?.surgery_time" :start="startDate" :end="endDate" @change="bindDateChange"> <uni-icons type="forward" color="gray" size="20"></uni-icons>
<view class="rbc-content-row rbc-content-right">
<view class="uni-input"> {{h_info?.surgery_time}}</view>
<uni-icons type="forward" color="gray" size="20"></uni-icons>
</view>
</picker>
</view> </view>
</view> </view>
</view> </view>
<view class="rb-card" @tap="toDetail(4)"> <view class="rb-card" @tap="toDetail(1)">
<view class="rbc-content"> <view class="rbc-content">
<view class="rbc-content-row rbc-content-left rbc-content-left-box"> <view class="rbc-content-row rbc-content-left rbc-content-left-box">
<uni-icons type="paperplane" color="gray" size="26"></uni-icons> <uni-icons type="paperplane" color="gray" size="26"></uni-icons>
手术医院</view> 手术医院</view>
<view class="rbc-content-row rbc-content-right"> <view class="rbc-content-row rbc-content-right">
<!-- {{h_info?.name}} --> 金山医院
<uni-combox @input="onClickH" :candidates="hospitals" placeholder="请选择医院" @choosed="toChooseH" v-model="hValue"></uni-combox>
<uni-icons type="forward" color="gray" size="20"></uni-icons> <uni-icons type="forward" color="gray" size="20"></uni-icons>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!--修改姓名/电话 弹窗 -->
<uni-popup ref="inputDialog" >
<view class="pop-box">
<view class="pb-title">{{input_title}}</view>
<view class="pb-content">
<view class="pb-item">
<!-- <view class="pb-item-left">事项说明</view> -->
<view class="pb-item-right">
<!-- <input v-if="edit_type == 1" class="uni-input" v-model="userinfo.nickname" focus placeholder="输入您的姓名" />
<input v-else class="uni-input" v-model="userinfo.phone" focus placeholder="输入您的电话" /> -->
<uni-easyinput :inputBorder="false" v-if="edit_type == 1" borderColor="#26758d" v-model="userinfo.nickname" focus placeholder="输入您的姓名"></uni-easyinput>
<uni-easyinput :inputBorder="false" v-else borderColor="#26758d" v-model="userinfo.phone" focus placeholder="输入您的电话"></uni-easyinput>
</view>
</view>
<view class="pb-item pb-item-btn" @tap="finishFunc">确定</view>
</view>
</view>
</uni-popup>
<view class="pb-item pb-item-btn" style="margin-top: 40rpx;" @tap="sumbmitFunc">确定</view>
</view> </view>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
@ -325,49 +153,5 @@
} }
.user-box{ .user-box{
background: #f6f6f6; background: #f6f6f6;
}
.pb-item-btn{
padding: 20rpx 0;
text-align: center;
color: white;
background: #26758d;
justify-content: center;
width: 66%;
margin: 0 auto;
border-radius: 10rpx;
}
.pop-box{
.pb-title{
text-align: center;
margin-bottom: 40rpx;
padding-top: 20rpx;
font-size: 32rpx;
font-weight: 900;
}
background-color: white;
padding: 20rpx;
width: 80%;
margin: 0 auto;
border-radius: 20rpx;
}
.pb-item{
display: flex;
align-items: center;
margin-bottom: 40rpx;
// justify-content: space-between;
.pb-item-left{
width: 30%;
color: gray;
}
.pb-item-right{
position: relative;
// margin-left: 10rpx;
width:100%;
}
}
:deep(){
.uni-popup__wrapper{
width: 100%;
}
} }
</style> </style>

View File

@ -6,19 +6,17 @@
// import mySwiper from "@/components/mySwiper.vue" // import mySwiper from "@/components/mySwiper.vue"
import {ref,onMounted,nextTick} from "vue" import {ref,onMounted,nextTick} from "vue"
import {useStore} from '@/store/index.js' import {useStore} from '@/store/index.js'
import emptyCard from "@/components/emptyCard.vue"
import api from "@/api/index.js" import api from "@/api/index.js"
import util from "@/utils"
onLoad((e) => { onLoad((e) => {
// console.log(e) console.log(e)
// a_info.value = JSON.parse(decodeURIComponent(e.info)) a_info.value = JSON.parse(decodeURIComponent(e.info))
if(!e.id) { if(!e.id) {
uni.showToast({ uni.showToast({
icon:"error", icon:"error",
title:"错误", title:"错误",
duration:2000 duration:2000
}) })
// a_info.value = null a_info.value = null
return return
} }
getDetail(e.id) getDetail(e.id)
@ -29,19 +27,6 @@
// //
async function getDetail(id) { async function getDetail(id) {
const res = await api.getArticleDetail({id}) const res = await api.getArticleDetail({id})
if(res.code == 0) {
a_info.value = res.data
}
else{
uni.showToast({
title:'获取失败',
icon:"error",
duration:2000
})
}
}
async function starFunc(type) { //
a_info.value.isStar = type
} }
</script> </script>
<template> <template>
@ -49,32 +34,11 @@
<view class="title"> <view class="title">
{{a_info?.title}} {{a_info?.title}}
</view> </view>
<view v-if="a_info" class="more-info small-text">{{util.timestampToDate(a_info?.CreatedAt)}}</view> <view class="more-info small-text">2023-10-5</view>
<view class="d-content" v-html="a_info?.content"></view> <view class="d-content" v-html="a_info?.content"></view>
<view class="action-box" v-if="a_info">
<view class="ab-item">
<uni-icons color="gray" type="eye" size="30"></uni-icons>
<view style="color: gray;">{{a_info?.reading_num}}</view>
</view>
<view class="ab-item">
<uni-icons color="#26758d" @tap="starFunc(0)" v-if="a_info?.isStar" type="star-filled" size="30"></uni-icons>
<uni-icons color="gray" @tap="starFunc(1)" v-else type="star" size="30"></uni-icons>
</view>
</view>
<emptyCard title="暂无内容" v-if="!a_info"></emptyCard>
</view> </view>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
.action-box{
margin-top: 20px;
display: flex;
justify-content: flex-end;
.ab-item{
display: flex;
align-items: center;
margin: 0 20rpx;
}
}
.detailBox{ .detailBox{
.more-info{ .more-info{
text-align: right; text-align: right;

View File

@ -7,7 +7,6 @@
import {ref,onMounted,nextTick} from "vue" import {ref,onMounted,nextTick} from "vue"
import {useStore} from '@/store/index.js' import {useStore} from '@/store/index.js'
import api from "@/api/index" import api from "@/api/index"
import emptyCard from "@/components/emptyCard.vue"
// //
onLoad(() => { onLoad(() => {
getList() getList()
@ -30,36 +29,43 @@
page:1, page:1,
pageSize:10 pageSize:10
}) })
const list = ref([]) 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日电 金秋时节北京再迎盛会第三届一带一路国际合作高峰论坛隆重举行
春发其华秋收其实
共建一带一路走过了第一个蓬勃十年正值风华正茂务当昂扬奋进奔向下一个金色十年
`
}
])
// //
function init() { function init() {
queryParams.page = 1 queryParams.page = 1
queryParams.pageSize = 10 queryParams.pageSize = 10
list.value = []
} }
async function getList(){ async function getList(){
const res = await api.getArticleList(queryParams.value) const res = await api.getArticleList(queryParams.value)
if(res.code == 0) {
if( res.data.list.length>0) {
list.value.push(...res.data.list)
}
else{
queryParams.page-=1
}
}
else{
uni.showToast({
title:'获取失败',
icon:"error",
duration:2000
})
}
} }
function toDetail(item) { function toDetail(item) {
let info = encodeURIComponent(JSON.stringify(item)) let info = encodeURIComponent(JSON.stringify(item))
// console.log(info) // console.log(info)
uni.navigateTo({ uni.navigateTo({
url:"./detail?id="+item.ID url:"./detail?info="+info+"&id="+item.id
}) })
} }
</script> </script>
@ -69,16 +75,15 @@
</view> </view>
<view class="list-box"> <view class="list-box">
<view v-if="list.length>0" class="lb-card" v-for="(item,i) in list" @tap="toDetail(item)"> <view class="lb-card" v-for="(item,i) in list" @tap="toDetail(item)">
<view class="lb-left"> <view class="lb-left">
<image :src="item.cover_img" mode="aspectFill"></image> <image :src="item.cover_img" mode="aspectFill"></image>
</view> </view>
<view class="lb-right"> <view class="lb-right">
<view class="lb-title">{{item.title}}</view> <view class="lb-title">{{item.title}}</view>
<view class="lb-content text-ellipsis-1 small-text" v-html="item.content"></view> <view class="lb-content text-ellipsis-1 small-text">{{item.content}}</view>
</view> </view>
</view> </view>
<emptyCard v-else></emptyCard>
</view> </view>
</view> </view>
</template> </template>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

View File

@ -23,8 +23,7 @@ export const useStore = defineStore('main2', {
cartList:[], cartList:[],
cartChange:false, cartChange:false,
remark_text:'', remark_text:'',
address:'', address:''
operation_info:null, // 手术信息
} }
}, },
actions:{ actions:{
@ -62,19 +61,8 @@ export const useStore = defineStore('main2', {
if(access_token) { if(access_token) {
this.access_token = access_token this.access_token = access_token
this.isLogin = true this.isLogin = true
this.userInfo = uni.getStorageSync('userInfo')
this.operation_info = uni.getStorageSync('operation_info')
// this.getUserInfo() // this.getUserInfo()
} }
else{
this.access_token = null
this.isLogin = false
this.userInfo = null
// 清空缓存
// uni.removeStorageSync('userInfo');
// uni.removeStorageSync('access_token');
// uni.removeStorageSync('avatarUrl');
}
// else{ // else{
// if(!visitState) { // if(!visitState) {
// // uni.navigateTo({ // // uni.navigateTo({
@ -157,19 +145,6 @@ export const useStore = defineStore('main2', {
// cart_list.value = res.data // cart_list.value = res.data
// } // }
} }
},
afterFailLogin(duration){
setTimeout(()=>{
uni.removeStorageSync('userInfo');
uni.removeStorageSync('access_token');
uni.removeStorageSync('avatarUrl');
this.userInfo = null
this.operation_info = null
uni.switchTab({
url:'/pages/user/index'
})
},duration)
} }
} }
}) })

View File

@ -1,4 +0,0 @@
## 2.02023-10-28
适配vue3 小程序
## 1.0.02023-07-16
组件初始化

View File

@ -1,195 +0,0 @@
<template>
<view class="content">
<!-- 顶部选项卡 -->
<scroll-view id="nav-bar" class="nav-bar" scroll-x scroll-with-animation :scroll-left="scrollLeft">
<!-- <view v-for="(item,index) in tabArr" :key="item.id" class="nav-item"
:class="{current: index === tabCurrentIndex}" :id="'tab'+index" @click="changeTab(index)">{{item.name}}
</view> -->
<view v-for="(item,index) in tabArr" :key="item.id" class="nav-item"
:style="{width:tab_width+'%'}"
:class="{current: index === o_index}" :id="'tab'+index" @click="changeTab(index)">{{item.name}}
</view>
</scroll-view>
</view>
</template>
<script>
let windowWidth = uni.getSystemInfoSync().windowWidth,
scrollTimer = false,
tabBar;
export default {
data() {
return {
tabCurrentIndex: 0, //
scrollLeft: 0, //
tab_width:0,
}
},
mounted() {
console.log(this.tabArr)
this.tab_width = parseFloat(100/this.tabArr.length)
},
props: {
tabArr: {
type: Array,
default () {
return [];
}
},
o_index: {
type: Number,
default () {
return 0;
}
}
},
methods: {
//tab
async changeTab(e) {
if (scrollTimer) {
//
clearTimeout(scrollTimer);
scrollTimer = false;
}
let index = e;
//e=numbere=objectswiper
if (typeof e === 'object') {
index = e.detail.current
}
if (typeof tabBar !== 'object') {
tabBar = await this.getElSize("nav-bar")
}
//
let tabBarScrollLeft = tabBar.scrollLeft;
let width = 0;
let nowWidth = 0;
//
for (let i = 0; i <= index; i++) {
let result = await this.getElSize('tab' + i);
width += result.width;
if (i === index) {
nowWidth = result.width;
}
}
if (typeof e === 'number') {
//tabbar
this.tabCurrentIndex = index;
}
// console.log("windowWidth = " + windowWidth);
//300ms,swipertabbar
scrollTimer = setTimeout(() => {
if (width - nowWidth / 2 > windowWidth / 2) {
//
this.scrollLeft = width - nowWidth / 2 - windowWidth / 2;
} else {
this.scrollLeft = 0;
}
if (typeof e === 'object') {
this.tabCurrentIndex = index;
}
this.tabCurrentIndex = index;
}, 300)
// console.log('changeTab is done!!!')
this.$emit("tabChange", this.tabCurrentIndex);
},
//size
getElSize(id) {
return new Promise((res, rej) => {
// 使wx.createSelectorQuery() wx. this.createSelectorQuery()
// unithisuni.createSelectorQuery()
// #ifdef MP-WEIXIN
let el = this.createSelectorQuery().select('#' + id);
// #endif
// #ifdef H5 || APP-PLUS
let el = uni.createSelectorQuery().select('#' + id);
// #endif
el.fields({
size: true,
scrollOffset: true,
rect: true
}, (data) => {
res(data);
}).exec();
});
},
}
}
</script>
<style lang='scss'>
.content {
background-color: #f8f8f8;
height: 100%;
overflow: hidden;
}
/* 隐藏滚动条scrollbar */
.nav-bar ::-webkit-scrollbar {
display: none;
background-color: transparent;
}
/* 顶部tabbar */
.nav-bar {
position: relative;
z-index: 10;
height: 90upx;
white-space: nowrap;
box-shadow: 0 2upx 8upx rgba(0, 0, 0, .06);
background-color: #fff;
.nav-item {
display: inline-block;
/* width: 150upx; */
/* width: 33.33%; */
height: 90upx;
text-align: center;
line-height: 90upx;
font-size: 30upx;
/* color: #303133; */
color: gray;
position: relative;
font-weight: 900;
&:after {
content: '';
width: 0;
height: 0;
border-bottom: 4upx solid #26758d;
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
transition: .3s;
}
}
.current {
color: #26758d;
&:after {
width: 50%;
}
}
}
</style>

View File

@ -1,85 +0,0 @@
{
"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"
}
}
}
}
}

View File

@ -1,132 +0,0 @@
# cc-newsTabs
#### 使用方法
```使用方法
<!-- tabArrtab数组 tabChange标签栏切换 -->
<cc-newsTabs :tabArr="tabArr" @tabChange="tabChange"></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
<template>
<view class="content">
<!-- tabArrtab数组 tabChange标签栏切换 -->
<cc-newsTabs :tabArr="tabArr" @tabChange="tabChange"></cc-newsTabs>
</view>
</template>
<script>
export default {
data() {
return {
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'
}],
}
},
methods: {
tabChange(currentIndex) {
uni.showModal({
title: "当前选择序列",
content: "当前选择序列 = " + currentIndex
})
}
}
}
</script>
<style>
page,
.content {
background-color: #f8f8f8;
height: 100%;
overflow: hidden;
}
</style>
```

View File

@ -1,15 +0,0 @@
## 1.0.12021-11-23
- 优化 label、label-width 属性
## 1.0.02021-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.02021-07-30
- 组件兼容 vue3如何创建vue3项目详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 0.0.62021-05-12
- 新增 组件示例地址
## 0.0.52021-04-21
- 优化 添加依赖 uni-icons, 导入后自动下载依赖
## 0.0.42021-02-05
- 优化 组件引用关系通过uni_modules引用组件
## 0.0.32021-02-04
- 调整为uni_modules目录规范

View File

@ -1,295 +0,0 @@
<template>
<view class="uni-combox" :class="border ? '' : 'uni-combox__no-border'">
<view v-if="label" class="uni-combox__label" :style="labelStyle">
<text>{{label}}</text>
</view>
<view class="uni-combox__input-box">
<input class="uni-combox__input" type="text" :placeholder="placeholder"
placeholder-class="uni-combox__input-plac" v-model="inputVal" @input="onInput" @focus="onFocus"
@blur="onBlur" />
<uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" @click="toggleSelector">
</uni-icons>
</view>
<view class="uni-combox__selector" v-if="showSelector && filterCandidates">
<view class="uni-popper__arrow"></view>
<scroll-view scroll-y="true" class="uni-combox__selector-scroll">
<view class="uni-combox__selector-empty" v-if="filterCandidatesLength === 0">
<text>{{emptyTips}}</text>
</view>
<view class="uni-combox__selector-item" v-for="(item,index) in filterCandidates" :key="index"
@click="onSelectorClick(index)">
<text>{{item.name}}</text>
</view>
</scroll-view>
</view>
</view>
</template>
<script>
/**
* Combox 组合输入框
* @description 组合输入框一般用于既可以输入也可以选择的场景
* @tutorial https://ext.dcloud.net.cn/plugin?id=1261
* @property {String} label 左侧文字
* @property {String} labelWidth 左侧内容宽度
* @property {String} placeholder 输入框占位符
* @property {Array} candidates 候选项列表
* @property {String} emptyTips 筛选结果为空时显示的文字
* @property {String} value 组合框的值
*/
export default {
name: 'uniCombox',
emits: ['input', 'update:modelValue'],
props: {
border: {
type: Boolean,
default: true
},
label: {
type: String,
default: ''
},
labelWidth: {
type: String,
default: 'auto'
},
placeholder: {
type: String,
default: ''
},
candidates: {
type: Array,
default () {
return []
}
},
emptyTips: {
type: String,
default: '无匹配项'
},
// #ifndef VUE3
value: {
type: [String, Number],
default: ''
},
// #endif
// #ifdef VUE3
modelValue: {
type: [String, Number],
default: ''
},
// #endif
},
data() {
return {
showSelector: false,
inputVal: '',
// inputValId:0
}
},
computed: {
labelStyle() {
if (this.labelWidth === 'auto') {
return ""
}
return `width: ${this.labelWidth}`
},
filterCandidates() {
if(this.candidates) {
return this.candidates.filter((item) => {
return item.name.toString().indexOf(this.inputVal) > -1
})
}
else{
return null
}
},
filterCandidatesLength() {
if(this.candidates) {
return this.filterCandidates.length
}
else{
return null
}
}
},
watch: {
// #ifndef VUE3
value: {
handler(newVal) {
this.inputVal = newVal
},
immediate: true
},
// #endif
// #ifdef VUE3
modelValue: {
handler(newVal) {
// console.log(1212121,newVal)
this.inputVal = newVal
},
immediate: true
},
// #endif
},
methods: {
toggleSelector() {
this.showSelector = !this.showSelector
},
onFocus() {
this.showSelector = true
},
onBlur() {
setTimeout(() => {
this.showSelector = false
}, 153)
},
onSelectorClick(index) {
// console.log(this.filterCandidates,index)
// console.log(this.filterCandidates[index].name)
// console.log( this.filterCandidates.length)
// // console.log(this.filterCandidates)
// // this.inputValId = this.filterCandidates[index].ID
this.showSelector = false
// this.$emit('input', this.inputVal)
this.$emit('update:modelValue', this.inputVal)
this.$emit('choosed', this.filterCandidates[index])
this.inputVal = this.filterCandidates[index].name
},
onInput() {
setTimeout(() => {
this.$emit('input', this.inputVal)
this.$emit('update:modelValue', this.inputVal)
})
}
}
}
</script>
<style lang="scss" scoped>
.uni-combox {
font-size: 14px;
border: 1px solid #DCDFE6;
border-radius: 4px;
padding: 6px 10px;
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
// height: 40px;
flex-direction: row;
align-items: center;
// border-bottom: solid 1px #DDDDDD;
}
.uni-combox__label {
font-size: 16px;
line-height: 22px;
padding-right: 10px;
color: #999999;
}
.uni-combox__input-box {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex: 1;
flex-direction: row;
align-items: center;
}
.uni-combox__input {
flex: 1;
font-size: 14px;
height: 22px;
line-height: 22px;
}
.uni-combox__input-plac {
font-size: 14px;
color: #999;
}
.uni-combox__selector {
/* #ifndef APP-NVUE */
box-sizing: border-box;
/* #endif */
position: absolute;
top: calc(100% + 12px);
left: 0;
width: 100%;
background-color: #FFFFFF;
border: 1px solid #EBEEF5;
border-radius: 6px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
z-index: 2;
padding: 4px 0;
}
.uni-combox__selector-scroll {
/* #ifndef APP-NVUE */
max-height: 200px;
box-sizing: border-box;
/* #endif */
}
.uni-combox__selector-empty,
.uni-combox__selector-item {
/* #ifndef APP-NVUE */
display: flex;
cursor: pointer;
/* #endif */
line-height: 36px;
font-size: 14px;
text-align: center;
// border-bottom: solid 1px #DDDDDD;
padding: 0px 10px;
}
.uni-combox__selector-item:hover {
background-color: #f9f9f9;
}
.uni-combox__selector-empty:last-child,
.uni-combox__selector-item:last-child {
/* #ifndef APP-NVUE */
border-bottom: none;
/* #endif */
}
// picker
.uni-popper__arrow,
.uni-popper__arrow::after {
position: absolute;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 6px;
}
.uni-popper__arrow {
filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
top: -6px;
left: 10%;
margin-right: 3px;
border-top-width: 0;
border-bottom-color: #EBEEF5;
}
.uni-popper__arrow::after {
content: " ";
top: 1px;
margin-left: -6px;
border-top-width: 0;
border-bottom-color: #fff;
}
.uni-combox__no-border {
border: none;
}
</style>

View File

@ -1,90 +0,0 @@
{
"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"
}
}
}
}
}

View File

@ -1,11 +0,0 @@
## Combox 组合框
> **组件名uni-combox**
> 代码块: `uCombox`
组合框组件。
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-combox)
#### 如使用过程中有任何问题或者您对uni-ui有一些好的建议欢迎加入 uni-ui 交流群871950839

View File

@ -1,23 +0,0 @@
## 1.2.52023-03-29
- 新增 pattern.icon 属性,可自定义图标
## 1.2.42022-09-07
小程序端由于 style 使用了对象导致报错,[详情](https://ask.dcloud.net.cn/question/152790?item_id=211778&rf=false)
## 1.2.32022-09-05
- 修复 nvue 环境下,具有 tabBar 时fab 组件下部位置无法正常获取 --window-bottom 的bug详见[https://ask.dcloud.net.cn/question/110638?notification_id=826310](https://ask.dcloud.net.cn/question/110638?notification_id=826310)
## 1.2.22021-12-29
- 更新 组件依赖
## 1.2.12021-11-19
- 修复 阴影颜色不正确的bug
## 1.2.02021-11-19
- 优化 组件UI并提供设计资源详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-fab](https://uniapp.dcloud.io/component/uniui/uni-fab)
## 1.1.12021-11-09
- 新增 提供组件设计资源,组件样式调整
## 1.1.02021-07-30
- 组件兼容 vue3如何创建vue3项目详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.0.72021-05-12
- 新增 组件示例地址
## 1.0.62021-02-05
- 调整为uni_modules目录规范
- 优化 按钮背景色调整
- 优化 兼容pc端

View File

@ -1,491 +0,0 @@
<template>
<view class="uni-cursor-point">
<view v-if="popMenu && (leftBottom||rightBottom||leftTop||rightTop) && content.length > 0" :class="{
'uni-fab--leftBottom': leftBottom,
'uni-fab--rightBottom': rightBottom,
'uni-fab--leftTop': leftTop,
'uni-fab--rightTop': rightTop
}" class="uni-fab"
:style="nvueBottom"
>
<view :class="{
'uni-fab__content--left': horizontal === 'left',
'uni-fab__content--right': horizontal === 'right',
'uni-fab__content--flexDirection': direction === 'vertical',
'uni-fab__content--flexDirectionStart': flexDirectionStart,
'uni-fab__content--flexDirectionEnd': flexDirectionEnd,
'uni-fab__content--other-platform': !isAndroidNvue
}" :style="{ width: boxWidth, height: boxHeight, backgroundColor: styles.backgroundColor }"
class="uni-fab__content" elevation="5">
<view v-if="flexDirectionStart || horizontalLeft" class="uni-fab__item uni-fab__item--first" />
<view v-for="(item, index) in content" :key="index" :class="{ 'uni-fab__item--active': isShow }"
class="uni-fab__item" @click="_onItemClick(index, item)">
<image :src="item.active ? item.selectedIconPath : item.iconPath" class="uni-fab__item-image"
mode="aspectFit" />
<text class="uni-fab__item-text"
:style="{ color: item.active ? styles.selectedColor : styles.color }">{{ item.text }}</text>
</view>
<view v-if="flexDirectionEnd || horizontalRight" class="uni-fab__item uni-fab__item--first" />
</view>
</view>
<view :class="{
'uni-fab__circle--leftBottom': leftBottom,
'uni-fab__circle--rightBottom': rightBottom,
'uni-fab__circle--leftTop': leftTop,
'uni-fab__circle--rightTop': rightTop,
'uni-fab__content--other-platform': !isAndroidNvue
}" class="uni-fab__circle uni-fab__plus" :style="{ 'background-color': styles.buttonColor, 'bottom': nvueBottom }" @click="_onClick">
<uni-icons class="fab-circle-icon" :type="styles.icon" :color="styles.iconColor" size="32"
:class="{'uni-fab__plus--active': isShow && content.length > 0}"></uni-icons>
<!-- <view class="fab-circle-v" :class="{'uni-fab__plus--active': isShow && content.length > 0}"></view>
<view class="fab-circle-h" :class="{'uni-fab__plus--active': isShow && content.length > 0}"></view> -->
</view>
</view>
</template>
<script>
let platform = 'other'
// #ifdef APP-NVUE
platform = uni.getSystemInfoSync().platform
// #endif
/**
* Fab 悬浮按钮
* @description 点击可展开一个图形按钮菜单
* @tutorial https://ext.dcloud.net.cn/plugin?id=144
* @property {Object} pattern 可选样式配置项
* @property {Object} horizontal = [left | right] 水平对齐方式
* @value left 左对齐
* @value right 右对齐
* @property {Object} vertical = [bottom | top] 垂直对齐方式
* @value bottom 下对齐
* @value top 上对齐
* @property {Object} direction = [horizontal | vertical] 展开菜单显示方式
* @value horizontal 水平显示
* @value vertical 垂直显示
* @property {Array} content 展开菜单内容配置项
* @property {Boolean} popMenu 是否使用弹出菜单
* @event {Function} trigger 展开菜单点击事件返回点击信息
* @event {Function} fabClick 悬浮按钮点击事件
*/
export default {
name: 'UniFab',
emits: ['fabClick', 'trigger'],
props: {
pattern: {
type: Object,
default () {
return {}
}
},
horizontal: {
type: String,
default: 'left'
},
vertical: {
type: String,
default: 'bottom'
},
direction: {
type: String,
default: 'horizontal'
},
content: {
type: Array,
default () {
return []
}
},
show: {
type: Boolean,
default: false
},
popMenu: {
type: Boolean,
default: true
}
},
data() {
return {
fabShow: false,
isShow: false,
isAndroidNvue: platform === 'android',
styles: {
color: '#3c3e49',
selectedColor: '#007AFF',
backgroundColor: '#fff',
buttonColor: '#007AFF',
iconColor: '#fff',
icon: 'plusempty'
}
}
},
computed: {
contentWidth(e) {
return (this.content.length + 1) * 55 + 15 + 'px'
},
contentWidthMin() {
return '55px'
},
//
boxWidth() {
return this.getPosition(3, 'horizontal')
},
//
boxHeight() {
return this.getPosition(3, 'vertical')
},
//
leftBottom() {
return this.getPosition(0, 'left', 'bottom')
},
//
rightBottom() {
return this.getPosition(0, 'right', 'bottom')
},
//
leftTop() {
return this.getPosition(0, 'left', 'top')
},
rightTop() {
return this.getPosition(0, 'right', 'top')
},
flexDirectionStart() {
return this.getPosition(1, 'vertical', 'top')
},
flexDirectionEnd() {
return this.getPosition(1, 'vertical', 'bottom')
},
horizontalLeft() {
return this.getPosition(2, 'horizontal', 'left')
},
horizontalRight() {
return this.getPosition(2, 'horizontal', 'right')
},
// nvue bottom
nvueBottom() {
const safeBottom = uni.getSystemInfoSync().windowBottom;
// #ifdef APP-NVUE
return 30 + safeBottom
// #endif
// #ifndef APP-NVUE
return 30
// #endif
}
},
watch: {
pattern: {
handler(val, oldVal) {
this.styles = Object.assign({}, this.styles, val)
},
deep: true
}
},
created() {
this.isShow = this.show
if (this.top === 0) {
this.fabShow = true
}
//
this.styles = Object.assign({}, this.styles, this.pattern)
},
methods: {
_onClick() {
this.$emit('fabClick')
if (!this.popMenu) {
return
}
this.isShow = !this.isShow
},
open() {
this.isShow = true
},
close() {
this.isShow = false
},
/**
* 按钮点击事件
*/
_onItemClick(index, item) {
if (!this.isShow) {
return
}
this.$emit('trigger', {
index,
item
})
},
/**
* 获取 位置信息
*/
getPosition(types, paramA, paramB) {
if (types === 0) {
return this.horizontal === paramA && this.vertical === paramB
} else if (types === 1) {
return this.direction === paramA && this.vertical === paramB
} else if (types === 2) {
return this.direction === paramA && this.horizontal === paramB
} else {
return this.isShow && this.direction === paramA ? this.contentWidth : this.contentWidthMin
}
}
}
}
</script>
<style lang="scss" >
$uni-shadow-base:0 1px 5px 2px rgba($color: #000000, $alpha: 0.3) !default;
.uni-fab {
position: fixed;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
justify-content: center;
align-items: center;
z-index: 10;
border-radius: 45px;
box-shadow: $uni-shadow-base;
}
.uni-cursor-point {
/* #ifdef H5 */
cursor: pointer;
/* #endif */
}
.uni-fab--active {
opacity: 1;
}
.uni-fab--leftBottom {
left: 15px;
bottom: 30px;
/* #ifdef H5 */
left: calc(15px + var(--window-left));
bottom: calc(30px + var(--window-bottom));
/* #endif */
// padding: 10px;
}
.uni-fab--leftTop {
left: 15px;
top: 30px;
/* #ifdef H5 */
left: calc(15px + var(--window-left));
top: calc(30px + var(--window-top));
/* #endif */
// padding: 10px;
}
.uni-fab--rightBottom {
right: 15px;
bottom: 30px;
/* #ifdef H5 */
right: calc(15px + var(--window-right));
bottom: calc(30px + var(--window-bottom));
/* #endif */
// padding: 10px;
}
.uni-fab--rightTop {
right: 15px;
top: 30px;
/* #ifdef H5 */
right: calc(15px + var(--window-right));
top: calc(30px + var(--window-top));
/* #endif */
// padding: 10px;
}
.uni-fab__circle {
position: fixed;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
justify-content: center;
align-items: center;
width: 55px;
height: 55px;
background-color: #3c3e49;
border-radius: 45px;
z-index: 11;
// box-shadow: $uni-shadow-base;
}
.uni-fab__circle--leftBottom {
left: 15px;
bottom: 30px;
/* #ifdef H5 */
left: calc(15px + var(--window-left));
bottom: calc(30px + var(--window-bottom));
/* #endif */
}
.uni-fab__circle--leftTop {
left: 15px;
top: 30px;
/* #ifdef H5 */
left: calc(15px + var(--window-left));
top: calc(30px + var(--window-top));
/* #endif */
}
.uni-fab__circle--rightBottom {
right: 15px;
bottom: 30px;
/* #ifdef H5 */
right: calc(15px + var(--window-right));
bottom: calc(30px + var(--window-bottom));
/* #endif */
}
.uni-fab__circle--rightTop {
right: 15px;
top: 30px;
/* #ifdef H5 */
right: calc(15px + var(--window-right));
top: calc(30px + var(--window-top));
/* #endif */
}
.uni-fab__circle--left {
left: 0;
}
.uni-fab__circle--right {
right: 0;
}
.uni-fab__circle--top {
top: 0;
}
.uni-fab__circle--bottom {
bottom: 0;
}
.uni-fab__plus {
font-weight: bold;
}
// .fab-circle-v {
// position: absolute;
// width: 2px;
// height: 24px;
// left: 0;
// top: 0;
// right: 0;
// bottom: 0;
// /* #ifndef APP-NVUE */
// margin: auto;
// /* #endif */
// background-color: white;
// transform: rotate(0deg);
// transition: transform 0.3s;
// }
// .fab-circle-h {
// position: absolute;
// width: 24px;
// height: 2px;
// left: 0;
// top: 0;
// right: 0;
// bottom: 0;
// /* #ifndef APP-NVUE */
// margin: auto;
// /* #endif */
// background-color: white;
// transform: rotate(0deg);
// transition: transform 0.3s;
// }
.fab-circle-icon {
transform: rotate(0deg);
transition: transform 0.3s;
font-weight: 200;
}
.uni-fab__plus--active {
transform: rotate(135deg);
}
.uni-fab__content {
/* #ifndef APP-NVUE */
box-sizing: border-box;
display: flex;
/* #endif */
flex-direction: row;
border-radius: 55px;
overflow: hidden;
transition-property: width, height;
transition-duration: 0.2s;
width: 55px;
border-color: #DDDDDD;
border-width: 1rpx;
border-style: solid;
}
.uni-fab__content--other-platform {
border-width: 0px;
box-shadow: $uni-shadow-base;
}
.uni-fab__content--left {
justify-content: flex-start;
}
.uni-fab__content--right {
justify-content: flex-end;
}
.uni-fab__content--flexDirection {
flex-direction: column;
justify-content: flex-end;
}
.uni-fab__content--flexDirectionStart {
flex-direction: column;
justify-content: flex-start;
}
.uni-fab__content--flexDirectionEnd {
flex-direction: column;
justify-content: flex-end;
}
.uni-fab__item {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
width: 55px;
height: 55px;
opacity: 0;
transition: opacity 0.2s;
}
.uni-fab__item--active {
opacity: 1;
}
.uni-fab__item-image {
width: 20px;
height: 20px;
margin-bottom: 4px;
}
.uni-fab__item-text {
color: #FFFFFF;
font-size: 12px;
line-height: 12px;
margin-top: 2px;
}
.uni-fab__item--first {
width: 55px;
}
</style>

View File

@ -1,84 +0,0 @@
{
"id": "uni-fab",
"displayName": "uni-fab 悬浮按钮",
"version": "1.2.5",
"description": "悬浮按钮 fab button ,点击可展开一个图标按钮菜单。",
"keywords": [
"uni-ui",
"uniui",
"按钮",
"悬浮按钮",
"fab"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": ""
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
},
"uni_modules": {
"dependencies": ["uni-scss","uni-icons"],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"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"
},
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}

View File

@ -1,9 +0,0 @@
## Fab 悬浮按钮
> **组件名uni-fab**
> 代码块: `uFab`
点击可展开一个图形按钮菜单
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-fab)
#### 如使用过程中有任何问题或者您对uni-ui有一些好的建议欢迎加入 uni-ui 交流群871950839