JM-MiniApp/pages/index/index.vue

185 lines
4.6 KiB
Vue
Raw Normal View History

2023-10-08 21:21:21 +08:00
<script setup>
// 引入依赖
import { onLoad } from "@dcloudio/uni-app"
import mySwiper from "@/components/mySwiper.vue"
import {ref,onMounted,nextTick} from "vue"
import {useStore} from '@/store/index.js'
2023-10-11 22:20:34 +08:00
// import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
2023-10-08 21:21:21 +08:00
const store = useStore()
onLoad((e) => {
if(!store.userInfo?.has_operation) { // 未填写手术信息
2023-10-11 22:20:34 +08:00
// operation_flag.value = true
// setTimeout(()=>{
// console.log(inputDialog.value)
// inputDialog.value.open()
// },0)
2023-10-08 21:21:21 +08:00
}
})
// 变量
const inputDialog = ref()
const inputClose = ref()
const operation_flag = ref(false)
const lbt_list = ref([
{
banner_name: "首页轮播2",
createtime: 1694851490,
deletetime: null,
id: 6,
image: "http://niunai.zhitou1688.com/uploads/20230922/ea3b3348df5d2b41eb49ddbf86b83516.png",
is_show: 1,
type: "index",
url: "",
weigh: 6,
},{
banner_name: "首页轮播2",
createtime: 1694851490,
deletetime: null,
id: 6,
image: "/static/vip2.png",
is_show: 1,
type: "index",
url: "",
weigh: 6,
}
])
</script>
<template>
<view class="content page-box">
<!-- 轮播图 -->
<mySwiper :indicatorDots="true" :isRadius="true" height="160" class="index-siwper margin-b-card" :lbt_list="lbt_list" style="width: 100%;" />
2023-10-11 22:20:34 +08:00
<view class="main-cards">
<view class="mc-part" style="margin-left: 0;">
<view class="mc-part-text">已完成事项</view>
<image src="../../static/done.png" mode="widthFix"></image>
</view>
<view class="mc-part mc-part2" style="margin-right: 0;">
<view class="mc-part-text">待完成事项</view>
<image style="transform: rotate(0deg);" src="../../static/undone.png" mode="widthFix"></image>
</view>
</view>
<view class="attention-card">
<view class="part-title">
注意事项
</view>
<view class="ac-parts">
<view class="ac-part" style="background: linear-gradient(45deg, #ffa2a2,#ffd3d3, #ffffff00);">
术前注意事项
<uni-icons type="forward" color="#ffa2a2" size="20"></uni-icons>
</view>
<view class="ac-part" style="background: linear-gradient(45deg, #f9b275,#fff3e9, #ffffff00);">
术中注意事项
<uni-icons type="forward" color="#f9b275" size="20"></uni-icons>
2023-10-08 21:21:21 +08:00
</view>
2023-10-11 22:20:34 +08:00
<view class="ac-part" style="background: linear-gradient(45deg, #8fdc8a,#fdfdfd, #ffffff00);">
术后注意事项
<uni-icons type="forward" color="#8fdc8a" size="20"></uni-icons>
</view>
</view>
</view>
2023-10-08 21:21:21 +08:00
<uni-popup ref="inputDialog" :is-mask-click='false'>
<view class="pop-box">
<view class="pb-title">手术信息</view>
</view>
<view class="pop-close">
关闭
</view>
<!-- <uni-popup-dialog ref="inputClose" mode="input" title="输入内容" value="对话框预置提示内容!"
placeholder="请输入内容" @confirm="dialogInputConfirm"></uni-popup-dialog> -->
</uni-popup>
</view>
</template>
2023-10-11 22:20:34 +08:00
<style scoped lang="scss">
.part-title{
border-left: 10rpx solid #fe915d;
padding-left: 20rpx;
font-weight: 900;
}
.attention-card{
margin-top: 20rpx;
width: 100%;
.ac-parts{
margin-top: 20rpx;
.ac-part{
display: flex;
align-items: center;
justify-content: space-between;
padding:30rpx 20rpx;
color: white;
margin: 20rpx 0;
}
}
}
.main-cards{
.mc-part{
.mc-part-text{
position: relative;
z-index: 10;
font-size: 36rpx;
font-weight: 900;
}
width: 50%;
/* text-align: center; */
background: linear-gradient(200deg, #82d8f2, #ddecf0);
color: white;
padding: 40rpx 20rpx;
margin: 0 20rpx;
border-radius: 20rpx;
height: 100rpx;
position: relative;
overflow: hidden;
image{
position: absolute;
width: 66%;
right: 0;
bottom: -20%;
z-index: 1;
// transform: rotate(315deg);
transform: rotate(45deg);
}
}
.mc-part2{
background: linear-gradient(200deg,#bbf4d5, #50c053);
// text-align: right;
}
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
margin-top: 20rpx;
}
2023-10-08 21:21:21 +08:00
.pop-box{
background-color: white;
padding: 20rpx;
}
.page-box{
padding: 20rpx;
}
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>