|
@@ -1,9 +1,9 @@
|
|
<template>
|
|
<template>
|
|
<view v-if="template">
|
|
<view v-if="template">
|
|
- <s-layout title="首页" navbar="custom" tabbar="/pages/index/index" :bgStyle="template.style?.background"
|
|
|
|
|
|
+ <s-layout title="首页" navbar="custom" tabbar="/pages/index/index" :bgStyle="template.page"
|
|
:navbarStyle="template.style?.navbar" onShareAppMessage>
|
|
:navbarStyle="template.style?.navbar" onShareAppMessage>
|
|
- <s-block v-for="(item, index) in template.data" :key="index" :styles="item.style">
|
|
|
|
- <s-block-item :type="item.type" :data="item.data" :styles="item.style" />
|
|
|
|
|
|
+ <s-block v-for="(item, index) in template.components" :key="index" :styles="item.style">
|
|
|
|
+ <s-block-item :type="item.id" :data="item.property" :styles="item.property.style" />
|
|
</s-block>
|
|
</s-block>
|
|
<!-- 广告模块 -->
|
|
<!-- 广告模块 -->
|
|
<s-popup-image />
|
|
<s-popup-image />
|
|
@@ -22,25 +22,10 @@
|
|
} from '@dcloudio/uni-app';
|
|
} from '@dcloudio/uni-app';
|
|
import sheep from '@/sheep';
|
|
import sheep from '@/sheep';
|
|
import $share from '@/sheep/platform/share';
|
|
import $share from '@/sheep/platform/share';
|
|
- import index2Api from '@/sheep/api/index2';
|
|
|
|
// 隐藏原生tabBar
|
|
// 隐藏原生tabBar
|
|
uni.hideTabBar();
|
|
uni.hideTabBar();
|
|
|
|
|
|
const template = computed(() => sheep.$store('app').template?.home);
|
|
const template = computed(() => sheep.$store('app').template?.home);
|
|
- // 在此处拦截改变一下首页轮播图 此处先写死后期复活
|
|
|
|
- (async function() {
|
|
|
|
- let {
|
|
|
|
- data
|
|
|
|
- } = await index2Api.decorate();
|
|
|
|
- template.value.data[0].data.list = JSON.parse(data[0].value).map(item => {
|
|
|
|
- return {
|
|
|
|
- src: item.picUrl,
|
|
|
|
- url: item.url,
|
|
|
|
- title: item.name,
|
|
|
|
- type: "image"
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }())
|
|
|
|
|
|
|
|
onLoad((options) => {
|
|
onLoad((options) => {
|
|
// #ifdef MP
|
|
// #ifdef MP
|
|
@@ -81,4 +66,4 @@
|
|
onPageScroll(() => {});
|
|
onPageScroll(() => {});
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style></style>
|
|
|
|
|
|
+<style></style>
|