Commit 9732374a authored by zhangjianguo's avatar zhangjianguo

Merge branch 'master' of http://gitlab.oytour.com/viitto/mallapp

parents 69ebbb61 59e8dfd6
......@@ -2,17 +2,15 @@
<view
class="checkin"
:style="{
color: check.textColor,
'text-align': check.textPosition,
'background-image': 'url(' + check.backgroundPicUrl + ')',
}"
>
<template v-if="check.showText">
<text>
今日签到可获得5积分
<view style="width:100%" :style="{color:check.textColor,'text-align':check.textPosition}">
<view style="margin-bottom:10px;">今日签到可获得5积分</view>
<!-- todo 签到功能对接 -->
\n 已连续签到9天
</text>
<view>已连续签到9天</view>
</view>
</template>
<view
class="hot-area"
......
......@@ -11,7 +11,7 @@ export default {
}
},
created() {
this.st=`background:#${this.block.background};height:${this.block.height}rpx`
this.st=`background:${this.block.background};height:${this.block.height}rpx`
},
}
</script>
......
<template>
<div class="goods-box" :class="{ flex: goods.catPosition == 'left' }">
<view :style="{ margin: goods.catStyle == 1 ? '0px' : '10px 5px' }">
<u-tabs
v-if="
goods.showCat &&
goods.catPosition == 'top' &&
goods.catList.length > 1
"
name="name"
:list="goods.catList"
:is-scroll="true"
:active-color="mainColor"
:current="activeKey"
:show-bar="goods.catStyle == 1"
:bold="false"
:type-style="goods.catStyle"
:height="goods.catStyle == 1 ? '88' : '44'"
@change="tabChangeHandler"
></u-tabs>
</view>
<view class="left-slider">
<sidebar
:active="activeKey"
v-if="goods.showCat && goods.catPosition == 'left'"
:list="goods.catList"
name="menuName"
:active-color="mainColor"
:border="false"
@change="tabChangeHandler"
>
</sidebar>
</view>
<div :class="{ 'right-slider': goods.catPosition == 'top' }">
<style1
v-if="
goods.listStyle == 1 && goods.showCat && goods.catPosition == 'top'
"
:goods-info="goods"
:good-list="currentList"
></style1>
<style2
v-if="
goods.listStyle == 2 && goods.showCat && goods.catPosition == 'top'
"
:goods-info="goods"
:good-list="currentList"
></style2>
<style3
v-if="
goods.listStyle == 3 && goods.showCat && goods.catPosition == 'top'
"
:goods-info="goods"
:good-list="currentList"
></style3>
<style4
v-if="
goods.listStyle == -1 || !goods.showCat || goods.catPosition == 'left'
"
:goods-info="goods"
:good-list="currentList"
></style4>
<style5
v-if="
goods.listStyle == 0 && goods.showCat && goods.catPosition == 'top'
"
:goods-info="goods"
:good-list="currentList"
></style5>
</div>
</div>
<div class="goods-box" :class="{ flex: goods.catPosition == 'left' }">
<view :style="{ margin: goods.catStyle == 1 ? '0px' : '10px 5px' }">
<u-tabs
v-if="goods.showCat && goods.catPosition == 'top' && goods.catList.length > 1"
name="name"
:list="goods.catList"
:is-scroll="true"
:active-color="mainColor"
:current="activeKey"
:show-bar="goods.catStyle == 1"
:bold="false"
:type-style="goods.catStyle"
:height="goods.catStyle == 1 ? '88' : '44'"
@change="tabChangeHandler"
></u-tabs>
</view>
<div :class="{ 'right-slider': goods.catPosition == 'top' }">
<!-- 有分类 -->
<template v-if="goods.showCat">
<template v-if="goods.catPosition == 'top'">
<!-- 一行一个 -->
<style1 v-if="goods.listStyle == 1" :goods-info="goods" :good-list="currentList"></style1>
<!-- 一行两个 -->
<style2 v-if="goods.listStyle == 2" :goods-info="goods" :good-list="currentList"></style2>
<!-- 一行三个 -->
<style3 v-if="goods.listStyle == 3" :goods-info="goods" :good-list="currentList"></style3>
<!-- 左右滚动 -->
<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>
</template>
<template v-else-if="goods.catPosition == 'left'">
<!-- 左侧分类 -->
<view>
<view class="left-slider">
<sidebar
:active="activeKey"
v-if="goods.showCat && goods.catPosition == 'left'"
:list="goods.catList"
name="menuName"
:active-color="mainColor"
:border="false"
@change="tabChangeHandler"
></sidebar>
</view>
<!-- 右侧列表 -->
<view class="style4View"><style4 :goods-info="goods" :good-list="currentList"></style4></view>
</view>
</template>
</template>
<!-- 只是商品 -->
<template v-else>
<!--一行一个-->
<style1 v-if="goods.listStyle == 1" :goods-info="goods" :good-list="currentList"></style1>
<!--一行两个-->
<style2 v-if="goods.listStyle == 2" :goods-info="goods" :good-list="currentList"></style2>
<!--一行三个-->
<style3 v-if="goods.listStyle == 3" :goods-info="goods" :good-list="currentList"></style3>
<!--左右滚动-->
<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>
</template>
</div>
</div>
</template>
<script>
import style1 from "./style1";
import style2 from "./style2";
import style3 from "./style3";
import style4 from "./style4";
import style5 from "./style5";
import sidebar from "../sidebar/index";
import style1 from './style1';
import style2 from './style2';
import style3 from './style3';
import style4 from './style4';
import style5 from './style5';
import style6 from './style6';
import sidebar from '../sidebar/index';
export default {
props: ["goods"],
components: {
style1,
style2,
style3,
style4,
style5,
sidebar,
},
data() {
return {
mainColor: "",
activeKey: 0,
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: {
tabChangeHandler(i) {
this.currentList = this.goods.catList[i].goodsList;
this.activeKey = i;
},
},
props: ['goods'],
components: {
style1,
style2,
style3,
style4,
style5,
style6,
sidebar
},
data() {
return {
mainColor: '',
activeKey: 0,
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: {
tabChangeHandler(i) {
this.currentList = this.goods.catList[i].goodsList;
this.activeKey = i;
}
}
};
</script>
<style>
.style4View {
display: inline-block;
width: 100%;
padding-left: 80px;
box-sizing: border-box;
}
.goods-box {
/* margin: 20rpx 0; */
/* margin: 20rpx 0; */
}
.goods-box .tips {
z-index: 50 !important;
z-index: 50 !important;
}
.goods-box.flex {
display: flex;
display: flex;
}
.goods-box.flex .left-slider {
width: 80px;
width: 80px;
position: absolute;
}
.goods-box.flex .right-slider {
flex: 1;
width: 1rpx;
flex: 1;
width: 1rpx;
}
.defaultz .van-sticky {
z-index: 1 !important;
z-index: 1 !important;
}
.goods-box .van-tabs__scroll {
background: none;
background: none;
}
.goods-box ._div {
width: 100%;
}
</style>
......@@ -27,7 +27,7 @@
<image
style="width: calc(100vw - 24px); height: 66vw;"
:mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src="item.cover_pic"
:src="item.picUrl"
v-if="goodsInfo.goodsCoverProportion == '3-2'"
/>
<image
......@@ -38,7 +38,7 @@
"
v-if="goodsInfo.goodsCoverProportion == '1-1'"
:mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src="item.cover_pic"
:src="item.picUrl"
/>
<div class="good-info">
<div class="good-name" v-if="goodsInfo.showGoodsName">
......@@ -46,7 +46,7 @@
</div>
<div class="good-price-info">
<span class="price" :style="{ color: mainColor }">{{
goodsInfo.showGoodsPrice ? item.price_content : ""
goodsInfo.showGoodsPrice ? item.price : ""
}}</span>
<span class="buy" v-if="goodsInfo.showBuyBtn" @click.stop="showSkuHandler(item)">
<u-icon
......
......@@ -11,7 +11,7 @@
<u-col span="6" v-for="(item, gli) in goodList" :key="gli">
<view
class="good-two"
@click="openGood(item.page_url)"
@click="openGood"
:style="{
border:
goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
......@@ -22,11 +22,7 @@
}"
>
<view class="tips" v-if="goodsInfo.showGoodsTag">
<image
:src="goodsInfo.goodsTagPicUrl"
mode="widthFix"
style="width: 100%;"
/>
<image :src="goodsInfo.goodsTagPicUrl" mode="widthFix" style="width:100%" />
</view>
<view class="img-box">
<view class="img-show">
......@@ -37,7 +33,7 @@
border-radius: 10rpx 10rpx 0 0;
"
:mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src="item.cover_pic"
:src="item.picUrl"
/>
</view>
</view>
......@@ -46,11 +42,11 @@
{{ item.name }}
</view>
<view class="good-price-info">
<view class="price" :style="{ color: mainColor }">{{
goodsInfo.showGoodsPrice ? item.price_content : ""
<view class="price" :style="{'color':mainColor}">{{
goodsInfo.showGoodsPrice ? item.price : ""
}}</view>
<view class="buy" v-if="goodsInfo.showBuyBtn" @click.stop="showSkuHandler(item)">
<u-icon
<view class="buy" v-if="goodsInfo.showBuyBtn">
<u-icon
name="cart-o"
size="40"
:color="mainColor"
......@@ -91,43 +87,24 @@
</view>
</u-col>
</u-row>
<good-sku
v-if="showSku"
:option-type="2"
borderRadius="20"
v-model="showSku"
:good="sku"
></good-sku>
</view>
</template>
<script>
import goodSku from "../goods/goodsku";
export default {
components: {
goodSku,
},
props: ["goodList", "goodsInfo"],
data() {
return {
mainColor: "",
activeKey: 0,
showSku: false,
sku: {},
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
},
methods: {
openGood(url) {
uni.navigateTo({
url: url,
});
},
showSkuHandler(g) {
this.sku = g;
this.showSku = true;
openGood(e) {
console.log(e);
},
},
};
......@@ -189,6 +166,7 @@ export default {
-webkit-box-orient: vertical;
margin: 3px 0;
font-size: 13px;
min-height:35px;
}
.good-two .good-info .good-price-info {
display: flex;
......
......@@ -33,7 +33,7 @@
border-radius: 10rpx 10rpx 0 0;
"
:mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src="item.cover_pic"
:src="item.picUrl"
/>
</div>
</div>
......@@ -43,7 +43,7 @@
</div>
<div class="good-price-info">
<view class="price" :style="{'color':mainColor}">{{
goodsInfo.showGoodsPrice ? item.price_content : ""
goodsInfo.showGoodsPrice ? item.price : ""
}}</view>
<view class="buy" v-if="goodsInfo.showBuyBtn" @click.stop="showSkuHandler(item)">
<u-icon
......@@ -180,6 +180,7 @@ export default {
margin: 3px 0;
font-size: 13px;
word-break:break-all;
min-height:34px;
}
.good-three .good-info .good-price-info {
display: flex;
......
<template>
<view
style="padding: 12px; padding-bottom: 0;"
<view
style="padding: 12px; padding-bottom: 0;width:100%;"
:style="{
'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl,
......@@ -29,7 +29,7 @@
<image
style="width: 100%; height: 100%;"
:mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src="item.cover_pic"
:src="item.picUrl"
/>
</view>
<view class="good-info">
......@@ -38,7 +38,7 @@
}}</view>
<view class="good-price-info">
<view class="price" :style="{'color':mainColor}">{{
goodsInfo.showGoodsPrice ? item.price_content : ""
goodsInfo.showGoodsPrice ? item.price : ""
}}</view>
<view class="buy" v-if="goodsInfo.showBuyBtn" @click.stop="showSkuHandler(item)">
<u-icon
......@@ -144,6 +144,7 @@ export default {
padding-bottom: 0;
display: flex;
flex-direction: column;
/* width:20%; */
}
.good-four .good-info .good-name {
font-size: 13px;
......
......@@ -9,40 +9,40 @@
>
<view
class="good-five"
@click="openGood(item.page_url)"
@click="openGood"
v-for="(item, gli) in goodList"
:key="gli"
:style="{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background:
goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : '',
}"
'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%;"
/>
<image :src="goodsInfo.goodsTagPicUrl" mode="widthFix" style="width:100%" />
</view>
<view class="img-box">
<view class="img-show">
<image
style="width: 100%; height: 100%; border-radius: 10rpx 10rpx 0 0;"
:mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src="item.cover_pic"
:src="item.picUrl"
/>
</view>
</view>
<view class="good-info">
<view
class="good-info"
>
<view class="good-name" v-if="goodsInfo.showGoodsName">
{{ item.name }}
</view>
<view class="good-price-info">
<view class="price" :style="{ color: mainColor }">{{
goodsInfo.showGoodsPrice ? item.price_content : ""
<view class="price" :style="{'color':mainColor}">{{
goodsInfo.showGoodsPrice ? item.price : ""
}}</view>
<view class="buy" v-if="goodsInfo.showBuyBtn" @click.stop="showSkuHandler(item)">
<view class="buy" v-if="goodsInfo.showBuyBtn">
<u-icon
name="cart-o"
size="40"
......@@ -78,39 +78,26 @@
</view>
</view>
</view>
<view style="color: rgba(0, 0, 0, 0); font-size: 12px;">0</view>
<good-sku v-if="showSku" :option-type="2" borderRadius="20" v-model="showSku" :good="sku"></good-sku>
<view style="color:rgba(0,0,0,0);font-size:12px;">0</view>
</view>
</template>
<script>
import goodSku from '../goods/goodsku'
export default {
components:{
goodSku
},
props: ["goodList", "goodsInfo"],
data() {
return {
mainColor: "",
activeKey: 0,
showSku:false,
sku:{}
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
},
methods: {
openGood(url) {
uni.navigateTo({
url: url,
});
openGood(e) {
console.log(e);
},
showSkuHandler(g){
this.sku=g
this.showSku=true
}
},
};
</script>
......
......@@ -2,11 +2,10 @@
<div class="mynav">
<swiper
:autoplay="false"
style="background: #fff;"
:style="{ height: height + 'rpx' }"
:style="{'height': height + 'rpx' }"
>
<swiper-item v-for="(item, index) in cols" :key="index">
<view :style="formatStyle">
<view :style="[formatStyle]">
<u-grid :col="navs.columns" align="left" :border="false">
<u-grid-item
v-for="(c, i) in item"
......@@ -15,11 +14,11 @@
@click="clickHandler(c.url)"
>
<image
:src="c.icon"
:src="getIconLink(c.icon)"
mode="widthFix"
style="width: 88rpx; height: 88rpx;"
/>
<text>{{ c.name }}</text>
<text :style="{'color':navs.color}">{{ c.name }}</text>
</u-grid-item>
</u-grid>
</view>
......@@ -82,4 +81,7 @@ export default {
margin-top: 4rpx;
color: "#330330";
}
.grid-text view{
background: transparent!important;
}
</style>
......@@ -48,7 +48,7 @@ export default {
if (this.notice.icon && this.notice.icon != "") {
this.defaultIcon = this.notice.icon;
}
this.list.push(this.notice.name);
this.list.push(this.notice.name+':'+this.notice.content);
this.buttonStyle = {
background:this.notice.btnColor,
width:this.notice.btnWidth,
......
......@@ -10,7 +10,7 @@
:style="[item.formatStyle]"
@click="clickHandler(item.link.new_link_url)"
>
<image :src="item.pic_url" mode="widthFix" class="img"></image>
<img :src="item.pic_url" mode="widthFix"/>
</view>
</view>
</template>
......@@ -29,7 +29,7 @@ export default {
backgroundRepeat: x.backgroundRepeat,
backgroundSize: x.backgroundSize,
backgroundPosition: x.backgroundPosition,
height: x.height,
border:'1px solid red'
};
if (this.ad.height == "auto") {
x.formatStyle.position = "unset";
......@@ -57,7 +57,7 @@ export default {
.ad-box .ad-chi {
position: absolute;
}
.ad-box .ad-chi .img {
.ad-box .ad-chi img {
width: 100%;
}
</style>
......@@ -87,7 +87,6 @@ export default {
}
.side-box .item {
height: 50px;
line-height: 50px;
border-bottom: 1rpx solid #eee;
box-sizing: border-box;
border-left: 6rpx solid transparent;
......
......@@ -37,6 +37,11 @@ export default {
};
},
created() {
if(this.swipers.banners.length>0){
this.swipers.banners.forEach(x=>{
x.picUrl=this.getIconLink(x.picUrl)
})
}
this.banners = this.swipers.banners;
},
methods: {
......
......@@ -5,6 +5,7 @@
<u-grid-item
v-for="(c, i) in uo.navs"
:key="i"
class="uu_grid"
@click="clickHandler(c.url)"
>
<image
......@@ -38,4 +39,7 @@ export default {
margin-top: 4rpx;
color: "#330330";
}
.uu_grid view{
background: transparent!important;
}
</style>
<template>
<view class="content">
<u-tabs
v-if="indexPageData.home_pages.navs.length > 1"
v-if="myPageData.home_pages.navs.length > 1"
name="name"
:list="indexPageData.home_pages.navs"
:list="myPageData.home_pages.navs"
:is-scroll="true"
:active-color="mainColor"
:current="active"
......@@ -11,7 +11,7 @@
:font-size="32"
@change="changeHandler"
></u-tabs>
<template v-for="(item, i) in indexPageData.home_pages.navs">
<template v-for="(item, i) in myPageData.home_pages.navs">
<view :style="item.templateBg" :key="i" v-show="active == i">
<template v-for="(d, di) in item.template.data">
<search v-if="d.id == 'search'" :styleStr="d.data" :key="di"></search>
......@@ -92,6 +92,7 @@ export default {
data() {
return {
title: "Hello",
myPageData:{},
indexPageData: {},
mainColor: "",
active: 0,
......@@ -132,100 +133,40 @@ export default {
},
methods: {
init() {
if (uni.getStorageSync("indexdata")) {
this.indexPageData = uni.getStorageSync("indexdata");
this.indexPageData.home_pages.navs[0].template.data.push({
id: "quick-nav",
permission_key: "",
data: {
navSwitch: 1,
useMallConfig: false,
navStyle: 1,
closedPicUrl:
"https://cdnimg.iotweixin.com/uploads/mall1285/20200309/2377f4a89a86598a6b442503356f7624.png",
openedPicUrl:
"https://cdnimg.iotweixin.com/uploads/mall1285/20200309/2377f4a89a86598a6b442503356f7624.png",
home: {
opened: true,
picUrl:
"https://cdnimg.iotweixin.com/uploads/mall1285/20200305/032f41de1ce0ac0cc655a02e6f8aa226.png",
},
customerService: {
opened: true,
picUrl:
"https://cdnimg.iotweixin.com/uploads/mall1285/20200305/cd0092c67dbe71cce73e9ed8266748d0.png",
},
tel: {
opened: true,
picUrl:
"https://cdnimg.iotweixin.com/uploads/mall1285/20200305/2377f4a89a86598a6b442503356f7624.png",
number: "",
},
web: {
opened: true,
picUrl:
"https://cdnimg.iotweixin.com/uploads/mall1285/20200305/b6e82d2d3d7e0aea24bb0e3bd3125842.png",
url: "http://www.baidu.com",
},
mApp: {
opened: true,
picUrl:
"https://cdnimg.iotweixin.com/uploads/mall1285/20200305/3681e31f5fae422b9f16fd5b257c9026.png",
appId: "",
page: "",
},
mapNav: {
opened: true,
picUrl:
"https://cdnimg.iotweixin.com/uploads/mall1285/20200305/2058797984c620a54ca9254d4d7e4d85.png",
address: "中国四川省成都市锦江区大慈寺路48号",
location: "30.656180,104.083290",
},
customize: {
opened: true,
picUrl:
"https://cdnimg.iotweixin.com/uploads/mall1285/20200415/c9d23be434e910ccb8dc500fe5fe611d.png",
open_type: "navigate",
link_url: "/pages/address/address",
key: "",
},
},
});
this.formatBg();
} else {
this.request(
this.request2(
{
url: "",
url: '/api/Mall/GetHome',
data: {
r: "api/index/index",
page_id: 0,
longitude: "",
latitude: "",
},
},
(res) => {
//this.isloading = false;
this.indexPageData = res.data;
wx.setStorageSync("indexdata", this.indexPageData);
console.log(res,'resIndex');
this.indexPageData = res.data.home_pages.navs[0].template.data;
this.myPageData=res.data;
wx.setStorageSync("indexdata", this.myPageData);
if (res.data.home_pages.title != "") {
uni.setNavigationBarTitle({
title: this.basedata.mall.name,
title: res.data.home_pages.title,
});
uni.setNavigationBarColor({
//字体颜色
frontColor:res.data.navbar.top_text_color,
//背景颜色
backgroundColor:res.data.navbar.top_background_color
});
}
// if (this.indexPageData.home_pages.navs.length > 1) {
// this.activeName = this.indexPageData.home_pages.navs[0].name;
// }
this.formatBg();
}
},
(error)=>{
}
);
}
},
changeHandler(i) {
this.active = i;
},
formatBg() {
this.indexPageData.home_pages.navs.forEach((y) => {
this.myPageData.home_pages.navs.forEach((y) => {
y.template.data.forEach((x) => {
if (x.id == "background") {
let t = "";
......@@ -255,6 +196,7 @@ export default {
flex-direction: column;
/* align-items: center;
justify-content: center; */
padding-bottom:100rpx;
}
/* .logo {
......
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