课程价格重新写

This commit is contained in:
@fawn-nine
2024-06-25 17:06:30 +08:00
parent 8e58d4af88
commit 0374ef034a
9 changed files with 487 additions and 196 deletions

View File

@@ -63,22 +63,15 @@
<text>正在学习</text>
</view>
<view class="learn flexbox">
<view class="item">
<view class="">
<image src="../../static/video.jpg" mode="aspectFit"></image>
<view class="item" v-for="(item, index) in learnList" :key="index" @click="onPageJump('/pages/course/myCourseLearn',item.id)">
<view class="img" style="overflow: hidden;">
<image v-if="item.image && item.image != ''" :src="item.image" mode="aspectFit"></image>
<image v-else src="/static/nobg.jpg" mode="widthFix"></image>
</view>
<view class="txt555">
生理试听生理试听生理试听生理试听生理试听生理试听生理试听生理试听
{{item.title}}
</view>
</view>
<view class="item">
<view class="">
<image src="../../static/video.jpg" mode="aspectFit"></image>
</view>
<view class="txt555">
生理试听
</view>
</view>
</view>
</view>
</view>
</view>
@@ -528,10 +521,16 @@
},
newsClick(item) {
console.log('item', item)
// if(item.type == 1){
// uni.navigateTo({
// url: `/pages/news/newsForwebview?newsId=${item.id}&url=${item.url}&type=${item.type}`
// })
// }else{
uni.navigateTo({
url: `/pages/news/news?newsId=${item.id}&url=${item.url}&type=${item.type}`
})
// }
// }
},
openURL(url) {
// #ifdef APP-PLUS
@@ -695,7 +694,7 @@
z-index: 1;
.item {
background: rgba(255, 255, 255, .6);
background: rgba(255, 255, 255, .9);
margin-bottom: 20rpx;
border: 1px solid #fff;
align-items: center;
@@ -1001,11 +1000,15 @@
@include pleft_right(10px);
@include mshadow(10px, 1);
margin-bottom: 10px;
.img{
width: 100%; height: 180rpx;
background-color: #f7f7f7;
display: flex; align-items: center;
}
.learn {
justify-content: space-between;
margin-top: 20rpx;
flex-wrap: wrap;
.item {
width: 48%;

View File

@@ -1,10 +1,16 @@
<template>
<view>
<z-nav-bar backState="2000" title="购物车"></z-nav-bar>
<z-nav-bar backState="2000" title="购物车">
<view class="curseSet" slot="right" @click="manaCart = !manaCart" style="margin-right: 10px;">
<text v-show="!manaCart">管理</text>
<text v-show="manaCart">完成</text>
</view>
</z-nav-bar>
</z-nav-bar>
<view class="shopCarContent">
<scroll-view scroll-y="true">
<view class="cartItem" v-for="(item,index) in cartList" :key="index">
<view class="select">
<view class="select" v-show="manaCart">
<checkbox :checked="item.checked" @click="checkboxGroupChange(index,item)"
class="round checkedItem" />
</view>
@@ -64,7 +70,8 @@
totalPrice: 0, // 总价
all: false, // 是否全选
isCartDelShow: false, // 是否展示删除按钮
cartList: [] // 购物车列表
cartList: [], // 购物车列表
manaCart:false,
};
},
//第一次加载
@@ -104,15 +111,24 @@
},
// 是否全选
isSelectAll(e) {
console.log(e,'e')
if (this.cartList.length > 0) {
this.all = !this.all
this.cartList.forEach((item, index) => {
item.checked = this.all
})
// if(){
// this.cartList.forEach((item, index) => {
// item.checked = false
// })
// this.manaCart = false
// }
this.isCartDelShow = this.all
this.total()
this.manaCart = this.all
} else {
this.all = false
}
},
// 选中单独商品
@@ -214,6 +230,7 @@
this.totalPrice = 0
this.getCartList()
uni.hideLoading()
this.manaCart = false
})
} else {
console.log('cancel') //点击取消之后执行的代码