Commit 95b61952 authored by 黄奎's avatar 黄奎

样式修改

parent b2f88fb8
...@@ -58,23 +58,26 @@ ...@@ -58,23 +58,26 @@
</div> </div>
</view> </view>
<!-- 新加div --> <!-- 新加div -->
<view v-if="u.TenantId==27" class="Teachers"> <template v-if="u&&u.TenantId==27">
<view class="portrait-box"> <view class="Teachers">
<image v-if="cx.edudata.TeacherIcon" class="portrait" mode="aspectFit" :src="cx.edudata.TeacherIcon" /> <view class="portrait-box">
<view v-if="cx.edudata.TeacherName" class="sell2">{{cx.edudata.TeacherName}}</view> <image v-if="cx.edudata.TeacherIcon" class="portrait" mode="aspectFit" :src="cx.edudata.TeacherIcon" />
</view> <view v-if="cx.edudata.TeacherName" class="sell2">{{cx.edudata.TeacherName}}</view>
<!-- 价格 --> </view>
<view class="cart-box"> <!-- 价格 -->
<view class="vip2" :style="{ color: mainColor }"> <view class="cart-box">
{{ cx.price_content }} <view class="vip2" :style="{ color: mainColor }">
{{ cx.price_content }}
</view>
<div @click.stop="showSkuHandler(cx)" class="right">
<!-- todo 点击加入购物车-->
<u-icon name="cart-circle-o" size="44" :color="mainColor" />
</div>
</view> </view>
<div @click.stop="showSkuHandler(cx)" class="right">
<!-- todo 点击加入购物车-->
<u-icon name="cart-circle-o" size="44" :color="mainColor" />
</div>
</view> </view>
</view> </template>
</div> </div>
<u-divider v-if="isover" :margin-top="20" :margin-bottom="20">没有更多商品了</u-divider> <u-divider v-if="isover" :margin-top="20" :margin-bottom="20">没有更多商品了</u-divider>
......
...@@ -8,34 +8,45 @@ ...@@ -8,34 +8,45 @@
'border-color': classification == i ? 'mainColor' : '#F0F0F0', 'border-color': classification == i ? 'mainColor' : '#F0F0F0',
}" v-for="(item, i) in Theclass" :key="i" @click="subjects(item,i)"> }" v-for="(item, i) in Theclass" :key="i" @click="subjects(item,i)">
<view class="classification-text">{{item.name}}</view> <view class="classification-text">{{item.name}}</view>
<u-icon name="arrow-down" size="32" ></u-icon> <u-icon name="arrow-down" size="32"></u-icon>
</view> </view>
</view> </view>
<!-- 内容 --> <!-- 内容 -->
<!-- <u-popup mode="top" length="auto" v-model="mask"> --> <!-- <u-popup mode="top" length="auto" v-model="mask"> -->
<scroll-view scroll-y="true" style="max-height: 300rpx;" v-show="mask"> <scroll-view scroll-y="true" style="max-height: 300rpx;" v-show="mask">
<view class="drop-down-content"> <view class="drop-down-content" >
<view class="content-box" @click="content()" :style="{ <!-- 年级不限 -->
<view v-show="classification==0" class="content-box" @click="content()" :style="{
color: index ? mainColor : '', color: index ? mainColor : '',
'border-color': index == i ? 'mainColor' : '#F0F0F0', 'border-color': index == i ? 'mainColor' : '#F0F0F0',
}"> }">
<view class="content-tetx">不限</view> <view class="content-tetx">不限</view>
</view> </view>
<view class="content-box" v-show="classification==0" :style="{
color: index2 == i ? mainColor : '', <!-- 类型不限 -->
'border-color': index2 == i ? 'mainColor' : '#F0F0F0', <view v-show="classification==1" class="content-box" @click="content33()" :style="{
}" v-for="(item, i) in d" :key='i'@click="content2(item,i)"> color: indexx ? mainColor : '',
'border-color': indexx == i ? 'mainColor' : '#F0F0F0',
}">
<view class="content-tetx">不限</view>
</view>
<!-- 年级内容 -->
<view class="content-box" v-show="classification==0" :style="{
color: index22 == i ? mainColor : '',
'border-color': index22 == i ? 'mainColor' : '#F0F0F0',
}" v-for="(item, i) in d" :key='i' @click="content2(item,i)">
<view class="content-tetx">{{item.Name}}</view> <view class="content-tetx">{{item.Name}}</view>
</view> </view>
<view class="content-box" v-show="classification==1" :style="{ <!-- 类型内容 -->
<view class="content-box" v-show="classification==1" :style="{
color: index2 == i ? mainColor : '', color: index2 == i ? mainColor : '',
'border-color': index2 == i ? 'mainColor' : '#F0F0F0', 'border-color': index2 == i ? 'mainColor' : '#F0F0F0',
}" v-for="(item, i) in subjectslist" @click="content3(item,i)"> }" v-for="(item, i) in subjectslist" @click="content3(item,i)">
<view class="content-tetx">{{item.CateName}}</view> <view class="content-tetx">{{item.CateName}}</view>
</view>
</view> </view>
</view>
</scroll-view> </scroll-view>
<!-- </u-popup> --> <!-- </u-popup> -->
<!-- 内容 --> <!-- 内容 -->
...@@ -113,24 +124,27 @@ ...@@ -113,24 +124,27 @@
</div> </div>
</view> </view>
<!-- 新加div --> <!-- 新加div -->
<view v-if="u.TenantId==27" class="Teachers"> <template v-if="u&&u.TenantId==27">
<view class="portrait-box"> <view class="Teachers">
<image v-if="cx.edudata.TeacherIcon" class="portrait" mode="aspectFit" <view class="portrait-box">
:src="cx.edudata.TeacherIcon" /> <image v-if="cx.edudata.TeacherIcon" class="portrait" mode="aspectFit"
<view v-if="cx.edudata.TeacherName" class="sell2">{{cx.edudata.TeacherName}}</view> :src="cx.edudata.TeacherIcon" />
</view> <view v-if="cx.edudata.TeacherName" class="sell2">{{cx.edudata.TeacherName}}</view>
<!-- 价格 --> </view>
<view class="cart-box"> <!-- 价格 -->
<view class="vip2" :style="{ color: mainColor }"> <view class="cart-box">
{{ cx.price_content }} <view class="vip2" :style="{ color: mainColor }">
{{ cx.price_content }}
</view>
<div @click.stop="showSkuHandler(cx)" class="right">
<!-- todo 点击加入购物车-->
<u-icon name="cart-circle-o" size="44" :color="mainColor" />
</div>
</view> </view>
<div @click.stop="showSkuHandler(cx)" class="right">
<!-- todo 点击加入购物车-->
<u-icon name="cart-circle-o" size="44" :color="mainColor" />
</div>
</view> </view>
</view> </template>
</div> </div>
<u-divider v-if="isover" :margin-top="20" :margin-bottom="20">没有更多商品了</u-divider> <u-divider v-if="isover" :margin-top="20" :margin-bottom="20">没有更多商品了</u-divider>
...@@ -169,10 +183,15 @@ ...@@ -169,10 +183,15 @@
id: "1" id: "1"
} }
], ],
obj2: {
EduClassTypeId: ''
},
subjectslist: [], subjectslist: [],
classification: -1, classification: -1,
index: true, index: true,
indexx: true,
index2: -1, index2: -1,
index22: -1,
textColor: "#F0F0F0", textColor: "#F0F0F0",
mask: false, mask: false,
...@@ -195,16 +214,7 @@ ...@@ -195,16 +214,7 @@
OrderBy: 1, OrderBy: 1,
UserId: 0, UserId: 0,
StoreId: 0, StoreId: 0,
}, EduClassTypeId: '',
msg: {
pageIndex: 1,
pageSize: 14,
Name: '',
GoodsType: 0,
CategoryIds: '',
OrderBy: 1,
UserId: 0,
StoreId: 0,
}, },
sku: {}, sku: {},
showSku: false, showSku: false,
...@@ -220,6 +230,7 @@ ...@@ -220,6 +230,7 @@
auth auth
}, },
created() { created() {
this.u = uni.getStorageSync('mall_UserInfo');
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.activeStyle = `background:${this.mainColor};`; this.activeStyle = `background:${this.mainColor};`;
this.IsEducation = uni.getStorageSync('basedata') ? this.IsEducation = uni.getStorageSync('basedata') ?
...@@ -230,7 +241,7 @@ ...@@ -230,7 +241,7 @@
}, },
mounted() { mounted() {
this.init(); this.init();
this.u = uni.getStorageSync('mall_UserInfo5') // this.u = uni.getStorageSync('mall_UserInfo5')
}, },
methods: { methods: {
// 接口 // 接口
...@@ -287,46 +298,63 @@ ...@@ -287,46 +298,63 @@
} }
}, },
// 内容点击 // 内容点击
// 年级不限
content() { content() {
this.index = !this.index this.index = !this.index
if (this.index) { if (this.index) {
this.index2 = -1 // this.index =true
this.index22 = -1
this.msg.CategoryIds = '' this.msg.CategoryIds = ''
this.msg.EduClassTypeId=''
this.msg.page = 1; this.msg.page = 1;
this.subjectslist = []; this.subjectslist = [];
this.g = []; this.g = [];
this.init() this.init()
this.mask = false this.mask = false
this.classification = -1 this.classification = -1
this.Theclass[0].name = '年级不限'
}
},
// 类型不限
content33() {
this.indexx = !this.indexx
if (this.indexx) {
// this.indexx =true
this.index2 = -1
this.msg.EduClassTypeId = ''
this.msg.page = 1;
this.subjectslist = [];
this.g = [];
this.init()
this.mask = false
this.classification = -1
this.Theclass[1].name = '类型不限'
} }
}, },
// 年级内容
content2(item, i) { content2(item, i) {
this.index2 = i this.index22 = i
this.index = false this.index = false
this.classification = -1 this.classification = -1
this.mask = false this.mask = false
this.msg.page = 1; this.msg.page = 1;
this.g = []; this.g = [];
this.msg.CategoryIds = item.Id this.msg.CategoryIds = item.Id
this.Theclass[0].name = item.Name
this.init() this.init()
}, },
// 类型内容
content3(item, i) { content3(item, i) {
let obj2={
EduClassTypeId:''
}
this.index2 = i this.index2 = i
this.index = false this.indexx = false
this.classification = -1 this.classification = -1
this.mask = false this.mask = false
this.msg.page = 1; this.msg.page = 1;
this.g = []; this.g = [];
obj2.EduClassTypeId =item.CateId this.msg.EduClassTypeId = item.CateId
let obj = Object.assign({}, this.msg, obj2); this.Theclass[1].name = item.CateName
this.msg= obj
this.init() this.init()
}, },
// 购物车 // 购物车
showSkuHandler(g) { showSkuHandler(g) {
......
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