Commit 2ae1dac6 authored by 罗超's avatar 罗超

调整部分样式

parent e4a71330
...@@ -4,40 +4,35 @@ ...@@ -4,40 +4,35 @@
<u-col span="6" v-for="(cx, ci) in g" :key="ci"> <u-col span="6" v-for="(cx, ci) in g" :key="ci">
<view class="good" @click="clickHandler(cx)"> <view class="good" @click="clickHandler(cx)">
<view class="good-img"> <view class="good-img">
<image mode="aspectFill" :src="cx.cover_pic" style="width: 100%; height: 100%;" />
</view>
<view class="good-name" v-if="setting.is_show_goods_name==1">
<view
v-if="cx.marketingLogo.iswords && cx.marketingLogo.iswords==1&& cx.marketingLogo.words!=''"
class="Logo"
:style="{color: cx.marketingLogo.wordsColor,
background:cx.marketingLogo.wordsBack ,}"
>{{cx.marketingLogo.words}}</view>
<image <image
mode="aspectFill" v-if="cx.marketingLogo.iswords&&cx.marketingLogo.iswords==2&& cx.marketingLogo.ico!=''"
:src="cx.cover_pic" mode="heightFix"
style="width: 100%; height: 100%;" :src="cx.marketingLogo.ico"
style=" height: 11px;"
/> />
<view
style="color: #FF4048;background: #fdf6ec;padding: 0 5px;display: inline-block;height: 32rpx;font-size: 20rpx;margin-right: 5rpx;"
v-if="cx.freeShippingFullMoneyPinkage>0 || cx.freeShippingFullNumPinkage>0"
>
{{cx.freeShippingFullMoneyPinkage>0 && cx.freeShippingFullNumPinkage==0?cx.freeShippingFullMoneyPinkage+'元包邮':''}}
{{cx.freeShippingFullMoneyPinkage==0 && cx.freeShippingFullNumPinkage>0?cx.freeShippingFullNumPinkage+'件包邮':''}}
</view>
{{ cx.name }}
</view> </view>
<view class="good-name" v-if="setting.is_show_goods_name==1">
<view v-if="cx.marketingLogo.iswords && cx.marketingLogo.iswords==1&& cx.marketingLogo.words!=''" class="Logo" :style=
"{color: cx.marketingLogo.wordsColor,
background:cx.marketingLogo.wordsBack ,}">
{{cx.marketingLogo.words}}
</view>
<image
v-if="cx.marketingLogo.iswords&&cx.marketingLogo.iswords==2&& cx.marketingLogo.ico!=''"
mode="heightFix"
:src="cx.marketingLogo.ico"
style=" height: 16px;"
/>
<view style="color: #FF4048;background: #fdf6ec;padding: 0 5px;display: inline-block;height: 32rpx;font-size: 20rpx;margin-right: 5rpx;"
v-if="cx.freeShippingFullMoneyPinkage>0 || cx.freeShippingFullNumPinkage>0"
>
{{cx.freeShippingFullMoneyPinkage>0 && cx.freeShippingFullNumPinkage==0?cx.freeShippingFullMoneyPinkage+'元包邮':''}}
{{cx.freeShippingFullMoneyPinkage==0 && cx.freeShippingFullNumPinkage>0?cx.freeShippingFullNumPinkage+'件包邮':''}}
</view>
{{ cx.name }}
</view>
<view class="good-info"> <view class="good-info">
<view class="price" :style="{ color: mainColor }"> <view class="price" :style="{ color: mainColor }">¥{{cx.price}}</view>
{{cx.price}}</view> <!-- v-if="setting.is_show_sales_num=='1'" -->
<!-- v-if="setting.is_show_sales_num=='1'" -->
<view class="sell">{{ cx.sales }}</view> <view class="sell">{{ cx.sales }}</view>
<view v-if="setting.is_show_cart==1" class="cart" @click.stop="showSkuHandler(cx)"> <view v-if="setting.is_show_cart==1" class="cart" @click.stop="showSkuHandler(cx)">
<u-icon name="cart-o" size="40" :color="mainColor" /> <u-icon name="cart-o" size="40" :color="mainColor" />
...@@ -46,41 +41,35 @@ ...@@ -46,41 +41,35 @@
</view> </view>
</u-col> </u-col>
</u-row> </u-row>
<good-sku <good-sku v-if="showSku" :option-type="2" borderRadius="20" v-model="showSku" :good="sku"></good-sku>
v-if="showSku" <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
:option-type="2"
borderRadius="20"
v-model="showSku"
:good="sku"
></good-sku>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
</view> </view>
</template> </template>
<script> <script>
import goodSku from "../goods/goodsku"; import goodSku from "../goods/goodsku";
import auth from '@/components/auth/index.vue'; import auth from "@/components/auth/index.vue";
export default { export default {
components: { components: {
goodSku, goodSku,
auth auth,
}, },
props: ["list"], props: ["list"],
data() { data() {
return { return {
g: [], g: [],
showSku: false, showSku: false,
showAuth:false, showAuth: false,
u:{}, u: {},
sku: {}, sku: {},
mainColor: "", mainColor: "",
setting:{} setting: {},
}; };
}, },
mounted() { mounted() {
this.g = this.list; this.g = this.list;
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.initConfig() this.initConfig();
}, },
watch: { watch: {
list: { list: {
...@@ -93,33 +82,33 @@ export default { ...@@ -93,33 +82,33 @@ export default {
}, },
methods: { methods: {
initConfig() { initConfig() {
this.setting = uni.getStorageSync("basedata").mall.setting this.setting = uni.getStorageSync("basedata").mall.setting;
}, },
clickHandler(item) { clickHandler(item) {
console.log("GoodsId",item) console.log("GoodsId", item);
uni.navigateTo({ url: '/pages/goods/goods?GoodsId='+item.id }); uni.navigateTo({ url: "/pages/goods/goods?GoodsId=" + item.id });
}, },
showSkuHandler(g) { showSkuHandler(g) {
this.sku = g; this.sku = g;
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) { if (!this.u) {
this.u = { this.u = {
nickName: '未登录', nickName: "未登录",
avatarUrl: '' avatarUrl: "",
}; };
this.showAuth = true; this.showAuth = true;
} else { } else {
this.showSku = true; this.showSku = true;
} }
}, },
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth = false; // this.showAuth = false;
}, },
//关闭登录窗口 //关闭登录窗口
gbAuth() { gbAuth() {
this.showAuth = false; this.showAuth = false;
} },
}, },
}; };
</script> </script>
...@@ -137,34 +126,32 @@ export default { ...@@ -137,34 +126,32 @@ export default {
display: block; display: block;
position: relative; position: relative;
} }
.u-good-list .good .good-img .shipping{ .u-good-list .good .good-img .shipping {
width: 100%; width: 100%;
height: 30px; height: 30px;
font-size: 11px; font-size: 11px;
color: #FFFFFF; color: #ffffff;
padding: 0 10px; padding: 0 10px;
background-image: linear-gradient( background-image: linear-gradient(
to bottom , to bottom,
rgb(0, 0, 0, 0), rgb(0, 0, 0, 0),
rgb(0, 0, 0, 1) rgb(0, 0, 0, 1)
);
); position: absolute;
position: absolute; left: 0;
left: 0; bottom: 0;
bottom: 0; line-height: 30px;
line-height: 30px; text-overflow: -o-ellipsis-lastline;
text-overflow: -o-ellipsis-lastline; overflow: hidden;
overflow: hidden; text-overflow: ellipsis;
text-overflow: ellipsis; display: -webkit-box;
display: -webkit-box; -webkit-line-clamp: 1;
-webkit-line-clamp: 1; line-clamp: 1;
line-clamp: 1; -webkit-box-orient: vertical;
-webkit-box-orient: vertical;
} }
.u-good-list .good .good-name { .u-good-list .good .good-name {
height: 37px; height: 37px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
...@@ -195,7 +182,11 @@ export default { ...@@ -195,7 +182,11 @@ export default {
width: 40rpx; width: 40rpx;
text-align: right; text-align: right;
} }
.u-good-list .Logo{ .u-good-list .Logo {
padding: 0 5px;display: inline-block;height: 32rpx;font-size: 20rpx;margin-right: 5rpx;line-height: 32rpx; padding: 1px 5px;
display: inline-block;
font-size: 22rpx;
margin-right: 5rpx;
border-radius: 4px;
} }
</style> </style>
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
return { return {
cols: [], cols: [],
formatStyle: "", formatStyle: "",
height: 186, height: 160,
bg:"" bg:""
}; };
}, },
......
...@@ -18,16 +18,18 @@ ...@@ -18,16 +18,18 @@
</swiper-item> </swiper-item>
</block> </block>
</swiper> --> </swiper> -->
<view :style="{marginTop:swipers.topAndBottom+'px',marginBottom:(swipers.topAndBottom<0?0:swipers.topAndBottom)+'px',marginLeft:swipers.leftAndRight+'px',marginRight:swipers.leftAndRight+'px',background:swipers.background}"> <view :style="{background:swipers.background}">
<u-swiper <view :style="{marginTop:swipers.topAndBottom+'px',marginBottom:(swipers.topAndBottom<0?0:swipers.topAndBottom)+'px',marginLeft:swipers.leftAndRight+'px',marginRight:swipers.leftAndRight+'px'}">
:list="banners" <u-swiper
:effect3d="swipers.style == 2" :list="banners"
:height="swipers.height" :effect3d="swipers.style == 2"
:interval="5000" :height="swipers.height"
name="picUrl" :interval="5000"
:border-radius="swipers.radius" name="picUrl"
@click="clickHandler" :border-radius="swipers.radius"
></u-swiper> @click="clickHandler"
></u-swiper>
</view>
</view> </view>
</template> </template>
......
...@@ -299,7 +299,7 @@ export default { ...@@ -299,7 +299,7 @@ export default {
if (x.id == "background") { if (x.id == "background") {
let t = ""; let t = "";
if (x.data.showImg) { if (x.data.showImg) {
y.templateBg += `background-color:#${x.data.backgroundColor};`; y.templateBg += `background-color:${x.data.backgroundColor};`;
y.templateBg = `background-image:url('${backgroundPicUrl}');`; y.templateBg = `background-image:url('${backgroundPicUrl}');`;
y.templateBg += `background-position:${x.data.positionText};`; y.templateBg += `background-position:${x.data.positionText};`;
y.templateBg += `background-repeat:${x.data.repeatText};`; y.templateBg += `background-repeat:${x.data.repeatText};`;
......
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