<template>
	<view v-if="pageShow" class="page"
		:class="bgTabVal==2?'fullsize noRepeat':bgTabVal==1?'repeat ysize':'noRepeat ysize'"
		:style="'background-color:'+bgColor+';background-image: url('+bgPic+');min-height:'+windowHeight+'px;'">
		<view v-if="!errorNetwork" :style="colorStyle">
			<skeleton :show="showSkeleton" :isNodes="isNodes" ref="skeleton" loading="chiaroscuro" selector="skeleton"
				bgcolor="#FFF"></skeleton>
			<view class="index skeleton" :style="{visibility: showSkeleton ? 'hidden' : 'visible'}">
				<!-- #ifdef H5 -->
				<view v-for="(item, index) in styleConfig" :key="index">
					<component :is="item.name" :index="index" :dataConfig="item" @changeBarg="changeBarg"
						@changeTab="changeTab" :tempArr="tempArr" :iSshowH="iSshowH" @detail="goDetail"
						:isSortType="isSortType" @bindSortId="bindSortId" @bindHeight="bindHeight" :isFixed="isFixed">
					</component>
				</view>
				<!-- #endif -->
				
				<!-- #ifdef MP || APP-PLUS -->
				<block v-for="(item, index) in styleConfig" :key="index">
					<!-- <activeParty v-if="item.name == 'activeParty'" :dataConfig="item" :isSortType="isSortType">
					</activeParty> -->
					<!-- <articleList v-if="item.name == 'articleList'" :dataConfig="item" :isSortType="isSortType">
					</articleList> -->
					<!-- <bargain v-if="item.name == 'bargain'" :dataConfig="item" @changeBarg="changeBarg"
						:isSortType="isSortType"></bargain> -->
					<!-- <blankPage v-if="item.name == 'blankPage'" :dataConfig="item" :isSortType="isSortType"></blankPage> -->
					<!-- <combination v-if="item.name == 'combination'" :dataConfig="item" :isSortType="isSortType">
					</combination> -->
					<!-- <coupon v-if="item.name == 'coupon'" :dataConfig="item" :isSortType="isSortType"></coupon> -->
					<!-- <customerService v-if="item.name == 'customerService'" :dataConfig="item" :isSortType="isSortType">
					</customerService> -->
					<!-- <goodList v-if="item.name == 'goodList'" :dataConfig="item" @detail="goDetail"
						:isSortType="isSortType"></goodList> -->
					<!-- <guide v-if="item.name == 'guide'" :dataConfig="item" :isSortType="isSortType"></guide> -->
					<headerSerch v-if="item.name == 'headerSerch'" :dataConfig="item"></headerSerch>
					<!-- <liveBroadcast v-if="item.name == 'liveBroadcast'" :dataConfig="item" :isSortType="isSortType">
					</liveBroadcast> -->
					<menus v-if="item.name == 'menus'" :dataConfig="item" :isSortType="isSortType"></menus>
					<news v-if="item.name == 'news'" :dataConfig="item" :isSortType="isSortType"></news>
					<!-- <pictureCube v-if="item.name == 'pictureCube'" :dataConfig="item" :isSortType="isSortType">
					</pictureCube> -->
					<promotionList v-if="item.name == 'promotionList'" :dataConfig="item" @changeTab="changeTab"
						:tempArr="tempArr" :iSshowH="iSshowH" @detail="goDetail" :isSortType="isSortType">
					</promotionList>
					<!-- <richText v-if="item.name == 'richText'" :dataConfig="item" :isSortType="isSortType"></richText> -->
					<!-- <seckill v-if="item.name == 'seckill'" :dataConfig="item" :isSortType="isSortType"></seckill> -->
					<swiperBg v-if="item.name == 'swiperBg'" :dataConfig="item" :isSortType="isSortType"></swiperBg>
					<!-- <swipers v-if="item.name == 'swipers'" :dataConfig="item" :isSortType="isSortType"></swipers> -->
					<tabNav v-if="item.name == 'tabNav'" :dataConfig="item" @bindHeight="bindHeighta"
						@bindSortId="bindSortId" :isFixed="isFixed"></tabNav>
					<!-- <titles v-if="item.name == 'titles'" :dataConfig="item" :isSortType="isSortType"></titles> -->
				</block>
				<!-- #endif -->
				<!-- 分类商品模块 -->
				<!-- #ifdef  APP-PLUS -->
				<view class="sort-product" v-if="isSortType == 1" style="margin-top: 0;">
					<scroll-view scroll-x="true" style="background: #fff;">
						<view class="sort-box" v-if="sortList.children && sortList.children.length">
							<view class="sort-item" v-for="(item, index) in sortList.children" :key="index"
								@click="changeSort(item, index)" :class="{ on: curSort == index }">
								<image :src="item.pic" mode="" v-if="item.pic"></image>
								<image src="/static/images/sort-img.png" mode="" v-else></image>
								<view class="txt">{{ item.cate_name }}</view>
							</view>
						</view>
					</scroll-view>
					<view class="product-list" v-if="goodList.length">
						<view class="product-item" v-for="(item, index) in goodList" @click="goGoodsDetail(item)">
							<image :src="item.image"></image>
							<span class="pictrue_log_big pictrue_log_class"
								v-if="item.activity && item.activity.type === '1'">{{$t(`秒杀`)}}</span>
							<span class="pictrue_log_big pictrue_log_class"
								v-if="item.activity && item.activity.type === '2'">{{$t(`砍价`)}}</span>
							<span class="pictrue_log_big pictrue_log_class"
								v-if="item.activity && item.activity.type === '3'">{{$t(`拼团`)}}</span>
							<view class="info">
								<view class="title line1">{{ item.store_name }}</view>
								<view class="price-box">
									<text>{{$t(`￥`)}}</text>
									{{ item.price }}
								</view>
							</view>
						</view>
					</view>
					<Loading :loaded="loaded" :loading="loading"></Loading>
					<view class="" v-if="goodList.length == 0 && loaded">
						<view class="emptyBox">
							<image :src="imgHost + '/statics/images/no-thing.png'"></image>
							<view class="tips">{{$t(`暂无商品，去看点别的吧`)}}</view>
						</view>
						<recommend :hostProduct="hostProduct"></recommend>
					</view>
				</view>
				<!-- #endif -->
				<!-- #ifndef  APP-PLUS -->
				<view class="sort-product" v-if="isSortType == 1" :style="{ marginTop: sortMpTop + 'px' }">
					<scroll-view scroll-x="true" style="background: #fff;">
						<view class="sort-box" v-if="sortList.children && sortList.children.length">
							<view class="sort-item" v-for="(item, index) in sortList.children" :key="index"
								@click="changeSort(item, index)" :class="{ on: curSort == index }">
								<image :src="item.pic" mode="" v-if="item.pic"></image>
								<image src="/static/images/sort-img.png" mode="" v-else></image>
								<view class="txt">{{ item.cate_name }}</view>
							</view>
						</view>
					</scroll-view>
					<view class="product-list" v-if="goodList.length">
						<view class="product-item" v-for="(item, index) in goodList" @click="goGoodsDetail(item)">
							<image :src="item.image"></image>
							<span class="pictrue_log_big pictrue_log_class"
								v-if="item.activity && item.activity.type === '1'">{{$t(`秒杀`)}}</span>
							<span class="pictrue_log_big pictrue_log_class"
								v-if="item.activity && item.activity.type === '2'">{{$t(`砍价`)}}</span>
							<span class="pictrue_log_big pictrue_log_class"
								v-if="item.activity && item.activity.type === '3'">{{$t(`拼团`)}}</span>
							<span class="pictrue_log_big pictrue_log_class" v-if="item.checkCoupon">{{$t(`券`)}}</span>
							<view class="info">
								<view class="title line2">{{ item.store_name }}</view>
								<view class="price-box">
									<text>{{$t(`￥`)}}</text>
									{{ item.price }}
								</view>
							</view>
						</view>
					</view>
					<Loading :loaded="loaded" :loading="loading"></Loading>
					<view class="" v-if="goodList.length == 0 && loaded">
						<view class="emptyBox">
							<image :src="imgHost + '/statics/images/no-thing.png'"></image>
							<view class="tips">{{$t(`暂无数据`)}}</view>
						</view>
						<recommend :hostProduct="hostProduct"></recommend>
					</view>
				</view>
				<!-- #endif -->
				<!-- 	<view class="loadingicon acea-row row-center-wrapper" v-if="tempArr.length && styleConfig[styleConfig.length - 1].name == 'promotionList'">
					<text class="loading iconfont icon-jiazai" :hidden="loading == false"></text>
					{{ loadTitle }}
				</view> -->
				<!-- #ifdef MP -->
				<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" :isGoIndex="false"></authorize> -->
				<!-- #endif -->
				<couponWindow :window="isCouponShow" @onColse="couponClose" :couponImage="couponObj.image"
					:couponList="couponObj.list"></couponWindow>
				<view class="uni-p-b-98" v-if="footerStatus"></view>
				<view v-if="site_config" class="site-config" @click="goICP">{{ site_config }}</view>
				<!-- <pageFooter v-if="footerStatus"></pageFooter> -->
				<view class="foot" v-if="newData.status && newData.status.status">
					<view class="page-footer" id="target" :style="{'background-color':newData.bgColor.color[0].item}">
						<view class="foot-item" v-for="(item,index) in newData.menuList" :key="index"
							@click="goRouter(item)">
							<block v-if="item.link == activeRouter">
								<image :src="item.imgList[0]"></image>
								<view class="txt" :style="{color:newData.activeTxtColor.color[0].item}">
									{{$t(item.name)}}
								</view>
							</block>
							<block v-else>
								<image :src="item.imgList[1]"></image>
								<view class="txt" :style="{color:newData.txtColor.color[0].item}">{{$t(item.name)}}
								</view>
							</block>
							<div class="count-num"
								v-if="item.link === '/pages/order_addcart/order_addcart' && countNum > 0">
								{{countNum}}
							</div>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view v-else>
			<view class="error-network">
				<image :src="imgHost + '/statics/images/error-network.png'"></image>
				<view class="title">{{$t(`网络连接断开`)}}</view>
				<view class="con">
					<view class="label">{{$t(`请检查情况：`)}}：</view>
					<view class="item">· {{$t(`在设置中是否已开启网络权限：`)}}</view>
					<view class="item">· {{$t(`当前是否处于弱网环境`)}}</view>
					<view class="item">· {{$t(`版本是否过低，升级试试吧`)}}</view>
				</view>
				<view class="btn" @click="reconnect">{{$t(`重新连接`)}}</view>
			</view>
		</view>
		<!-- #ifdef APP-PLUS -->
		<app-update v-if="!privacyStatus" ref="appUpdate" :force="true" :tabbar="false"></app-update>
		<view class="privacy-wrapper" v-if="privacyStatus">
			<view class="privacy-box">
				<view class="title">{{$t(`服务协议与隐私政策`)}}</view>
				<view class="content">
					{{$t(`请务必审慎阅读、充分理解“服务协议与 隐私政策”各条款，包括但不限于：为了 向你提供即时通讯、内容分享等服务，我 们需要收集你的设备信息、操作日志等个
					人信息。你可以在“设置”中查看、变更、删除个人信息并管理你的授权。`)}}<br>
					{{$t(`你可以阅读`)}}<navigator url="/pages/users/privacy/index?type=3">{{$t(`《服务协议与隐私政策》`)}}</navigator>
					{{$t(`了解详细信息。如你同意，请点击“我同意”开始接受我们的服务。`)}}
				</view>
				<view class="btn-box">
					<view class="btn-item" @click="confirmApp">{{$t(`我同意`)}}</view>
					<view class="btn" @click="closeModel">{{$t(`残忍拒绝`)}}</view>
				</view>
			</view>
		</view>
		<!-- #endif -->
	</view>
