Commit c5d70189 authored by zhengke's avatar zhengke

21212

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