mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-28 21:40:50 +00:00
【模版目录】更新模版文件
This commit is contained in:
parent
16b8cdcb7c
commit
d0ce7c66a0
BIN
template/admin/public/image/logo-small.png
Normal file
BIN
template/admin/public/image/logo-small.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
@ -5,6 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<link rel="manifest" href="./manifest.json">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
13
template/admin/public/manifest.json
Normal file
13
template/admin/public/manifest.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"name":"CRMEB",
|
||||
"display":"standalone",
|
||||
"start_url":".",
|
||||
"id": "index.html",
|
||||
"background_color": "#999",
|
||||
"theme_color":"#292d3e",
|
||||
"icons":[{
|
||||
"src":"./image/logo-small.png",
|
||||
"sizes":"144x144",
|
||||
"type":"image/png"
|
||||
}]
|
||||
}
|
||||
@ -1,8 +1,8 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 1945396 */
|
||||
src: url('//at.alicdn.com/t/c/font_1945396_6gitgc05gen.woff2?t=1712912127437') format('woff2'),
|
||||
url('//at.alicdn.com/t/c/font_1945396_6gitgc05gen.woff?t=1712912127437') format('woff'),
|
||||
url('//at.alicdn.com/t/c/font_1945396_6gitgc05gen.ttf?t=1712912127437') format('truetype');
|
||||
src: url('//at.alicdn.com/t/c/font_1945396_qp61r9cscmj.woff2?t=1719814295530') format('woff2'),
|
||||
url('//at.alicdn.com/t/c/font_1945396_qp61r9cscmj.woff?t=1719814295530') format('woff'),
|
||||
url('//at.alicdn.com/t/c/font_1945396_qp61r9cscmj.ttf?t=1719814295530') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
@ -13,6 +13,18 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.iconrequ1:before {
|
||||
content: "\e830";
|
||||
}
|
||||
|
||||
.iconrequ:before {
|
||||
content: "\e82f";
|
||||
}
|
||||
|
||||
.iconicon_Like_2:before {
|
||||
content: "\e7e1";
|
||||
}
|
||||
|
||||
.iconic_mall:before {
|
||||
content: "\e797";
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-if="FromData">
|
||||
<el-dialog :visible.sync="modals" :title="FromData.title" :z-index="1" width="720px" @closed="cancel">
|
||||
<el-dialog :visible.sync="modals" :title="FromData.title" width="720px" @closed="cancel">
|
||||
<template>
|
||||
<div class="radio acea-row row-middle" v-if="FromData.action === '/marketing/coupon/save.html'">
|
||||
<div class="name ivu-form-item-content">优惠券类型</div>
|
||||
|
||||
@ -225,7 +225,7 @@ export default {
|
||||
name: 'home_goods_list',
|
||||
cname: '商品列表',
|
||||
configName: 'c_home_goods_list',
|
||||
icon: 'iconcuxiaoliebiao1',
|
||||
icon: 'iconshangpinliebiao1',
|
||||
type: 0, // 0 基础组件 1 营销组件 2工具组件
|
||||
defaultName: 'goodList', // 外面匹配名称
|
||||
props: {
|
||||
|
||||
@ -37,7 +37,7 @@ export default {
|
||||
name: 'home_hotspot',
|
||||
cname: '热区',
|
||||
configName: 'c_hotspot',
|
||||
icon: 'icontupianguanggao1',
|
||||
icon: 'iconrequ1',
|
||||
type: 0, // 0 基础组件 1 营销组件 2工具组件
|
||||
defaultName: 'hotspot', // 外面匹配名称
|
||||
props: {
|
||||
|
||||
@ -80,7 +80,7 @@ export default {
|
||||
name: 'picture_cube',
|
||||
cname: '图片魔方',
|
||||
configName: 'c_picture_cube',
|
||||
icon: 'iconcuxiaoliebiao1',
|
||||
icon: 'iconshangpinfenlei1',
|
||||
type: 0, // 0 基础组件 1 营销组件 2工具组件
|
||||
defaultName: 'pictureCube', // 外面匹配名称
|
||||
props: {
|
||||
|
||||
@ -101,6 +101,11 @@
|
||||
<div>{{ scope.row.extract_fee }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到账金额" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<div class="f-price">{{ scope.row.receive_price }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="提现方式" min-width="130">
|
||||
<template slot-scope="scope">
|
||||
<div class="type" v-if="scope.row.extract_type === 'bank'">
|
||||
@ -436,4 +441,11 @@ export default {
|
||||
img
|
||||
width 100%
|
||||
height 100%
|
||||
.z-price {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.f-price {
|
||||
color: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
<el-form-item label="物流方式:" prop="logistics">
|
||||
<el-checkbox-group v-model="formValidate.logistics">
|
||||
<el-checkbox label="1">快递</el-checkbox>
|
||||
<el-checkbox label="2">到店核销</el-checkbox>
|
||||
<el-checkbox label="2">到店</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -122,7 +122,6 @@
|
||||
:inactive-value="0"
|
||||
v-model="scope.row.status"
|
||||
:value="scope.row.status"
|
||||
:disabled="scope.row.stop_status ? true : false"
|
||||
@change="onchangeIsShow(scope.row)"
|
||||
size="large"
|
||||
>
|
||||
@ -377,6 +376,7 @@ export default {
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$message.error(res.msg);
|
||||
row.status = !row.status
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
@ -119,7 +119,7 @@
|
||||
<el-form-item label="物流方式:" prop="logistics">
|
||||
<el-checkbox-group v-model="formValidate.logistics">
|
||||
<el-checkbox label="1">快递</el-checkbox>
|
||||
<el-checkbox label="2">到店核销</el-checkbox>
|
||||
<el-checkbox label="2">到店</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -123,7 +123,6 @@
|
||||
:inactive-value="0"
|
||||
v-model="scope.row.is_show"
|
||||
:value="scope.row.is_show"
|
||||
:disabled="scope.row.stop_status ? true : false"
|
||||
@change="onchangeIsShow(scope.row)"
|
||||
size="large"
|
||||
active-text="上架"
|
||||
@ -310,6 +309,7 @@ export default {
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$message.error(res.msg);
|
||||
row.is_show = !row.is_show
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
@ -66,7 +66,7 @@
|
||||
<el-form-item label="物流方式:" prop="logistics">
|
||||
<el-checkbox-group v-model="formValidate.logistics">
|
||||
<el-checkbox label="1">快递</el-checkbox>
|
||||
<el-checkbox label="2">到店核销</el-checkbox>
|
||||
<el-checkbox label="2">到店</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -359,6 +359,7 @@ export default {
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$message.error(res.msg);
|
||||
row.status = !row.status
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
@ -707,7 +707,7 @@
|
||||
<el-form-item label="物流方式:" prop="logistics">
|
||||
<el-checkbox-group v-model="formValidate.logistics" @change="logisticsBtn">
|
||||
<el-checkbox label="1">快递</el-checkbox>
|
||||
<el-checkbox label="2">到店核销</el-checkbox>
|
||||
<el-checkbox label="2">到店</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -221,7 +221,7 @@
|
||||
<el-form-item label="物流方式:" prop="logistics">
|
||||
<el-checkbox-group v-model="batchFormData.logistics" @change="logisticsBtn">
|
||||
<el-checkbox label="1">快递</el-checkbox>
|
||||
<el-checkbox label="2">到店核销</el-checkbox>
|
||||
<el-checkbox label="2">到店</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="运费设置:">
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<el-card class="h100" :bordered="false" shadow="never" v-if="cardShow == 0">
|
||||
<div class="acea-row">
|
||||
<div class="acea-row no-warp">
|
||||
<div class="iframe-col">
|
||||
<iframe class="iframe-box" :src="iframeUrl" frameborder="0" ref="iframe"></iframe>
|
||||
<div class="mask"></div>
|
||||
@ -447,6 +447,9 @@ export default {
|
||||
background-color: #fff;
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
.no-warp{
|
||||
flex-wrap: nowrap !important;
|
||||
}
|
||||
::v-deep .el-card__body{
|
||||
padding: 40px;
|
||||
}
|
||||
@ -456,6 +459,7 @@ export default {
|
||||
|
||||
.iframe-col {
|
||||
width: 375px;
|
||||
min-width: 375px;
|
||||
height: 650px;
|
||||
margin-right: 30px;
|
||||
position: relative;
|
||||
|
||||
@ -618,7 +618,7 @@ export default {
|
||||
.save {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: -30px;
|
||||
bottom: -10px;
|
||||
z-index: 99;
|
||||
}
|
||||
}
|
||||
|
||||
@ -258,18 +258,18 @@ export default {
|
||||
uni.setStorageSync('copyRight', res.data);
|
||||
});
|
||||
// #ifdef MP
|
||||
getSystemVersion().then((res) => {
|
||||
if (res.data.version_code != SYSTEM_VERSION) {
|
||||
uni.showModal({
|
||||
title: '警告',
|
||||
content: '前后端版本不一致!',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
// getSystemVersion().then((res) => {
|
||||
// if (res.data.version_code != SYSTEM_VERSION) {
|
||||
// uni.showModal({
|
||||
// title: '警告',
|
||||
// content: '前后端版本不一致!',
|
||||
// success: function (res) {
|
||||
// if (res.confirm) {
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// #endif
|
||||
},
|
||||
// #ifdef H5
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
"name" : "CRMEB标准版",
|
||||
"appid" : "__UNI__A3F1ED4",
|
||||
"description" : "CRMEB标准版",
|
||||
"versionName" : "5.3.0",
|
||||
"versionCode" : 530,
|
||||
"versionName" : "5.4.0",
|
||||
"versionCode" : 540,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
||||
@ -484,7 +484,6 @@
|
||||
// #endif
|
||||
if (options.hasOwnProperty('id')) {
|
||||
this.id = options.id
|
||||
// app.globalData.openPages = '/pages/activity/goods_combination_details/index?id=' + this.id + '&spid=' + this.userInfo.uid;
|
||||
if (this.isLogin) {
|
||||
this.combinationDetail();
|
||||
} else {
|
||||
@ -858,9 +857,6 @@
|
||||
// 授权后回调
|
||||
onLoadFun: function(e) {
|
||||
this.userInfo = e
|
||||
app.globalData.openPages = '/pages/activity/goods_combination_details/index?id=' + this.id + '&spid=' +
|
||||
e.uid;
|
||||
// this.downloadFilePromotionCode();
|
||||
this.combinationDetail();
|
||||
},
|
||||
selecAttr: function() {
|
||||
@ -1261,7 +1257,7 @@
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: this.storeInfo.title,
|
||||
path: app.globalData.openPages,
|
||||
path: '/pages/activity/goods_combination_details/index?id=' + this.id + '&spid=' + this.$store.state.app.uid,
|
||||
imageUrl: this.storeInfo.image
|
||||
};
|
||||
}
|
||||
|
||||
@ -235,7 +235,6 @@
|
||||
handler: function(newV, oldV) {
|
||||
if (newV) {
|
||||
this.userInfo = newV;
|
||||
app.globalData.openPages = '/pages/activity/goods_combination_status/index?id=' + this.pinkId;
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
@ -269,7 +268,7 @@
|
||||
let that = this;
|
||||
return {
|
||||
title: that.$t(`您的好友`) + that.userInfo.nickname + this.$t(`邀请您参团`) + that.storeCombination.title,
|
||||
path: app.globalData.openPages,
|
||||
path: '/pages/activity/goods_combination_status/index?id=' + that.pinkId,
|
||||
imageUrl: that.storeCombination.image
|
||||
};
|
||||
},
|
||||
@ -319,7 +318,6 @@
|
||||
// 授权后回调
|
||||
onLoadFun: function(e) {
|
||||
this.userInfo = e;
|
||||
app.globalData.openPages = '/pages/activity/goods_combination_status/index?id=' + this.pinkId;
|
||||
this.getCombinationPink();
|
||||
},
|
||||
/**
|
||||
|
||||
@ -605,11 +605,6 @@
|
||||
setTimeout(() => {
|
||||
that.infoScroll();
|
||||
}, 500);
|
||||
|
||||
app.globalData.openPages = '/pages/activity/goods_seckill_details/index?id=' + that.id +
|
||||
'&spid=' + that.storeInfo.uid;
|
||||
// wxParse.wxParse('description', 'html', that.data.storeInfo.description || '', that, 0);
|
||||
// wxh.time(that.data.time, that);
|
||||
}).catch(err => {
|
||||
that.$util.Tips({
|
||||
title: err
|
||||
@ -1141,7 +1136,7 @@
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: this.storeInfo.title,
|
||||
path: app.globalData.openPages,
|
||||
path: '/pages/activity/goods_seckill_details/index?id=' + this.id + '&spid=' + this.$store.state.app.uid,
|
||||
imageUrl: this.storeInfo.image
|
||||
};
|
||||
}
|
||||
|
||||
@ -178,7 +178,6 @@
|
||||
title: this.$t(`微信支付`),
|
||||
payStatus: true
|
||||
},
|
||||
// #ifdef H5 ||APP-PLUS
|
||||
{
|
||||
name: this.$t(`支付宝支付`),
|
||||
icon: 'icon-zhifubao',
|
||||
@ -186,7 +185,6 @@
|
||||
title: this.$t(`支付宝支付`),
|
||||
payStatus: true
|
||||
},
|
||||
// #endif
|
||||
{
|
||||
name: this.$t(`余额支付`),
|
||||
icon: 'icon-qiandai',
|
||||
|
||||
@ -1136,7 +1136,7 @@ export default {
|
||||
confirmOrder(orderId) {
|
||||
let that = this;
|
||||
// #ifdef MP
|
||||
if (wx.openBusinessView && this.orderInfo.order_shipping_open && this.orderInfo.trade_no) {
|
||||
if (wx.openBusinessView && this.orderInfo.order_shipping_open && this.orderInfo.trade_no && this.orderInfo.uid == this.orderInfo.pay_uid) {
|
||||
uni.showLoading({
|
||||
title: this.$t(`加载中`)
|
||||
});
|
||||
|
||||
@ -1,241 +1,250 @@
|
||||
<template>
|
||||
<view v-show="!isSortType && menus.length" :class="bgStyle?'borderRadius15':''"
|
||||
:style="{background:bgColor,margin:'0 '+prConfig*2+'rpx',marginTop:mbConfig*2+'rpx'}">
|
||||
<view v-if="isMany">
|
||||
<view class="swiper">
|
||||
<swiper :interval="interval" :duration="duration" :style="'height:'+(navHigh*2+17)+'rpx;'"
|
||||
@change='bannerfun'>
|
||||
<block>
|
||||
<swiper-item v-for="(item,indexw) in menuList" :key="indexw">
|
||||
<view class="nav acea-row" :id="'nav' + indexw">
|
||||
<view :style="'color:' + titleColor" class="item"
|
||||
:class="number===1?'four':number===2?'five':''" v-for="(itemn,indexn) in item.list"
|
||||
:key="indexn" @click="menusTap(itemn.info[1].value)">
|
||||
<view class="pictrue skeleton-radius" :class="menuStyle?'':'on'">
|
||||
<image :src="itemn.img" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="menu-txt">{{ $t(itemn.info[0].value) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
<view class="dot acea-row row-center-wrapper" v-if="docConfig<2">
|
||||
<view class="dot-item" :class="{ 'line_dot-item': docConfig === 0,'': docConfig === 1}"
|
||||
:style="active==index?'background:'+ dotColor:''" v-for="(item,index) in menuList"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="nav oneNav" v-else>
|
||||
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex" show-scrollbar="false">
|
||||
<block v-for="(item, index) in menus" :key="index">
|
||||
<view class="item" :style="'color:' + titleColor" @click="menusTap(item.info[1].value)">
|
||||
<view class="pictrue skeleton-radius" :class="menuStyle?'':'on'">
|
||||
<image :src="item.img" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="menu-txt">{{ $t(item.info[0].value) }}</view>
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'menus',
|
||||
props: {
|
||||
dataConfig: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
isSortType: {
|
||||
type: String | Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
interval: 3000,
|
||||
duration: 500,
|
||||
menus: this.dataConfig.menuConfig.list || [],
|
||||
titleColor: this.dataConfig.titleColor.color[0].item,
|
||||
mbConfig: this.dataConfig.mbConfig.val,
|
||||
rowsNum: this.dataConfig.rowsNum.type,
|
||||
number: this.dataConfig.number.type,
|
||||
isMany: this.dataConfig.tabConfig.tabVal,
|
||||
menuStyle: this.dataConfig.menuStyle.type,
|
||||
docConfig: this.dataConfig.pointerStyle.type,
|
||||
dotColor: this.dataConfig.pointerColor.color[0].item,
|
||||
bgColor: this.dataConfig.bgColor.color[0].item,
|
||||
bgStyle: this.dataConfig.bgStyle.type,
|
||||
prConfig: this.dataConfig.prConfig.val,
|
||||
navHigh: 0,
|
||||
menuList: [],
|
||||
active: 0
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
if (this.rowsNum === 0) {
|
||||
if (this.number === 0) {
|
||||
this.pageNum(6)
|
||||
} else if (this.number === 1) {
|
||||
this.pageNum(8)
|
||||
} else {
|
||||
this.pageNum(10)
|
||||
}
|
||||
} else if (this.rowsNum === 1) {
|
||||
if (this.number === 0) {
|
||||
this.pageNum(9)
|
||||
} else if (this.number === 1) {
|
||||
this.pageNum(12)
|
||||
} else {
|
||||
this.pageNum(15)
|
||||
}
|
||||
} else {
|
||||
if (this.number === 0) {
|
||||
this.pageNum(12)
|
||||
} else if (this.number === 1) {
|
||||
this.pageNum(16)
|
||||
} else {
|
||||
this.pageNum(20)
|
||||
}
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (this.menuList.length && this.isMany) {
|
||||
let that = this
|
||||
// #ifdef H5
|
||||
that.menuHeight()
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
setTimeout(() => {
|
||||
that.menuHeight()
|
||||
}, 100)
|
||||
// #endif
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
bannerfun(e) {
|
||||
this.active = e.detail.current;
|
||||
},
|
||||
menuHeight() {
|
||||
let that = this;
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select('#nav0').boundingClientRect(data => {
|
||||
that.navHigh = data.height;
|
||||
}).exec();
|
||||
},
|
||||
pageNum(num) {
|
||||
let count = Math.ceil(this.menus.length / num);
|
||||
let goodArray = new Array();
|
||||
for (let i = 0; i < count; i++) {
|
||||
let list = this.menus.slice(i * num, i * num + num);
|
||||
if (list.length)
|
||||
goodArray.push({
|
||||
list: list
|
||||
});
|
||||
}
|
||||
this.$set(this, 'menuList', goodArray);
|
||||
},
|
||||
menusTap(url) {
|
||||
this.$util.JumpPath(url);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.dot {
|
||||
width: 100%;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.instruct {
|
||||
width: 50rpx;
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
color: #fff;
|
||||
border-radius: 16rpx;
|
||||
font-size: 24rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dot-item {
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
background: rgba(0, 0, 0, .4);
|
||||
border-radius: 50%;
|
||||
margin: 0 4px;
|
||||
|
||||
&.line_dot-item {
|
||||
width: 20rpx;
|
||||
height: 5rpx;
|
||||
border-radius: 3rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nav {
|
||||
&.oneNav {
|
||||
padding-bottom: 25rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-top: 30rpx;
|
||||
width: 160rpx;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
display: inline-block;
|
||||
|
||||
.pictrue {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
margin: 0 auto;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
&.on {
|
||||
image {
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu-txt {
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.swiper {
|
||||
z-index: 20;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.nav {
|
||||
.item {
|
||||
width: 33.3333%;
|
||||
|
||||
&.four {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
&.five {
|
||||
width: 20%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
swiper,
|
||||
.swiper-item {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
<template>
|
||||
<view
|
||||
v-show="!isSortType && menus.length"
|
||||
:class="bgStyle ? 'borderRadius15' : ''"
|
||||
:style="{ background: bgColor, margin: '0 ' + prConfig * 2 + 'rpx', marginTop: mbConfig * 2 + 'rpx' }"
|
||||
>
|
||||
<view v-if="isMany">
|
||||
<view class="swiper">
|
||||
<swiper :interval="interval" :duration="duration" :style="'height:' + navHigh + 'px;'" @change="bannerfun">
|
||||
<swiper-item v-for="(item, indexw) in menuList" :key="indexw">
|
||||
<view class="nav acea-row" :id="'nav' + indexw">
|
||||
<view
|
||||
:style="'color:' + titleColor"
|
||||
class="item"
|
||||
:class="number === 1 ? 'four' : number === 2 ? 'five' : ''"
|
||||
v-for="(itemn, indexn) in item.list"
|
||||
:key="indexn"
|
||||
@click="menusTap(itemn.info[1].value)"
|
||||
>
|
||||
<view class="pictrue skeleton-radius" :class="menuStyle ? '' : 'on'">
|
||||
<image :src="itemn.img" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="menu-txt">{{ $t(itemn.info[0].value) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
<view class="dot acea-row row-center-wrapper" v-if="docConfig < 2">
|
||||
<view
|
||||
class="dot-item"
|
||||
:class="{ 'line_dot-item': docConfig === 0, '': docConfig === 1 }"
|
||||
:style="active == index ? 'background:' + dotColor : ''"
|
||||
v-for="(item, index) in menuList"
|
||||
></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="nav oneNav" v-else>
|
||||
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex" show-scrollbar="false">
|
||||
<block v-for="(item, index) in menus" :key="index">
|
||||
<view class="item" :style="'color:' + titleColor" @click="menusTap(item.info[1].value)">
|
||||
<view class="pictrue skeleton-radius" :class="menuStyle ? '' : 'on'">
|
||||
<image :src="item.img" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="menu-txt">{{ $t(item.info[0].value) }}</view>
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'menus',
|
||||
props: {
|
||||
dataConfig: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
isSortType: {
|
||||
type: String | Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
interval: 3000,
|
||||
duration: 500,
|
||||
menus: this.dataConfig.menuConfig.list || [],
|
||||
titleColor: this.dataConfig.titleColor.color[0].item,
|
||||
mbConfig: this.dataConfig.mbConfig.val,
|
||||
rowsNum: this.dataConfig.rowsNum.type,
|
||||
number: this.dataConfig.number.type,
|
||||
isMany: this.dataConfig.tabConfig.tabVal,
|
||||
menuStyle: this.dataConfig.menuStyle.type,
|
||||
docConfig: this.dataConfig.pointerStyle.type,
|
||||
dotColor: this.dataConfig.pointerColor.color[0].item,
|
||||
bgColor: this.dataConfig.bgColor.color[0].item,
|
||||
bgStyle: this.dataConfig.bgStyle.type,
|
||||
prConfig: this.dataConfig.prConfig.val,
|
||||
navHigh: 0,
|
||||
menuList: [],
|
||||
active: 0
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
if (this.rowsNum === 0) {
|
||||
if (this.number === 0) {
|
||||
this.pageNum(6);
|
||||
} else if (this.number === 1) {
|
||||
this.pageNum(8);
|
||||
} else {
|
||||
this.pageNum(10);
|
||||
}
|
||||
} else if (this.rowsNum === 1) {
|
||||
if (this.number === 0) {
|
||||
this.pageNum(9);
|
||||
} else if (this.number === 1) {
|
||||
this.pageNum(12);
|
||||
} else {
|
||||
this.pageNum(15);
|
||||
}
|
||||
} else {
|
||||
if (this.number === 0) {
|
||||
this.pageNum(12);
|
||||
} else if (this.number === 1) {
|
||||
this.pageNum(16);
|
||||
} else {
|
||||
this.pageNum(20);
|
||||
}
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (this.menuList.length && this.isMany) {
|
||||
let that = this;
|
||||
|
||||
setTimeout(() => {
|
||||
that.menuHeight();
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
bannerfun(e) {
|
||||
this.active = e.detail.current;
|
||||
},
|
||||
menuHeight() {
|
||||
let that = this;
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query
|
||||
.select('#nav0')
|
||||
.boundingClientRect((data) => {
|
||||
console.log(data.height);
|
||||
that.navHigh = data.height;
|
||||
})
|
||||
.exec();
|
||||
},
|
||||
pageNum(num) {
|
||||
let count = Math.ceil(this.menus.length / num);
|
||||
let goodArray = new Array();
|
||||
for (let i = 0; i < count; i++) {
|
||||
let list = this.menus.slice(i * num, i * num + num);
|
||||
if (list.length)
|
||||
goodArray.push({
|
||||
list: list
|
||||
});
|
||||
}
|
||||
this.$set(this, 'menuList', goodArray);
|
||||
},
|
||||
menusTap(url) {
|
||||
this.$util.JumpPath(url);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.dot {
|
||||
width: 100%;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.instruct {
|
||||
width: 50rpx;
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
color: #fff;
|
||||
border-radius: 16rpx;
|
||||
font-size: 24rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dot-item {
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
border-radius: 50%;
|
||||
margin: 0 4px;
|
||||
|
||||
&.line_dot-item {
|
||||
width: 20rpx;
|
||||
height: 5rpx;
|
||||
border-radius: 3rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nav {
|
||||
&.oneNav {
|
||||
padding-bottom: 25rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-top: 30rpx;
|
||||
width: 160rpx;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
display: inline-block;
|
||||
|
||||
.pictrue {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
margin: 0 auto;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
&.on {
|
||||
image {
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu-txt {
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.swiper {
|
||||
z-index: 20;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
padding-bottom: 30rpx;
|
||||
.nav {
|
||||
.item {
|
||||
width: 33.3333%;
|
||||
|
||||
&.four {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
&.five {
|
||||
width: 20%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
swiper,
|
||||
.swiper-item {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -417,11 +417,6 @@
|
||||
that.storeImage = that.storeInfo.image
|
||||
// #endif
|
||||
that.DefaultSelect();
|
||||
app.globalData.openPages = '/pages/activity/goods_seckill_details/index?id=' + that.id +
|
||||
'&time=' + that.time +
|
||||
'&status=' + that.status + '&scene=' + that.storeInfo.uid;
|
||||
// wxParse.wxParse('description', 'html', that.data.storeInfo.description || '', that, 0);
|
||||
// wxh.time(that.data.time, that);
|
||||
}).catch(err => {
|
||||
that.$util.Tips({
|
||||
title: err
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user