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

样式修改

parent b2f88fb8
...@@ -58,7 +58,8 @@ ...@@ -58,7 +58,8 @@
</div> </div>
</view> </view>
<!-- 新加div --> <!-- 新加div -->
<view v-if="u.TenantId==27" class="Teachers"> <template v-if="u&&u.TenantId==27">
<view class="Teachers">
<view class="portrait-box"> <view class="portrait-box">
<image v-if="cx.edudata.TeacherIcon" class="portrait" mode="aspectFit" :src="cx.edudata.TeacherIcon" /> <image v-if="cx.edudata.TeacherIcon" class="portrait" mode="aspectFit" :src="cx.edudata.TeacherIcon" />
<view v-if="cx.edudata.TeacherName" class="sell2">{{cx.edudata.TeacherName}}</view> <view v-if="cx.edudata.TeacherName" class="sell2">{{cx.edudata.TeacherName}}</view>
...@@ -75,6 +76,8 @@ ...@@ -75,6 +76,8 @@
</div> </div>
</view> </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,26 +8,37 @@ ...@@ -8,26 +8,37 @@
'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 v-show="classification==1" class="content-box" @click="content33()" :style="{
color: indexx ? mainColor : '',
'border-color': indexx == i ? 'mainColor' : '#F0F0F0',
}">
<view class="content-tetx">不限</view>
</view>
<!-- 年级内容 -->
<view class="content-box" v-show="classification==0" :style="{ <view class="content-box" v-show="classification==0" :style="{
color: index2 == i ? mainColor : '', color: index22 == i ? mainColor : '',
'border-color': index2 == i ? 'mainColor' : '#F0F0F0', 'border-color': index22 == i ? 'mainColor' : '#F0F0F0',
}" v-for="(item, i) in d" :key='i'@click="content2(item,i)"> }" 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',
...@@ -113,7 +124,8 @@ ...@@ -113,7 +124,8 @@
</div> </div>
</view> </view>
<!-- 新加div --> <!-- 新加div -->
<view v-if="u.TenantId==27" class="Teachers"> <template v-if="u&&u.TenantId==27">
<view class="Teachers">
<view class="portrait-box"> <view class="portrait-box">
<image v-if="cx.edudata.TeacherIcon" class="portrait" mode="aspectFit" <image v-if="cx.edudata.TeacherIcon" class="portrait" mode="aspectFit"
:src="cx.edudata.TeacherIcon" /> :src="cx.edudata.TeacherIcon" />
...@@ -131,6 +143,8 @@ ...@@ -131,6 +143,8 @@
</div> </div>
</view> </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,44 +298,61 @@ ...@@ -287,44 +298,61 @@
} }
}, },
// 内容点击 // 内容点击
// 年级不限
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()
}, },
......
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