</template>

<script>
const app = getApp();
import colors from "@/mixins/color";
import couponWindow from '@/components/couponWindow/index';
import {
	getCouponV2,
	getCouponNewUser,
	siteConfig
} from '@/api/api.js';
import {
	getNavigation
} from '@/api/public.js';
// #ifdef H5
import mConfig from './components/index.js';
// #endif
// #ifdef MP || APP-PLUS
import authorize from '@/components/Authorize';
import activeParty from './components/activeParty';
import headerSerch from './components/headerSerch';
import swipers from './components/swipers';
import coupon from './components/coupon';
import articleList from './components/articleList';
import bargain from './components/bargain';
import blankPage from './components/blankPage';
import combination from './components/combination';
import customerService from './components/customerService';
import goodList from './components/goodList';
import guide from './components/guide';
import liveBroadcast from './components/liveBroadcast';
import menus from './components/menus';
import news from './components/news';
import pictureCube from './components/pictureCube';
import promotionList from './components/promotionList';
import richText from './components/richText';
import seckill from './components/seckill';
import swiperBg from './components/swiperBg';
import tabNav from './components/tabNav';
import titles from './components/titles';
import appUpdate from "@/components/update/app-update.vue";
import {
	getTempIds
} from '@/api/api.js';
import {
	SUBSCRIBE_MESSAGE,
	TIPS_KEY
} from '@/config/cache';

