Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx
This commit is contained in:
@@ -1,33 +1,37 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<view class="top">
|
||||
<view class="sosuo"></view>
|
||||
<view class="tabs">
|
||||
<u-tabs :is-scroll="false" bar-width="70" ref="tabs" :list="list" :current="num" :bar-style="{
|
||||
<view>
|
||||
<view class="status_bar"></view>
|
||||
<view class="index">
|
||||
<navigator url="/pageB/photo/index?id=28">qqq</navigator>
|
||||
<view class="top">
|
||||
<view class="sosuo"></view>
|
||||
<view class="tabs">
|
||||
<u-tabs :is-scroll="false" bar-width="70" ref="tabs" :list="list" :current="num" :bar-style="{
|
||||
'background-color':'#FF780F',
|
||||
'bottom':'10rpx'
|
||||
}"
|
||||
inactive-color="#333" :active-item-style="{
|
||||
inactive-color="#333" :active-item-style="{
|
||||
'color':'#333'
|
||||
}" :bold="false"
|
||||
@change="dianji"></u-tabs>
|
||||
@change="dianji"></u-tabs>
|
||||
</view>
|
||||
<view class="sosuo"></view>
|
||||
</view>
|
||||
<view class="sosuo"></view>
|
||||
</view>
|
||||
<swiper class="card" @change="dianji" :current="num">
|
||||
<swiper-item>
|
||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
||||
<view class="box">
|
||||
<!-- <indexad style="width:690rpx"></indexad> -->
|
||||
<u-swiper mode="dot" :list="indexImageSwiper" name="adv_code" @click="clickFImage"></u-swiper>
|
||||
<view class="list">
|
||||
<view>
|
||||
<videoItem v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id" :item="item"
|
||||
@getArticlelist="getArticlelist"></videoItem>
|
||||
</view>
|
||||
<view style="margin-left:20rpx">
|
||||
<videoItem v-for="item in articleList.filter((_, index) => index&1)" :key="item.article_id" :item="item"
|
||||
@getArticlelist="getArticlelist"></videoItem>
|
||||
<swiper class="card" @change="dianji" :current="num">
|
||||
<swiper-item>
|
||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
||||
<view class="box">
|
||||
<!-- <indexad style="width:690rpx"></indexad> -->
|
||||
<u-swiper mode="dot" :list="indexImageSwiper" name="adv_code"></u-swiper>
|
||||
<view class="list">
|
||||
<view>
|
||||
<videoItem v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id" :item="item"
|
||||
@getArticlelist="getArticlelist"></videoItem>
|
||||
</view>
|
||||
<view style="margin-left:20rpx">
|
||||
<videoItem v-for="item in articleList.filter((_, index) => index&1)" :key="item.article_id" :item="item"
|
||||
@getArticlelist="getArticlelist"></videoItem>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -45,44 +49,44 @@
|
||||
<zhiboItem v-for="item in tabLiveLists.filter((_, index) => index&1)" :zid="item.live_id" :rid="item.chatroom_id" :key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url"></zhiboItem>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
||||
<view class="box">
|
||||
<view class="tuijian">
|
||||
<view class="title" @click="toSearchPage" >
|
||||
<view class="left">
|
||||
<view></view>
|
||||
<text>推荐达人</text>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
||||
<view class="box">
|
||||
<view class="tuijian">
|
||||
<view class="title" @click="toSearchPage">
|
||||
<view class="left">
|
||||
<view></view>
|
||||
<text>推荐达人</text>
|
||||
</view>
|
||||
<image class="right" src="/static/image/common/1.png"></image>
|
||||
</view>
|
||||
<image class="right" src="/static/image/common/1.png"></image>
|
||||
</view>
|
||||
<view class="tuijianlist">
|
||||
<!-- <darenItem style="margin-right:23rpx"></darenItem>
|
||||
<view class="tuijianlist">
|
||||
<!-- <darenItem style="margin-right:23rpx"></darenItem>
|
||||
<darenItem style="margin-right:23rpx"></darenItem> -->
|
||||
<darenItem v-for="item in recommendList.slice(0,3)" :key="item.id" :info="item" v-on:pChangeType="changeType" ></darenItem>
|
||||
<darenItem v-for="item in recommendList.slice(0,3)" :key="item.id" :info="item" v-on:pChangeType="changeType"></darenItem>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view>
|
||||
<!-- <videoItem isguanzhu="true" v-for="item in 10"></videoItem> -->
|
||||
<videoItem isguanzhu="true" v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id"
|
||||
:item="item" @getArticlelist="getArticlelist"></videoItem>
|
||||
</view>
|
||||
<view style="margin-left:20rpx">
|
||||
<!-- <videoItem isguanzhu="true" v-for="item in 10"></videoItem> -->
|
||||
<videoItem isguanzhu="true" v-for="item in articleList.filter((_, index) => index&1)" :key="item.article_id"
|
||||
:item="item" @getArticlelist="getArticlelist"></videoItem>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view>
|
||||
<!-- <videoItem isguanzhu="true" v-for="item in 10"></videoItem> -->
|
||||
<videoItem isguanzhu="true" v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id"
|
||||
:item="item" @getArticlelist="getArticlelist"></videoItem>
|
||||
</view>
|
||||
<view style="margin-left:20rpx">
|
||||
<!-- <videoItem isguanzhu="true" v-for="item in 10"></videoItem> -->
|
||||
<videoItem isguanzhu="true" v-for="item in articleList.filter((_, index) => index&1)" :key="item.article_id"
|
||||
:item="item" @getArticlelist="getArticlelist"></videoItem>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
@@ -203,7 +207,7 @@
|
||||
recommendList: [], // 推荐达人
|
||||
indexImageSwiper: [],
|
||||
zhiboImageSwiper: [],
|
||||
tabLiveLists:[]
|
||||
tabLiveLists: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -219,9 +223,12 @@
|
||||
this.getZhiBoSwiper();
|
||||
this.tabLiveList();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
// this.getManicureList({ load: 'reload' });
|
||||
},
|
||||
methods: {
|
||||
tabLiveList(){
|
||||
this.$u.api.tabLiveList().then((res)=>{
|
||||
tabLiveList() {
|
||||
this.$u.api.tabLiveList().then((res) => {
|
||||
console.log(res)
|
||||
this.tabLiveLists = res.data
|
||||
})
|
||||
@@ -233,12 +240,12 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
changeType(member_id){
|
||||
changeType(member_id) {
|
||||
console.log(member_id);
|
||||
this.$emit("pChangeType")
|
||||
this.$u.api.attentionMember({
|
||||
member_id: member_id
|
||||
}).then((res)=>{
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
this.getRecommendList();
|
||||
})
|
||||
@@ -263,7 +270,7 @@
|
||||
page: this.page,
|
||||
is_video_img: 0, // 查询视频1 图文2 都查0
|
||||
}).then(res => {
|
||||
console.log('37647744ghj',res)
|
||||
console.log('37647744ghj', res)
|
||||
if (res.errCode == 0) {
|
||||
this.articleList = res.data.list;
|
||||
}
|
||||
@@ -278,10 +285,10 @@
|
||||
})
|
||||
},
|
||||
toSearchPage() {
|
||||
console.log("22");
|
||||
uni.navigateTo({
|
||||
url: '/pageB/follow/index'
|
||||
});
|
||||
console.log("22");
|
||||
uni.navigateTo({
|
||||
url: '/pageB/follow/index'
|
||||
});
|
||||
},
|
||||
clickFImage(index) {
|
||||
const item = this.indexImageSwiper[index];
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<view class="mine">
|
||||
<view class="mine-top">
|
||||
<view class="top">
|
||||
<u-avatar @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar" :size="110"></u-avatar>
|
||||
<u-avatar @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar + '?' + new Date().getTime()" :size="110"></u-avatar>
|
||||
<view class="user-info">
|
||||
<view class="info-left">
|
||||
<view class="user-nickname">{{ userInfo.member_nickname }}</view>
|
||||
@@ -56,8 +56,8 @@
|
||||
<view>待支付</view>
|
||||
</view>
|
||||
<view @click="toOtherPage('/order/Index?current=2')">
|
||||
<image src="/static/image/mine/14.png"></image>
|
||||
<view>已取消</view>
|
||||
<image src="/static/image/mine/35.png"></image>
|
||||
<view>待发货</view>
|
||||
</view>
|
||||
<view @click="toOtherPage('/order/Index?current=3')">
|
||||
<image src="/static/image/mine/2.png"></image>
|
||||
@@ -68,13 +68,13 @@
|
||||
<view>试穿试送</view>
|
||||
</view>
|
||||
<view @click="toOtherPage('/order/Index?current=5')">
|
||||
<image src="/static/image/mine/3.png"></image>
|
||||
<view>待评价</view>
|
||||
</view>
|
||||
<view @click="toOtherPage('/order/Index?current=6')">
|
||||
<image src="/static/image/mine/9.png"></image>
|
||||
<view>售后</view>
|
||||
</view>
|
||||
<view @click="toOtherPage('/order/Index?current=6')">
|
||||
<image src="/static/image/mine/3.png"></image>
|
||||
<view>待评价</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tool">
|
||||
@@ -124,7 +124,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex';
|
||||
export default {
|
||||
computed: {
|
||||
...mapState(['hasLogin', 'token'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
userInfo: {},
|
||||
@@ -136,8 +140,18 @@ export default {
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// 尝试登录
|
||||
if (!this.hasLogin) {
|
||||
uni.navigateTo({
|
||||
url: "../../pageA/login/login"
|
||||
})
|
||||
}
|
||||
this.getUserInfo();
|
||||
},
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.getUserInfo();
|
||||
},
|
||||
onNavigationBarButtonTap() {
|
||||
this.toOtherPage("/setting/Index");
|
||||
},
|
||||
@@ -147,6 +161,7 @@ export default {
|
||||
if (res.errCode == 0) {
|
||||
// this.userInfo = res.data.MemberArray;
|
||||
this.$set(this, 'userInfo', res.data.MemberArray);
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -160,7 +175,7 @@ export default {
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.mine {
|
||||
min-height: calc(calc(100vh - var(--window-top)) - 50px);
|
||||
min-height: calc(calc(100vh - var(--window-top)));
|
||||
background: #ECECEC;
|
||||
.mine-top {
|
||||
// width: 100%;
|
||||
@@ -295,7 +310,7 @@ export default {
|
||||
$content-padding-top: 22rpx,
|
||||
$content-padding-bottom: 30rpx,
|
||||
$image-height: 36rpx,
|
||||
$image-width: 36rpx,
|
||||
$image-width: 36rpx
|
||||
);
|
||||
.title {
|
||||
justify-content: space-between;
|
||||
@@ -316,7 +331,7 @@ export default {
|
||||
@include image-size($image-width: 33rpx, $image-height: 36rpx);
|
||||
}
|
||||
> view:nth-child(2){
|
||||
@include image-size($image-width: 39rpx, $image-height: 33rpx);
|
||||
@include image-size($image-width: 38rpx, $image-height: 32rpx);
|
||||
}
|
||||
> view:nth-child(3){
|
||||
@include image-size($image-width: 41rpx, $image-height: 33rpx);
|
||||
@@ -337,7 +352,7 @@ export default {
|
||||
$content-padding-top: 8rpx,
|
||||
$content-padding-bottom: 25rpx,
|
||||
$image-height: 71rpx,
|
||||
$image-width: 71rpx,
|
||||
$image-width: 71rpx
|
||||
);
|
||||
.content {
|
||||
> view:not(:last-child) {
|
||||
@@ -350,7 +365,7 @@ export default {
|
||||
$content-padding-top: 8rpx,
|
||||
$content-padding-bottom: 48rpx,
|
||||
$image-height: 71rpx,
|
||||
$image-width: 71rpx,
|
||||
$image-width: 71rpx
|
||||
);
|
||||
.content {
|
||||
> view:not(:last-child) {
|
||||
|
||||
@@ -1,305 +1,347 @@
|
||||
<template>
|
||||
<scroll-view class="shop" scroll-y @scrolltolower="onreachBottom">
|
||||
<view class="top">
|
||||
<image src="/static/image/shop/1.png" class="local"></image>
|
||||
<view class="add" @click="chooseArea=true">
|
||||
<text class="u-line-1">{{ area }}</text>
|
||||
<image src="/static/image/shop/2.png"></image>
|
||||
</view>
|
||||
<view @click="sousuo">
|
||||
<u-search placeholder="" v-model="keyword" :show-action="false" bg-color="#fff" border-color="#999999" :disabled="true"></u-search>
|
||||
</view>
|
||||
<image src="/static/image/shop/3.png" class="mnue" @click="toClassifyPage"></image>
|
||||
</view>
|
||||
<view class="swiper-image">
|
||||
<u-swiper :list="list" mode="dot" @click="clickImage"></u-swiper>
|
||||
</view>
|
||||
<view class="chengnuo">
|
||||
<view>
|
||||
<image src="/static/image/shop/4.png"></image>
|
||||
<text>免费洗衣</text>
|
||||
</view>
|
||||
<view>
|
||||
<image src="/static/image/shop/5.png"></image>
|
||||
<text>全国包邮</text>
|
||||
</view>
|
||||
<view>
|
||||
<image src="/static/image/shop/6.png"></image>
|
||||
<text>延误必赔</text>
|
||||
</view>
|
||||
<view>
|
||||
<image src="/static/image/shop/7.png"></image>
|
||||
<text>上门取件</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fenlei">
|
||||
<shopitem v-for="item in goodsClassify" :key="item.gc_id" :info="item" class="item"></shopitem>
|
||||
</view>
|
||||
<!-- 秒杀 -->
|
||||
<recommend v-if="JSON.stringify(recommendedSpike) != '{}'" :recommendData="recommendedSpike" type="spike"></recommend>
|
||||
<!-- 秒杀列表 -->
|
||||
<seckill v-if="spikeList.length" :list="spikeList" :time="seckillTime"></seckill>
|
||||
<!-- 拼团推荐 -->
|
||||
<pintuan v-if="JSON.stringify(pinTuanPush) != '{}'" :recommendData="pinTuanPush"></pintuan>
|
||||
<!-- 拼团列表 -->
|
||||
<group></group>
|
||||
<view class="activity-view">
|
||||
<image class="lingquan" :src="activityInfo.adv_code" @click="activityLink({ type: activityInfo.url_type, id: activityInfo.info_id })"></image>
|
||||
</view>
|
||||
<youhq></youhq>
|
||||
<list ref="recommendGoods"></list>
|
||||
<view class="cart" @click="toCartPage">
|
||||
<image src="/static/image/common/3.png"></image>
|
||||
</view>
|
||||
<u-picker mode="region" :params="areaParams" v-model="chooseArea" @confirm="setArea"></u-picker>
|
||||
</scroll-view>
|
||||
<view>
|
||||
<view class="status_bar"></view>
|
||||
<scroll-view class="shop" scroll-y @scrolltolower="onreachBottom">
|
||||
<view class="top">
|
||||
<image src="/static/image/shop/1.png" class="local"></image>
|
||||
<view class="add" @click="chooseArea=true">
|
||||
<text class="u-line-1">{{ area }}</text>
|
||||
<image src="/static/image/shop/2.png"></image>
|
||||
</view>
|
||||
<view @click="sousuo">
|
||||
<u-search placeholder="" v-model="keyword" :show-action="false" bg-color="#fff" border-color="#999999" :disabled="true"></u-search>
|
||||
</view>
|
||||
<image src="/static/image/shop/3.png" class="mnue" @click="toClassifyPage"></image>
|
||||
</view>
|
||||
<view class="swiper-image">
|
||||
<u-swiper :list="list" mode="dot" @click="clickImage"></u-swiper>
|
||||
</view>
|
||||
<view class="chengnuo">
|
||||
<view>
|
||||
<image src="/static/image/shop/4.png"></image>
|
||||
<text>免费洗衣</text>
|
||||
</view>
|
||||
<view>
|
||||
<image src="/static/image/shop/5.png"></image>
|
||||
<text>全国包邮</text>
|
||||
</view>
|
||||
<view>
|
||||
<image src="/static/image/shop/6.png"></image>
|
||||
<text>延误必赔</text>
|
||||
</view>
|
||||
<view>
|
||||
<image src="/static/image/shop/7.png"></image>
|
||||
<text>上门取件</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fenlei">
|
||||
<shopitem v-for="item in goodsClassify" :key="item.gc_id" :info="item" class="item"></shopitem>
|
||||
</view>
|
||||
<!-- 秒杀 -->
|
||||
<recommend v-if="JSON.stringify(recommendedSpike) != '{}'" :recommendData="recommendedSpike" type="spike"></recommend>
|
||||
<!-- 秒杀列表 -->
|
||||
<seckill v-if="spikeList.length" :list="spikeList" :time="seckillTime"></seckill>
|
||||
<!-- 拼团推荐 -->
|
||||
<pintuan v-if="JSON.stringify(pinTuanPush) != '{}'" :recommendData="pinTuanPush"></pintuan>
|
||||
<!-- 拼团列表 -->
|
||||
<group></group>
|
||||
<view class="activity-view">
|
||||
<image class="lingquan" :src="activityInfo.adv_code" @click="activityLink({ type: activityInfo.url_type, id: activityInfo.info_id })"></image>
|
||||
</view>
|
||||
<youhq></youhq>
|
||||
<list ref="recommendGoods"></list>
|
||||
<view class="cart" @click="toCartPage">
|
||||
<image src="/static/image/common/3.png"></image>
|
||||
</view>
|
||||
<u-picker mode="selector" :range="areaList" v-model="chooseArea" range-key="area_name" @confirm="setArea"></u-picker>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import shopitem from "@/components/shop/shop-item/index";
|
||||
import recommend from "@/components/shop/recommend/index";
|
||||
import pintuan from "@/components/shop/recommend/pintuan";
|
||||
import seckill from "@/components/shop/seckill/index";
|
||||
import group from "@/components/shop/group/index";
|
||||
import youhq from "@/components/shop/youhq/index";
|
||||
import list from "@/components/shop/list/index";
|
||||
export default {
|
||||
name: "shop",
|
||||
components: {
|
||||
shopitem,
|
||||
recommend,
|
||||
seckill,
|
||||
group,
|
||||
youhq,
|
||||
list,
|
||||
pintuan
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
area: "请选择",
|
||||
chooseArea: false,
|
||||
areaParams: {
|
||||
province: true,
|
||||
city: true,
|
||||
area: false
|
||||
import shopitem from "@/components/shop/shop-item/index";
|
||||
import recommend from "@/components/shop/recommend/index";
|
||||
import pintuan from "@/components/shop/recommend/pintuan";
|
||||
import seckill from "@/components/shop/seckill/index";
|
||||
import group from "@/components/shop/group/index";
|
||||
import youhq from "@/components/shop/youhq/index";
|
||||
import list from "@/components/shop/list/index";
|
||||
export default {
|
||||
name: "shop",
|
||||
components: {
|
||||
shopitem,
|
||||
recommend,
|
||||
seckill,
|
||||
group,
|
||||
youhq,
|
||||
list,
|
||||
pintuan
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
area: "请选择",
|
||||
chooseArea: false,
|
||||
keyword: "",
|
||||
list: [],
|
||||
goodsClassify: [], // 商品分类
|
||||
// classifyList: [],
|
||||
recommendedSpike: {}, // 秒杀推荐
|
||||
spikeList: [], // 全部秒杀列表
|
||||
seckillTime: {}, // 秒杀时间
|
||||
// couponGroupList: [], // 优惠券拼团分类
|
||||
pinTuanPush: {}, // 拼团推荐
|
||||
activityInfo: {},
|
||||
areaList: [], // 位置信息
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getShopTopList();
|
||||
this.getLocation(); // 获取定位
|
||||
this.getStoreActivity();
|
||||
// this.area = uni.getStorageSync("address") || "请选择";
|
||||
},
|
||||
onShow() {
|
||||
this.getRecommendedSpike();
|
||||
this.getSpikeList();
|
||||
this.getPinTuanPush();
|
||||
this.getAllLoaction(); // 获取位置
|
||||
},
|
||||
methods: {
|
||||
sousuo() {
|
||||
// console.log(123)
|
||||
this.$u.route({
|
||||
url: "pageB/search/index"
|
||||
})
|
||||
},
|
||||
keyword: "",
|
||||
list: [],
|
||||
goodsClassify: [], // 商品分类
|
||||
// classifyList: [],
|
||||
recommendedSpike: {}, // 秒杀推荐
|
||||
spikeList: [], // 全部秒杀列表
|
||||
seckillTime: {}, // 秒杀时间
|
||||
// couponGroupList: [], // 优惠券拼团分类
|
||||
pinTuanPush: {}, // 拼团推荐
|
||||
activityInfo: {},
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getShopTopList();
|
||||
},
|
||||
onShow() {
|
||||
this.getRecommendedSpike();
|
||||
this.getSpikeList();
|
||||
this.getPinTuanPush();
|
||||
this.getStoreActivity();
|
||||
},
|
||||
methods: {
|
||||
sousuo() {
|
||||
// console.log(123)
|
||||
this.$u.route({
|
||||
url:"pageB/search/index"
|
||||
})
|
||||
},
|
||||
getShopTopList() {
|
||||
this.$u.api.getShopTopList().then((res)=>{
|
||||
if (res.errCode == 0) {
|
||||
let temp = [];
|
||||
res.data.banner.forEach(item => {
|
||||
temp.push({
|
||||
image: item.adv_code,
|
||||
adv_link: item.adv_link,
|
||||
adv_id: item.adv_id,
|
||||
})
|
||||
})
|
||||
this.list = temp;
|
||||
this.goodsClassify = res.data.goodsclass;
|
||||
}
|
||||
})
|
||||
},
|
||||
getRecommendedSpike() {
|
||||
this.$u.api.recommendedSpike().then(res => {
|
||||
if(res.errCode == 0) this.recommendedSpike = res.data;
|
||||
// console.log(this.recommendedSpike);
|
||||
})
|
||||
},
|
||||
// 拼团推荐
|
||||
getPinTuanPush() {
|
||||
this.$u.api.getPinTuanPush().then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.pinTuanPush = res.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 全部秒杀
|
||||
getSpikeList() {
|
||||
this.$u.api.getSpikeList({ page: 0 }).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.spikeList = res.data.list;
|
||||
this.seckillTime = {
|
||||
bigHour: res.data.bigHour,
|
||||
littleHour: res.data.littleHour,
|
||||
// 获取定位
|
||||
getLocation() {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
geocode: true,
|
||||
success: (res) => {
|
||||
// console.log(res.address);
|
||||
this.area = res.address.city;
|
||||
},
|
||||
fail: (e) => {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
// 获取位置
|
||||
getAllLoaction() {
|
||||
this.$u.api.getAreaList({pid: 0}).then(res => {
|
||||
// console.log(res);
|
||||
this.areaList = res.data;
|
||||
})
|
||||
},
|
||||
getShopTopList() {
|
||||
this.$u.api.getShopTopList().then((res) => {
|
||||
if (res.errCode == 0) {
|
||||
let temp = [];
|
||||
res.data.banner.forEach(item => {
|
||||
temp.push({
|
||||
image: item.adv_code,
|
||||
adv_link: item.adv_link,
|
||||
adv_id: item.adv_id,
|
||||
})
|
||||
})
|
||||
this.list = temp;
|
||||
this.goodsClassify = res.data.goodsclass;
|
||||
}
|
||||
})
|
||||
},
|
||||
getRecommendedSpike() {
|
||||
this.$u.api.recommendedSpike().then(res => {
|
||||
if (res.errCode == 0) this.recommendedSpike = res.data;
|
||||
// console.log(this.recommendedSpike);
|
||||
})
|
||||
},
|
||||
// 拼团推荐
|
||||
getPinTuanPush() {
|
||||
this.$u.api.getPinTuanPush().then(res => {
|
||||
if (res.errCode == 0) {
|
||||
this.pinTuanPush = res.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 全部秒杀
|
||||
getSpikeList() {
|
||||
this.$u.api.getSpikeList({
|
||||
page: 0
|
||||
}).then(res => {
|
||||
if (res.errCode == 0) {
|
||||
this.spikeList = res.data.list;
|
||||
this.seckillTime = {
|
||||
bigHour: res.data.bigHour,
|
||||
littleHour: res.data.littleHour,
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
clickImage(index) {
|
||||
console.log(index);
|
||||
console.log(this.list[index]);
|
||||
},
|
||||
// 下拉加载更多推荐商品
|
||||
onreachBottom() {
|
||||
this.$refs.recommendGoods.loadMore();
|
||||
},
|
||||
setArea(e) {
|
||||
console.log(e);
|
||||
this.area = this.areaList[e[0]].area_name;
|
||||
},
|
||||
toCartPage() {
|
||||
uni.navigateTo({
|
||||
url: '/pageC/cart/index'
|
||||
});
|
||||
},
|
||||
toClassifyPage() {
|
||||
uni.navigateTo({
|
||||
url: '/pageC/classify/index'
|
||||
});
|
||||
},
|
||||
getStoreActivity() {
|
||||
this.$u.api.getStoreActivity().then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.activityInfo = res.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
activityLink({ type, id }) {
|
||||
if(type == 0 || type == 2) return false;
|
||||
// type 1 商品详情页, 2 店铺详情页
|
||||
const url = type == 1 ? 'pageB/sdetails/index' : '';
|
||||
let params = { id: id };
|
||||
// type: 1 // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||
if(type == 1) Object.assign(params, { type: 1 });
|
||||
this.$u.route({
|
||||
url: url,
|
||||
params: params
|
||||
})
|
||||
},
|
||||
},
|
||||
clickImage(index) {
|
||||
console.log(index);
|
||||
console.log(this.list[index]);
|
||||
},
|
||||
// 下拉加载更多推荐商品
|
||||
onreachBottom() {
|
||||
this.$refs.recommendGoods.loadMore();
|
||||
},
|
||||
setArea(e) {
|
||||
// console.log(e);
|
||||
this.area = e.city.label;
|
||||
},
|
||||
toCartPage() {
|
||||
uni.navigateTo({
|
||||
url: '/pageC/cart/index'
|
||||
});
|
||||
},
|
||||
toClassifyPage() {
|
||||
uni.navigateTo({
|
||||
url: '/pageC/classify/index'
|
||||
});
|
||||
},
|
||||
getStoreActivity() {
|
||||
this.$u.api.getStoreActivity().then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.activityInfo = res.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
activityLink({ type, id }) {
|
||||
if(type == 0 || type == 2) return false;
|
||||
// type 1 商品详情页, 2 店铺详情页
|
||||
const url = type == 1 ? 'pageB/sdetails/index' : '';
|
||||
let params = { id: id };
|
||||
// type: 1 // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||
if(type == 1) Object.assign(params, { type: 1 });
|
||||
this.$u.route({
|
||||
url: url,
|
||||
params: params
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.shop {
|
||||
height: calc(100vh - var(--window-top));
|
||||
box-sizing: border-box;
|
||||
background-color: #F0EDF1;
|
||||
.top {
|
||||
padding: 0 30rpx;
|
||||
background-color: #ffffff;
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.local{
|
||||
width: 31rpx;
|
||||
height: 37rpx;
|
||||
}
|
||||
}
|
||||
.swiper-image {
|
||||
background-color: #ffffff;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
.add {
|
||||
width: 115rpx;
|
||||
height: 25rpx;
|
||||
display: flex;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-left: 14rpx;
|
||||
margin-right: 37rpx;
|
||||
> text {
|
||||
width: 80rpx;
|
||||
}
|
||||
> image {
|
||||
width: 24rpx;
|
||||
height: 15rpx;
|
||||
}
|
||||
}
|
||||
.mnue {
|
||||
background-color: #ffffff;
|
||||
width: 35rpx;
|
||||
height: 26rpx;
|
||||
margin-left: 36rpx;
|
||||
}
|
||||
.chengnuo {
|
||||
padding: 30rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
> view {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
> image {
|
||||
width: 23rpx;
|
||||
height: 23rpx;
|
||||
}
|
||||
> text {
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.fenlei {
|
||||
padding: 30rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 20rpx;
|
||||
> view {
|
||||
margin-bottom: 30rpx;
|
||||
&:not(:nth-child(5n)) {
|
||||
margin-right: 70rpx;
|
||||
.shop {
|
||||
height: calc(100vh - var(--window-top));
|
||||
box-sizing: border-box;
|
||||
background-color: #F0EDF1;
|
||||
|
||||
.top {
|
||||
padding: 0 30rpx;
|
||||
background-color: #ffffff;
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.local {
|
||||
width: 31rpx;
|
||||
height: 37rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.activity-view {
|
||||
padding: 20rpx 30rpx;
|
||||
text-align: center;
|
||||
.lingquan {
|
||||
background-color: #ececec;
|
||||
width: 688rpx;
|
||||
height: 138rpx;
|
||||
|
||||
.swiper-image {
|
||||
background-color: #ffffff;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.add {
|
||||
width: 115rpx;
|
||||
height: 25rpx;
|
||||
display: flex;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-left: 14rpx;
|
||||
margin-right: 37rpx;
|
||||
|
||||
>text {
|
||||
width: 80rpx;
|
||||
}
|
||||
|
||||
>image {
|
||||
width: 24rpx;
|
||||
height: 15rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.mnue {
|
||||
background-color: #ffffff;
|
||||
width: 35rpx;
|
||||
height: 26rpx;
|
||||
margin-left: 36rpx;
|
||||
}
|
||||
|
||||
.chengnuo {
|
||||
padding: 30rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
>view {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
>image {
|
||||
width: 23rpx;
|
||||
height: 23rpx;
|
||||
}
|
||||
|
||||
>text {
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fenlei {
|
||||
padding: 30rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
>view {
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
&:not(:nth-child(5n)) {
|
||||
margin-right: 70rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.activity-view {
|
||||
padding: 20rpx 30rpx;
|
||||
text-align: center;
|
||||
.lingquan {
|
||||
background-color: #ececec;
|
||||
width: 688rpx;
|
||||
height: 138rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.cart {
|
||||
z-index: 9;
|
||||
position: fixed;
|
||||
right: 30rpx;
|
||||
bottom: 300rpx;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
background: rgba(253, 211, 96, 1);
|
||||
box-shadow: 0rpx 10rpx 6rpx 0rpx rgba(253, 211, 96, 0.34);
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
>image {
|
||||
width: 56rpx;
|
||||
height: 54rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.cart {
|
||||
z-index: 9;
|
||||
position: fixed;
|
||||
right: 30rpx;
|
||||
bottom: 300rpx;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
background: rgba(253, 211, 96, 1);
|
||||
box-shadow: 0rpx 10rpx 6rpx 0rpx rgba(253,211,96,0.34);
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
> image {
|
||||
width: 56rpx;
|
||||
height: 54rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<view class="guanzhu" @click="guanzhu"><text style="color:#fff;font-size:24rpx">{{info.is_attention == 1 ? '已关注' : '关注'}}</text></view>
|
||||
</view>
|
||||
<view class="userlist" :style="{'top': top + 10 * rpx}">
|
||||
<image class="userlistitem" v-for="(i,j) in [0,1,2]" :style="{'right': (-j * 15 * rpx) + 'px'}"></image>
|
||||
<image class="userlistitem" v-for="(i,j) in [0,1,2]" :style="{'right': (-j * 15 * rpx) + 'px'}" :key="j"></image>
|
||||
</view>
|
||||
<view class="hot" :style="{'top': top + 10 * rpx}">
|
||||
<text class="hottext">2.8w</text>
|
||||
@@ -52,7 +52,7 @@
|
||||
</div> -->
|
||||
</div>
|
||||
<list class="list">
|
||||
<cell class="item" v-for="(i,j) in list" @click="xuanzhong(j)">
|
||||
<cell class="item" v-for="(i,j) in list" :key="j" @click="xuanzhong(j)">
|
||||
<image class="shopimg" :src="i.goods_image"></image>
|
||||
<div class="infos">
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user