|
@@ -0,0 +1,161 @@
|
|
|
+<template>
|
|
|
+ <view class="apps-box">
|
|
|
+ <view class="item" v-for="item in list" :key="item.label" hover-class="navigator-hover" @click="onClick(item)">
|
|
|
+ <view class="label">
|
|
|
+ {{ item.label }}
|
|
|
+ <view class="backg" :style="{ background: item.color }" />
|
|
|
+ </view>
|
|
|
+ <view class="introduce u-line-2">
|
|
|
+ {{ item.introduce }}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ name: "apps",
|
|
|
+ props: {
|
|
|
+ appsToPage: {
|
|
|
+ type: Function
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ list: [{
|
|
|
+ label: "单品",
|
|
|
+ introduce: "电器 / 吊顶 / 墙面 / 木制品 \n渠道 / 工程",
|
|
|
+ itemId: "cloud"
|
|
|
+ }, {
|
|
|
+ label: "商品",
|
|
|
+ introduce: "总部直通车 千万大返利",
|
|
|
+ }, {
|
|
|
+ label: "图库",
|
|
|
+ introduce: "电器 / 厨卫 / 阳台 / 背景墙 /顶墙",
|
|
|
+ itemId: "index",
|
|
|
+ page: "案例",
|
|
|
+ params: {
|
|
|
+ active: '图库'
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ label: "实景/设计分享图",
|
|
|
+ introduce: "总部精选 / 实景图 / 设计图",
|
|
|
+ itemId: "index",
|
|
|
+ page: "案例",
|
|
|
+ params: {
|
|
|
+ active: '实景案例'
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ label: "资料库",
|
|
|
+ introduce: "单品 / 通知 / 介绍 / 画册 / 物料\n视频 / 说明书等",
|
|
|
+ itemId: "cloud",
|
|
|
+ }, {
|
|
|
+ label: "商学院",
|
|
|
+ introduce: "产品 / 销售 / 管理 / 设计 / 考试等",
|
|
|
+ itemId: "cloud",
|
|
|
+ }, {
|
|
|
+ label: "6C红人服务",
|
|
|
+ introduce: "装修报价 / 老房改造 / 精装房焕新\n品质服务",
|
|
|
+ path: "/packageA/advertising/shareable?id=465"
|
|
|
+ }, {
|
|
|
+ label: "免费设计",
|
|
|
+ introduce: "0元领取全屋顶墙设计方案\n免费量尺寸 / 免费设计",
|
|
|
+ path: "/packageA/advertising/shareable?id=147"
|
|
|
+ }, {
|
|
|
+ label: "视频",
|
|
|
+ introduce: "品牌 / 产品 / 安装 / 服务等视频",
|
|
|
+ itemId: "index",
|
|
|
+ }, {
|
|
|
+ label: "云C+工作台",
|
|
|
+ introduce: "预约名单 / 人员管理 / 活动 \n门店 / 商城管理 / 排行榜等",
|
|
|
+ }],
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.dye(this.list)
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ onClick(item) {
|
|
|
+ if (item.itemId) {
|
|
|
+ this.$emit("appsToPage", item.itemId, item.page || item.label, item.params || '')
|
|
|
+ } else if (item.path) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: item.path,
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: "功能尚在开发中",
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ dye(list, num = 2) {
|
|
|
+ let colors = ['linear-gradient( 270deg, rgba(255,255,255,0) 0%, #E18FFA 100%)',
|
|
|
+ "linear-gradient( 270deg, rgba(255,255,255,0) 0%, #FD8C90 100%)",
|
|
|
+ "linear-gradient( 270deg, rgba(255,255,255,0) 0%, #9191FA 100%)",
|
|
|
+ "linear-gradient( 270deg, rgba(255,255,255,0) 0%, #8CD6F7 100%)",
|
|
|
+ "linear-gradient( 270deg, rgba(255,255,255,0) 0%, #5CD96B 100%)",
|
|
|
+ "linear-gradient( 270deg, rgba(255,255,255,0) 0%, #D4D418 100%)"],
|
|
|
+ count = num - 1,
|
|
|
+ index = 0;
|
|
|
+ this.list = list.map((v, i) => {
|
|
|
+ if (i > count) {
|
|
|
+ count += num;
|
|
|
+ index += 1;
|
|
|
+ }
|
|
|
+ v.color = colors[index % colors.length]
|
|
|
+ return v
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.apps-box {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ padding: 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding-top: 0;
|
|
|
+
|
|
|
+ .item {
|
|
|
+ width: 173px;
|
|
|
+ height: 94px;
|
|
|
+ background: #FFFFFF;
|
|
|
+ border-radius: 8px;
|
|
|
+ margin-top: 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 15px;
|
|
|
+ padding-right: 10px;
|
|
|
+
|
|
|
+ .label {
|
|
|
+ position: relative;
|
|
|
+ line-height: 24px;
|
|
|
+ font-family: Source Han Sans SC, Source Han Sans SC;
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #333333;
|
|
|
+
|
|
|
+ .backg {
|
|
|
+ position: absolute;
|
|
|
+ width: 40px;
|
|
|
+ height: 6px;
|
|
|
+ border-radius: 5px;
|
|
|
+ left: 0;
|
|
|
+ bottom: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .introduce {
|
|
|
+ line-height: 15px;
|
|
|
+ font-family: Source Han Sans SC, Source Han Sans SC;
|
|
|
+ font-size: 10px;
|
|
|
+ color: #999999;
|
|
|
+ margin-top: 10px;
|
|
|
+ white-space: pre-wrap;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|