Commit 15f45dd5 authored by zhengke's avatar zhengke

增加组件

parent 9e1a0b53
......@@ -29,6 +29,8 @@
<style5 v-if="goods.listStyle == 0" :goods-info="goods" :good-list="currentList"></style5>
<!--列表模式-->
<style6 v-if="goods.listStyle == -1" :goods-info="goods" :good-list="currentList"></style6>
<!-- 教育有星星模式 -->
<style7 v-if="goods.listStyle == 4" :goods-info="goods" :good-list="currentList"></style7>
</template>
<template v-else-if="goods.catPosition == 'left'">
<!-- 左侧分类 -->
......@@ -61,6 +63,8 @@
<style5 v-if="goods.listStyle == 0" :goods-info="goods" :good-list="currentList"></style5>
<!--列表模式-->
<style6 v-if="goods.listStyle == -1" :goods-info="goods" :good-list="currentList"></style6>
<!-- 教育有星星模式 -->
<style7 v-if="goods.listStyle == 4" :goods-info="goods" :good-list="currentList"></style7>
</template>
</div>
</div>
......@@ -73,6 +77,7 @@ import style3 from './style3';
import style4 from './style4';
import style5 from './style5';
import style6 from './style6';
import style7 from './style7';
import sidebar from '../sidebar/index';
export default {
props: ['goods'],
......@@ -83,6 +88,7 @@ export default {
style4,
style5,
style6,
style7,
sidebar
},
data() {
......
<template>
<view
style="padding: 12px; padding-bottom: 0;width:100%;"
:style="{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : ''
}"
>
<view
class="good-seven"
v-for="(item, gli) in goodList"
:key="gli"
@click="openGood(item)"
:style="{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : ''
}"
>
<view class="tips" v-if="goodsInfo.showGoodsTag"><image :src="goodsInfo.goodsTagPicUrl" mode="widthFix" style="width: 100%;" /></view>
<view class="img-box"><image style="width: 100%; height: 100%;" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.picUrl" /></view>
<view class="good-info">
<view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</view>
<view class="good-price-info">
<view>
<u-rate
:current="item.courseScore!=null &&item.courseScore>0?item.courseScore:'5'"
:active-color="mainColor" inactive-color="#DDDDDD"
active-icon="star"
inactive-icon="star-o"
size="20"
:disabled="true"
></u-rate>
<text class="good-rb-text">{{item.courseScore!=null &&item.courseScore>0?item.courseScore.toFixed(1):'5.0'}}</text>
</view>
<view class="price" :style="{ color: mainColor }">{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }}</view>
<view class="buy" v-if="goodsInfo.showBuyBtn" @click.stop="showSkuHandler(item)">
<u-icon name="cart-o" size="40" :color="mainColor" v-if="goodsInfo.buyBtn == 'cart'" />
<u-icon name="add-o" size="40" :color="mainColor" v-else-if="goodsInfo.buyBtn == 'add'" />
<u-button
type="primary"
size="mini"
:ripple="true"
:color="goodsInfo.buttonColor"
:custom-style="
`backgroundColor:${goodsInfo.buttonColor},color:${goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4 ? goodsInfo.buttonColor : '#FFF'}`
"
:plain="goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4"
:shape="goodsInfo.buyBtnStyle == 3 || goodsInfo.buyBtnStyle == 4 ? 'circle' : 'square'"
v-else
>
{{ goodsInfo.buyBtnText }}
</u-button>
</view>
</view>
</view>
</view>
<good-sku v-if="showSku" borderRadius="20" v-model="showSku" :good="sku" :option-type="2"></good-sku>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
</view>
</template>
<script>
import goodSku from '../goods/goodsku';
import auth from '@/components/auth/index.vue';
export default {
components: {
goodSku,
auth
},
props: ['goodList', 'goodsInfo'],
data() {
return {
mainColor: '',
activeKey: 0,
showSku: false,
sku: {},
showAuth: false,
u: {}
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
},
methods: {
openGood(item) {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId=' + item.id });
},
showSkuHandler(g) {
this.sku = g;
this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
this.showSku = true;
}
},
reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo');
// this.showAuth = false;
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
}
}
};
</script>
<style>
.good-seven {
position: relative;
margin-bottom: 14px;
display: flex;
/* height: 102px; */
border: 1rpx solid transparent;
border-radius: 10rpx;
box-sizing: border-box;
padding: 0 1px 1px 0;
overflow: hidden;
}
.good-seven .tips {
width: 64rpx;
height: 64rpx;
position: absolute;
top: 0;
left: 0;
z-index: 4;
}
.good-seven .img-box {
width: 125px;
height: 70px;
border-radius:4px;
overflow: hidden;
box-shadow:0 4px 10px 1px #D2D2D2;
}
.good-seven .good-info {
padding-left: 12px;
flex: 1;
width: 1rpx;
border: 10rpx;
padding-bottom: 0;
display: flex;
flex-direction: column;
/* width:20%; */
}
.good-seven .good-info .good-name {
font-size: 13px;
height: 34px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.good-seven .good-info .good-price-info {
display: flex;
justify-items: center;
justify-content: space-between;
align-items: flex-end;
height: 10px;
flex: 1;
padding-bottom: 10rpx;
}
.good-seven .good-rb-text {
font-size: 11px;
color: #999999;
margin-top: 3px;
margin-left: 2px;
}
.good-seven .good-info .good-price-info .price {
color: #ff4544;
font-size: 14px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.good-seven .good-info .good-price-info .buy {
width: 24px;
text-align: right;
}
</style>
<template>
<view class='Rstudy' :style="{
'padding-top':info.PaddingTop+'px',
'padding-right':info.PaddingRight+'px',
'padding-bottom':info.PaddingBottom+'px',
'padding-left':info.PaddingLeft+'px',
'padding-top':goods.PaddingTop+'px',
'padding-right':goods.PaddingRight+'px',
'padding-bottom':goods.PaddingBottom+'px',
'padding-left':goods.PaddingLeft+'px',
'bottom':posiTop+'px'
}"
v-if="isshow==true"
>
<view class='Rstudy-box' :style="{width:windowWidth+'px'}">
<view class="close" v-if="info.isleft==1" @click="isshow=false">
<view class="close" @click="isshow=false">
<u-icon name="cross" color="#FFF" size="40"></u-icon>
</view>
<view class="content" :style="{width:textWidth+'px'}">
<view class="cover" v-if='info.isimg ==1'>
<image src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1601282872605&di=686b8ba4f0e837522a97d77267a2da18&imgtype=0&src=http%3A%2F%2Ft8.baidu.com%2Fit%2Fu%3D2247852322%2C986532796%26fm%3D79%26app%3D86%26f%3DJPEG%3Fw%3D1280%26h%3D853" style="width: 100%;height: 100%;border-radius: 5px;"></image>
<view class="cover">
<image :src="goods.Cover" style="width: 100%;height: 100%;border-radius: 5px;"></image>
</view>
<view class="content-r" :style="{width:(textWidth-70-10)+'px'}">
<text class="content-Name" v-if='info.isName ==1'>vue初级入门最新</text>
<text class="progress" v-if='info.isschedule ==1'>小白入门-ref的使用</text>
<text class="content-Name">{{goods.Name}}</text>
<view class="progress-box">
<progress percent="40" active stroke-width="3" />
</view>
</view>
</view>
<view class="close" v-if="info.isleft==2" @click="isshow=false">
<u-icon name="cross" color="#FFF" size="40"></u-icon>
</view>
</view>
</view>
......@@ -31,6 +30,7 @@
<script>
export default{
props: ['goods'],
data(){
return{
info:{
......@@ -45,7 +45,7 @@
},
textWidth:0,
windowWidth:0,
isshow:false,
isshow:true,
posiTop:0,
}
......@@ -70,7 +70,8 @@
padding: 10px;
display: flex;flex-direction: row;
align-items: center;
background: rgba(99, 99, 107, 0.8);
/* background: rgba(99, 99, 107, 0.8); */
background: rgba(0, 0, 0, 0.6);
border-radius: 5px;
justify-content: space-between;
......
......@@ -4,13 +4,13 @@
<!-- 只是商品 -->
<template>
<!--一行一个-->
<style1 v-if="goods.listStyle == 1" :goods-info="goods" :good-list="currentList"></style1>
<style1 v-if="goods.listStyle == 1" :goods-info="goods"></style1>
<!--一行两个-->
<style2 v-if="goods.listStyle == 2" :goods-info="goods" :good-list="currentList"></style2>
<style2 v-if="goods.listStyle == 2" :goods-info="goods"></style2>
<!--左右滚动-->
<style5 v-if="goods.listStyle == 0" :goods-info="goods" :good-list="currentList"></style5>
<style5 v-if="goods.listStyle == 0" :goods-info="goods"></style5>
<!--列表模式-->
<style6 v-if="goods.listStyle == -1" :goods-info="goods" :good-list="currentList"></style6>
<style6 v-if="goods.listStyle == -1" :goods-info="goods"></style6>
</template>
</div>
</div>
......@@ -23,7 +23,7 @@ import style5 from './style5';
import style6 from './style6';
export default {
// props: ['goods'],
props: ['goods'],
components: {
style1,
style2,
......@@ -36,39 +36,39 @@ export default {
mainColor: '',
activeKey: 0,
currentList: [],
goods:{
catPosition:'top',
listStyle:2,
showCat:false,
backgroundColor:'',
backgroundPicUrl:'',
goodsStyle:2,//边框模式
showGoodsName:true,
showsubtitle:true,
goodsCoverProportion:'1-1',
backgroundColor:'#FFF',
PaddingTop:10,
PaddingRight:10,
PaddingBottom:10,
PaddingLeft:10,
list:[
{id: 367454,
name: "高考必考语文作文快速提升作文快速提升",
picUrl: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1593499381000_752.jpg",
subtitle: '本教程共分3个章节',
},
{id: 367454,
name: "高考必考语文作文快速提升作文快速提升",
picUrl: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1601282872605&di=686b8ba4f0e837522a97d77267a2da18&imgtype=0&src=http%3A%2F%2Ft8.baidu.com%2Fit%2Fu%3D2247852322%2C986532796%26fm%3D79%26app%3D86%26f%3DJPEG%3Fw%3D1280%26h%3D853",
subtitle: '本教程共分3个章节',
},
{id: 367454,
name: "高考必考语文作文快速提升作文快速提升",
picUrl: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1601282872605&di=686b8ba4f0e837522a97d77267a2da18&imgtype=0&src=http%3A%2F%2Ft8.baidu.com%2Fit%2Fu%3D2247852322%2C986532796%26fm%3D79%26app%3D86%26f%3DJPEG%3Fw%3D1280%26h%3D853",
subtitle: '本教程共分3个章节',
}
]
}
// goods:{
// catPosition:'top',
// listStyle:2,
// showCat:false,
// backgroundColor:'',
// backgroundPicUrl:'',
// goodsStyle:2,//边框模式
// showGoodsName:true,
// showsubtitle:true,
// goodsCoverProportion:'1-1',
// backgroundColor:'#FFF',
// PaddingTop:10,
// PaddingRight:10,
// PaddingBottom:10,
// PaddingLeft:10,
// list:[
// {id: 367454,
// name: "高考必考语文作文快速提升作文快速提升",
// picUrl: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1593499381000_752.jpg",
// subtitle: '本教程共分3个章节',
// },
// {id: 367454,
// name: "高考必考语文作文快速提升作文快速提升",
// picUrl: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1601282872605&di=686b8ba4f0e837522a97d77267a2da18&imgtype=0&src=http%3A%2F%2Ft8.baidu.com%2Fit%2Fu%3D2247852322%2C986532796%26fm%3D79%26app%3D86%26f%3DJPEG%3Fw%3D1280%26h%3D853",
// subtitle: '本教程共分3个章节',
// },
// {id: 367454,
// name: "高考必考语文作文快速提升作文快速提升",
// picUrl: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1601282872605&di=686b8ba4f0e837522a97d77267a2da18&imgtype=0&src=http%3A%2F%2Ft8.baidu.com%2Fit%2Fu%3D2247852322%2C986532796%26fm%3D79%26app%3D86%26f%3DJPEG%3Fw%3D1280%26h%3D853",
// subtitle: '本教程共分3个章节',
// }
// ]
// }
};
},
created() {
......
<template>
<div
:style="{
<div :style="{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : ''
}"
>
<div
v-for="(item, gli) in goodList"
:key="gli"
class="good-one"
@click="openGood(item)"
:style="{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : ''
}"
>
<!-- <div class="tips" v-if="goodsInfo.showGoodsTag"><image :src="goodsInfo.goodsTagPicUrl" mode="widthFix" style="width: 100%;" /></div> -->
<!-- <image
style="width: calc(100vw - 24px); height: 66vw;"
:mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src="item.picUrl"
v-if="goodsInfo.goodsCoverProportion == '3-2'"
/> -->
<image
style="
'paddingLeft':goodsInfo.PaddingLeft+'px',
'paddingRight':goodsInfo.PaddingRight+'px',
'paddingTop':goodsInfo.PaddingTop+'px',
'paddingBottom':goodsInfo.PaddingBottom+'px'
}">
<div v-for="(item, gli) in goodsInfo.list" :key="gli" class="good_study_one" @click="openGood(item)" :style="{
borderRadius:goodsInfo.SearchFilletPX+'px'
}">
<image style="
width: calc(100vw - 24px);
height: 100vw;
border-radius: 10rpx 10rpx 0 0;
"
mode='aspectFill'
:src="item.picUrl"
/>
<div class="good-info" v-if="imgModel==false">
<div class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</div>
<div class="good-price-info" v-if="goodsInfo.showsubtitle">
<span class="price" >{{ item.subtitle }}</span>
mode='aspectFill' :src="item.picUrl" />
<div class="good-info">
<div class="good-name" v-if="item.name">{{ item.name }}</div>
<div class="good-price-info" v-if="item.lableName">
<span class="price">{{ item.lableName }}</span>
</div>
</div>
</div>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
</div>
</template>
<script>
import auth from '@/components/auth/index.vue';
export default {
components: {
auth
},
props: ['goodList', 'goodsInfo'],
data() {
return {
mainColor: '',
activeKey: 0,
showSku: false,
sku: {},
showAuth: false,
u: {},
imgModel:false
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
if(this.goodsInfo.showGoodsName==false && this.goodsInfo.showsubtitle ==false){
this.imgModel=true
}
},
methods: {
openGood(item) {
this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId=' + item.id });
}
import auth from '@/components/auth/index.vue';
export default {
components: {
auth
},
props: ['goodsInfo'],
data() {
return {
mainColor: '',
showSku: false,
sku: {},
showAuth: false,
u: {},
};
},
reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo');
// this.showAuth = false;
created() {
this.mainColor = this.$uiConfig.mainColor;
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
methods: {
openGood(item) {
this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
if (item.linkUrl) {
uni.navigateTo({
url: item.linkUrl,
});
}
}
},
reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo');
// this.showAuth = false;
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
}
}
}
};
};
</script>
<style>
.good-one {
margin: 12px;
position: relative;
border: 1rpx solid transparent;
border-radius: 10rpx;
/* padding-bottom: 10rpx; */
overflow: hidden;
}
.good-one .tips {
width: 64rpx;
height: 64rpx;
position: absolute;
top: 0;
left: 0;
z-index: 4;
}
.good-one .guding {
position: relative;
}
.good-one .guding .img-box {
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
}
.good-one .good-info {
padding: 12rpx;
padding-bottom: 0;
margin-top: -5px;
}
.good-one .good-info .good-name {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
margin-bottom: 13px;
}
.good-one .good-info .good-price-info {
display: flex;
}
.good-one .good-info .good-price-info .price {
color: #999999;
font-size: 11px;
flex: 1;
}
.good-one .good-info .good-price-info .buy {
width: 24px;
text-align: right;
}
.good_study_one {
margin: 12px;
position: relative;
border: 1rpx solid transparent;
border-radius: 10rpx;
border: 1px solid rgb(226, 226, 226);
overflow: hidden;
}
.good_study_one .tips {
width: 64rpx;
height: 64rpx;
position: absolute;
top: 0;
left: 0;
z-index: 4;
}
.good_study_one .guding {
position: relative;
}
.good_study_one .guding .img-box {
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
}
.good_study_one .good-info {
padding: 12rpx;
margin-top: -5px;
}
.good_study_one .good-info .good-name {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
margin-bottom: 13px;
}
.good_study_one .good-info .good-price-info {
display: flex;
}
.good_study_one .good-info .good-price-info .price {
color: #999999;
font-size: 11px;
flex: 1;
}
.good_study_one .good-info .good-price-info .buy {
width: 24px;
text-align: right;
}
</style>
<template>
<view
style="padding: 12px; padding-bottom: 0;"
:style="{
<view style="padding: 12px; padding-bottom: 0;" :style="{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : ''
}"
>
<u-row gutter="24">
<u-col span="6" v-for="(item, gli) in goodList" :key="gli">
<view
class="good-two"
@click="openGood(item)"
:style="{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : ''
}"
>
<!-- <view class="tips" v-if="goodsInfo.showGoodsTag"><image :src="goodsInfo.goodsTagPicUrl" mode="widthFix" style="width:100%" /></view> -->
<view class="img-box">
<view class="img-show">
<image
style="
}">
<view :style="{
'paddingLeft':goodsInfo.PaddingLeft+'px',
'paddingRight':goodsInfo.PaddingRight+'px',
'paddingTop':goodsInfo.PaddingTop+'px',
'paddingBottom':goodsInfo.PaddingBottom+'px',
}">
<u-row gutter="24">
<u-col span="6" v-for="(item, gli) in goodsInfo.list" :key="gli">
<view class="good_study_two" @click="openGood(item)" :style="{borderRadius:goodsInfo.SearchFilletPX+'px'}">
<view class="img-box">
<view class="img-show">
<image style="
width: 100%;
height: 100%;
border-radius: 10rpx 10rpx 0 0;
"
mode="aspectFill"
:src="item.picUrl"
/>
" mode="aspectFill" :src="item.picUrl" />
</view>
</view>
</view>
<view class="good-info" v-if="imgModel==false">
<view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</view>
<view class="good-price-info" v-if="goodsInfo.showsubtitle">
<span class="price" >{{ item.subtitle }}</span>
<view class="good-info">
<view class="good-name" v-if="item.name">{{ item.name }}</view>
<view class="good-price-info" v-if="item.lableName">
<span class="price">{{ item.lableName }}</span>
</view>
</view>
</view>
</view>
</u-col>
</u-row>
</u-col>
</u-row>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
</view>
</template>
<script>
import auth from '@/components/auth/index.vue';
export default {
components: {
auth
},
props: ['goodList', 'goodsInfo'],
data() {
return {
mainColor: '',
activeKey: 0,
showSku: false,
showAuth: false,
u: {},
imgModel:false
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
if(this.goodsInfo.showGoodsName==false && this.goodsInfo.showsubtitle ==false){
this.imgModel=true
}
},
methods: {
openGood(item) {
this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
uni.navigateTo({ url: '/pages/school/courseList?GoodsId=' + item.id });
// uni.navigateTo({ url: '/pages/school/articleList' });
}
import auth from '@/components/auth/index.vue';
export default {
components: {
auth
},
reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo');
// this.showAuth = false;
props: ['goodsInfo'],
data() {
return {
mainColor: '',
showSku: false,
showAuth: false,
u: {},
};
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
created() {
this.mainColor = this.$uiConfig.mainColor;
},
methods: {
openGood(item) {
this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
if (item.linkUrl) {
uni.navigateTo({
url: item.linkUrl,
});
}
}
},
reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo');
// this.showAuth = false;
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
}
}
}
};
};
</script>
<style>
.good-two {
position: relative;
margin-bottom: 12px;
border: 1rpx solid transparent;
border-radius: 10rpx;
overflow: hidden;
/* padding-bottom: 10rpx; */
}
.good-two .tips {
width: 64rpx;
height: 64rpx;
position: absolute;
top: 0;
left: 0;
z-index: 4;
}
.good-two .img-box {
width: 100%;
height: 0;
padding-top: 54%;
position: relative;
}
.good-two .img-box .img-show {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
.good-two .guding {
position: relative;
}
.good-two .guding .img-box {
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
}
.good-two .good-info {
padding: 6rpx;
margin-top: -5px;
padding-bottom: 0;
}
.good-two .good-info .good-name {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
margin: 3px 0;
font-size: 13px;
height: 37px;
}
.good-two .good-info .good-price-info {
display: flex;
}
.good-two .good-info .good-price-info .price {
color: #999999;
/* flex: 1; */
font-size: 11px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.good-two .good-info .good-price-info .buy {
width: 24px;
text-align: right;
}
.good_study_two {
position: relative;
margin-bottom: 12px;
border: 1rpx solid transparent;
border-radius: 10rpx;
overflow: hidden;
border: 1px solid rgb(226, 226, 226);
box-shadow: 0 4px 10px 1px #e6e5e5;
background-color: #fff;
}
.good_study_two .tips {
width: 64rpx;
height: 64rpx;
position: absolute;
top: 0;
left: 0;
z-index: 4;
}
.good_study_two .img-box {
width: 100%;
height: 0;
padding-top: 60%;
position: relative;
}
.good_study_two .img-box .img-show {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
.good_study_two .guding {
position: relative;
}
.good_study_two .guding .img-box {
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
}
.good_study_two .good-info {
padding: 15rpx;
}
.good_study_two .good-info .good-name {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
margin-bottom: 8px;
color: #1B1D1E;
font-size: 13px;
}
.good_study_two .good-info .good-price-info {
display: flex;
color: #999999;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.good_study_two .good-info .good-price-info .price {
color: #999999;
/* flex: 1; */
font-size: 11px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.good_study_two .good-info .good-price-info .buy {
width: 24px;
text-align: right;
}
</style>
<template>
<view
class="her-scoller"
:style="{
<view class="her-scoller-study" :style="{
'background-color': goodsInfo.backgroundColor
}">
<view class="her_Two_study" :style="{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : '',
'padding-top':goodsInfo.PaddingTop+'px',
'padding-right':goodsInfo.PaddingRight+'px',
'padding-bottom':goodsInfo.PaddingBottom+'px',
'padding-left':goodsInfo.PaddingLeft+'px',
}"
>
<view
class="good-five"
@click="openGood(item)"
v-for="(item, gli) in goodList"
:key="gli"
>
<view class="img-box" :style="{'width':imgModel?'173px':'97px','height':imgModel?'100px':'70px'}"><image style="width: 100%; height: 100%;border-radius: 4px;" mode="aspectFill" :src="item.picUrl" /></view>
<view class="good-info" v-if="imgModel==false">
<view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</view>
<view class="good-price-info" v-if="goodsInfo.showsubtitle">
<span class="price" >{{ item.subtitle }}</span>
}">
<view class="good-five" @click="openGood(item)" v-for="(item, gli) in goodsInfo.list" :style="{borderRadius:goodsInfo.SearchFilletPX+'px'}" :key="gli">
<view class="img-box">
<view class="img-show">
<image style="width: 100%; height: 100%;" mode="aspectFill" :src="item.picUrl" />
</view>
</view>
<view class="good-info">
<view class="good-name" v-if="item.name">{{ item.name }}</view>
<view class="good-price-info" v-if="item.lableName">
<span class="price">{{ item.lableName }}</span>
</view>
</view>
</view>
</view>
......@@ -30,73 +27,71 @@
</view>
</template>
<script>
import auth from '@/components/auth/index.vue';
export default {
components: {
import auth from '@/components/auth/index.vue';
export default {
components: {
auth
},
props: ['goodList', 'goodsInfo'],
data() {
return {
mainColor: '',
activeKey: 0,
showAuth: false,
u: {},
imgModel:false,
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
if(this.goodsInfo.showGoodsName==false && this.goodsInfo.showsubtitle ==false){
this.imgModel=true
}
},
methods: {
openGood(item) {
this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId=' + item.id });
}
auth
},
props: ['goodsInfo'],
data() {
return {
mainColor: '',
showAuth: false,
u: {},
};
},
reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo');
// this.showAuth = false;
created() {
this.mainColor = this.$uiConfig.mainColor;
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
methods: {
openGood(item) {
this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
if (item.linkUrl) {
uni.navigateTo({
url: item.linkUrl,
});
}
}
},
reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo');
// this.showAuth = false;
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
}
}
}
};
};
</script>
<style>
.her-scoller {
.her-scoller-study {
padding: 12px;
}
.her_Two_study{
overflow-x: auto !important;
display: flex;
white-space: nowrap;
}
.her-scoller .good-five {
.her-scoller-study .good-five {
position: relative;
margin-right: 12px;
width: 30%;
border-radius: 10rpx;
display: flex;
flex-direction: row;
align-items: center;
/* float: left; */
padding-bottom: 10rpx;
border:1px solid rgb(226, 226, 226);
overflow: hidden;
}
.her-scoller .good-five .tips {
.her-scoller-study .good-five .tips {
width: 64rpx;
height: 64rpx;
position: absolute;
......@@ -104,49 +99,61 @@ export default {
left: 0;
z-index: 4;
}
.her-scoller .good-five .img-box {
width: 97px;
height: 70px;
margin-right: 10px;
}
.her-scoller .good-five .good-info {
padding: 5px 0 ;
display: flex;
flex-direction: column;
justify-content: space-between;
width: 173px;
height: 70px;
.her-scoller-study .good-five .img-box {
width: 100%;
height: 0;
padding-top: 100%;
position: relative;
}
.her-scoller .good-five .good-info .good-name {
font-size: 13px;
height: 34px;
.her-scoller-study .good-five .img-box .img-show {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
overflow: hidden;
z-index: 2;
}
.her-scoller-study .good-five .guding {
position: relative;
}
.her-scoller-study .good-five .guding .img-box {
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
}
.her-scoller-study .good-five .good-info {
padding: 6rpx;
padding-bottom: 0;
}
.her-scoller-study .good-five .good-info .good-name {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
display: block;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
padding-right: 5px;
margin-bottom: 4rpx;
font-size: 13px;
width: 100%;
}
.her-scoller .good-five .good-info .good-price-info {
.her-scoller-study .good-five .good-info .good-price-info {
display: flex;
justify-items: center;
align-items: center;
}
.her-scoller .good-five .good-info .good-price-info .price {
.her-scoller-study .good-five .good-info .good-price-info .price {
color: #999999;
flex: 1;
font-size: 11px;
font-size: 12px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.her-scoller .good-five .good-info .good-price-info .buy {
.her-scoller-study .good-five .good-info .good-price-info .buy {
width: 24px;
text-align: right;
}
......
<template>
<view
style="width:100%;"
:style="{
<view style="width:100%;padding: 12px;" :style="{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : '',
}">
<view :style="{
'padding-top':goodsInfo.PaddingTop+'px',
'padding-right':goodsInfo.PaddingRight+'px',
'padding-bottom':goodsInfo.PaddingBottom+'px',
'padding-left':goodsInfo.PaddingLeft+'px',
}"
>
<view
class="good-four"
v-for="(item, gli) in goodList"
:key="gli"
@click="openGood(item)"
:style="{
background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : ''
}"
>
<view class="img-box"><image style="width: 100%; height: 100%;border-radius: 4px;" mode="aspectFill" :src="item.picUrl" /></view>
<view class="good-info" v-if="imgModel==false">
<view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</view>
<view class="good-price-info" v-if="goodsInfo.showsubtitle">
<span class="price" >{{ item.subtitle }}</span>
'padding-left':goodsInfo.PaddingLeft+'px'
}">
<view class="good-four-study" v-for="(item, gli) in goodsInfo.list" :key="gli" :style="{'borderRadius':goodsInfo.SearchFilletPX+'px'}" @click="openGood(item)">
<view class="img-box">
<image style="width: 100%; height: 100%;" mode="aspectFill" :src="item.picUrl" />
</view>
<view class="good-info">
<view class="good-name" v-if="item.name">{{ item.name }}</view>
<view class="good-price-info" v-if="item.lableName">
<span class="price">{{ item.lableName }}</span>
</view>
</view>
</view>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
</view>
</template>
<script>
import goodSku from '../goods/goodsku';
import auth from '@/components/auth/index.vue';
export default {
components: {
auth
},
props: ['goodList', 'goodsInfo'],
data() {
return {
mainColor: '',
activeKey: 0,
showAuth: false,
u: {},
imgModel:false
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
if(this.goodsInfo.showGoodsName==false && this.goodsInfo.showsubtitle ==false){
this.imgModel=true
}
},
methods: {
openGood(item) {
this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId=' + item.id });
}
import goodSku from '../goods/goodsku';
import auth from '@/components/auth/index.vue';
export default {
components: {
auth
},
props: ['goodsInfo'],
data() {
return {
mainColor: '',
showAuth: false,
u: {},
};
},
reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo');
// this.showAuth = false;
created() {
this.mainColor = this.$uiConfig.mainColor;
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
methods: {
openGood(item) {
this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
if (item.linkUrl) {
uni.navigateTo({
url: item.linkUrl,
});
}
}
},
reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo');
// this.showAuth = false;
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
}
}
}
};
};
</script>
<style>
.good-four {
position: relative;
/* margin-bottom: 14px; */
display: flex;
height: 90px;
border: 1rpx solid transparent;
border-radius: 10rpx;
box-sizing: border-box;
padding: 0 1px 1px 0;
overflow: hidden;
padding: 10px 0;
}
.good-four .tips {
width: 64rpx;
height: 64rpx;
position: absolute;
top: 0;
left: 0;
z-index: 4;
}
.good-four .img-box {
width: 125px;
height: 70px;
}
.good-four .good-info {
padding: 5px 0 5px 10px;
flex: 1;
width: 1rpx;
border: 10rpx;
padding-bottom: 0;
display: flex;
flex-direction: column;
/* width:20%; */
}
.good-four .good-info .good-name {
font-size: 13px;
height: 34px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.good-four .good-info .good-price-info {
display: flex;
justify-items: center;
align-items: flex-end;
height: 22px;
flex: 1;
padding-bottom: 10rpx;
}
.good-four .good-info .good-price-info .price {
color: #999999;
flex: 1;
font-size: 11px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.good-four .good-info .good-price-info .buy {
width: 24px;
text-align: right;
}
.good-four-study {
position: relative;
margin-bottom: 14px;
display: flex;
height: 102px;
border: 1px solid rgb(226, 226, 226);
border-radius: 10rpx;
box-sizing: border-box;
padding: 0 1px 1px 0;
overflow: hidden;
}
.good-four-study .tips {
width: 64rpx;
height: 64rpx;
position: absolute;
top: 0;
left: 0;
z-index: 4;
}
.good-four-study .img-box {
width: 100px;
height: 100px;
}
.good-four-study .good-info {
padding: 12px;
flex: 1;
width: 1rpx;
border: 10rpx;
padding-bottom: 0;
display: flex;
flex-direction: column;
/* width:20%; */
}
.good-four-study .good-info .good-name {
font-size: 13px;
height: 34px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.good-four-study .good-info .good-price-info {
display: flex;
justify-items: center;
align-items: flex-end;
height: 22px;
flex: 1;
padding-bottom: 10rpx;
}
.good-four-study .good-info .good-price-info .price {
color: #999999;
flex: 1;
font-size: 14px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.good-four-study .good-info .good-price-info .buy {
width: 24px;
text-align: right;
}
</style>
<template>
<div class="goods-box" :class="{ flex: goods.catPosition == 'left' }">
<div :class="{ 'right-slider': goods.catPosition == 'top' }">
<!-- 只是商品 -->
<template>
<!--列表模式-->
<style6 v-if="goods.listStyle == -1" :goods-info="goods"></style6>
<!--左右滚动-->
<style5 v-if="goods.listStyle == 0" :goods-info="goods"></style5>
<!--一行一个-->
<style1 v-if="goods.listStyle == 1" :goods-info="goods"></style1>
</template>
</div>
</div>
</template>
<script>
import style1 from './style1';
import style5 from './style5';
import style6 from './style6';
export default {
props: ['goods'],
components: {
style1,
style5,
style6,
},
data() {
return {
mainColor: '',
currentList: [],
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
if (this.goods.showCat) {
this.currentList = this.goods.catList[0].goodsList;
} else {
this.currentList = this.goods.list;
}
},
methods: {
}
};
</script>
<style>
.style4View {
display: inline-block;
width: 100%;
padding-left: 80px;
box-sizing: border-box;
}
.goods-box {
/* margin: 20rpx 0; */
}
.goods-box .tips {
z-index: 50 !important;
}
.goods-box.flex {
display: flex;
}
.goods-box.flex .left-slider {
width: 80px;
position: absolute;
}
.goods-box.flex .right-slider {
flex: 1;
width: 1rpx;
}
.defaultz .van-sticky {
z-index: 1 !important;
}
.goods-box .van-tabs__scroll {
background: none;
}
.goods-box ._div {
width: 100%;
}
</style>
<template>
<div :style="{
'background-color': goodsInfo.backgroundColor,
'paddingLeft':goodsInfo.PaddingLeft+'px',
'paddingRight':goodsInfo.PaddingRight+'px',
'paddingTop':goodsInfo.PaddingTop+'px',
'paddingBottom':goodsInfo.PaddingBottom+'px'
}">
<div v-for="(item, gli) in goodsInfo.list" :key="gli" class="good_study_one" @click="openGood(item)" :style="{
borderRadius:goodsInfo.SearchFilletPX+'px'
}">
<image style="
width: calc(100vw - 24px);
height: 100vw;
border-radius: 10rpx 10rpx 0 0;
"
mode='aspectFill' :src="item.picUrl" />
<div class="good-info">
<div class="good-name" v-if="item.name">{{ item.name }}</div>
<div>
<view style="display:inline-block;padding: 2px 4px;border-radius: 2px;font-size: 10px;color: #FAF8F9;margin-right:5px"
:style="{background:mainColor}" v-for="(subItem,subIndex) in item.lableNameList" :key="subIndex">
{{subItem}}
</view>
</div>
</div>
</div>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
</div>
</template>
<script>
import auth from '@/components/auth/index.vue';
export default {
components: {
auth
},
props: ['goodsInfo'],
data() {
return {
mainColor: '',
showSku: false,
sku: {},
showAuth: false,
u: {},
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
},
methods: {
openGood(item) {
this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
uni.navigateTo({
url: '/pages/school/courseInfo?GoodsId=' + item.id
});
}
},
reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo');
// this.showAuth = false;
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
}
}
};
</script>
<style>
.good_study_one {
margin: 12px;
position: relative;
border: 1rpx solid transparent;
border-radius: 10rpx;
border: 1px solid rgb(226, 226, 226);
overflow: hidden;
}
.good_study_one .tips {
width: 64rpx;
height: 64rpx;
position: absolute;
top: 0;
left: 0;
z-index: 4;
}
.good_study_one .guding {
position: relative;
}
.good_study_one .guding .img-box {
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
}
.good_study_one .good-info {
padding: 12rpx;
margin-top: -5px;
}
.good_study_one .good-info .good-name {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
margin-bottom: 13px;
}
.good_study_one .good-info .good-price-info {
display: flex;
}
.good_study_one .good-info .good-price-info .price {
color: #999999;
font-size: 11px;
flex: 1;
}
.good_study_one .good-info .good-price-info .buy {
width: 24px;
text-align: right;
}
</style>
<template>
<view class="her-scoller-study" :style="{
'background-color': goodsInfo.backgroundColor
}">
<view class="her_Two_study" :style="{
'background-color': goodsInfo.backgroundColor,
'padding-top':goodsInfo.PaddingTop+'px',
'padding-right':goodsInfo.PaddingRight+'px',
'padding-bottom':goodsInfo.PaddingBottom+'px',
'padding-left':goodsInfo.PaddingLeft+'px',
}">
<view class="good-five" @click="openGood(item)" v-for="(item, gli) in goodsInfo.list" :style="{borderRadius:goodsInfo.SearchFilletPX+'px'}" :key="gli">
<view class="img-box">
<view class="img-show">
<image style="width: 100%; height: 100%;" mode="aspectFill" :src="item.picUrl" />
</view>
</view>
<view class="good-info">
<view class="good-name" v-if="item.name">{{ item.name }}</view>
<view>
<view style="display:inline-block;padding: 2px 4px;border-radius: 2px;font-size: 10px;color: #FAF8F9;margin-right:5px"
:style="{background:mainColor}" v-for="(subItem,subIndex) in item.lableNameList" :key="subIndex">
{{subItem}}
</view>
</view>
</view>
</view>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
</view>
</template>
<script>
import auth from '@/components/auth/index.vue';
export default {
components: {
auth
},
props: ['goodsInfo'],
data() {
return {
mainColor: '',
showAuth: false,
u: {},
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
},
methods: {
openGood(item) {
this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
uni.navigateTo({
url: '/pages/school/courseInfo?GoodsId=' + item.id
});
}
},
reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo');
// this.showAuth = false;
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
}
}
};
</script>
<style>
.her-scoller-study {
padding: 12px;
}
.her_Two_study{
overflow-x: auto !important;
display: flex;
white-space: nowrap;
}
.her-scoller-study .good-five {
position: relative;
margin-right: 12px;
width: 30%;
border-radius: 10rpx;
padding-bottom: 10rpx;
border:1px solid rgb(226, 226, 226);
overflow: hidden;
}
.her-scoller-study .good-five .tips {
width: 64rpx;
height: 64rpx;
position: absolute;
top: 0;
left: 0;
z-index: 4;
}
.her-scoller-study .good-five .img-box {
width: 100%;
height: 0;
padding-top: 100%;
position: relative;
}
.her-scoller-study .good-five .img-box .img-show {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
overflow: hidden;
z-index: 2;
}
.her-scoller-study .good-five .guding {
position: relative;
}
.her-scoller-study .good-five .guding .img-box {
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
}
.her-scoller-study .good-five .good-info {
padding: 6rpx;
padding-bottom: 0;
}
.her-scoller-study .good-five .good-info .good-name {
overflow: hidden;
text-overflow: ellipsis;
display: block;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
margin-bottom: 4rpx;
font-size: 13px;
width: 100%;
}
.her-scoller-study .good-five .good-info .good-price-info {
display: flex;
justify-items: center;
align-items: center;
}
.her-scoller-study .good-five .good-info .good-price-info .price {
color: #999999;
flex: 1;
font-size: 12px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.her-scoller-study .good-five .good-info .good-price-info .buy {
width: 24px;
text-align: right;
}
</style>
<template>
<view style="width:100%;padding: 12px;" :style="{
'background-color': goodsInfo.backgroundColor,
}">
<view :style="{
'padding-top':goodsInfo.PaddingTop+'px',
'padding-right':goodsInfo.PaddingRight+'px',
'padding-bottom':goodsInfo.PaddingBottom+'px',
'padding-left':goodsInfo.PaddingLeft+'px'
}">
<view class="good-four-study" v-for="(item, gli) in goodsInfo.list" :key="gli" :style="{'borderRadius':goodsInfo.SearchFilletPX+'px'}" @click="openGood(item)">
<view class="img-box">
<image style="width: 100%; height: 100%;" mode="aspectFill" :src="item.picUrl" />
</view>
<view class="good-info">
<view class="good-name" v-if="item.name">{{ item.name }}</view>
<view>
<view style="display:inline-block;padding: 2px 4px;border-radius: 2px;font-size: 10px;color: #FAF8F9;margin-right:5px"
:style="{background:mainColor}" v-for="(subItem,subIndex) in item.lableNameList" :key="subIndex">
{{subItem}}
</view>
</view>
</view>
</view>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
</view>
</template>
<script>
import goodSku from '../goods/goodsku';
import auth from '@/components/auth/index.vue';
export default {
components: {
auth
},
props: ['goodsInfo'],
data() {
return {
mainColor: '',
showAuth: false,
u: {},
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
},
mounted(){
console.log(this.goodsInfo,'gdinfo');
},
methods: {
openGood(item) {
this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
} else {
uni.navigateTo({
url: '/pages/school/courseInfo?GoodsId=' + item.id
});
}
},
reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo');
// this.showAuth = false;
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
}
}
};
</script>
<style>
.good-four-study {
position: relative;
margin-bottom: 14px;
display: flex;
height: 102px;
border: 1px solid rgb(226, 226, 226);
border-radius: 10rpx;
box-sizing: border-box;
padding: 0 1px 1px 0;
overflow: hidden;
}
.good-four-study .tips {
width: 64rpx;
height: 64rpx;
position: absolute;
top: 0;
left: 0;
z-index: 4;
}
.good-four-study .img-box {
width: 100px;
height: 100px;
}
.good-four-study .good-info {
padding: 12px;
flex: 1;
width: 1rpx;
border: 10rpx;
padding-bottom: 0;
display: flex;
flex-direction: column;
/* width:20%; */
}
.good-four-study .good-info .good-name {
font-size: 13px;
margin-bottom:5px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.good-four-study .good-info .good-price-info {
display: flex;
justify-items: center;
align-items: flex-end;
height: 22px;
flex: 1;
padding-bottom: 10rpx;
}
.good-four-study .good-info .good-price-info .price {
color: #999999;
flex: 1;
font-size: 14px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.good-four-study .good-info .good-price-info .buy {
width: 24px;
text-align: right;
}
</style>
......@@ -56,12 +56,13 @@
<shopinfo v-if="d.id == 'shop-info' " :ad="d.data" :key="di" ref="son"></shopinfo>
<guide v-if="d.id == 'drive-guide'" :info="d.data" ref='city'></guide>
<!-- 网课列表 -->
<rgoods v-if="d.id == 'goods'"></rgoods>
<rgoods v-if="d.id == 'educationCustom'" :goods="d.data"></rgoods>
<!-- 资讯 -->
<argoods v-if="d.id == 'educationArticle'" :goods="d.data"></argoods>
<!-- 最近学习组件 -->
<rstudy v-if='di==item.template.data.length-1'></rstudy>
<rstudy v-if="d.id == 'education'" :goods="d.data"></rstudy>
</template>
</view>
</view>
</template>
<view v-if="showtabs==true">
<tabbar></tabbar>
......@@ -119,6 +120,8 @@ import auth from "@/components/auth/index.vue";
import guide from "@/components/guidecar/index.vue";
import rstudy from "@/components/study/Rstudy.vue";
import rgoods from "@/components/study/index.vue";
import argoods from "@/components/studyArticle/index.vue";
export default {
data() {
......@@ -176,10 +179,10 @@ export default {
auth,
guide,
rstudy,
rgoods
rgoods,
argoods
},
onLoad(options) {
console.log(options, "option");
let that = this;
uni.getSystemInfo({
success(res) {
......
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