@ -1,18 +1,28 @@
< script setup >
import DraggableButton from "@/pages/components/goHome.vue" ;
/ * *
import DraggableButton from "@/pages/components/goHome.vue" ;
/ * *
* name :
* user : sa0ChunLuyu
* date : 2024 年9月11日 19 : 24 : 50
* /
import { ref } from "vue" ;
import { $api , $response , $image } from "@/api" ;
import { onShow } from "@dcloudio/uni-app" ;
import { useStore } from "@/store" ;
import {
ref
} from "vue" ;
import {
$api ,
$response ,
$image
} from "@/api" ;
import {
onShow
} from "@dcloudio/uni-app" ;
import {
useStore
} from "@/store" ;
/ / c o m b o I d 套 餐 I D 没 有 套 餐 I D 就 是 个 人 自 选 项 目
/ / i t e m I d s 自 选 I D
const $props = defineProps ( {
/ / c o m b o I d 套 餐 I D 没 有 套 餐 I D 就 是 个 人 自 选 项 目
/ / i t e m I d s 自 选 I D
const $props = defineProps ( {
comboId : {
type : String ,
default : "" ,
@ -33,35 +43,38 @@ const $props = defineProps({
type : String ,
default : "" ,
} ,
} ) ;
} ) ;
const $store = useStore ( ) ;
const $store = useStore ( ) ;
let wj = ref ( "" ) ; / /
let leftList = ref ( { } ) ; / / 左 侧 列 表
let tabIndex = ref ( "" ) ; / / 默 认 选 中
let rightLeft = ref ( [ ] ) ; / / 右 侧 列 表
let selectIds = ref ( [ ] ) ; / / 选 中 i d 列 表
let headImg = ref ( "" ) ; / / 头 部 图 片
let packagePrice = ref ( 0 ) ; / / 套 餐 折 扣 价 格
let packageOriginalPrice = ref ( 0 ) ; / / 套 餐 原 始 价 格
let optionalPrice = ref ( 0 ) ; / / 自 选 折 扣 价 格
let optionalOriginalPrice = ref ( 0 ) ; / / 自 选 原 始 价 格
let totalPrice = ref ( 0 ) ; / / 总 折 扣 价 格
let totalOriginalPrice = ref ( 0 ) ; / / 总 原 始 价 格
let total = ref ( 0 ) ; / / 总 项 目 数
let comboId = ref ( "" ) ; / / 套 餐 i d
let recommendPackageList = ref ( [ ] ) ; / / 推 荐 套 餐 列 表
let popup = ref ( null ) ; / / 推 荐 套 餐 弹 窗
let popupTip = ref ( null ) ; / / 剩 余 额 度 提 示 弹 窗
let groupLength = ref ( 0 ) ; / / 团 检 自 带 的 套 餐 数 量
let status = ref ( 0 ) ; / / 1 个 检 套 餐 2 个 检 自 选 3 团 检 套 餐 4 团 检 自 选
let personId = ref ( "" ) ; / / 就 诊 人 I D
let groupId = ref ( "" ) ; / / 团 检 i d
let losePrice = ref ( 0 ) ; / / 剩 余 金 额
/ / l e t q u e r y = r e f ( " " ) ; / / 参 数
let wj = ref ( "" ) ; / /
let leftList = ref ( { } ) ; / / 左 侧 列 表
let tabIndex = ref ( "" ) ; / / 默 认 选 中
let rightLeft = ref ( [ ] ) ; / / 右 侧 列 表
let selectIds = ref ( [ ] ) ; / / 选 中 i d 列 表
let selectItems = ref ( [ ] ) ; / / 选 中 项 目 列 表
let BuyInfo = ref ( "" ) ; / / B u y I n f o 接 口 返 回
let headImg = ref ( "" ) ; / / 头 部 图 片
let packagePrice = ref ( 0 ) ; / / 套 餐 折 扣 价 格
let packageOriginalPrice = ref ( 0 ) ; / / 套 餐 原 始 价 格
let optionalPrice = ref ( 0 ) ; / / 自 选 折 扣 价 格
let optionalOriginalPrice = ref ( 0 ) ; / / 自 选 原 始 价 格
let totalPrice = ref ( 0 ) ; / / 总 折 扣 价 格
let totalOriginalPrice = ref ( 0 ) ; / / 总 原 始 价 格
let total = ref ( 0 ) ; / / 总 项 目 数
let comboId = ref ( "" ) ; / / 套 餐 i d
let recommendPackageList = ref ( [ ] ) ; / / 推 荐 套 餐 列 表
let popup = ref ( null ) ; / / 推 荐 套 餐 弹 窗
let popupTip = ref ( null ) ; / / 剩 余 额 度 提 示 弹 窗
let groupLength = ref ( 0 ) ; / / 团 检 自 带 的 套 餐 数 量
let status = ref ( 0 ) ; / / 1 个 检 套 餐 2 个 检 自 选 3 团 检 套 餐 4 团 检 自 选
let personId = ref ( "" ) ; / / 就 诊 人 I D
let groupId = ref ( "" ) ; / / 团 检 i d
let losePrice = ref ( 0 ) ; / / 剩 余 金 额
/ / l e t q u e r y = r e f ( " " ) ; / / 参 数
let popupItemList = ref ( null ) ; / / 已 选 项 目 列 表 弹 窗
const getComboRecommend = async ( ) => {
const getComboRecommend = async ( ) => {
/ / 获 取 推 荐 套 餐
const response = await $api ( "ComboRecommend" , {
person _id : personId . value ,
@ -76,9 +89,9 @@ const getComboRecommend = async () => {
}
uni . hideLoading ( ) ;
} ) ;
} ;
} ;
const getAllItems = async ( e ) => {
const getAllItems = async ( e ) => {
/ / 获 取 全 部 项 目
const response = await $api ( "GetAllItems" , {
search : e ? . value ,
@ -92,9 +105,9 @@ const getAllItems = async (e) => {
headImg . value = leftList . value [ keys [ 0 ] ] . head _img ;
}
} ) ;
} ;
} ;
const getBuyInfo = async ( ) => {
const getBuyInfo = async ( ) => {
/ / 获 取 购 买 信 息
uni . showLoading ( {
title : "加载中" ,
@ -112,23 +125,24 @@ const getBuyInfo = async () => {
}
const response = await $api ( "BuyInfo" , obj ) ;
console . log ( response )
if ( response . status === false ) {
if ( response . status === false ) {
uni . hideLoading ( ) ;
uni . $lu . toast ( response . msg ) ;
return false ;
}
$response ( response , ( ) => {
groupLength . value = response . data . group _info
? response . data . group _info [ 0 ] ? . items ? . length
: 0 ;
groupLength . value = response . data . group _info ?
response . data . group _info [ 0 ] ? . items ? . length :
0 ;
packagePrice . value = response . data . combo _info . price ;
packageOriginalPrice . value = response . data . combo _info . original _price ;
optionalPrice . value = response . data . items _info . price ;
optionalOriginalPrice . value = response . data . items _info . original _price ;
BuyInfo . value = response . data ;
totalPrice . value = response . data . true _price ;
totalOriginalPrice . value = response . data . original _price ;
total . value = response . data . pay _item _count ;
/ / t o t a l . v a l u e = r e s p o n s e . d a t a . p a y _ i t e m _ c o u n t ;
losePrice . value = response . data . lose _price ;
if ( status . value == 4 && groupLength . value ) {
/ / 团 检 无 套 餐 I D 的 情 况 下 需 要 判 断 一 下 是 否 有 团 检 自 带 套 餐
@ -136,9 +150,9 @@ const getBuyInfo = async () => {
}
uni . hideLoading ( ) ;
} ) ;
} ;
} ;
const confirm = async ( ) => {
const confirm = async ( ) => {
/ / 确 定
/ / s t a t u s 1 个 检 套 餐 2 个 检 自 选 3 团 检 套 餐 4 团 检 自 选
if ( status . value == 3 ) {
@ -180,9 +194,9 @@ const confirm = async () => {
return ;
}
toDetails ( ) ;
} ;
} ;
const toDetails = ( state ) => {
const toDetails = ( state ) => {
/ / 去 详 情 页
if ( losePrice . value > 0 && ! state ) {
/ / p o p u p T i p . v a l u e . o p e n ( " c e n t e r " ) ; / / 弹 剩 余 额 度 提 醒
@ -193,8 +207,8 @@ const toDetails = (state) => {
if ( groupId . value ) {
query += "&groupId=" + groupId . value ;
}
if ( $props . wj ) {
query += "&wj=" + $props . wj
if ( $props . wj ) {
query += "&wj=" + $props . wj
}
console . log ( $props . comboId || $props . itemIds ? 2 : 1 ) ;
let delta = 0 ;
@ -229,20 +243,20 @@ const toDetails = (state) => {
) ;
} ,
} ) ;
} ;
} ;
const buy = async ( item ) => {
const buy = async ( item ) => {
if ( item ) {
comboId . value = item . combo _id ;
selectIds . value = [ ] ;
selectIds . value = [ ] ;
await getBuyInfo ( ) ;
}
/ / 预 约 套 餐
popup . value . close ( ) ; / / 关 闭 推 荐 套 餐 弹 窗
toDetails ( ) ;
} ;
} ;
const mountedAction = async ( ) => {
const mountedAction = async ( ) => {
selectIds . value = $props . itemIds ? $props . itemIds . split ( "," ) : [ ] ;
comboId . value = $props . comboId || "" ;
personId . value = $store . getUser ( ) . person _id || "" ;
@ -272,41 +286,60 @@ const mountedAction = async () => {
await getAllItems ( ) ; / / 获 取 全 部 项 目
/ / a w a i t g e t C o m b o R e c o m m e n d ( ) ;
await getBuyInfo ( ) ; / / 获 取 购 买 信 息
} ;
} ;
const config _ref = ref ( null ) ;
const configRef = ( e ) => {
const config _ref = ref ( null ) ;
const configRef = ( e ) => {
if ( ! config _ref . value ) {
config _ref . value = e ;
mountedAction ( ) ;
}
} ;
const XuanZeItem = async ( item ) => {
let doi = ""
if ( selectIds . value . includes ( item . id ) ) {
selectIds . value . splice ( selectIds . value . indexOf ( item . id ) , 1 ) ;
doi = "del"
} else {
} ;
const XuanZeItem = async ( item ) => {
let doi = ""
if ( selectIds . value . includes ( item . id ) ) {
selectIds . value . splice ( selectIds . value . indexOf ( item . id ) , 1 ) ;
doi = "del"
} else {
selectIds . value . push ( item . id ) ;
doi = "add"
doi = "add"
}
let a = await getBuyInfo ( )
if ( a === false ) {
if ( doi == "add" ) {
selectIds . value . splice ( selectIds . value . indexOf ( item . id ) , 1 ) ;
let a = await getBuyInfo ( )
if ( a === false ) {
if ( doi == "add" ) {
selectIds . value . splice ( selectIds . value . indexOf ( item . id ) , 1 ) ;
}
if ( doi == "del" ) {
if ( doi == "del" ) {
selectIds . value . push ( item . id ) ;
}
}
}
onShow ( ( ) => {
}
const openPopupItemList = ( ) => {
selectItems . value = [ ] ;
if ( BuyInfo . value . items _info ) {
BuyInfo . value . items _info . items . forEach ( ( v , i ) => {
v . children . forEach ( ( v2 , i2 ) => {
selectItems . value . push ( v2 )
} )
} )
}
if ( selectItems . value . length > 0 ) {
popupItemList . value . open ( )
}
}
const ClearItems = async ( ) => {
selectIds . value = [ ] ;
await getBuyInfo ( )
popupItemList . value . close ( )
}
onShow ( ( ) => {
if ( ! ! config _ref . value ) {
mountedAction ( ) ;
}
} ) ;
} ) ;
< / script >
< template >
< DraggableButton / >
@ -315,28 +348,50 @@ onShow(() => {
< view :ref ="configRef" > < / view >
< / view >
< / view >
< uni -popup ref = "popupItemList" type = "bottom" >
< view class = "popupItemList-content" >
< view style = "display: flex;justify-content: space-between;margin-bottom: 34rpx;" >
< view style = "font-size: 30rpx;" > 已加购项目 < / view >
< view style = "color: #9E9E9F;display: flex;align-items: center;" @click ="ClearItems()" >
< uni -icons type = "trash" color = "#9E9E9F" size = "20" > < / u n i - i c o n s >
< view style = "font-size: 20rpx;" > 清空 < / view >
< / view >
< / view >
< view v-for ="(item,index) in selectItems" >
< view class = "itemlist_list" @click ="XuanZeItem(item)" >
< view >
< view style = "display: flex; align-items: center;margin-bottom: 20rpx;" >
< view class = "itemlist_bianhao" > { { index + 1 } } < / view >
< view class = "itemlist_itemname" > { { item . name } } < / view >
< / view >
< view style = "display: flex;align-items: end;" >
< view class = "itemlist_price" > < span style = "font-size: 20rpx;" > ¥ < / span > { { item . price } } < / view >
< view class = "itemlist_org_price line-through" > { { item . original _price } } < / view >
< / view >
< / view >
< view : class = " {
'!bg-#009fa8 !b-#008e99' : selectIds . includes ( item . id ) ,
} " class=" w - 24 rpx h - 24 rpx b - 1 b - solid b - # 009 fa8 bg - # fff rounded - 24 rpx center " >
< image v -if = " selectIds.includes ( item.id ) " class = "w-20rpx" src = "@/static/assets/select.png"
mode = "widthFix" / >
< / view >
< / view >
< / view >
< / view >
< / u n i - p o p u p >
< uni -popup ref = "popupTip" >
< view
class = "mb-70rpx bg-#fff text-center box-border pt-80rpx pb-50rpx px-65rpx w-90vw rounded-15rpx"
>
< view
class = "w-full text-center text-##090909 text-26rpx line-height-[50rpx]"
> 您还剩余
< view class = "mb-70rpx bg-#fff text-center box-border pt-80rpx pb-50rpx px-65rpx w-90vw rounded-15rpx" >
< view class = "w-full text-center text-##090909 text-26rpx line-height-[50rpx]" > 您还剩余
{ { losePrice } }
元体检额度尚未使用 , 确认提交后剩余体检额度将无法使用 ! < / v i e w
>
元体检额度尚未使用 , 确认提交后剩余体检额度将无法使用 !
< / view >
< view class = "mt-50rpx between" >
< button
type = "primary"
@ click = "toDetails(1)"
class = "w-196rpx h-68rpx center text-#fff text-24rpx !bg-#239EA3 rounded-8rpx"
>
< button type = "primary" @click ="toDetails(1)"
class = "w-196rpx h-68rpx center text-#fff text-24rpx !bg-#239EA3 rounded-8rpx" >
我想好了
< / button >
< button
@ click = "popupTip.close()"
class = "w-196rpx h-68rpx center text-#239EA3 text-24rpx !bg-#D9F3F2 rounded-8rpx"
>
< button @click ="popupTip.close()"
class = "w-196rpx h-68rpx center text-#239EA3 text-24rpx !bg-#D9F3F2 rounded-8rpx" >
我再想想
< / button >
< / view >
@ -346,39 +401,19 @@ onShow(() => {
< view class = "bg-#fff rounded-15rpx w-95vw px-20rpx box-border" >
< view class = "center relative pt-47rpx pb-32rpx text-36rpx" >
< text class = "line-height-[1]" > 推荐套餐 < / text >
< uni -icons
@ click = "popup.close()"
type = "closeempty"
color = "#A6A6A6"
size = "26"
class = "absolute right-40rpx top-30rpx"
> < / u n i - i c o n s >
< / view >
< view
v - for = "(item, index) in recommendPackageList"
: key = "index"
class = "pt-40rpx pb-15rpx box-border b-0 b-t-1 b-solid b-#E1ECEE"
>
< uni -icons @click ="popup.close()" type = "closeempty" color = "#A6A6A6" size = "26"
class = "absolute right-40rpx top-30rpx" > < / u n i - i c o n s >
< / view >
< view v -for = " ( item , index ) in recommendPackageList " :key ="index"
class = "pt-40rpx pb-15rpx box-border b-0 b-t-1 b-solid b-#E1ECEE" >
< view class = "flex w-full" >
< image
v - if = "item.cover"
: src = "$image(item.cover)"
class = "w-190rpx h-190rpx mr-37rpx"
mode = "widthFix"
/ >
< image v -if = " item.cover " :src ="$image(item.cover)" class = "w-190rpx h-190rpx mr-37rpx"
mode = "widthFix" / >
< view class = "flex flex-col grow" >
< text
> { { item . name } } < / t e x t
>
< text > { { item . name } } < / text >
< view class = "mt-13rpx mb-18rpx" >
< uni -tag
v - for = "(val, i) in item.tags"
: key = "i"
size = "small"
: inverted = "true"
: text = "val.text"
class = "mr-8rpx"
: custom - style = "
< uni -tag v -for = " ( val , i ) in item.tags " :key ="i" size = "small" :inverted ="true"
: text = "val.text" class = "mr-8rpx" : custom - style = "
'background-color:' +
val . color +
';border-color:' +
@ -386,16 +421,11 @@ onShow(() => {
'; color:' +
val . text _color +
';'
"
/ >
" / >
< / view >
< view >
< text
v - for = "(val, i) in item.tags2"
: key = "i"
class = "text-#8B8B8B text-20rpx line-height-[1] px-5rpx b-0 b-r-2 b-solid b-#8B8B8B"
> { { val } } < / t e x t
>
< text v -for = " ( val , i ) in item.tags2 " :key ="i"
class = "text-#8B8B8B text-20rpx line-height-[1] px-5rpx b-0 b-r-2 b-solid b-#8B8B8B" > { { val } } < / text >
< / view >
< view class = "mt-20rpx w-full flex items-end" >
< text class = "text-18rpx text-#EC3D15" > ¥ < / text >
@ -405,9 +435,7 @@ onShow(() => {
< text class = "text-18rpx text-#878787 line-through" > { {
item . original _price
} } < / text >
< text class = "text-18rpx text-#878787 ml-auto mr-55rpx"
> 已售 { { item . count } } < / t e x t
>
< text class = "text-18rpx text-#878787 ml-auto mr-55rpx" > 已售 { { item . count } } < / text >
< / view >
< / view >
< / view >
@ -424,77 +452,48 @@ onShow(() => {
? "增加"
: "减少"
} } 了
< text class = "text-#239EA3"
> ¥ { { item . recommend ? . money . replace ( /-/ , "" ) } } < / t e x t
>
< / view >
< button
type = "primary"
@ click = "buy(item)"
class = "w-160rpx h-60rpx center text-#fff text-28rpx !bg-#239EA3 rounded-full"
>
< text class = "text-#239EA3" > ¥ { { item . recommend ? . money . replace ( /-/ , "" ) } } < / text >
< / view >
< button type = "primary" @click ="buy(item)"
class = "w-160rpx h-60rpx center text-#fff text-28rpx !bg-#239EA3 rounded-full" >
预约
< / button >
< / view >
< / view >
< view class = "b-0 b-t-1 b-solid b-#E1ECEE pt-80rpx pb-70rpx" >
< button
type = "primary"
@ click = "buy()"
class = "w-300rpx h-78rpx center text-#fff text-30rpx !bg-#239EA3 rounded-10rpx"
>
< button type = "primary" @click ="buy()"
class = "w-300rpx h-78rpx center text-#fff text-30rpx !bg-#239EA3 rounded-10rpx" >
跳过
< / button >
< / view >
< / view >
< / u n i - p o p u p >
< view class = "bg-#d8edf2" >
< uni -search -bar
class = "search"
radius = "100"
placeholder = "请输入关键字搜索"
@ clear = "getAllItems()"
@ cancel = "getAllItems()"
@ confirm = "getAllItems"
/ >
< / view >
< view class = "mt-20rpx flex min-h-100%" >
< uni -search -bar class = "search" radius = "100" placeholder = "请输入关键字搜索" @clear ="getAllItems()"
@ cancel = "getAllItems()" @ confirm = "getAllItems" / >
< / view >
< view class = "mt-20rpx flex min-h-100%" style = "background-color: #eef7f7;" >
< view class = "min-w-214rpx max-w-214rpx mr-20rpx min-h-100% text-center" >
< view
class = "w-100% rounded-r-full text-#0E0E0E text-25rpx px-20rpx w-100% center h-84rpx box-border"
v - for = "(item, index) in leftList"
: key = "index"
: class = " {
< view class = "w-100% rounded-r-full text-#0E0E0E text-25rpx px-20rpx w-100% center h-84rpx box-border"
v - for = "(item, index) in leftList" : key = "index" : class = " {
'bg-gradient-to-r from-#edf6f5 to-#bbdfe2' : tabIndex == index ,
} "
@ click = "
} " @click="
( ) => {
tabIndex = index ;
rightLeft = item . children ;
headImg = item . head _img ;
}
"
>
" >
{ { item . title } }
< / view >
< view style = "height: 150rpx;" > < / view >
< / view >
< view class = "grow min-h-100% bg-#fff pb-200rpx" >
< image
v - if = "headImg"
class = "w-full"
mode = "widthFix"
: src = "$image(headImg)"
> < / image >
< view
v - for = "(item, index) in rightLeft"
: key = "index"
: class = " {
< view v -for = " ( item , index ) in rightLeft " :key ="index" : class = " {
'!b-0' : index == rightLeft . length - 1 ,
} "
class = "flex justify-between center py-30rpx px-20rpx b-b-1px b-b-solid b-b-#e5e5e5"
>
< view class = "w-40% text-#0E0E0E text-25rpx flex items-center" >
} " class=" flex justify - between center py - 30 rpx px - 20 rpx b - b - 1 px b - b - solid b - b - # e5e5e5 " >
< view class = "w-40% text-#0E0E0E text-24rpx flex items-center" >
< text > { { item . title } } < / text >
< uni -tooltip >
<!-- 定义插槽 , 插槽名为 content -- >
@ -506,90 +505,122 @@ onShow(() => {
< / template >
<!-- 触发提示的按钮 -- >
< uni -icons color = "#239ea4 " type = "help-filled" size = "14" > < / u n i - i c o n s >
< uni -icons color = "#009fa8 " type = "help-filled" size = "14" > < / u n i - i c o n s >
< / u n i - t o o l t i p >
< / view >
< view
class = "w-58% items-end flex justify-between"
@ click = "XuanZeItem(item)"
>
< view class = "w-58% items-end flex justify-between" @click ="XuanZeItem(item)" >
< text class = "text-#EC3D15 text-26rpx" > ¥ { { item . price } } < / text >
< text class = "text-#9e9d9d text-20rpx line-through"
> ¥ { { item . original _price } } < / t e x t
>
< view
: class = " {
'!bg-#EEA61E !b-#EEA61E' : selectIds . includes ( item . id ) ,
} "
class = "w-24rpx h-24rpx b-1 b-solid b-#DCDCDC bg-#F8F8F8 rounded-3rpx center"
>
< image
v - if = "selectIds.includes(item.id)"
class = "w-20rpx"
src = "@/static/assets/select.png"
mode = "widthFix"
/ >
< text class = "text-#9e9d9d text-20rpx line-through" > ¥ { { item . original _price } } < / text >
< view : class = " {
'!bg-#009fa8 !b-#008e99' : selectIds . includes ( item . id ) ,
} " class=" w - 24 rpx h - 24 rpx b - 1 b - solid b - # c3e9eb bg - # ccecee rounded - 8 rpx center " >
< image v -if = " selectIds.includes ( item.id ) " class = "w-20rpx" src = "@/static/assets/select.png"
mode = "widthFix" / >
< / view >
< / view >
< / view >
< / view >
< / view >
< view
class = "fixed bottom-0 left-0 w-100% h-135rpx bg-#fff px-20rpx py-30rpx box-border items-center flex justify-between"
>
< text
class = "text-26rpx text-#121212 b-r-1 b-r-solid b-#8D9698 pr-12rpx mr-12rpx min-w-120rpx max-w-120rpx"
>
您需付费 \ n { { total } } 个项目
< / text >
< view class = "grow" >
< view class = "flex items-end" v-if ="comboId != 0" >
< text class = "text-18rpx text-#878787" > 套餐价格 < / text >
< text class = "text-21rpx text-#ED6907 mx-20rpx"
> ¥ { { packagePrice } } < / t e x t
>
< text class = "text-18rpx text-#878787 line-through"
> ¥ { { packageOriginalPrice } } < / t e x t
>
< view style = "z-index: 999;"
class = "fixed bottom-0 left-0 w-100% h-150rpx bg-gradient-to-r from-#02b4bd to-#ABD7D7 px-20rpx py-30rpx box-border items-center flex justify-between" >
< view style = "position: relative;" class = "w-110rpx h-129rpx ml-60rpx mt-5rpx" @click ="openPopupItemList()" >
< image class = "w-110rpx h-129rpx" src = "@/static/assets/buy/xiong.png" mode = "widthFix" / >
< view class = "yuandian" >
{ { selectIds . length } }
< / view >
< view class = "flex items-end" >
< text class = "text-18rpx text-#878787" > 自选项目价格 < / text >
< text class = "text-21rpx text-#ED6907 mx-20rpx"
> ¥ { { optionalPrice || 0 } } < / t e x t
>
< text
v - if = "optionalOriginalPrice"
class = "text-18rpx text-#878787 line-through"
> ¥ { { optionalOriginalPrice } } < / t e x t
>
< / view >
< view class = "grow" style = "margin-left: 10rpx;" >
< view class = "flex items-end" >
< text class = "text-18rpx text-#ED6907" > 合计费用 < / text >
< text class = "text-24rpx text-#ED6907 ml-20rpx mr-5rpx" > ¥ < / text >
< text class = "text-36rpx text-#ED6907 mr-20rpx font-bold" > { {
totalPrice || 0
< text class = "text-46rpx text-#e95513 ml-20rpx mr-5rpx" > ¥ < / text >
< text class = "text-46rpx text-#e95513 mr-10rpx font-bold" > { {
optionalPrice || 0
} } < / text >
< text
v - if = "totalOriginalPrice"
class = "text-18rpx text-#878787 line-through"
> ¥ { { totalOriginalPrice } } < / t e x t
>
< / view >
< / view >
< button
type = "primary"
@ click = "confirm()"
class = "text-#F8F8F8 w-240rpx h-hull rounded-full !bg-#239EA3 !mx-0 text-30rpx"
>
确定
< / button >
< text v-if ="optionalOriginalPrice" class="text-26rpx text-#3e3a39 line-through" > ¥
{ { optionalOriginalPrice } } < / text >
< / view >
< / view >
< view @click ="confirm()" class = "button" >
确认项目
< / view >
< / view >
< / template >
< style >
. uni - tooltip - popup {
. uni - tooltip - popup {
background - color : # fff ;
}
< / style >
< style >
. button {
color : # 00828 e ;
background - color : # fff ;
}
height : 58 rpx ;
line - height : 58 rpx ;
text - align : center ;
width : 174 rpx ;
border - radius : 58 rpx ;
margin - right : 20 rpx ;
font - size : 29 rpx ;
}
. popupItemList - content {
padding : 40 rpx 40 rpx 180 rpx 40 rpx ;
border - radius : 40 rpx ;
background - color : # fff ;
}
. yuandian {
position : absolute ;
top : 55 rpx ;
right : - 10 rpx ;
background - color : # E95513 ;
height : 26 rpx ;
width : 26 rpx ;
border - radius : 13 rpx ;
color : # fff ;
font - size : 20 rpx ;
text - align : center ;
font - weight : 900 ;
}
. itemlist _org _price {
color : # 9 E9E9F ;
font - weight : bolder ;
font - size : 18 rpx ;
margin - left : 10 rpx ;
padding - bottom : 5 rpx ;
}
. itemlist _price {
color : # E95513 ;
font - weight : bolder ;
font - size : 32 rpx ;
}
. itemlist _itemname {
font - size : 30 rpx ;
font - weight : bolder ;
}
. itemlist _list {
display : flex ;
width : 100 % ;
justify - content : space - between ;
border - bottom : 1 px solid # 00828 e ;
padding - bottom : 20 rpx ;
margin - bottom : 20 rpx ;
align - items : center ;
}
. itemlist _bianhao {
height : 26 rpx ;
width : 26 rpx ;
margin - right : 10 rpx ;
border - radius : 26 rpx ;
line - height : 26 rpx ;
color : # fff ;
font - size : 20 rpx ;
font - weight : bolder ;
text - align : center ;
background : linear - gradient ( to right , # 67 a8aa , # 8 ce7e7 ) ;
}
< / style >