// #endif
import {
	mapGetters
} from 'vuex';
import {
	getDiy,
	getIndexData
} from '@/api/api.js';
import {
	getGroomList,
	getCategoryList,
	getProductslist,
	getProductHot
} from '@/api/store.js';
import {
	goShopDetail
} from '@/libs/order.js';
import {
	getCartCounts,
} from '@/api/order.js';
import {
	toLogin
} from '@/libs/login.js';
import { HTTP_REQUEST_URL } from '@/config/app';
import pageFooter from '@/components/pageFooter/index.vue';
import Loading from '@/components/Loading/index.vue';
import recommend from '@/components/recommend';
export default {
	computed: mapGetters(['isLogin', 'uid']),
	mixins: [colors],
	components: {
		recommend,
		Loading,
		pageFooter,
		couponWindow,
		// #ifdef H5
		...mConfig,
		// #endif
		// #ifdef MP || APP-PLUS
		authorize,
		activeParty,
		headerSerch,
		swipers,
		coupon,
		articleList,
		bargain,
		blankPage,
		combination,
		customerService,
		goodList,
		guide,
		liveBroadcast,
		menus,
		pictureCube,
		news,
		promotionList,
		richText,
		seckill,
		swiperBg,
		tabNav,
		titles,
		appUpdate, //APP更新
		// #endif
	},
	computed: mapGetters(['isLogin', 'cartNum']),
	data() {
		return {
			imgHost: HTTP_REQUEST_URL,
			showSkeleton: true, //骨架屏显示隐藏
			isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
			styleConfig: [],
			tempArr: [],
			goodType: 3,
			loading: false,
			loadend: false,
			loadTitle: this.$t(`下拉加载更多`), //提示语
			page: 1,
			limit: this.$config.LIMIT,
			iSshowH: false,
			numConfig: 0,
			code: '',
			isCouponShow: false,
			couponObj: {},
			couponObjs: {
				show: false
			},
			shareInfo: {},
			footConfig: {},
			isSortType: 0,
			sortList: '',
			sortAll: [],
			goodPage: 1,
			goodList: [],
			newData: {},
			sid: 0,
			curSort: 0,
			sortMpTop: 0,
			loaded: false,
			loading: false,
			hostProduct: [],
			hotScroll: false,
			hotPage: 1,
			hotLimit: 10,
			domOffsetTop: 50,
			// #ifdef APP-PLUS || MP
			isFixed: true,
			// #endif

			// #ifdef H5
			isFixed: false,
			// #endif
			site_config: '',
			errorNetwork: false, // 是否断网
			privacyStatus: false, // 隐私政策是否同意过
			footerStatus: false,
			isHeaderSerch: false,
			bgColor: '',
			bgPic: '',
			bgTabVal: '',
			pageShow: true,
			windowHeight: 0,
			activeRouter: '',
			countNum: 0
		};
	},
	onPullDownRefresh() {
		this.diyData();
	},
	created(options) {
		let that = this
		this.$nextTick(function () {
			uni.getSystemInfo({
				success: function (res) {
					that.windowHeight = res.windowHeight;
				}
			});
		})
		getNavigation().then(res => {
			this.newData = res.data
			if (this.newData.status && this.newData.status.status) {
				uni.hideTabBar()
			} else {
				uni.showTabBar()
			}
		})
		let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
		let curRoute = routes[routes.length - 1].route //获取当前页面路由
		this.activeRouter = '/' + curRoute
		// #ifdef APP-PLUS
		uni.setStorageSync("privacyStatus", true);
		// try {
		// 	let val = uni.getStorageSync('privacyStatus') || false
		// 	if (!val) {
		// 		this.privacyStatus = true
		// 	}
		// } catch (e) {}
		// #endif
		this.diyData();
		this.getIndexData();
		// #ifdef MP
		this.getTempIds();
		// #endif
		// #ifndef APP-PLUS
		siteConfig().then(res => {
			this.site_config = res.data.record_No
		}).catch(err => {
			console.error(err.msg);
		});
		// #endif

		// 优惠券弹窗
		// var newDates = new Date().toLocaleDateString();
		if (this.isLogin) {
			this.getCoupon();
			getCartCounts().then(res => {
				this.countNum = res.data.count
				this.$store.commit('indexData/setCartNum', res.data.count > 99 ? '..' : res.data.count +
					'')
				if (res.data.count > 0) {
					wx.setTabBarBadge({
						index: Number(uni.getStorageSync('FOOTER_ADDCART')) || 2,
						text: res.data.count + ''
					})
				} else {
					wx.hideTabBarRedDot({
						index: Number(uni.getStorageSync('FOOTER_ADDCART')) || 2
					})
				}
			});
		}
	},
	// onReady() {
	// 	let that = this
	// 	uni.getSystemInfo({
	// 		success: function(res) { // res - 各种参数
	// 			let info = uni.createSelectorQuery().select(".hander"); // 获取某个元素
	// 			info.boundingClientRect(function(data) { //data - 各种参数
	// 				let view = res.windowHeight - data.height
	// 				that.heightHome = view
	// 			}).exec()
	// 		}
	// 	});
	// },
	watch: {
		isLogin: {
			deep: true, //深度监听设置为 true
			handler: function (newV, oldV) {
				// 优惠券弹窗
				var newDates = new Date().toLocaleDateString();
				if (newV) {
					try {
						var oldDate = uni.getStorageSync('oldDate') || '';
					} catch { }
					if (oldDate != newDates) {
						this.getCoupon();
					}
				}
			}
		}
	},
	onReady() { },
	methods: {
		// #ifdef APP-PLUS
		// 同意隐私协议
		confirmApp() {
			uni.setStorageSync('privacyStatus', true)
			this.privacyStatus = false
		},
		// 关闭Model
		closeModel() {
			//退出app
			uni.getSystemInfo({
				success: function (res) { // 判断为安卓的手机 
					if (res.platform == 'android') { // 安卓退出app      
						plus.runtime.quit();
					} else { // 判断为ios的手机，退出App      
						plus.ios.import("UIApplication").sharedApplication().performSelector("exit");

					}
				}
			})
		},
		// #endif
		// 重新链接
		reconnect() {
			uni.showLoading({
				title: this.$t(`加载中`)
			})
			this.diyData();
			this.getIndexData();
			getShare().then(res => {
				this.shareInfo = res.data;
			});
		},
		goICP() {
			// #ifdef H5
			window.open('http://beian.miit.gov.cn/');
			// #endif
			// #ifdef MP
			uni.navigateTo({
				url: `/pages/annex/web_view/index?url=https://beian.miit.gov.cn/`
			});
			// #endif
		},
		bindHeighta(data) {
			// #ifdef APP-PLUS
			this.sortMpTop = data.top + data.height;
			// #endif
		},
		bindHeight(data) {
			uni.hideLoading();
			this.domOffsetTop = data.top;
		},
		// 去商品详情
		goGoodsDetail(item) {
			goShopDetail(item, this.uid).then(res => {
				uni.navigateTo({
					url: `/pages/goods_details/index?id=${item.id}`
				});
			});
		},
		/**
		 * 获取我的推荐
		 */
		get_host_product: function () {
			let that = this;
			if (that.hotScroll) return;
			getProductHot(that.hotPage, that.hotLimit).then(res => {
				that.hotPage++;
				that.hotScroll = res.data.length < that.hotLimit;
				that.hostProduct = that.hostProduct.concat(res.data);
				// that.$set(that, 'hostProduct', res.data)
			});
		},
		// 分类点击
		changeSort(item, index) {
			if (this.curSort == index) return;
			this.curSort = index;
			this.sid = item.id;
			this.goodList = [];
			this.goodPage = 1;
			this.loaded = false;
			this.getGoodsList();
		},
		// 获取分类id
		bindSortId(data) {
			this.isSortType = data == -99 ? 0 : 1;
			this.getProductList(data);
			if (this.hostProduct.length == 0) {
				this.get_host_product();
			}
		},
		getProductList(data) {
			let tempObj = '';
			this.curSort = 0;
			this.loaded = false;
			if (this.sortAll.length > 0) {
				this.sortAll.forEach((el, index) => {
					if (el.id == data) {
						this.$set(this, 'sortList', el);
						this.sid = el.children.length ? el.children[0].id : '';
					}
				});
				this.goodList = [];
				this.goodPage = 1;
				this.$nextTick(() => {
					if (this.sortList != '') this.getGoodsList();
				});
			} else {
				getCategoryList().then(res => {
					this.sortAll = res.data;
					res.data.forEach((el, index) => {
						if (el.id == data) {
							this.sortList = el;
							this.sid = el.children.length ? el.children[0].id : '';
						}
					});
					this.goodList = [];
					this.goodPage = 1;

					this.$nextTick(() => {
						if (this.sortList != '') this.getGoodsList();
					});
				});
			}
		},
		getGoodsList() {
			if (this.loading || this.loaded) return;
			this.loading = true;
			getProductslist({
				sid: this.sid,
				keyword: '',
				priceOrder: '',
				salesOrder: '',
				news: 0,
				page: this.goodPage,
				limit: 10,
				cid: this.sortList.id
			}).then(res => {
				this.loading = false;
				this.loaded = res.data.length < 10;
				this.goodPage++;
				this.goodList = this.goodList.concat(res.data);
			});
		},
		// 新用户优惠券
		getNewCoupon() {
			const oldUser = uni.getStorageSync('oldUser') || 0;
			if (!oldUser) {
				getCouponNewUser().then(res => {
					const {
						data
					} = res;
					if (data.show) {
						if (data.list.length) {
							this.isCouponShow = true;
							this.couponObj = data;
							uni.setStorageSync('oldUser', 1);
						}
					} else {
						uni.setStorageSync('oldUser', 1);
					}
				});
			}
		},
		// 优惠券弹窗
		getCoupon() {
			const tagDate = uni.getStorageSync('tagDate') || '',
				nowDate = new Date().toLocaleDateString();
			if (tagDate === nowDate) {
				this.getNewCoupon();
			} else {
				getCouponV2().then(res => {
					const {
						data
					} = res;
					if (data.list.length) {
						this.isCouponShow = true;
						this.couponObj = data;
						uni.setStorageSync('tagDate', new Date().toLocaleDateString());
					} else {
						this.getNewCoupon();
					}
				});
			}
		},
		// 优惠券弹窗关闭
		couponClose() {
			this.isCouponShow = false;
			if (!uni.getStorageSync('oldUser')) {
				this.getNewCoupon();
			}
		},
		onLoadFun() { },
		// #ifdef H5
		// 获取url后面的参数
		getQueryString(name) {
			var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
			var reg_rewrite = new RegExp('(^|/)' + name + '/([^/]*)(/|$)', 'i');
			var r = window.location.search.substr(1).match(reg);
			var q = window.location.pathname.substr(1).match(reg_rewrite);
			if (r != null) {
				return unescape(r[2]);
			} else if (q != null) {
				return unescape(q[2]);
			} else {
				return null;
			}
		},
		// #endif

		// #ifdef MP
		getTempIds() {
			let messageTmplIds = wx.getStorageSync(SUBSCRIBE_MESSAGE);
			if (!messageTmplIds) {
				getTempIds().then(res => {
					if (res.data) wx.setStorageSync(SUBSCRIBE_MESSAGE, JSON.stringify(res.data));
				});
			}
		},
		// #endif
		// 对象转数组
		objToArr(data) {
			let obj = Object.keys(data);
			let m = obj.map(key => data[key]);
			return m;
		},
		diyData() {
			let that = this;
			let value = {
				"1666235374470008": {
					"name": "liveBroadcast",
					"timestamp": "1666235374470008",
					"setUp": {
						"tabVal": 0
					},
					"bg": {
						"title": "背景色",
						"name": "bg",
						"default": [
							{
								"item": "#fff"
							}
						],
						"color": [
							{
								"item": "#fff"
							}
						]
					},
					"boxShadow": {
						"title": "阴影颜色",
						"name": "playBg",
						"default": [
							{
								"item": "rgba(0, 0, 0, 0.06)"
							}
						],
						"color": [
							{
								"item": "rgba(0, 0, 0, 0.06)"
							}
						]
					},
					"limit": {
						"title": "显示个数",
						"val": 1
					},
					"listStyle": {
						"title": "列表样式",
						"name": "listStyle",
						"type": 0,
						"list": [
							{
								"val": "单列",
								"icon": "iconPic_big"
							},
							{
								"val": "双列",
								"icon": "iconPic_small"
							},
							{
								"val": "大图",
								"icon": "iconbanner_1"
							}
						]
					},
					"mbConfig": {
						"title": "页面间距",
						"val": 0,
						"min": 0
					},
					"id": "id1666235050825000"
				},
				"1666235374470000": {
					"name": "headerSerch",
					"timestamp": "1666235374470000",
					"setUp": {
						"tabVal": 0
					},
					"bgColor": {
						"title": "背景颜色(渐变)",
						"name": "bgColor",
						"default": [
							{
								"item": "#F62C2C"
							},
							{
								"item": "#F96E29"
							}
						],
						"color": [
							{
								"item": "rgba(29,176,252,1)"
							},
							{
								"item": "rgba(64,209,244,1)"
							}
						]
					},
					"boxStyle": {
						"title": "边框样式",
						"name": "boxStyle",
						"type": 0,
						"list": [
							{
								"val": "圆角",
								"icon": "iconPic_fillet"
							},
							{
								"val": "直角",
								"icon": "iconPic_square"
							}
						]
					},
					"txtStyle": {
						"title": "文本位置",
						"name": "txtStyle",
						"type": 1,
						"list": [
							{
								"val": "居左",
								"icon": "icondoc_left"
							},
							{
								"val": "居中",
								"icon": "icondoc_center"
							}
						]
					},
					"prConfig": {
						"title": "背景边距",
						"val": 8,
						"min": 0
					},
					"mbConfig": {
						"title": "页面间距",
						"val": 0,
						"min": 0
					},
					"hotWords": {
						"list": [
							{
								"val": ""
							}
						]
					},
					"logoConfig": {
						"type": 1,
						"header": "设置logo",
						"title": "",
						"url": "https://demo26.crmeb.net/uploads/attach/2022/10/20221009/7436ee5680bc5d67c46a6017939475e5.png"
					},
					"id": "id1665385357481000"
				},
				"1666235374470001": {
					"name": "swiperBg",
					"timestamp": "1666235374470001",
					"setUp": {
						"tabVal": 1
					},
					"swiperConfig": {
						"title": "最多可添加10张图片，建议宽度750px；鼠标拖拽左侧圆点可调整图片 顺序",
						"maxList": 10,
						"list": [
							{
								"img": "https://demo26.crmeb.net/uploads/attach/2022/09/20220928/8903e1c331b95263270d1bf558315eea.jpg",
								"info": [
									{
										"title": "标题",
										"value": "电商社交",
										"tips": "选填，不超过4个字",
										"max": 4
									},
									{
										"title": "链接",
										"value": "/pages/goods_cate/goods_cate",
										"tips": "请输入链接",
										"max": 100
									}
								]
							},
							{
								"img": "https://qiniu.crmeb.net/attach/2021/10/78c7c20211011171437256.png",
								"info": [
									{
										"title": "标题",
										"value": "今日推荐",
										"tips": "选填，不超过4个字",
										"max": 4
									},
									{
										"title": "链接",
										"value": "/pages/extension/customer_list/chat",
										"tips": "请输入链接",
										"max": 100
									}
								]
							},
							{
								"img": "https://qiniu.crmeb.net/attach/2021/10/ce66b202110111714168104.png",
								"info": [
									{
										"title": "标题",
										"value": "超值爆款",
										"tips": "选填，不超过4个字",
										"max": 4
									},
									{
										"title": "链接",
										"value": "/pages/users/user_sgin/index",
										"tips": "请输入链接",
										"max": 100
									}
								]
							}
						]
					},
					"isShow": {
						"title": "是否显示背景色",
						"val": false
					},
					"bgColor": {
						"title": "背景颜色(渐变)",
						"default": [
							{
								"item": "#F62C2C"
							},
							{
								"item": "#F96E29"
							}
						],
						"color": [
							{
								"item": "rgba(29,176,252,1)"
							},
							{
								"item": "rgba(64,209,244,1)"
							}
						]
					},
					"dotColor": {
						"title": "指示器颜色",
						"default": [
							{
								"item": "#fff"
							}
						],
						"color": [
							{
								"item": "rgba(29,176,252,1)"
							}
						]
					},
					"lrConfig": {
						"title": "左右边距",
						"val": 11,
						"min": 0
					},
					"mbConfig": {
						"title": "页面间距",
						"val": 10,
						"min": 0
					},
					"docConfig": {
						"cname": "swiper",
						"title": "指示器样式",
						"type": 0,
						"list": [
							{
								"val": "圆形",
								"icon": "iconDot"
							},
							{
								"val": "直线",
								"icon": "iconSquarepoint"
							},
							{
								"val": "数字",
								"icon": "iconshuzi"
							},
							{
								"val": "无指示器",
								"icon": "iconjinyong"
							}
						]
					},
					"txtStyle": {
						"title": "指示器位置",
						"type": 2,
						"list": [
							{
								"val": "居左",
								"icon": "icondoc_left"
							},
							{
								"val": "居中",
								"icon": "icondoc_center"
							},
							{
								"val": "居右",
								"icon": "icondoc_right"
							}
						]
					},
					"imgConfig": {
						"cname": "docStyle",
						"title": "轮播图样式",
						"type": 0,
						"list": [
							{
								"val": "圆角",
								"icon": "iconPic_fillet"
							},
							{
								"val": "直角",
								"icon": "iconPic_square"
							}
						]
					},
					"id": "id1665385357481001"
				},
				"1666235374470002": {
					"name": "news",
					"timestamp": "1666235374470002",
					"setUp": {
						"tabVal": 1
					},
					"txtStyle": {
						"title": "文本位置",
						"name": "txtStyle",
						"type": 0,
						"list": [
							{
								"val": "居左",
								"icon": "icondoc_left",
								"style": "left"
							},
							{
								"val": "居中",
								"icon": "icondoc_center",
								"style": "center"
							},
							{
								"val": "居右",
								"icon": "icondoc_right",
								"style": "right"
							}
						]
					},
					"bgColor": {
						"title": "背景颜色",
						"default": [
							{
								"item": "#fff"
							}
						],
						"color": [
							{
								"item": "#fff"
							}
						]
					},
					"txtColor": {
						"title": "文字颜色",
						"default": [
							{
								"item": "#333"
							}
						],
						"color": [
							{
								"item": "#333"
							}
						]
					},
					"listConfig": {
						"title": "最多可添加10个版块；鼠标拖拽左侧圆点可调整版块顺序",
						"max": 10,
						"list": [
							{
								"chiild": [
									{
										"title": "标题",
										"val": "标准版4.5正式发布，大家快来体验",
										"max": 30,
										"pla": "选填，不超过30个字",
										"empty": true
									},
									{
										"title": "链接",
										"val": "/pages/extension/news_details/index?id=128",
										"max": 200,
										"pla": "请输入连接"
									}
								]
							}
						],
						"tabCur": 0
					},
					"bgStyle": {
						"title": "背景样式",
						"name": "bgStyle",
						"type": 1,
						"list": [
							{
								"val": "直角",
								"icon": "iconPic_square"
							},
							{
								"val": "圆角",
								"icon": "iconPic_fillet"
							}
						]
					},
					"prConfig": {
						"title": "背景边距",
						"val": 10,
						"min": 0
					},
					"mbConfig": {
						"title": "页面间距",
						"val": 10,
						"min": 0
					},
					"logoConfig": {
						"header": "图标设置",
						"title": "最多可添加1张图片，建议宽度130 * 36px",
						"url": "https://qiniu.crmeb.net/attach/2021/11/6d4fe202111181229083421.png"
					},
					"id": "id1665385357481002"
				},
				"1666235374470003": {
					"name": "menus",
					"timestamp": "1666235374470003",
					"setUp": {
						"tabVal": 0
					},
					"tabConfig": {
						"title": "展示样式",
						"tabVal": 1,
						"type": 1,
						"tabList": [
							{
								"name": "单行展示",
								"icon": "icondanhang"
							},
							{
								"name": "多行展示",
								"icon": "iconduohang"
							}
						]
					},
					"rowsNum": {
						"title": "显示行数",
						"name": "rowsNum",
						"type": 0,
						"list": [
							{
								"val": "2行",
								"icon": "icon2hang"
							},
							{
								"val": "3行",
								"icon": "icon3hang"
							},
							{
								"val": "4行",
								"icon": "icon4hang"
							}
						]
					},
					"menuStyle": {
						"title": "图标样式",
						"name": "menuStyle",
						"type": 1,
						"list": [
							{
								"val": "方形",
								"icon": "iconPic_square"
							},
							{
								"val": "圆形",
								"icon": "icondayuanjiao"
							}
						]
					},
					"number": {
						"title": "显示个数",
						"name": "number",
						"type": 2,
						"list": [
							{
								"val": "3个",
								"icon": "icon3ge"
							},
							{
								"val": "4个",
								"icon": "icon4ge1"
							},
							{
								"val": "5个",
								"icon": "icon5ge1"
							}
						]
					},
					"pointerStyle": {
						"title": "指示器样式",
						"name": "pointerStyle",
						"type": 2,
						"list": [
							{
								"val": "长条",
								"icon": "iconSquarepoint"
							},
							{
								"val": "圆形",
								"icon": "iconDot"
							},
							{
								"val": "无指示器",
								"icon": "iconjinyong"
							}
						]
					},
					"bgStyle": {
						"title": "背景样式",
						"name": "bgStyle",
						"type": 1,
						"list": [
							{
								"val": "直角",
								"icon": "iconPic_square"
							},
							{
								"val": "圆角",
								"icon": "iconPic_fillet"
							}
						]
					},
					"prConfig": {
						"title": "背景边距",
						"val": 10,
						"min": 0
					},
					"menuConfig": {
						"title": "最多可添加1张图片，建议宽度90 * 90px",
						"maxList": 100,
						"list": [
							{
								"img": "https://qiniu.crmeb.net/attach/2021/09/02d9e202109101106364468.png",
								"info": [
									{
										"title": "标题",
										"value": "预约自提",
										"tips": "选填，不超过4个字",
										"max": 4
									},
									{
										"title": "链接",
										"value": "/pages/goods_details/index?id=109",
										"tips": "请输入链接",
										"max": 100
									}
								]
							},
							{
								"img": "https://qiniu.crmeb.net/attach/2021/09/4a21a202109101106368349.png",
								"info": [
									{
										"title": "标题",
										"value": "领优惠券",
										"tips": "选填，不超过4个字",
										"max": 4
									},
									{
										"title": "链接",
										"value": "/pages/users/user_get_coupon/index",
										"tips": "请输入链接",
										"max": 100
									}
								]
							},
							{
								"img": "https://demo26.crmeb.net/uploads/attach/2022/09/20220916/d09d2286f960697ab7e1fb9d2595605f.png",
								"info": [
									{
										"title": "标题",
										"value": "特价限购",
										"tips": "选填，不超过4个字",
										"max": 4
									},
									{
										"title": "链接",
										"value": "/pages/goods_details/index?id=116",
										"tips": "请输入链接",
										"max": 100
									}
								]
							},
							{
								"img": "https://qiniu.crmeb.net/attach/2021/09/9d74b20210910110637104.png",
								"info": [
									{
										"title": "标题",
										"value": "新闻资讯",
										"tips": "选填，不超过4个字",
										"max": 4
									},
									{
										"title": "链接",
										"value": "/pages/extension/news_list/index",
										"tips": "请输入链接",
										"max": 100
									}
								]
							},
							{
								"img": "https://qiniu.crmeb.net/attach/2021/09/1c95120210910110636424.png",
								"info": [
									{
										"title": "标题",
										"value": "助力砍价",
										"tips": "选填，不超过4个字",
										"max": 4
									},
									{
										"title": "链接",
										"value": "/pages/activity/goods_bargain/index",
										"tips": "请输入链接",
										"max": 100
									}
								]
							},
							{
								"img": "https://qiniu.crmeb.net/attach/2021/09/23332202109101106361126.png",
								"info": [
									{
										"title": "标题",
										"value": "限时秒杀",
										"tips": "选填，不超过4个字",
										"max": 4
									},
									{
										"title": "链接",
										"value": "/pages/activity/goods_seckill/index",
										"tips": "请输入链接",
										"max": 100
									}
								]
							},
							{
								"img": "https://qiniu.crmeb.net/attach/2021/09/34f81202109101106357549.png",
								"info": [
									{
										"title": "标题",
										"value": "积分商城",
										"tips": "选填，不超过4个字",
										"max": 4
									},
									{
										"title": "链接",
										"value": "/pages/points_mall/index",
										"tips": "请输入链接",
										"max": 100
									}
								]
							},
							{
								"img": "https://demo26.crmeb.net/uploads/attach/2022/09/20220916/06c63d52fc6772917540d47076606680.png",
								"info": [
									{
										"title": "标题",
										"value": "成团返佣",
										"tips": "选填，不超过4个字",
										"max": 4
									},
									{
										"title": "链接",
										"value": "/pages/activity/goods_combination_details/index?id=23",
										"tips": "请输入链接",
										"max": 100
									}
								]
							},
							{
								"img": "https://demo26.crmeb.net/uploads/attach/2022/09/20220916/e31cdcb6fa7660aee45912ef572cc114.png",
								"info": [
									{
										"title": "标题",
										"value": "用户足迹",
										"tips": "选填，不超过4个字",
										"max": 4
									},
									{
										"title": "链接",
										"value": "/pages/users/visit_list/index",
										"tips": "请输入链接",
										"max": 100
									}
								]
							},
							{
								"img": "https://qiniu.crmeb.net/attach/2021/09/f4598202109101106358762.png",
								"info": [
									{
										"title": "标题",
										"value": "幸运转盘",
										"tips": "选填，不超过4个字",
										"max": 4
									},
									{
										"title": "链接",
										"value": "/pages/goods/lottery/grids/index?type=1",
										"tips": "请输入链接",
										"max": 100
									}
								]
							}
						]
					},
					"pointerColor": {
						"title": "指示器颜色",
						"name": "pointerColor",
						"default": [
							{
								"item": "#f44"
							}
						],
						"color": [
							{
								"item": "#f44"
							}
						]
					},
					"bgColor": {
						"title": "背景颜色",
						"name": "bgColor",
						"default": [
							{
								"item": "#fff"
							}
						],
						"color": [
							{
								"item": "#fff"
							}
						]
					},
					"titleColor": {
						"title": "文字颜色",
						"name": "themeColor",
						"default": [
							{
								"item": "#333333"
							}
						],
						"color": [
							{
								"item": "rgba(51,51,51,1)"
							}
						]
					},
					"mbConfig": {
						"title": "页面间距",
						"val": 12,
						"min": 0
					},
					"id": "id1665385357481003"
				},
				"1666235374470004": {
					"name": "activeParty",
					"timestamp": "1666235374470004",
					"setUp": {
						"tabVal": 1
					},
					"titleConfig": {
						"title": "促销标题",
						"value": "超值爆款",
						"place": "请输入标题",
						"max": 10
					},
					"desConfig": {
						"title": "促销简介",
						"value": "美好生活由此开始",
						"place": "请输入简介",
						"max": 8
					},
					"menuConfig": {
						"title": "最多可添加4个版块，图片建议尺寸140 * 140px；鼠标拖拽左侧圆点可 调整版块顺序",
						"maxList": 4,
						"list": [
							{
								"img": "https://qiniu.crmeb.net/attach/2021/11/16/216aaf8ea5fdeff2a31a48f3e931ff46.jpg",
								"info": [
									{
										"title": "标题",
										"value": "今日推荐",
										"tips": "选填，不超过4个字",
										"max": 4
									},
									{
										"title": "简介",
										"value": "店主诚意推荐 品质商品",
										"tips": "选填，不超过20个字",
										"max": 20
									},
									{
										"title": "链接",
										"value": "/pages/columnGoods/HotNewGoods/index?type=1&name=精品推荐",
										"tips": "请输入链接",
										"max": 100
									}
								]
							},
							{
								"img": "https://qiniu.crmeb.net/attach/2021/11/15/1c72a02ad97f695bd85fa04821b72985.jpg",
								"info": [
									{
										"title": "标题",
										"value": "热门榜单",
										"tips": "选填，不超过4个字",
										"max": 4
									},
									{
										"title": "简介",
										"value": "店主诚意推荐 品质商品",
										"tips": "选填，不超过20个字",
										"max": 20
									},
									{
										"title": "链接",
										"value": "/pages/columnGoods/HotNewGoods/index?type=2&name=热门榜单",
										"tips": "请输入链接",
										"max": 100
									}
								]
							},
							{
								"img": "https://qiniu.crmeb.net/attach/2021/10/612bb202110121143097664.png",
								"info": [
									{
										"title": "标题",
										"value": "首发新品",
										"tips": "选填，不超过4个字",
										"max": 4
									},
									{
										"title": "简介",
										"value": "新品上架等 你来拿",
										"tips": "选填，不超过20个字",
										"max": 20
									},
									{
										"title": "链接",
										"value": "/pages/columnGoods/HotNewGoods/index?type=3&name=首发新品",
										"tips": "请输入链接",
										"max": 100
									}
								]
							},
							{
								"img": "https://qiniu.crmeb.net/attach/2021/10/59c17202110130919585671.png",
								"info": [
									{
										"title": "标题",
										"value": "促销单品",
										"tips": "选填，不超过4个字",
										"max": 4
									},
									{
										"title": "简介",
										"value": "综合评选好 产品",
										"tips": "选填，不超过20个字",
										"max": 20
									},
									{
										"title": "链接",
										"value": "/pages/columnGoods/HotNewGoods/index?type=4&name=促销单品",
										"tips": "请输入链接",
										"max": 100
									}
								]
							}
						]
					},
					"themeColor": {
						"title": "主题颜色",
						"name": "themeColor",
						"default": [
							{
								"item": "#fc3c3e"
							}
						],
						"color": [
							{
								"item": "rgba(29,176,252,1)"
							}
						]
					},
					"bgColor": {
						"title": "标签背景颜色",
						"name": "bgColor",
						"default": [
							{
								"item": "#F62C2C"
							},
							{
								"item": "#F96E29"
							}
						],
						"color": [
							{
								"item": "rgba(29,176,252,1)"
							},
							{
								"item": "rgba(64,209,244,1)"
							}
						]
					},
					"boxColor": {
						"title": "背景颜色",
						"name": "boxColor",
						"default": [
							{
								"item": "#ffe5e3"
							}
						],
						"color": [
							{
								"item": "rgba(208,240,255,1)"
							}
						]
					},
					"mbConfig": {
						"title": "页面间距",
						"val": 12,
						"min": 0
					},
					"id": "id1665385357481004"
				},
				"1666235374470005": {
					"name": "combination",
					"timestamp": "1666235374470005",
					"setUp": {
						"tabVal": 1
					},
					"numConfig": {
						"val": 3
					},
					"priceShow": {
						"title": "是否显示价格",
						"val": true
					},
					"bntShow": {
						"title": "是否显示按钮",
						"val": true
					},
					"titleShow": {
						"title": "是否显示名称",
						"val": true
					},
					"pinkShow": {
						"title": "是否显示拼团标签",
						"val": true
					},
					"joinShow": {
						"title": "是否显示参团标签",
						"val": true
					},
					"txtColor": {
						"title": "文字背景色",
						"name": "themeColor",
						"default": [
							{
								"item": "rgba(255,68,68,0.1)"
							}
						],
						"color": [
							{
								"item": "rgba(208,240,255,1)"
							}
						]
					},
					"conStyle": {
						"title": "背景样式",
						"name": "conStyle",
						"type": 1,
						"list": [
							{
								"val": "直角",
								"icon": "iconPic_square"
							},
							{
								"val": "圆角",
								"icon": "iconPic_fillet"
							}
						]
					},
					"bgColor": {
						"title": "背景颜色",
						"name": "themeColor",
						"default": [
							{
								"item": "#fff"
							}
						],
						"color": [
							{
								"item": "#fff"
							}
						]
					},
					"prConfig": {
						"title": "背景边距",
						"val": 10,
						"min": 0
					},
					"themeColor": {
						"title": "主题风格",
						"name": "themeColor",
						"default": [
							{
								"item": "#E93323"
							}
						],
						"color": [
							{
								"item": "rgba(29,176,252,1)"
							}
						]
					},
					"mbConfig": {
						"title": "页面间距",
						"val": 12,
						"min": 0
					},
					"lrConfig": {
						"title": "左右边距",
						"val": 10,
						"min": 0
					},
					"imgConfig": {
						"title": "最多可添加1张图片，建议宽度18 * 18px",
						"url": "https://qiniu.crmeb.net/attach/2021/11/238c5202111181433515309.gif"
					},
					"id": "id1665385357481005"
				},
				"1666235374470006": {
					"name": "bargain",
					"timestamp": "1666235374470006",
					"setUp": {
						"tabVal": 1
					},
					"numConfig": {
						"val": 3
					},
					"priceShow": {
						"title": "是否显示价格",
						"val": true
					},
					"bntShow": {
						"title": "是否显示按钮",
						"val": true
					},
					"themeColor": {
						"title": "主题风格",
						"name": "themeColor",
						"default": [
							{
								"item": "#E93323"
							}
						],
						"color": [
							{
								"item": "rgba(29,176,252,1)"
							}
						]
					},
					"titleColor": {
						"title": "标题颜色",
						"name": "txtColor",
						"default": [
							{
								"item": "#FF6000"
							}
						],
						"color": [
							{
								"item": "rgba(255,152,0,1)"
							}
						]
					},
					"bgColor": {
						"title": "背景颜色",
						"name": "bgColor",
						"default": [
							{
								"item": "#FDDBB2"
							},
							{
								"item": "#FDEFC6"
							}
						],
						"color": [
							{
								"item": "#FDDBB2"
							},
							{
								"item": "#FDEFC6"
							}
						]
					},
					"bgStyle": {
						"title": "背景样式",
						"name": "bgStyle",
						"type": 1,
						"list": [
							{
								"val": "直角",
								"icon": "iconPic_square"
							},
							{
								"val": "圆角",
								"icon": "iconPic_fillet"
							}
						]
					},
					"prConfig": {
						"title": "背景边距",
						"val": 10,
						"min": 0
					},
					"productGap": {
						"title": "商品间距",
						"val": 10,
						"min": 0
					},
					"mbCongfig": {
						"title": "页面间距",
						"val": 0,
						"min": 0
					},
					"id": "id1665385357481006"
				},
				"1666235374470007": {
					"name": "seckill",
					"timestamp": "1666235374470007",
					"setUp": {
						"tabVal": 1
					},
					"countDownColor": {
						"title": "倒计时背景色",
						"name": "countDownColor",
						"default": [
							{
								"item": "rgba(252,60,62,0.09)"
							}
						],
						"color": [
							{
								"item": "rgba(255,255,255,0.09)"
							}
						]
					},
					"themeColor": {
						"title": "主题风格",
						"name": "themeColor",
						"default": [
							{
								"item": "#E93323"
							}
						],
						"color": [
							{
								"item": "rgba(29,176,255,1)"
							}
						]
					},
					"conStyle": {
						"title": "背景样式",
						"name": "conStyle",
						"type": 1,
						"list": [
							{
								"val": "直角",
								"icon": "iconPic_square"
							},
							{
								"val": "圆角",
								"icon": "iconPic_fillet"
							}
						]
					},
					"bgColor": {
						"title": "背景颜色",
						"name": "themeColor",
						"default": [
							{
								"item": "#fff"
							}
						],
						"color": [
							{
								"item": "#fff"
							}
						]
					},
					"prConfig": {
						"title": "背景边距",
						"val": 10,
						"min": 0
					},
					"priceShow": {
						"title": "是否显示价格",
						"val": true
					},
					"discountShow": {
						"title": "是否显示折扣标签",
						"val": true
					},
					"titleShow": {
						"title": "是否显示名称",
						"val": true
					},
					"seckillShow": {
						"title": "抢购标签",
						"val": true
					},
					"numberConfig": {
						"val": 3
					},
					"lrConfig": {
						"title": "左右边距",
						"val": 10,
						"min": 0
					},
					"mbConfig": {
						"title": "页面间距",
						"val": 0,
						"min": 0
					},
					"imgConfig": {
						"title": "最多可添加1张图片，建议宽度18 * 18px",
						"url": "https://demo26.crmeb.net/uploads/attach/2022/09/20220930/e537a7fc631006d3571d7a8574438b03.gif"
					},
					"id": "id1665385357481007"
				},
				"1666235374470009": {
					"name": "promotionList",
					"timestamp": "1666235374470009",
					"setUp": {
						"tabVal": 1
					},
					"productList": {
						"title": "促销列表"
					},
					"titleConfig": {
						"title": "标题位置",
						"type": 2,
						"list": [
							{
								"val": "居左",
								"icon": "icondoc_left"
							},
							{
								"val": "居中",
								"icon": "icondoc_center"
							},
							{
								"val": "居右",
								"icon": "icondoc_right"
							}
						]
					},
					"titleShow": {
						"title": "是否显示商品名称",
						"val": true
					},
					"opriceShow": {
						"title": "是否显示商品原价",
						"val": true
					},
					"priceShow": {
						"title": "是否显示商品价格",
						"val": true
					},
					"couponShow": {
						"title": "是否显示优惠券",
						"val": true
					},
					"tabConfig": {
						"title": "最多可添加4个版块；鼠标拖拽左侧圆点可调整版块顺序",
						"max": 4,
						"tabCur": 3,
						"list": [
							{
								"chiild": [
									{
										"title": "标题",
										"val": "首发新品",
										"max": 4,
										"pla": "选填，不超过四个字"
									},
									{
										"title": "简介",
										"val": "最新出炉",
										"max": 4,
										"pla": "选填，不超过四个字"
									}
								],
								"link": {
									"title": "链接",
									"activeVal": 3,
									"optiops": [
										{
											"type": 0,
											"value": 1,
											"label": "精品推荐"
										},
										{
											"type": 1,
											"value": 2,
											"label": "热门榜单"
										},
										{
											"type": 2,
											"value": 3,
											"label": "首发新品"
										},
										{
											"type": 3,
											"value": 4,
											"label": "促销单品"
										}
									]
								}
							},
							{
								"chiild": [
									{
										"title": "标题",
										"val": "精品推荐",
										"max": 4,
										"pla": "选填，不超过四个字"
									},
									{
										"title": "简介",
										"val": "猜你喜欢",
										"max": 4,
										"pla": "选填，不超过四个字"
									}
								],
								"link": {
									"title": "链接",
									"activeVal": 1,
									"optiops": [
										{
											"type": 0,
											"value": 1,
											"label": "精品推荐"
										},
										{
											"type": 1,
											"value": 2,
											"label": "热门榜单"
										},
										{
											"type": 2,
											"value": 3,
											"label": "首发新品"
										},
										{
											"type": 3,
											"value": 4,
											"label": "促销单品"
										}
									]
								}
							},
							{
								"chiild": [
									{
										"title": "标题",
										"val": "热门榜单",
										"max": 4,
										"pla": "选填，不超过四个字"
									},
									{
										"title": "简介",
										"val": "好评如云",
										"max": 4,
										"pla": "选填，不超过四个字"
									}
								],
								"link": {
									"title": "链接",
									"activeVal": 2,
									"optiops": [
										{
											"type": 0,
											"value": 1,
											"label": "精品推荐"
										},
										{
											"type": 1,
											"value": 2,
											"label": "热门榜单"
										},
										{
											"type": 2,
											"value": 3,
											"label": "首发新品"
										},
										{
											"type": 3,
											"value": 4,
											"label": "促销单品"
										}
									]
								}
							},
							{
								"chiild": [
									{
										"title": "标题",
										"val": "促销单品",
										"max": 4,
										"pla": "选填，不超过四个字"
									},
									{
										"title": "简介",
										"val": "多买多销",
										"max": 4,
										"pla": "选填，不超过四个字"
									}
								],
								"link": {
									"title": "链接",
									"activeVal": 4,
									"optiops": [
										{
											"type": 0,
											"value": 1,
											"label": "精品推荐"
										},
										{
											"type": 1,
											"value": 2,
											"label": "热门榜单"
										},
										{
											"type": 2,
											"value": 3,
											"label": "首发新品"
										},
										{
											"type": 3,
											"value": 4,
											"label": "促销单品"
										}
									]
								}
							}
						]
					},
					"themeColor": {
						"title": "主题风格",
						"name": "themeColor",
						"default": [
							{
								"item": "#F95429"
							}
						],
						"color": [
							{
								"item": "rgba(29,176,252,1)"
							}
						]
					},
					"fontColor": {
						"title": "价格颜色",
						"name": "fontColor",
						"default": [
							{
								"item": "#e93323"
							}
						],
						"color": [
							{
								"item": "rgba(253,80,47,1)"
							}
						]
					},
					"labelColor": {
						"title": "活动标签",
						"name": "labelColor",
						"default": [
							{
								"item": "#e93323"
							}
						],
						"color": [
							{
								"item": "rgba(29,176,252,1)"
							}
						]
					},
					"mbConfig": {
						"title": "页面间距",
						"val": 0,
						"min": 0
					},
					"numConfig": {
						"val": 9
					},
					"id": "id1665385357481008"
				},
				"1666235390875000": {
					"name": "pageFoot",
					"setUp": {
						"tabVal": 0
					},
					"status": {
						"title": "是否自定义",
						"name": "status",
						"status": true
					},
					"txtColor": {
						"title": "文字颜色",
						"name": "txtColor",
						"default": [
							{
								"item": "#282828"
							}
						],
						"color": [
							{
								"item": "rgba(51,51,51,1)"
							}
						]
					},
					"activeTxtColor": {
						"title": "选中文字颜色",
						"name": "txtColor",
						"default": [
							{
								"item": "#F62C2C"
							}
						],
						"color": [
							{
								"item": "rgba(29,176,252,1)"
							}
						]
					},
					"bgColor": {
						"title": "背景颜色",
						"name": "bgColor",
						"default": [
							{
								"item": "#fff"
							}
						],
						"color": [
							{
								"item": "#fff"
							}
						]
					},
					"menuList": [
						{
							"imgList": [
								"https://qiniu.crmeb.net/attach/2021/11/bdf25202111181452426458.png",
								"https://qiniu.crmeb.net/attach/2021/11/aaf1b202111181452576658.png"
							],
							"name": "首页",
							"link": "/pages/index/index"
						},
						{
							"imgList": [
								"https://demo26.crmeb.net/uploads/attach/2022/09/20220923/14367a2fecd502f51978ed6ea09afe19.png",
								"https://qiniu.crmeb.net/attach/2021/11/59d4a202111181453208678.png"
							],
							"name": "分类",
							"link": "/pages/goods_cate/goods_cate"
						},
						{
							"imgList": [
								"https://qiniu.crmeb.net/attach/2021/11/076ac202111181453294517.png",
								"https://qiniu.crmeb.net/attach/2021/11/201c9202111181453378599.png"
							],
							"name": "购物车",
							"link": "/pages/order_addcart/order_addcart"
						},
						{
							"imgList": [
								"https://qiniu.crmeb.net/attach/2021/11/f04cf20211118145343755.png",
								"https://qiniu.crmeb.net/attach/2021/11/3a141202111181453495771.png"
							],
							"name": "我的",
							"link": "/pages/user/index"
						}
					],
					"id": "idundefined"
				}
			}
			getDiy(0).then(res => {
				setTimeout(() => {
					this.isNodes++;
				}, 0);
				this.errorNetwork = false
				let data = res.data;
				if (data.is_bg_color) {
					this.bgColor = data.color_picker
				}
				if (data.is_bg_pic) {
					this.bgPic = data.bg_pic
					this.bgTabVal = data.bg_tab_val
				}
				this.pageShow = data.is_show
				uni.setNavigationBarTitle({
					title: res.data.title
				});

				let temp = [];
				let lastArr = that.objToArr(value);
				lastArr.forEach((item, index, arr) => {
					if (item.name == 'headerSerch') {
						this.isHeaderSerch = true
					}
					if (item.name == 'pageFoot') {
						console.log(item.status)
						if (item.status && item.status.status) {
							this.newData = item
							setTimeout((e) => {
								that.$set(that, 'footerStatus', true);
								console.log(this.footerStatus)
							}, 50)
						}
						uni.setStorageSync('FOOTER_BAR', item.status && item.status.status ? true :
							false)
						item.menuList.map((path, index) => {
							if (path.link === '/pages/order_addcart/order_addcart') {
								uni.setStorageSync('FOOTER_ADDCART', index)
							}
						})
						arr.splice(index, 1);

					}
					if (item.name == 'promotionList') {
						that.numConfig = item.numConfig.val;
						that.goodType = item.tabConfig.list[0].link.activeVal;
						that.getGroomList();
					}
					if (item.name == 'tabNav') {
						// #ifndef APP-PLUS
						// uni.showLoading({
						// 	title: '加载中',
						// 	mask: true,
						// });
						// #endif
						// setTimeout(function() {
						// 	uni.hideLoading();
						// }, 8000);
					}
					temp = arr;
				});

				function sortNumber(a, b) {
					return a.timestamp - b.timestamp;
				}
				temp.sort(sortNumber)
				that.styleConfig = temp;
				setTimeout(() => {
					this.showSkeleton = false
				}, 300)
				uni.stopPullDownRefresh({
					success: (e) => { },
				});

			}).catch(error => {
				// #ifdef APP-PLUS
				if (error.status) {
					uni.hideLoading()
					if (that.errorNetwork) {
						uni.showToast({
							title: this.$t(`连接失败`),
							icon: 'none',
							duration: 2000
						})
					}
					this.errorNetwork = true
					this.showSkeleton = false;
				}
				// #endif
			});
		},
		getIndexData() { },
		changeBarg(item) {
			if (!this.isLogin) {
				toLogin();
			} else {
				uni.navigateTo({
					url: `/pages/activity/goods_bargain_details/index?id=${item.id}&bargain=${this.$store.state.app.uid}`
				});
			}
		},
		// 促销列表的点击事件；
		changeTab(type) {
			this.goodType = type;
			this.tempArr = [];
			this.page = 1;
			this.loadend = false;
			let onloadH = true;
			this.getGroomList(onloadH);
		},
		// 精品推荐
		getGroomList(onloadH) {
			let that = this;
			let type = that.goodType;
			if (that.loadend) return false;
			if (that.loading) return false;
			if (onloadH) {
				that.$set(that, 'iSshowH', true);
			}
			getGroomList(type, {
				page: that.page,
				limit: this.numConfig
			})
				.then(({
					data
				}) => {
					that.$set(that, 'iSshowH', false);
					let maxPage = Math.ceil(this.numConfig / this.limit);
					let list = data.list,
						loadend = list.length < that.limit || that.page >= maxPage;
					let tempArr = that.$util.SplitArray(list, that.tempArr);
					that.$set(that, 'tempArr', tempArr.slice(0, this.numConfig));
					that.loadend = loadend;
					that.loadTitle = loadend ? that.$t(`没有更多内容啦~`) : that.$t(`加载更多`);
					that.page = that.page + 1;
					that.loading = false;
				})
				.catch(res => {
					that.loading = false;
					that.loadTitle = that.$t(`加载更多`);
				});
		},
		goRouter(item) {
			var pages = getCurrentPages();
			var page = (pages[pages.length - 1]).$page.fullPath;
			if (item.link == page) return
			uni.switchTab({
				url: item.link,
				fail(err) {
					uni.redirectTo({
						url: item.link
					})
				}
			})
		},
		goDetail(item) {
			goShopDetail(item, this.$store.state.app.uid).then(res => {
				uni.navigateTo({
					url: `/pages/goods_details/index?id=${item.id}`
				});
			});
		},
		onsollBotton() {
			console.log('????', this.isSortType)
			if (this.isSortType == 0) {
				// this.getGroomList();
			} else {
				this.getGoodsList();
			}
		}
	},

	onReachBottom: function () {

	},
	onPageScroll(e) {
		// #ifdef H5
		if (this.isHeaderSerch) {
			if (e.scrollTop > this.domOffsetTop) {
				this.isFixed = true;
			}
			if (e.scrollTop < this.domOffsetTop) {
				this.$nextTick(() => {
					this.isFixed = false;
				});
			}
		} else {
			this.isFixed = false
		}
		// #endif
	},
	//#ifdef MP
	onShareAppMessage() {
		return {
			title: this.shareInfo.title,
			path: '/pages/index/index'
		};
	},
	//分享到朋友圈
	onShareTimeline: function () {
		return {
			title: this.shareInfo.title,
			imageUrl: this.shareInfo.img
		};
	}
	//#endif
};
</script>

