Commit 9c0e930c authored by 黄奎's avatar 黄奎

样式修改

parent e5371bf5
......@@ -134,7 +134,7 @@
<!-- <view v-else>{{cx.edudata.show}}</view> -->
<view v-if="cx.show"
:class="[cx.edudata.ClassTimeList[0].TypeStr!='固定日期'?'rema':'']">
<view v-for="(item,i) in cx.edudata.ClassTimeList" :key="i">
<view v-for="(item,i) in cx.edudata.ClassTimeList" :key="i" :class="[cx.edudata.ClassTimeList[0].TypeStr=='固定日期'?'rema3':'']">
<text v-if="item.TypeStr=='固定日期'">
{{item.TypeStr}} :&nbsp
</text>
......@@ -152,7 +152,7 @@
</view>
</view>
<!-- 上课次数 -->
<div v-if="cx.edudata.ClassNum&&u.TenantId==27" class="sell">
<div v-if="cx.edudata.ClassNum&&u.TenantId==27" class="sell" style="margin-top: 8rpx;" >
{{cx.edudata.ClassNum}}
</div>
<div v-if="cx.is_level==1&&u.TenantId!=27">
......@@ -297,14 +297,10 @@
remaining(i) {
this.$nextTick(function() {
i.show = !i.show
console.log('llllllllllllllllllllllllll', i.edudata)
})
// this.$set(i.edudata, 'age', 88)
},
remaining2(i) {
i.show = !i.show
// this.ind=i
},
// 接口
initlist(i) {
......@@ -505,7 +501,6 @@
addList(list);
this.g = list
// console.log((this.g, '==='))
this.page_count = res.data.pageCount;
if (this.page_count == 1 || this.page_count == 0) {
this.isover = true;
......@@ -539,6 +534,9 @@
</script>
<style>
.rema3{
margin-bottom: 8rpx;
}
.rema {
display: flex;
flex-wrap: wrap;
......
......@@ -8,104 +8,192 @@
padding: 0 15rpx;
">
<Text class="grid-text" v-if='IsEducation!=1'>商品库存有限,请尽快下单哦</Text>
<Text class="grid-text" v-if='IsEducation==1'>{{list[0].GoodsList.length?list[0].GoodsList.length:'0'}}个课程</Text>
<Text class="grid-text"
v-if='IsEducation==1'>{{list[0].GoodsList.length?list[0].GoodsList.length:'0'}}个课程</Text>
<Text @click="edit" v-if="editType == false && list[0].GoodsList.length>0" class="grid-text_r">编辑</Text>
<Text @click="edit" v-if="editType == true" class="grid-text_r">完成</Text>
</view>
<view style="width: 100%; height: 30rpx; background: #f7f7f7; margin: 20rpx 0;"></view>
<u-empty v-if="emptyshow == true" text="购物车还是空的哦" mode="car"></u-empty>
<view v-if="list.length > 0" style="height: calc(100vh - 60px-30px-35px-20px);width: calc(100vw);overflow: hidden;padding-top: 10px;">
<view v-if="list.length > 0"
style="height: calc(100vh - 60px-30px-35px-20px);width: calc(100vw);overflow: hidden;padding-top: 10px;">
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" :style="{ height: '100%' }">
<template v-if="list.length > 0 && emptyshow==false">
<view class="cartList" :style="{ 'margin-bottom': listbottom }" v-for="(c, i) in list" :key="i">
<view @click.stop="abc()" style=" padding: 0 12px 12px 12px; border-bottom: 1rpx solid #f5f5f5; width: 100%;">
<view @click.stop="abc()"
style=" padding: 0 12px 12px 12px; border-bottom: 1rpx solid #f5f5f5; width: 100%;">
<u-checkbox-group @change="mch_SelectAll(c.checked, i)">
<u-checkbox v-model="c.checked" shape="circle" :active-color="mc">{{ c.MallName }}
</u-checkbox>
</u-checkbox-group>
</view>
<view :class=" u.TenantId!=27?'cartList_item':'cartList_item2'" v-for="(item, index) in c.GoodsList" :key="index"
@click="btnclick(item,index,i)">
<view @click.stop="abc()" style="width: 40px;text-align: center;" v-if="(item.GoodsStatus == 1 && item.InventoryNum!=0 && IsEducation!=1) || (editType == true&& IsEducation!=1)">
<view :class=" u.TenantId!=27?'cartList_item':'cartList_item2'"
v-for="(item, index) in c.GoodsList" :key="index" @click="btnclick(item,index,i)">
<view @click.stop="abc()" style="width: 40px;text-align: center;"
v-if="(item.GoodsStatus == 1 && item.InventoryNum!=0 && IsEducation!=1) || (editType == true&& IsEducation!=1)">
<u-checkbox-group @change="clickcheckbox(item.checked, item.Price, index, i)">
<u-checkbox v-model="item.checked" shape="circle" :active-color="mc"></u-checkbox>
</u-checkbox-group>
</view>
<view @click.stop="abc()" style="width: 40px;text-align: center;" v-if="(item.GoodsStatus == 1 && IsEducation==1) || (editType == true && IsEducation==1)">
<view @click.stop="abc()" style="width: 40px;text-align: center;"
v-if="(item.GoodsStatus == 1 && IsEducation==1) || (editType == true && IsEducation==1)">
<u-checkbox-group @change="clickcheckbox(item.checked, item.Price, index, i)">
<u-checkbox v-model="item.checked" shape="circle" :active-color="mc"></u-checkbox>
</u-checkbox-group>
</view>
<view class="invalid" :style="{ background: mc }" v-if="item.GoodsStatus != 1 && editType == false">
<view class="invalid" :style="{ background: mc }"
v-if="item.GoodsStatus != 1 && editType == false">
<Text style="color: #fff; width: 22px;font-size: 20rpx;">失效</Text>
</view>
<view class="invalid" :style="{ background: mc }" v-if="item.InventoryNum == 0 && editType == false && IsEducation!=1">
<view class="invalid" :style="{ background: mc }"
v-if="item.InventoryNum == 0 && editType == false && IsEducation!=1">
<Text style="color: #fff; width: 22px;font-size: 20rpx;">售馨</Text>
</view>
<!-- 布局修改 -->
<view class="cent-box">
<image :src="item.CoverImage" v-if='IsEducation!=1' mode="widthFix" style="width: 150rpx;height: 150rpx;margin-left: 30rpx;border-radius: 5px;"
@click.native.stop="clickHandler(item.GoodsId)" />
<image :src="item.CoverImage" v-if='IsEducation==1' mode="widthFix" style="width: 116px;height: 64px;margin-left: 30rpx;border-radius: 5px;box-shadow:0 4px 10px 1px #D2D2D2;"
@click.native.stop="clickHandler2(item.GoodsId)" />
<view :class="u.TenantId!=27?'item-r':'item-r2' " :style="{'width':IsEducation!=1?'440rpx':item_r,'height':IsEducation!=1&&u.TenantId!=27?'150rpx':u.TenantId==27?'auto':'65px', }">
<image :src="item.CoverImage" v-if='IsEducation!=1' mode="widthFix"
style="width: 150rpx;height: 150rpx;margin-left: 30rpx;border-radius: 5px;"
@click.native.stop="clickHandler(item.GoodsId)" />
<image :src="item.CoverImage" v-if='IsEducation==1' mode="widthFix"
style="width: 116px;height: 64px;margin-left: 30rpx;border-radius: 5px;box-shadow:0 4px 10px 1px #D2D2D2;"
@click.native.stop="clickHandler2(item.GoodsId)" />
<view :class="u.TenantId!=27?'item-r':'item-r2' "
:style="{'width':IsEducation!=1?'440rpx':item_r,'height':IsEducation!=1&&u.TenantId!=27?'150rpx':u.TenantId==27?'auto':'65px', }">
<view :class="IsEducation!=1?'item-r-n':'item-r-n2'">
<view v-if="item.MarketingLogo.iswords && item.MarketingLogo.iswords==1&& item.MarketingLogo.words!=''" class="Logo"
:style="{color: item.MarketingLogo.wordsColor,background:item.MarketingLogo.wordsBack ,}">
<view
v-if="item.MarketingLogo.iswords && item.MarketingLogo.iswords==1&& item.MarketingLogo.words!=''"
class="Logo"
:style="{color: item.MarketingLogo.wordsColor,background:item.MarketingLogo.wordsBack ,}">
{{item.MarketingLogo.words}}
</view>
<image v-if="item.MarketingLogo.iswords&&item.MarketingLogo.iswords==2&& item.MarketingLogo.ico!=''" mode="heightFix"
:src="item.MarketingLogo.ico" style=" height: 12px;margin-right: 5px" />
<image
v-if="item.MarketingLogo.iswords&&item.MarketingLogo.iswords==2&& item.MarketingLogo.ico!=''"
mode="heightFix" :src="item.MarketingLogo.ico"
style=" height: 12px;margin-right: 5px" />
{{ item.GoodsName}}
</view>
<view style="width: 440rpx;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" v-if="IsEducation!=1">
<Text v-for="(attr, inde2x) in item.SpecificationList" :key="inde2x" style="color: #a0a09d;font-size: 22rpx;margin-right: 5rpx;">
<view
style="width: 440rpx;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"
v-if="IsEducation!=1">
<Text v-for="(attr, inde2x) in item.SpecificationList" :key="inde2x"
style="color: #a0a09d;font-size: 22rpx;margin-right: 5rpx;">
{{ attr}}
</Text>
</view>
<view style="max-width: 440rpx;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;margin-top: 2px;"
@click.native.stop="goUrl(item.FreeShippingUrl)" v-if="item.FreeShippingName !=null&&IsEducation!=1 && (item.FreeShippingFullMoneyPinkage>0 || item.FreeShippingFullNumPinkage>0)">
<view style="color: #FF4048;background: #fdf6ec;padding: 0 5px;display: inline-block;">
<view
style="max-width: 440rpx;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;margin-top: 2px;"
@click.native.stop="goUrl(item.FreeShippingUrl)"
v-if="item.FreeShippingName !=null&&IsEducation!=1 && (item.FreeShippingFullMoneyPinkage>0 || item.FreeShippingFullNumPinkage>0)">
<view
style="color: #FF4048;background: #fdf6ec;padding: 0 5px;display: inline-block;">
<Text style="font-size: 20rpx;margin-right: 5rpx;">
{{item.FreeShippingName !=null ?item.FreeShippingName+':':''}}
<text v-if="item.FreeShippingFullMoneyPinkage==0 && item.FreeShippingFullNumPinkage>0">{{item.FreeShippingFullNumPinkage}}件包邮</text>
<text v-if="item.FreeShippingFullMoneyPinkage>0 && item.FreeShippingFullNumPinkage==0">{{item.FreeShippingFullMoneyPinkage}}元包邮</text>
<text
v-if="item.FreeShippingFullMoneyPinkage==0 && item.FreeShippingFullNumPinkage>0">{{item.FreeShippingFullNumPinkage}}件包邮</text>
<text
v-if="item.FreeShippingFullMoneyPinkage>0 && item.FreeShippingFullNumPinkage==0">{{item.FreeShippingFullMoneyPinkage}}元包邮</text>
</Text>
</view>
</view>
<!-- 新增上课时间 -->
<Text v-if='u.TenantId==27&&item.EduData.ClassTime' style="color: #a0a09d;font-size: 22rpx;margin-right: 5rpx;">
<!-- <Text v-if='u.TenantId==27&&item.EduData.ClassTime' style="color: #a0a09d;font-size: 22rpx;margin-right: 5rpx;">
上课时间:{{item.EduData.ClassTime}}
</Text>
</Text> -->
<view v-if="item.EduData.ClassTimeList.length>0&&u.TenantId==27"
style="color: #a0a09d;font-size: 22rpx;margin-right: 5rpx;">
<view v-if="!item.show">
<view style='display: flex;
justify-content: space-between;width: 100%;' v-if="item.EduData.ClassTimeList[0].TypeStr=='固定日期'">
<view>
{{item.EduData.ClassTimeList[0].TypeStr}}:&nbsp
{{item.EduData.ClassTimeList[0].DateList[0]}}
&nbsp{{item.EduData.ClassTimeList[0].TimeStr}}
</view>
<view v-if='item.EduData.ClassTimeList.length>1'
@click.stop="remaining(item)" :style="{ color: pricecolor }"
class="remaining">点击更多
</view>
</view>
<!-- 非固定 -->
<view style='display: flex;
justify-content: space-between;width: 100%;' v-if="item.EduData.ClassTimeList[0].TypeStr!='固定日期'">
<view>
{{item.EduData.ClassTimeList[0].TypeStr}}
<text v-for="(itm,i3) in item.EduData.ClassTimeList[0].DateList"
:key="i3">
{{itm}}
<text v-if="item.EduData.ClassTimeList[0].DateList.length>1">
{{i3 === item.EduData.ClassTimeList[0].DateList.length-1 ? ":":"、"}}</text>
<text v-else>&nbsp:</text>
</text>
&nbsp{{item.EduData.ClassTimeList[0].TimeStr}}
</view>
<view v-if='item.EduData.ClassTimeList.length>1'
@click.stop="remaining(item)" :style="{ color: pricecolor }"
class="remaining">点击更多
</view>
</view>
</view>
<!-- 显示全部 -->
<!-- <view v-else>{{cx.edudata.show}}</view> -->
<view v-if="item.show"
:class="[item.EduData.ClassTimeList[0].TypeStr!='固定日期'?'rema':'']">
<view v-for="(item3,i) in item.EduData.ClassTimeList" :key="i"
:class="[cx.edudata.ClassTimeList[0].TypeStr=='固定日期'?'rema3':'']">
<text v-if="item3.TypeStr=='固定日期'">
{{item3.TypeStr}} :&nbsp
</text>
<text v-if="item3.TypeStr!='固定日期'">
{{item3.TypeStr}}
</text>
<text v-for="(item2,i2) in item3.DateList">
{{item2}}
<text>{{i2 === item3.DateList.length-1 ? ":":"、"}}</text>
</text>
<text style="margin-right: 10px;">&nbsp{{item3.TimeStr}}</text>
</view>
<text @click.stop="remaining2(item)" :style="{ color: pricecolor }"
class="remaining2">收起</text>
</view>
</view>
<!-- 课程数量 -->
<Text v-if='u.TenantId==27&&item.EduData.ClassNum' style="color: #a0a09d;font-size: 22rpx;margin-right: 5rpx;">
<Text v-if='u.TenantId==27&&item.EduData.ClassNum'
style="color: #a0a09d;font-size: 22rpx;margin-right: 5rpx;margin-top: 8rpx;">
课程数量:{{item.EduData.ClassNum}}
</Text>
<view @click.stop="abc()" style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<view @click.stop="abc()"
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<Text style="font-size: 30rpx;" :style="{ color: pricecolor }">
<Text style="40rpx">{{ item.Price }}</Text>
</Text>
<u-number-box v-if='IsEducation!=1&&u.TenantId!=27' v-model="item.Number" :min="1" :max="item.InventoryNum"
@change="valChange(i, index, item.Number, item.Price, $event)">
<u-number-box v-if='IsEducation!=1&&u.TenantId!=27' v-model="item.Number"
:min="1" :max="item.InventoryNum"
@change="valChange(i, index, item.Number, item.Price, $event)">
</u-number-box>
</view>
<!-- 新增绑定物品 -->
<view v-if='u.TenantId==27' v-for="(attr2, inde4x) in item.GoodsRelevanceList" :key="inde4x">
<Text v-if='attr2.RelevanceName' style="color: #a0a09d;font-size: 22rpx;margin-right: 5rpx;">
<view v-if='u.TenantId==27' v-for="(attr2, inde4x) in item.GoodsRelevanceList"
:key="inde4x">
<Text v-if='attr2.RelevanceName'
style="color: #a0a09d;font-size: 22rpx;margin-right: 5rpx;">
已选物品:{{attr2.RelevanceName}}
</Text>
<view v-if='attr2.RelevancePrice' style="font-size: 30rpx;" :style="{ color: pricecolor }">
<view v-if='attr2.RelevancePrice' style="font-size: 30rpx;"
:style="{ color: pricecolor }">
<Text style="40rpx">{{attr2.RelevancePrice}}</Text>
</view>
</view>
<!-- 新增绑定物品 -->
<Text v-if="item.GoodsStatus != 1 && editType == false&&IsEducation!=1" style="font-size: 20rpx;color:#a0a09d ;">失效原因:商品下架或者库存不足</Text>
<Text v-if="item.GoodsStatus != 1 && editType == false&&IsEducation==1" style="font-size: 20rpx;color:#a0a09d ;">失效原因:课程下架</Text>
<Text v-if="item.GoodsStatus != 1 && editType == false&&IsEducation!=1"
style="font-size: 20rpx;color:#a0a09d ;">失效原因:商品下架或者库存不足</Text>
<Text v-if="item.GoodsStatus != 1 && editType == false&&IsEducation==1"
style="font-size: 20rpx;color:#a0a09d ;">失效原因:课程下架</Text>
</view>
</view>
<!-- 布局修改 -->
......@@ -120,7 +208,8 @@
<u-checkbox-group @change="SelectAll">
<u-checkbox v-model="allchecked" shape="circle" :active-color="mc">全选</u-checkbox>
</u-checkbox-group>
<Text style="font-size: 30rpx;" :style="{ color: pricecolor }" v-if="editType == false">¥{{ TotalPrice }}</Text>
<Text style="font-size: 30rpx;" :style="{ color: pricecolor }"
v-if="editType == false">¥{{ TotalPrice }}</Text>
</div>
<div class="bottom_btn" v-if="!editType">
<u-button size="80" :ripple="true" shape="circle" @click="settlement" :custom-style="{
......@@ -232,6 +321,18 @@
});
},
methods: {
remaining(i) {
this.$nextTick(function() {
i.show = !i.show
console.log('llllllllllllllllllllllllll', i.edudata)
})
// this.$set(i.edudata, 'age', 88)
},
remaining2(i) {
i.show = !i.show
// this.ind=i
},
reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo');
this.showAuth = false;
......@@ -276,8 +377,19 @@
}
});
this.emptyshow = empty
this.list = list;
// this.list = list;
let addList = function(arr) {
arr.forEach(item => {
item.GoodsList.forEach(item2 => {
item2.show = false
})
});
};
addList(list);
this.list = list;
// console.log('44444444444444',this.list[0].GoodsList)
} else {
this.list = [];
}
......@@ -556,20 +668,22 @@
forms = good;
});
if (this.IsEducation != 1) {
if(this.u.TenantId!=27) {
if (this.u.TenantId != 27) {
uni.navigateTo({
url: '/pages/order-submit/order-submit?formData=' + encodeURIComponent(JSON.stringify(
forms)) + '&IsFormShoppingCart=1&ShoppingCartIdList=' + JSON.stringify(
url: '/pages/order-submit/order-submit?formData=' + encodeURIComponent(JSON
.stringify(
forms)) + '&IsFormShoppingCart=1&ShoppingCartIdList=' + JSON.stringify(
ShoppingCartIdList)
});
} else {
uni.navigateTo({
url: '/pages/order-submit/order-submit2?formData=' + encodeURIComponent(JSON.stringify(
forms)) + '&IsFormShoppingCart=1&ShoppingCartIdList=' + JSON.stringify(
url: '/pages/order-submit/order-submit2?formData=' + encodeURIComponent(JSON
.stringify(
forms)) + '&IsFormShoppingCart=1&ShoppingCartIdList=' + JSON.stringify(
ShoppingCartIdList)
});
}
} else if (this.IsEducation == 1) {
uni.navigateTo({
url: '/pages/school/course-submit?DetailList=' + encodeURIComponent(JSON.stringify(
......@@ -609,6 +723,29 @@
</script>
<style>
.rema {
display: flex;
flex-wrap: wrap;
}
.rema3 {
margin-bottom: 8rpx;
}
.remaining {
display: inline-block;
/* flex: 1; */
width: 110rpx;
text-align: right;
}
.remaining2 {
width: 70rpx;
display: inline-block;
margin-top: 8rpx;
}
.the-binding {
width: 100%;
margin-left: 210rpx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment