1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177 |
- <template>
- <view>
- <headerSerch :dataConfig="headItem"></headerSerch>
- <view class="header-group">
- <view class="tabs">
- <u-tabs :list="navigationList" @click="clickNav" lineColor="#FFD373" :inactiveStyle="{ color: '#FFF' }"
- :activeStyle="{ color: '#FFD373', fontWeight: 'bold' }" keyName="title"></u-tabs>
- </view>
- </view>
- <view v-if="!isLogin">
- <u-skeleton :loading="true" rows="20" :animate="true"></u-skeleton>
- </view>
- <view v-else>
- <!-- 内容切换 -->
- <view class="tab-content" v-if="current == 0">
- <!-- 轮播 -->
- <view class="swiper-group">
- <u-swiper :list="swiperList" indicator indicatorMode="line" circular></u-swiper>
- </view>
- <!-- 宫格 -->
- <view class="grid-box">
- <view class="grid-group">
- <view class="grid-item">
- <image src="../../../static/menus/miaosha.png" mode="aspectFit"
- @click="menusTap('共富1580', 8)">
- </image>
- <text>共富1580</text>
- </view>
- <view class="grid-item">
- <image src="../../../static/menus/hongbao.png" mode="aspectFit"
- @click="menusTap('红包商城', 3)">
- </image>
- <text>红包商城</text>
- </view>
- <view class="grid-item">
- <image src="../../../static/menus/jifeng.png" mode="aspectFit" @click="menusTap('积分专区', 1)">
- </image>
- <text>积分专区</text>
- </view>
- <view class="grid-item">
- <image src="../../../static/menus/chuangke.png" mode="aspectFit"
- @click="menusTap('创客专区', 4)">
- </image>
- <text>创客专区</text>
- </view>
- <view class="grid-item">
- <image src="../../../static/menus/chengshihehuoren.png" mode="aspectFit"
- @click="menusTap('城市合伙人', 5)">
- </image>
- <text>城市合伙人</text>
- </view>
- <view class="grid-item">
- <image src="../../../static/menus/jifengdikou.png" mode="aspectFit"
- @click="menusTap('积分抵扣专区', 2)">
- </image>
- <text>抵扣专区</text>
- </view>
- </view>
- </view>
- <!-- 通知 -->
- <view class="notice">
- <u-notice-bar :text="notice" direction="column" duration="3000" @click="goNoticeDetail($event)">
- </u-notice-bar>
- </view>
- <!-- 通知弹框 -->
- <view>
- <u-modal :show="noticeShow" title="通告" confirmText="我已知晓" confirmColor="#FABA59"
- @confirm="noticeClose">
- <view class="slot-content">
- <rich-text :nodes="noticeContent"></rich-text>
- </view>
- </u-modal>
- </view>
- <!-- 爆款专区 -->
- <view class="sale-group">
- <view class="sale-content">
- <view class="title">爆款专区 <view class="more">
- </view>
- </view>
- <view class="goods-scroll">
- <scroll-view scroll-x="true" v-if="tempArrBao.length > 0">
- <view class="goods-item" v-for="(item, index) in tempArrBao" :key="index"
- @click="goDetail(item)">
- <image :src="item.goodsCover" mode="aspectFit"></image>
- <view class="goods-name">
- <u-text prefixIcon="bookmark"
- iconStyle="font-size: 16px; color:red;min-height: 30px;" :lines="2" bold
- block size="12" :text="item.goodsName"></u-text>
- <view class="tags">赠送{{ item.obtainIntegral }}红积分</view>
- <view class="price">¥{{ item.salePrice - 0 }}</view>
- </view>
- </view>
- </scroll-view>
- <u-empty v-else mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png" />
- </view>
- </view>
- </view>
- <!-- 商品推荐列表 -->
- <view class="goods-list">
- <view class="title">
- <view class="line"></view>
- 商品推荐
- <view class="line"></view>
- </view>
- <goodListMall @changeTab="changeTab" :tempArr="tempArr" :iSshowH="false" @detail="goDetail"
- :isSortType="isSortType"></goodListMall>
- </view>
- </view>
- <view class="tab-content" v-show="current >= 1">
- <!-- 轮播 -->
- <view class="swiper-group">
- <u-swiper :list="swiperTabList.length == 0 ? swiperList : swiperTabList" indicator
- indicatorMode="line" circular></u-swiper>
- </view>
- <!-- 商品列表 -->
- <goodListMall @changeTab="changeTab" :iSshowH="true" @detail="goDetail" :currentId="currentId"
- :isSortType="isSortType" ref="goodTablist"></goodListMall>
- </view>
- </view>
- </view>
- </template>
- <script>
- import headerSerch from './components/headerSerch';
- import goodListMall from './components/goodListMall';
- import {
- toLogin
- } from '@/libs/login.js';
- import {
- mapGetters
- } from "vuex";
- import {
- getAdsList, getNoticeList, getCategoryOne,
- getGoodsPage, getIndexData, getGoodsInfo
- } from '../../../api/home.js'
- import {
- goShopDetail
- } from '@/libs/order.js';
- export default {
- components: {
- headerSerch,
- goodListMall
- },
- data() {
- return {
- currentId: '',
- noticeShow: false,
- noticeContent: '',
- tempArr: [],
- where: {
- zoneType: 8,
- current: 1,
- size: 20,
- },
- tempArrBao: [
- {
- "id": 72,
- "image": "https://demo26.crmeb.net/uploads/attach/2021/11/20211112/mid_1608a6e46f559f11328c544fa05ea10b.png",
- "store_name": "COACH/蔻驰女士swinger腋下包单肩包麻将包豌豆包",
- "store_info": "COACH/蔻驰女士swinger腋下包单肩包麻将包豌豆包",
- "cate_id": "79",
- "price": "3000.00",
- "ot_price": "2900.00",
- "sales": "226",
- "unit_name": "件",
- "sort": 446,
- "activity": [],
- "stock": 258,
- "vip_price": 0,
- "is_vip": 0,
- "couponId": [],
- "star": [
- {
- "product_score": 5,
- "product_id": 72
- }
- ],
- "checkCoupon": false
- },
- {
- "id": 119,
- "image": "https://demo26.crmeb.net/uploads/attach/2021/12/10/mid_738c68638ab29effeff2e98365ec6dd6.jpg",
- "store_name": "微星(MSI)GK50Z 机械键盘 红轴 RGB光效 有线 游戏电竞办公键盘 104键 吃鸡键盘 黑色",
- "store_info": "ceshi123",
- "cate_id": "38",
- "price": "0.01",
- "ot_price": "199.00",
- "sales": "135",
- "unit_name": "件",
- "sort": 999,
- "activity": [],
- "stock": 24855,
- "vip_price": 0,
- "is_vip": 0,
- "couponId": [
- {
- "id": 23,
- "product_id": 119,
- "issue_coupon_id": 218,
- "title": "",
- "add_time": 1664522680
- }
- ],
- "star": [
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 4,
- "product_id": 119
- },
- {
- "product_score": 4,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 4,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 2,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 3,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 4,
- "product_id": 119
- },
- {
- "product_score": 4,
- "product_id": 119
- },
- {
- "product_score": 3,
- "product_id": 119
- },
- {
- "product_score": 4,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 4,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 4,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 4,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 4,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 4,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 2,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- },
- {
- "product_score": 5,
- "product_id": 119
- }
- ],
- "checkCoupon": false
- },
- {
- "id": 41,
- "image": "http://demo26.crmeb.net/uploads/attach/2020/10/13/a23b5bc300cc6a965082368f8c657b3d.jpg",
- "store_name": "华为智选摄像头智能家居监控器无线高清网络摄像头家用全景智能摄像机1080P夜间清晰人像AI智能看护",
- "store_info": "华为智选摄像头智能家居监控器无线高清网络摄像头家用全景智能摄像机1080P夜间清晰人像AI智能看护",
- "cate_id": "11,21",
- "price": "500.00",
- "ot_price": "1000.00",
- "sales": "94",
- "unit_name": "件",
- "sort": 0,
- "activity": [],
- "stock": 1981,
- "vip_price": 0,
- "is_vip": 0,
- "couponId": [],
- "star": [],
- "checkCoupon": false
- },
- {
- "id": 51,
- "image": "http://demo26.crmeb.net/uploads/attach/2020/10/20201014/118bccc3d5499881dd7178c43ebb9346.jpg",
- "store_name": "极度空间 中秋贺卡 生日卡片 创意3D明信片感恩卡*10",
- "store_info": "极度空间 中秋贺卡 生日卡片 创意3D明信片感恩卡*10",
- "cate_id": "40,34",
- "price": "100.00",
- "ot_price": "1000.00",
- "sales": "39",
- "unit_name": "件",
- "sort": 0,
- "activity": [],
- "stock": 761,
- "vip_price": 0,
- "is_vip": 0,
- "couponId": [],
- "star": [
- {
- "product_score": 5,
- "product_id": 51
- }
- ],
- "checkCoupon": true
- },
- {
- "id": 89,
- "image": "https://demo26.crmeb.net/uploads/attach/2021/11/20211113/mid_2fbe723632427b0768df24c4f23c6cad.png",
- "store_name": "家居梵高系列联名款饭盒袋大容量手拎保温实用方便 星月夜饭盒袋",
- "store_info": "",
- "cate_id": "35",
- "price": "350.00",
- "ot_price": "300.00",
- "sales": "19",
- "unit_name": "件",
- "sort": 553,
- "activity": [],
- "stock": 185,
- "vip_price": 0,
- "is_vip": 0,
- "couponId": [],
- "star": [
- {
- "product_score": 5,
- "product_id": 89
- }
- ],
- "checkCoupon": false
- },
- {
- "id": 45,
- "image": "http://demo26.crmeb.net/uploads/attach/2020/10/20201014/1bfcaad092adb917739ec681f55fb255.jpg",
- "store_name": "Adidas阿迪达斯男装 2020秋季新款运动服户外跑步训练健身透气舒适时尚休闲夹克外套GD5462 GD5462 L",
- "store_info": "Adidas阿迪达斯男装 2020秋季新款运动服户外跑步训练健身透气舒适时尚休闲夹克外套GD5462 GD5462 L",
- "cate_id": "26,27,50,54",
- "price": "200.00",
- "ot_price": "500.00",
- "sales": "11",
- "unit_name": "件",
- "sort": 0,
- "activity": [],
- "stock": 4984,
- "vip_price": "120.00",
- "is_vip": 1,
- "couponId": [],
- "star": [
- {
- "product_score": 5,
- "product_id": 45
- },
- {
- "product_score": 5,
- "product_id": 45
- },
- {
- "product_score": 2,
- "product_id": 45
- }
- ],
- "checkCoupon": false
- },
- {
- "id": 71,
- "image": "https://demo26.crmeb.net/uploads/attach/2021/09/03/mid_0b209a475fe7a7118dc964407c98542c.jpg",
- "store_name": "Casio卡西欧女表时尚优雅简约指针防水复古石英手表LTP-1094E-1A",
- "store_info": "品质保障 全场包邮",
- "cate_id": "38",
- "price": "265.00",
- "ot_price": "265.00",
- "sales": "6",
- "unit_name": "件",
- "sort": 300,
- "activity": [],
- "stock": 94,
- "vip_price": 0,
- "is_vip": 0,
- "couponId": [],
- "star": [
- {
- "product_score": 5,
- "product_id": 71
- },
- {
- "product_score": 5,
- "product_id": 71
- },
- {
- "product_score": 5,
- "product_id": 71
- }
- ],
- "checkCoupon": false
- }
- ],
- isSortType: 0,
- headItem: {
- "name": "headerSerch",
- "timestamp": "1666235374470000",
- "setUp": {
- "tabVal": 0
- },
- "bgColor": {
- "title": "背景颜色(渐变)",
- "name": "bgColor",
- "default": [
- {
- "item": "#F62C2C"
- },
- {
- "item": "#F96E29"
- }
- ],
- "color": [
- {
- "item": "rgba(242,16,78,1)"
- },
- {
- "item": "rgba(210,41,87,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"
- },
- current: 0,
- noticeList: [],
- notice: [
- '寒雨连江夜入吴',
- '平明送客楚山孤',
- '洛阳亲友如相问',
- '一片冰心在玉壶'
- ],
- swiperTabList: [
- 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
- 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
- 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
- ],
- swiperList: [
- 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
- 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
- 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
- ],
- navigationList: [{
- title: '推荐',
- id: '0'
- }]
- }
- },
- computed: mapGetters(['isLogin']),
- created() {
- this.getCategoryOne()
- this.getNoticeList()
- this.getAdsList()
- this.getBroGoodsInfo()
- this.getGoodsInfo()
- this.getAdsTabList()
- },
- onMounted(options) {
- },
- onLoad(options) {
- },
- onShow() {
- },
- updated() {
- },
- watch: {
- isLogin: {
- deep: true, //深度监听设置为 true
- handler: function (newV, oldV) {
- this.getCategoryOne()
- this.getNoticeList()
- this.getAdsList()
- this.getBroGoodsInfo()
- this.getGoodsInfo()
- this.getAdsTabList()
- }
- }
- },
- methods: {
- pullResh() {
- if (this.current == 0) {
- uni.showLoading({ title: '刷新中' });
- this.getNoticeList()
- this.getAdsList()
- this.getBroGoodsInfo()
- this.getAdsTabList()
- this.getGoodsInfo()
- } else {
- this.$refs.goodTablist.getGoodsPage()
- }
- },
- getGoodsInfo() {
- getGoodsInfo({
- current: 1,
- size: 50,
- isRecom: 1
- }).then(res => {
- this.tempArr = res.data
- uni.stopPullDownRefresh()
- uni.hideLoading();
- })
- },
- getBroGoodsInfo() {
- getGoodsInfo({
- current: 1,
- size: 50,
- zoneType: 6
- }).then(res => {
- this.tempArrBao = res.data
- })
- },
- getCategoryOne() {
- getCategoryOne().then(res => {
- this.navigationList = []
- let tuiJian = {
- title: '推荐',
- id: '0'
- }
- this.navigationList = res.data
- this.navigationList.unshift(tuiJian)
- })
- },
- menusTap(url, zoneType) {
- let that = this
- // #ifdef H5
- location.href = url
- // #endif
- // #ifdef MP || APP-PLUS
- if (zoneType == 8) {
- //共富取消中间过渡界面
- getGoodsInfo(that.where).then(res => {
- let list = res.data;
- if (that.where.zoneType == 8 && list.length == 1) {
- // 自动跳转共富1580商品详情
- that.godDetail(list[0])
- }
- })
- } else {
- uni.navigateTo({
- url: "/pages/goods/goods_list_mall/index?zoneType=" + zoneType + "&title=" + url
- });
- }
- // #endif
- },
- // 去详情页
- godDetail(item) {
- goShopDetail(item, this.uid).then(res => {
- uni.navigateTo({
- url: `/pages/goods_details/index?id=${item.id}`
- + "&zoneType=" + item.zoneType
- })
- })
- },
- noticeClose() {
- this.noticeShow = false
- },
- goNoticeDetail(value) {
- this.noticeContent = this.noticeList[value].content
- this.noticeShow = true
- },
- getNoticeList() {
- getNoticeList().then(res => {
- this.notice = []
- this.noticeList = res.data
- res.data.forEach(element => {
- this.notice.push(element.title)
- });
- })
- },
- getAdsList() {
- getAdsList({
- type: 1
- }).then(res => {
- if (res.data.length > 0) {
- this.swiperList = []
- res.data.forEach(element => {
- this.swiperList.push(element.imageUrl)
- });
- }
- });
- },
- getAdsTabList() {
- getAdsList({
- type: 7
- }).then(res => {
- this.swiperTabList = []
- if (res.data.length > 0) {
- res.data.forEach(element => {
- this.swiperTabList.push(element.imageUrl)
- });
- }
- });
- },
- // 促销列表的点击事件;
- 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);
- }
- uni.request({
- url: 'api/groom/list',
- success: res => {
- that.$set(that, 'iSshowH', false);
- let maxPage = Math.ceil(this.numConfig / this.limit);
- let list = res.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;
- }
- })
- // 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(`加载更多`);
- // });
- },
- goDetail(item) {
- goShopDetail(item, this.$store.state.app.uid).then(res => {
- uni.navigateTo({
- url: `/pages/goods_details/index?id=${item.id}`
- });
- });
- },
- // 去商品详情
- goGoodsDetail(item) {
- goShopDetail(item, this.uid).then(res => {
- uni.navigateTo({
- url: `/pages/goods_details/index?id=${item.id}`
- });
- });
- },
- clickNav(e) {
- this.current = e.index
- if (e.index > 0) {
- this.currentId = e.id
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- page {
- background-color: #ee4040;
- }
- .header-group {
- background-color: #EB4C63;
- .search-group {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 30rpx 30rpx 10rpx 30rpx;
- .logo {
- width: 138rpx;
- height: 46rpx;
- }
- .message {
- line-height: 1;
- image {
- width: 48rpx;
- height: 48rpx;
- }
- }
- .search {
- flex: 1;
- padding: 0 30rpx;
- .searchBox {
- padding: 0 30rpx;
- display: flex;
- align-items: center;
- background-color: #FFF;
- border-radius: 100rpx;
- height: 60rpx;
- image {
- width: 28rpx;
- height: 28rpx;
- padding-right: 20rpx;
- }
- text {
- font-size: 24rpx;
- color: #999;
- }
- }
- }
- }
- .tabs {
- padding: 0 20rpx;
- }
- }
- .tab-content {
- .swiper-group {
- padding: 20rpx 30rpx 10rpx 30rpx;
- background-image: linear-gradient(to bottom, #EB4C63, #F9F9F9);
- }
- .grid-box {
- padding: 10rpx 30rpx 20rpx 30rpx;
- .grid-group {
- padding: 20rpx 0;
- border-radius: 20rpx;
- background-color: #FFF;
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- .grid-item {
- width: 33.333%;
- display: flex;
- flex-direction: column;
- align-items: center;
- margin: 10rpx 0;
- image {
- width: 98rpx;
- height: 98rpx;
- }
- text {
- font-size: 24rpx;
- color: #666;
- margin-top: 10rpx;
- }
- }
- }
- }
- .notice {
- padding: 0 30rpx;
- }
- .sale-group {
- padding: 20rpx 30rpx;
- .sale-content {
- border-radius: 20rpx;
- background-image: linear-gradient(45deg, #EB4C63, #FFA470);
- padding: 20rpx 0;
- .title {
- display: flex;
- align-items: center;
- justify-content: space-between;
- color: #FFF;
- font-weight: bold;
- padding: 0 30rpx;
- .more {
- display: flex;
- align-items: center;
- font-size: 24rpx;
- font-weight: normal;
- image {
- width: 24rpx;
- height: 24rpx;
- }
- }
- }
- .goods-scroll {
- white-space: nowrap;
- padding: 20rpx 15rpx 0 15rpx;
- .goods-item {
- display: inline-block;
- width: 240rpx;
- padding: 15rpx;
- margin: 0 10rpx;
- background-color: #FFF;
- border-radius: 10rpx;
- image {
- width: 210rpx;
- height: 210rpx;
- }
- .goods-name {
- font-size: 26rpx;
- color: #333;
- width: 240rpx;
- margin: 6rpx 0;
- word-break: break-all;
- white-space: pre-wrap;
- text-overflow: ellipsis;
- display: -webkit-box;
- line-height: 1.2;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- }
- .tags {
- display: inline-block;
- font-size: 20rpx;
- padding: 6rpx;
- background-color: #FCE9EC;
- color: #EB4C63;
- margin: 6rpx 0;
- }
- .price {
- font-size: 32rpx;
- font-weight: bold;
- color: #EB4C63;
- }
- }
- }
- }
- }
- .goods-list {
- .title {
- text-align: center;
- color: #333;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 32rpx;
- font-weight: bold;
- .line {
- display: inline-block;
- width: 200rpx;
- height: 2rpx;
- margin: 0 30rpx;
- background-color: #FFA470;
- }
- }
- .list-group {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- padding: 15rpx;
- box-sizing: border-box;
- .list-item-content {
- width: 50%;
- padding: 15rpx;
- box-sizing: border-box;
- .list-item {
- padding: 15rpx;
- background-color: #FFF;
- border-radius: 10rpx;
- image {
- width: 100%;
- }
- .goods-name {
- font-size: 28rpx;
- color: #333;
- margin: 6rpx 0;
- word-break: break-all;
- white-space: pre-wrap;
- text-overflow: ellipsis;
- display: -webkit-box;
- line-height: 1.4;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- }
- .tags {
- display: inline-block;
- font-size: 20rpx;
- padding: 6rpx;
- background-color: #FCE9EC;
- color: #EB4C63;
- margin: 6rpx 0;
- }
- .price {
- font-size: 32rpx;
- font-weight: bold;
- color: #EB4C63;
- }
- }
- }
- }
- }
- }
- </style>
|