This commit is contained in:
2023-10-11 22:20:34 +08:00
parent 60bf302119
commit 4fa658db18
70 changed files with 14216 additions and 23 deletions

View File

@@ -4,15 +4,15 @@
import mySwiper from "@/components/mySwiper.vue"
import {ref,onMounted,nextTick} from "vue"
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?.has_operation) { // 未填写手术信息
operation_flag.value = true
setTimeout(()=>{
console.log(inputDialog.value)
inputDialog.value.open()
},0)
// operation_flag.value = true
// setTimeout(()=>{
// console.log(inputDialog.value)
// inputDialog.value.open()
// },0)
}
})
// 变量
@@ -47,11 +47,35 @@
<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%;" />
<!-- <uni-popup ref="inputDialog" >
<view class="">
dasdsdd
<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>
</uni-popup> -->
<view class="ac-part" style="background: linear-gradient(45deg, #f9b275,#fff3e9, #ffffff00);">
术中注意事项
<uni-icons type="forward" color="#f9b275" size="20"></uni-icons>
</view>
<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>
<uni-popup ref="inputDialog" :is-mask-click='false'>
<view class="pop-box">
<view class="pb-title">手术信息</view>
@@ -64,7 +88,65 @@
</uni-popup>
</view>
</template>
<style>
<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;
}
.pop-box{
background-color: white;
padding: 20rpx;

View File

@@ -1,8 +1,57 @@
<template>
</template>
<script>
<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'
const store = useStore()
import api from "@/api/index"
// 函数
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)
const res = await api.getToken(data)
wx_login()
}
async function wx_login(token_res){
let res=await new Promise(resolve=>{
uni.login({
provider: 'weixin', //使用微信登录
success: function (loginRes) {
resolve(loginRes);
console.log(loginRes,'微信登录返回信息');
}
});
});
let userId = ''
// const res = await api.wx_login(data)
let res2=await api.wx_login({code:res.code},userId);
}
</script>
<template>
<view class="user-box page-box">
<button class="submit-btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
<!-- <image class="wx_loin_img" :src="wx_login" mode=""></image> -->
<text>登录</text>
</button>
</view>
</template>
<style>
</style>