| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- <template>
- <!-- <swiper class="screen-swiper" :class="dotStyle?'square-dot':'round-dot'" :indicator-dots="true" :circular="true"
- :autoplay="false" interval="5000" duration="500">
- <swiper-item class="item">
-
- </swiper-item>
- </swiper> -->
- <view class="item">
- <view class="card" v-for="(item,index) in swiperList" :key="index" @click="jump(item)">
- <image :src="item.url" mode="aspectFill"
- :style="{width:item.name=='广告管理'?'52rpx':'56rpx',height:item.name=='广告管理'?'52rpx':'56rpx',}">
- </image>
- {{item.name}}
- </view>
- <!-- 弹窗 -->
- <Modal ref="myModal" :title="modalText.title" :content="modalText.content" :showCancelButton="false" />
- </view>
- </template>
- <script>
- import Modal from '@/components/modal/index.vue';
- export default {
- name: 'indexNav',
- components: {
- Modal,
- },
- data() {
- return {
- dotStyle: true,
- swiperList: [{
- name: '店铺设置',
- url: '/static/index/shop.png',
- path: '/pages/store/settings'
- },
- {
- name: '团餐活动',
- url: '/static/index/groupMeal.png',
- path: '/pages/groupMeal/goods/list'
- },
- {
- name: '优惠券',
- url: '/static/index/coupon.png',
- path: '/pages/coupon/coupon'
- },
- {
- name: '退款管理',
- url: '/static/index/refund.png'
- },
- {
- name: '订单管理',
- url: '/static/index/indent.png'
- },
- // {
- // name: '审核查询',
- // url: '/static/index/audit.png',
- // path: '/pages/store/examine'
- // },
- {
- name: '商品管理',
- url: '/static/index/product.png',
- path: '/pages/product/index'
- },
- {
- name: '提现管理',
- url: '/static/index/withdraw.png'
- },
- {
- name: '广告管理',
- url: '/static/index/ad.png',
- path: '/pages/adManagement/adlist'
- },
- {
- name: '秒杀活动',
- url: '/static/index/seckill.png'
- },
- {
- name: '客户评价',
- url: '/static/index/evaluate.png',
- path: '/pages/evaluate/evaluate'
- },
- {
- name: '全部服务',
- url: '/static/index/all.png',
- path: '/pages/index/full'
- },
- ],
- // 弹窗
- modalText: {
- title: '提示',
- btntext: '好的',
- // 很抱歉,您没有通过平台审核,如有疑问请联系平台客服。
- content: '报名成功,请等待平台审核'
- },
- }
- },
- methods: {
- jump(item) {
- // 需要先报名
- if (item.name === '团餐活动') {
- this.$http.post('/groupmeal/gmMerchantApplicationRecord/isApply', {}).then(res => {
- if (!res.data.result) {
- uni.navigateTo({
- url: '/pages/groupMeal/goods/index'
- });
- } else {
- let status = res.data.result.status;
- if (status == 1) {
- uni.navigateTo({
- url: item.path
- });
- } else {
- this.modalText.content = status == 2 ? '很抱歉,您没有通过平台审核,如有疑问请联系平台客服。' :
- '团餐活动报名审核中,请耐心等待';
- this.$refs.myModal.onOpen();
- }
- }
- });
- return;
- }
- if (!item.path) return;
- uni.navigateTo({
- url: item.path
- });
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .item {
- width: 100%;
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- }
- .card {
- width: 20%;
- display: flex;
- flex-direction: column;
- flex-wrap: wrap;
- justify-content: space-between;
- align-items: center;
- font-size: 24rpx;
- image {
- width: 56rpx;
- height: 56rpx;
- margin-bottom: 4rpx;
- }
- }
- .card:nth-child(-n+5) {
- margin-bottom: 40rpx;
- }
- ::v-deep .uni-swiper-wrapper {
- -webkit-transform: translate3d(0px, 0, 0);
- -moz-transform: translate3d(0px, 0, 0);
- -o-transform: translate(0px, 0px);
- -ms-transform: translate3d(0px, 0, 0);
- transform: translate3d(0px, 0, 0);
- }
- </style>
|