From c2d879c83d5d242d32b376193e1a4680067d169c Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期三, 31 五月 2023 15:14:38 +0800
Subject: [PATCH] 优化逻辑
---
src/views/myMine/index.vue | 164 +++++++++++++++++++++++++++++++++---------------------
src/views/jifenShangCheng/components/gouwuche.vue | 5 +
2 files changed, 106 insertions(+), 63 deletions(-)
diff --git a/src/views/jifenShangCheng/components/gouwuche.vue b/src/views/jifenShangCheng/components/gouwuche.vue
index a95a7a0..f60c6dc 100644
--- a/src/views/jifenShangCheng/components/gouwuche.vue
+++ b/src/views/jifenShangCheng/components/gouwuche.vue
@@ -226,6 +226,10 @@
Toast('没有选中要结算的商品')
return false
}
+ if (defaultDizhi.value.id===0){
+ Toast('请先选择你的地址')
+ return false
+ }
const pasm=`cartCodes=${listCode.toString()}&addressCode=${defaultDizhi.value.code}`
console.log(pasm)
ajaxPost('/eshop/order/checkout',pasm)
@@ -233,6 +237,7 @@
console.log(re)
if (re==='OK'){
Toast.success('您已经兑换成功')
+ show.value=false
} else {
Toast('兑换失败')
}
diff --git a/src/views/myMine/index.vue b/src/views/myMine/index.vue
index 7b63cee..7fc2506 100644
--- a/src/views/myMine/index.vue
+++ b/src/views/myMine/index.vue
@@ -15,9 +15,9 @@
</div>
</div>
</div>
- <div class="userInfo">
+ <div class="userinfo">
<div style="padding-left: 20px; padding-top: 12px; padding-right: 20px;">
- <van-row style="border-bottom: 1px solid #F1F1F2;margin-top: 12px;">
+ <van-row style="border-bottom: 1px solid #f1f1f2;margin-top: 12px;">
<van-col span="12" style="margin-bottom: 12px;">患者卡片</van-col>
<van-col span="12" style="text-align: right;padding-right: 5px;"> <van-icon name="arrow" /></van-col>
</van-row>
@@ -29,7 +29,7 @@
<span class="but">排班提醒</span>
</div>
<div class="div2">卡号:{{patientInfo.patientInfo.patientCardNo}}</div>
- <div class="div3" style="color: blue; font-family: cursive; font-size: 16px;">我的积分:{{patientInfo.patientInfo.patientCreditValue}} </div>
+ <div class="div3" style="color: #409eff; font-family: cursive; font-size: 16px;">我的积分:{{patientInfo.patientInfo.patientCreditValue}} </div>
</van-col>
<van-col span="8" class="info8">
<div class="img" @click="imgShow">
@@ -48,7 +48,17 @@
<div style="padding-left: 20px;">
<div class="title">其他服务</div>
<van-row>
- <van-col span="6" class="serveItem">
+ <van-col span="6" class="serveitem">
+ <div @click="openOrder">
+ <van-image
+ :src="serve2"
+ />
+ </div>
+ <div @click="openOrder">
+ 我的订单
+ </div>
+ </van-col>
+ <van-col span="6" class="serveitem">
<div>
<van-image
:src="serve1"
@@ -58,7 +68,7 @@
我的用药
</div>
</van-col>
- <van-col span="6" class="serveItem">
+ <van-col span="6" class="serveitem">
<div>
<van-image
:src="serve2"
@@ -68,7 +78,7 @@
检验指标
</div>
</van-col>
- <van-col span="6" class="serveItem">
+ <van-col span="6" class="serveitem">
<div>
<van-image
:src="serve3"
@@ -78,7 +88,7 @@
科室公告
</div>
</van-col>
- <van-col span="6" class="serveItem">
+ <van-col span="6" class="serveitem">
<div>
<van-image
:src="serve4"
@@ -88,7 +98,7 @@
科室介绍
</div>
</van-col>
- <van-col span="6" class="serveItem">
+ <van-col span="6" class="serveitem">
<div>
<van-image
:src="serve5"
@@ -98,7 +108,7 @@
智慧云客服
</div>
</van-col>
- <van-col span="6" @click="show2 = true" class="serveItem">
+ <van-col span="6" @click="show2 = true" class="serveitem">
<div>
<van-image
:src="serve6"
@@ -111,7 +121,7 @@
</van-row>
</div>
</div>
- <div class="ButtonBody">
+ <div class="buttonbody">
<van-button type="primary" @click="logOUT" round block>退出登录</van-button>
</div>
<van-popup v-model:show="show">
@@ -156,6 +166,7 @@
</van-form>
</div>
</van-popup>
+ <myOrder ref="myOrderRef"></myOrder>
<van-tabbar v-model="active" @change="tabChang">
<van-tabbar-item name="home" icon="like">首页</van-tabbar-item>
<van-tabbar-item name="jifen" icon="cart-circle-o">积分商城</van-tabbar-item>
@@ -168,6 +179,7 @@
import {ajaxPost} from '@/utils/axios'
import { Session } from '@/utils/storage'
import { userInfoStore } from '@/stores/userInfo'
+ import myOrder from '../jifenShangCheng/components/myOrder.vue'
import serve1 from './imgs/serve1.png'
import serve2 from './imgs/serve2.png'
import serve3 from './imgs/serve3.png'
@@ -179,6 +191,7 @@
import { Dialog } from 'vant'
const router=useRouter()
const userInfo = userInfoStore()
+ const myOrderRef=ref()
const active=ref('my')
const ruleForm=ref({
newPassword:'',
@@ -191,12 +204,15 @@
const asyncValidator = (val:any) =>{
return val===ruleForm.value.pass
}
+ const openOrder=()=>{
+ myOrderRef.value.openShow()
+ }
const tabChang=(index:any)=>{
if (index==='home'){
router.push('/')
- } else if(index==='jifen') {
+ } else if (index==='jifen') {
router.push('jifenShangCheng')
- }else if(index==='my') {
+ } else if (index==='my') {
router.push('my')
}
}
@@ -246,71 +262,83 @@
}
</script>
<style lang="scss" scoped>
- body{
- background-color:#166bd3;
- }
-.page{
- .imgcla{
+body {
+ background-color: #166bd3;
+}
+
+.page {
+ .imgcla {
width: 350px;
min-height: 350px;
- border: #777777 1px solid;
+ border: #777 1px solid;
}
- .formbiaodan{
+
+ .formbiaodan {
padding-top: 30px;
width: 350px;
}
- background-color:#F6FAFF;
- position:relative;
+ background-color: #f6faff;
+ position: relative;
min-width: 375px;
min-height: 800px;
- .hader{
+
+ .hader {
margin-top: 20px;
margin-bottom: 20px;
height: 50px;
width: 92%;
margin-left: 4%;
- text-align:left;
- .listrow{
- grid-template-columns: minmax(50px, 20%) 1fr ;
+ text-align: left;
+
+ .listrow {
+ grid-template-columns: minmax(50px, 20%) 1fr;
display: grid;
- .rowtext{
+
+ .rowtext {
margin-top: 15px;
font-size: 13px;
- font-family: PingFangSC-Regular, PingFang SC;
+
+ // font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
- color: #777777;
+ color: #777;
}
}
- .hader-regth{
+
+ .hader-regth {
height: 50px;
- text-align:right;
+ text-align: right;
line-height: 50px;
}
}
- .userInfo{
+
+ .userinfo {
width: 92%;
margin-left: 4%;
height: 160px;
- background: #FFFFFF;
- box-shadow: 0px 2px 4px 0px rgba(70,150,249,0.1);
+ background: #fff;
+ box-shadow: 0 2px 4px 0 rgba(70, 150, 249, 0.1);
border-radius: 5px;
- .info16{
+
+ .info16 {
text-align: left;
+
// background:red;
- .div1{
+ .div1 {
margin-top: 20px;
margin-bottom: 6px;
height: 21px;
font-size: 15px;
- font-family: PingFangSC-Medium, PingFang SC;
+
+ // font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
- color: #333333;
+ color: #333;
line-height: 21px;
- .but{
- font-family: PingFangSC-Regular, PingFang SC;
+
+ .but {
+ // font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
- color: #FDFDFD;
- background:rgb(77, 124, 212);
+ color: #fdfdfd;
+ background: rgb(77, 124, 212);
border-radius: 8px;
height: 20px;
line-height: 20px;
@@ -318,79 +346,89 @@
padding: 2px 8px;
}
}
- .div2{
+
+ .div2 {
height: 17px;
font-size: 12px;
- font-family: PingFangSC-Regular, PingFang SC;
+
+ // font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
- color: #777777;
+ color: #777;
line-height: 17px;
}
- .div3{
+
+ .div3 {
margin-top: 6px;
height: 20px;
font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
+ font-family: PingFangSC-Regular, "PingFang SC", sans-serif;
font-weight: 400;
- color: #777777;
+ color: #777;
line-height: 20px;
}
-
}
}
- .serves{
- background: #FFFFFF;
+
+ .serves {
+ background: #fff;
border-radius: 8px;
align-self: center;
margin-top: 20px;
width: 92%;
margin-left: 4%;
padding-top: 12px;
+
// padding-left: 20px;
padding-bottom: 20px;
- .title{
+
+ .title {
margin-top: 12px;
overflow-wrap: break-word;
color: rgba(51, 51, 51, 1);
font-size: 14px;
- font-family: PingFangSC-Medium;
+ font-family: PingFangSC-Regular, "PingFang SC", sans-serif;
text-align: left;
white-space: nowrap;
line-height: 20px;
+
// margin-bottom: 20px;
}
- .serveItem{
+
+ .serveitem {
text-align: center;
margin-top: 20px;
font-size: 13px;
- font-family: PingFangSC-Regular, PingFang SC;
+ font-family: PingFangSC-Regular, "PingFang SC", sans-serif;
font-weight: 400;
- color: #333333;
+ color: #333;
line-height: 20px;
}
}
}
-.info8{
+
+.info8 {
text-align: right;
padding-right: 40px;
- border-left: #F1F1F2 solid 1px;
+ border-left: #f1f1f2 solid 1px;
+
// background: #166bd3;
- .devcc{
+ .devcc {
height: 14px;
font-size: 10px;
- font-family: PingFangSC-Regular, PingFang SC;
+ font-family: PingFangSC-Regular, "PingFang SC", sans-serif;
font-weight: 400;
- color: #777777;
+ color: #777;
line-height: 14px;
}
}
-.text{
+
+.text {
background: #166bd3;
}
-.ButtonBody{
+
+.buttonbody {
margin-top: 40px;
width: 92%;
margin-left: 4%;
- // background: #166bd3;
}
</style>
\ No newline at end of file
--
Gitblit v1.8.0