123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547 |
- <template>
- <view class="center">
- <view class="topcontent padding-b-30">
- <view class="top">
- <view class="top-main flex">
- <view class="search-box flex" @click="clickSearch()">
- <image class="search" src="../../static/img/search.png" mode=""></image>
- <view class="search-font">输入关键词搜索</view>
- </view>
- </view>
- </view>
- <swiper class="carousel" autoplay="true" duration="400" interval="5000">
- <swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item"
- @click="bannerNavToUrl(item)">
- <image :src="item.pic" />
- </swiper-item>
- </swiper>
- <view class="stre flex">
- <view class="ic-text flex">
- <image class="ic-tubiao" src="../../static/icon/shou-ic.png" mode=""></image>
- <view class="ic-wen">自用购物优惠</view>
- </view>
- <view class="ic-text flex">
- <image class="ic-tubiao" src="../../static/icon/shou-ic.png" mode=""></image>
- <view class="ic-wen">分享好友赚钱</view>
- </view>
- <view class="ic-text flex">
- <image class="ic-tubiao" src="../../static/icon/shou-ic.png" mode=""></image>
- <view class="ic-wen">超值正品优惠</view>
- </view>
- </view>
- <view class="zhishi flex">
- <navigator url="/pages/index/category">
- <view class="zhishi-item">
- <image class="zhishi-ic" src="../../static/img/img-f.png" mode=""></image>
- <view class="zhishi-te">全部分类</view>
- </view>
- </navigator>
- <navigator url="/pages/user/shareQrCode">
- <view class="zhishi-item">
- <image class="zhishi-ic" src="../../static/img/img-d.png" mode=""></image>
- <view class="zhishi-te">邀请好友</view>
- </view>
- </navigator>
- <navigator url="/pages/index/artDetail?id=6">
- <view class="zhishi-item">
- <image class="zhishi-ic" src="../../static/img/img-a.png" mode=""></image>
- <view class="zhishi-te">关于我们</view>
- </view>
- </navigator>
- <view class="zhishi-item" @click="openKf">
- <image class="zhishi-ic" src="../../static/img/img-b.png" mode=""></image>
- <view class="zhishi-te">联系客服</view>
- </view>
-
- </view>
- <!-- 首购推荐 -->
- <view class="tj">
- <image class="tj-ic" src="../../static/img/sy-icon.png" mode=""></image>
- <view class="sg">首购推荐</view>
- </view>
- <swiper class="car" autoplay="true" duration="400" interval="5000">
- <swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item"
- @click="bannerNavToUrl(item)">
- <image :src="item.pic" />
- </swiper-item>
- </swiper>
- <!-- 列表 -->
- <view class="splist flex" v-for="item in 3">
- <view class="tp">
- <image class="list-iamg" src="../../static/img/sp.png" mode=""></image>
- </view>
- <view class="right" >
- <view class="list-title clamp2">风平乐樱桃乐乐樱桃乐乐樱桃乐乐樱桃乐乐樱桃乐</view>
- <view class="ysjg flex-start">
- <view class="yj">¥139</view>
- <view class="dz">直降40元</view>
- </view>
- <view class="bto flex">
- <view class="xj">¥99</view>
- <!-- TODO 详情id为传 -->
- <navigator url="/pages/index/product">
- <view class="ljgm">立即购买</view>
- </navigator>
- </view>
- </view>
- </view>
- <!-- 复购专区 -->
- <view class="tj">
- <image class="tj-ic" src="../../static/img/sy-icon.png" mode=""></image>
- <view class="sg">复购专区</view>
- </view>
- <view class="splist flex" v-for="item in 3">
- <view class="tp">
- <image class="list-iamg" src="../../static/img/sp.png" mode=""></image>
- </view>
- <view class="right" >
- <view class="list-title clamp2">风平乐樱桃姜黄复合肽压片 糖果套盒...风平乐樱桃姜黄复风平乐樱桃姜黄复风平乐樱桃姜黄复风平乐樱桃姜黄复</view>
- <view class="ysjg flex-start">
- <view class="yj">¥139</view>
- <view class="dz">直降40元</view>
- </view>
- <view class="bto flex">
- <view class="xj">¥99</view>
- <!-- TODO 详情id为传 -->
- <navigator url="/pages/index/product">
- <view class="ljgm">立即购买</view>
- </navigator>
- </view>
- </view>
- </view>
- </view>
- <uni-popup ref="popupkf" type="center">
- <view class="popup-box">
- <view class="img">
- <image src="../../static/img/img009.png" mode=""></image>
- </view>
- <view class="mian">
- <view class="delivery">
- <view class="title">已经为您定制专属客服</view>
- <image src="../../static/img/img010.png" mode=""></image>
- </view>
- <view class="nocancel">客服VX:{{ kefu }}</view>
- <view class="comfirm-box">
- <view class="cancel" @click="cancel">取消</view>
- <view class="comfirm" @click="comfirm(kefu)">复制微信</view>
- </view>
- </view>
- </view>
- </uni-popup>
- <u-tabbar activeColor="#01A6A8" inactive-color='#666666' :list="tabbar"></u-tabbar>
- </view>
- </template>
- <script>
- import {
- tabbar1
- } from '@/utils/tabbar.js'; //底部导航栏
- import {
- article
- } from '@/api/user.js';
- import {
- getCategoryList,
- getProducts
- } from '@/api/product.js';
- import {
- loadIndexs,
- store_list
- } from '@/api/index.js';
- import {
- auction_gu
- } from '@/api/hall.js';
- import {
- mapState,
- mapMutations
- } from 'vuex';
- export default {
-
- data() {
- return {
- current: 0,
- tabbar: tabbar1,
- carouselList: [], //轮播图列表
- kefu: '',
- };
- },
-
- onShow() {
- },
- methods: {
- ...mapMutations(['setLat', 'setLon', 'setChoose']),
- // 底部轮播图切换
- changeBottom(res) {
- this.actionArtInd = res.detail.current;
- console.log(res);
- },
- // 打开客服
- openKf() {
- this.$refs.popupkf.open();
- },
- // 关闭客服
- cancel() {
- this.$refs.popupkf.close();
- },
- toBack() {
- uni.navigateTo({
- url: '/pages/navigation/index'
- })
- },
- nav(url) {
- console.log(url, '123456');
- uni.navigateTo({
- url,
- fail() {
- uni.switchTab({
- url
- });
- }
- });
- },
- // 點擊搜索框
- clickSearch() {
- uni.navigateTo({
- url: '/pages/index/search'
- });
- },
- navTo(item) {
- uni.navigateTo({
- url: '/pages/hall/halllist?id=' + item.id + '&name=' + item.name + '&peoplename=' + item
- .nickname
- });
- },
- //详情页
- navToDetailPage(item) {
- let id = item.id;
- uni.navigateTo({
- url: '/pages/index/product?id=' + id
- });
- }
- }
- };
- </script>
- <style lang="scss">
- .center {
- padding-bottom: 30rpx;
- }
- .topcontent {
- background-color: #FFFFFF;
- }
- .vheigh {
- height: var(--status-bar-height);
- background-color: $base-color;
- }
- .top {
- position: relative;
- width: 100%;
- height: 120rpx;
- .top-main {
- position: relative;
- z-index: 2;
- padding: 30rpx;
- .search-box {
- justify-content: center;
- width: 698rpx;
- height: 60rpx;
- background: rgba(255, 240, 245, 0.4);
- border-radius: 30rpx;
- background-color: #EEEEEE;
- .search {
- width: 34rpx;
- height: 34rpx;
- }
- .search-font {
- margin-left: 14rpx;
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #CBCBCB;
- }
- }
- }
- }
- .carousel {
- width: 750rpx;
- height: 360rpx;
- /* #ifndef APP-PLUS */
- // margin: -230rpx auto 0;
- // margin: -160rpx auto 0;
- /* #endif */
- /* #ifdef APP-PLUS */
- // margin: -100rpx auto 0;
- /* #endif */
- image {
- width: 100%;
- height: 100%;
- }
- }
- .stre {
- padding: 0 30rpx;
- margin-top:20rpx ;
- .ic-text {
- .ic-tubiao {
- width: 27rpx;
- height: 27rpx;
- }
- .ic-wen {
- font-size: 21rpx;
- color: #333333;
- }
- }
- }
- .zhishi {
- padding: 30rpx;
- .zhishi-item {
- .zhishi-ic {
- width: 90rpx;
- height: 90rpx;
- }
- .zhishi-te {
- font-size: 24rpx;
- color: #666666;
- }
- }
- }
- .tj {
- height: 120rpx;
- .tj-ic {
- width: 350rpx;
- height: 10rpx;
- margin-top: 79rpx;
- margin-left: 199rpx;
- }
- .sg {
- font-size: 35rpx;
- font-weight: 500;
- color: #000000;
- text-align: center;
- margin-top: -35rpx;
- }
- }
-
- .car {
- width: 750rpx;
- height: 240rpx;
-
- image {
- width: 100%;
- height: 100%;
- }
- }
-
- .splist {
- background: #FFFFFF;
- border-radius: 10rpx;
- margin: 25rpx;
- align-items: stretch;
- .list-iamg {
- width: 235rpx;
- height: 235rpx;
- }
- .right {
- padding-left: 22rpx;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- flex-grow: 1;
- .list-title {
- font-size: 32rpx;
- font-weight: bold;
- color: #333333;
- }
- .ysjg {
- padding-top: 70rpx;
- .yj {
- font-size: 26rpx;
- color: #999999;
- }
- .dz {
- font-size: 24rpx;
- color: #B59467;
- padding-left: 10rpx;
- }
- }
- .bto {
- .xj {
- font-size: 36rpx;
- color: #FF6F0F;
- }
- .ljgm {
- margin-right: 25rpx;
- width: 137rpx;
- height: 52rpx;
- border-radius: 26rpx;
- background-color: #01A6A8;
- color: #fff;
- font-size: 28rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- }
- }
-
- }
-
- .popup-box {
- width: 522rpx;
- height: 605rpx;
- background-color: #ffffff;
- border-radius: 20rpx;
- position: relative;
- .img {
- position: relative;
- top: -56rpx;
- left: 0;
- width: 522rpx;
- height: 132rpx;
- display: flex;
- justify-content: center;
- image {
- border-radius: 20rpx 20rpx 0 0;
- width: 450rpx;
- height: 132rpx;
- }
- }
- .mian {
- margin-top: -44rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- background-color: #ffffff;
- border-radius: 0 0 20rpx 20rpx;
- text-align: center;
- .delivery {
- font-size: 40rpx;
- color: #333333;
- display: flex;
- align-items: center;
- flex-direction: column;
- .title {}
- image {
- margin-top: 48rpx;
- width: 172rpx;
- height: 160rpx;
- }
- }
- .nocancel {
- font-size: 32rpx;
- color: #333333;
- margin-top: 14rpx;
- }
- .comfirm-box {
- margin-top: 52rpx;
- display: flex;
- .cancel {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 197rpx;
- height: 74rpx;
- border: 1px solid #dcc786;
- border-radius: 38rpx;
- font-size: 32rpx;
- color: #605128;
- }
- .comfirm {
- margin-left: 32rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- width: 197rpx;
- height: 74rpx;
- background: linear-gradient(-90deg, #d1ba77 0%, #f7e8ad 100%);
- border-radius: 38px;
- font-size: 32rpx;
- color: #605128;
- }
- }
- }
- }
- .product-list {
- padding: 0 30rpx;
- line-height: 0;
- align-items: stretch;
- .list-left {
- .imgleft {
- width: 306rpx;
- height: 319rpx;
- }
- }
- .list-right {
- flex-direction: column;
- .imgleft {
- width: 366rpx;
- height: 152rpx;
- }
- }
- }
- .bottom-box {
- padding: 30rpx 0;
- background-color: #FFFFFF;
- .bottom-title {
- text-align: center;
- .image {
- width: 609rpx;
- height: 31rpx;
- }
- }
- .product-art-list {
- height: 432rpx;
- .product-art-item {
- .image-box {
- text-align: center;
- .image {
- width: 432rpx;
- height: 432rpx;
- }
- }
- }
- }
- .product-detail {
- margin: 30rpx;
- height: 4em;
- overflow: hidden;
- text-indent: 2em;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 4;
- -webkit-box-orient: vertical;
- }
- }
- </style>
|