<style lang="scss">
// page {
// 	padding-bottom: 50px;
// }
.pictrue_log_class {
	background-color: var(--view-theme);
}

.page {
	padding-bottom: 50px;
}

.ysize {
	background-size: 100%;
}

.fullsize {
	background-size: 100% 100%;
}

.repeat {
	background-repeat: repeat;
}

.noRepeat {
	background-repeat: no-repeat;
}

.privacy-wrapper {
	z-index: 999;
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: #7F7F7F;


	.privacy-box {
		position: absolute;
		left: 50%;
		top: 50%;
		transform: translate(-50%, -50%);
		width: 560rpx;
		padding: 50rpx 45rpx 0;
		background: #fff;
		border-radius: 20rpx;

		.title {
			text-align: center;
			font-size: 32rpx;
			text-align: center;
			color: #333;
			font-weight: 700;
		}

		.content {
			margin-top: 20rpx;
			line-height: 1.5;
			font-size: 26rpx;
			color: #666;

			navigator {
				display: inline-block;
				color: #E93323;
			}
		}

		.btn-box {
			margin-top: 40rpx;
			text-align: center;
			font-size: 30rpx;

			.btn-item {
				height: 82rpx;
				line-height: 82rpx;
				background: linear-gradient(90deg, #F67A38 0%, #F11B09 100%);
				color: #fff;
				border-radius: 41rpx;
			}

			.btn {
				padding: 30rpx 0;
			}
		}
	}
}

.error-network {
	position: fixed;
	left: 0;
	top: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	height: 100%;
	padding-top: 40rpx;
	background: #fff;

	image {
		width: 414rpx;
		height: 336rpx;
	}

	.title {
		position: relative;
		top: -40rpx;
		font-size: 32rpx;
		color: #666;
	}

	.con {
		font-size: 24rpx;
		color: #999;

		.label {
			margin-bottom: 20rpx;
		}

		.item {
			margin-bottom: 20rpx;
		}
	}

	.btn {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 508rpx;
		height: 86rpx;
		margin-top: 100rpx;
		border: 1px solid #D74432;
		color: #E93323;
		font-size: 30rpx;
		border-radius: 120rpx;
	}
}

.sort-product {
	margin-top: 20rpx;

	.sort-box {
		display: flex;
		width: 100%;
		border-radius: 16rpx;
		padding: 30rpx 0;

		.sort-item {
			width: 20%;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			flex-shrink: 0;

			image {
				width: 90rpx;
				height: 90rpx;
				border-radius: 50%;
			}

			.txt {
				color: #272727;
				font-size: 24rpx;
				margin-top: 10rpx;
				overflow: hidden;
				white-space: nowrap;
				text-overflow: ellipsis;
				width: 140rpx;
				text-align: center;
			}

			.pictrues {
				width: 90rpx;
				height: 90rpx;
				background: #f8f8f8;
				border-radius: 50%;
				margin: 0 auto;
			}

			.icon-gengduo1 {
				color: #333;
			}

			&.on {
				.txt {
					color: #fc4141;
				}

				image {
					border: 1px solid #fc4141;
				}
			}
		}
	}

	.product-list {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		margin-top: 30rpx;
		padding: 0 20rpx;

		.product-item {
			position: relative;
			width: 344rpx;
			background: #fff;
			border-radius: 10rpx;
			margin-bottom: 20rpx;
			display: flex;
			flex-direction: column;

			image {
				width: 100%;
				height: 344rpx;
				border-radius: 10rpx 10rpx 0 0;
			}

			.info {
				flex: 1;
				padding: 14rpx 16rpx;
				display: flex;
				flex-direction: column;
				justify-content: space-between;

				.title {
					font-size: 28rpx;
				}

				.price-box {
					font-size: 34rpx;
					font-weight: 700;
					margin-top: 8px;
					color: #fc4141;

					text {
						font-size: 26rpx;
					}
				}
			}
		}
	}
}

.emptyBox {
	text-align: center;
	padding-top: 20rpx;

	.tips {
		color: #aaa;
		font-size: 26rpx;
		padding-bottom: 20rpx;
	}

	image {
		width: 414rpx;
		height: 304rpx;
	}
}

.site-config {
	margin-top: 40rpx;
	font-size: 24rpx;
	text-align: center;
	color: #666;

	&.fixed {
		position: fixed;
		bottom: 69px;
		left: 0;
		width: 100%;
	}
}

.page-footer {
	position: fixed;
	bottom: 0;
	z-index: 30;
	display: flex;
	align-items: center;
	justify-content: space-around;
	width: 100%;
	height: calc(98rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
	height: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
	box-sizing: border-box;
	border-top: solid 1rpx #F3F3F3;
	background-color: #fff;
	box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
	padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
	padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/

	.foot-item {
		display: flex;
		width: max-content;
		align-items: center;
		justify-content: center;
		flex-direction: column;
		position: relative;

		.count-num {
			position: absolute;
			display: flex;
			justify-content: center;
			align-items: center;
			width: 40rpx;
			height: 40rpx;
			top: 0rpx;
			right: -15rpx;
			color: #fff;
			font-size: 20rpx;
			background-color: #FD502F;
			border-radius: 50%;
			padding: 4rpx;
		}
	}

	.foot-item image {
		height: 50rpx;
		width: 50rpx;
		text-align: center;
		margin: 0 auto;
	}

	.foot-item .txt {
		font-size: 24rpx;


		&.active {}
	}
}
</style>
