Compare commits
No commits in common. "720af35b11cae5a6bca0d2e52521fb6a0e9cacc3" and "b0f224d79bae663ac9316275b4ca087121435829" have entirely different histories.
720af35b11
...
b0f224d79b
21
App.vue
21
App.vue
@ -1,9 +1,6 @@
|
||||
<script>
|
||||
import { mapMutations, mapState } from 'vuex';
|
||||
import { mapMutations } from 'vuex';
|
||||
export default {
|
||||
computed: {
|
||||
...mapState(["hasLogin"])
|
||||
},
|
||||
onLaunch() {
|
||||
// 缓存token
|
||||
uni.getStorage({
|
||||
@ -12,23 +9,9 @@
|
||||
this.loginIn(res.data);
|
||||
}
|
||||
})
|
||||
// 刷新token
|
||||
if (this.hasLogin) {
|
||||
this.refreshToken_function();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['loginIn']),
|
||||
// 刷新token
|
||||
refreshToken_function(){
|
||||
this.$u.api.refreshToken({}).then((res) => {
|
||||
// console.log(res);
|
||||
if (res.errCode == 0) {
|
||||
let token = res.data.token;
|
||||
uni.setStorageSync('token', token);//存储toke值
|
||||
}
|
||||
})
|
||||
},
|
||||
...mapMutations(['loginIn'])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -173,17 +173,10 @@ export default {
|
||||
goods_id: id
|
||||
});
|
||||
},
|
||||
getStoreGoodsList({ id, page, order, gc_id }){
|
||||
getStoreGoodsList({ id, page = 0}){
|
||||
return vm.$u.post('Store/getStoreGoodsList', {
|
||||
id: id,
|
||||
page: page,
|
||||
order: order,
|
||||
gc_id: gc_id,
|
||||
});
|
||||
},
|
||||
getStoreClassifyList({ id }) {
|
||||
return vm.$u.post('Store/getStoreClassifyList', {
|
||||
id: id
|
||||
page:page
|
||||
});
|
||||
},
|
||||
getStoreImgVideoList({id}){
|
||||
@ -313,11 +306,7 @@ export default {
|
||||
// 达人上架商品
|
||||
goodsShelves({live_id}){
|
||||
return vm.$u.post('Specialci/goodsShelves',{live_id})
|
||||
},
|
||||
//
|
||||
addFavoriteStore({ id }) {
|
||||
return vm.$u.post('member/addFavoriteStore',{ fid: id })
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -175,10 +175,9 @@ export default {
|
||||
return vm.$u.post('Member/getFavoritesList', params);
|
||||
},
|
||||
// 取消收藏(商品/店铺)
|
||||
removeFavorite({ id, type }) {
|
||||
removeFavorite({ id }) {
|
||||
return vm.$u.post('Member/removeFavorite', {
|
||||
fav_id: id,
|
||||
type: type,
|
||||
id: id,
|
||||
});
|
||||
},
|
||||
// 设置-用户信息
|
||||
|
@ -3,8 +3,8 @@ const install = (Vue, vm) => {
|
||||
Vue.prototype.$u.http.setConfig({
|
||||
baseUrl: 'https://dmmall.sdbairui.com/api',
|
||||
loadingText: '努力加载中~',
|
||||
loadingTime: 800,
|
||||
// originalData: true
|
||||
loadingTime: 800
|
||||
|
||||
});
|
||||
|
||||
// 请求拦截,配置Token等参数
|
||||
@ -17,28 +17,6 @@ const install = (Vue, vm) => {
|
||||
return config;
|
||||
|
||||
}
|
||||
|
||||
// 响应拦截,如配置,每次请求结束都会执行本方法
|
||||
Vue.prototype.$u.http.interceptor.response = (res) => {
|
||||
if(parseInt(res.errCode) == 0) {
|
||||
// res为服务端返回值,可能有errCode,result等字段
|
||||
// 这里对res.result进行返回,将会在this.$u.post(url).then(res => {})的then回调中的res的到
|
||||
// 如果配置了originalData为true,请留意这里的返回值
|
||||
return res;
|
||||
} else if(res.errCode == 401) {
|
||||
// 假设201为token失效,这里跳转登录
|
||||
vm.$u.toast('验证失败,请重新登录');
|
||||
setTimeout(() => {
|
||||
// 此为uView的方法,详见路由相关文档
|
||||
vm.$u.route('/pageA/login/login')
|
||||
}, 1500)
|
||||
return false;
|
||||
} else {
|
||||
// 如果返回false,则会调用Promise的reject回调,
|
||||
// 并将进入this.$u.post(url).then().catch(res=>{})的catch回调中,res为服务端的返回值
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="daren-item">
|
||||
<image class="head" @click="toDetailsPage" :src="info.member_avatar"></image>
|
||||
<view class="daren-item" @click="toDetailsPage">
|
||||
<image class="head" :src="info.member_avatar"></image>
|
||||
<text class="name">{{ info.member_nickname }}</text>
|
||||
<text class="zhuangtai">状态: {{ info.live_status == 1 ? '正在直播' : '未开播' }}</text>
|
||||
<view class="guanzhu action" @tap="changeType(info.member_id)" v-if="info.is_attention == 1">已关注</view>
|
||||
@ -8,31 +8,17 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { mapState } from 'vuex';
|
||||
export default {
|
||||
name:"daren-item",
|
||||
props: {
|
||||
info: Object,
|
||||
},
|
||||
computed: {
|
||||
...mapState(["login","hasLogin"]),
|
||||
},
|
||||
watch: {
|
||||
info(newVal, old) {
|
||||
// console.log(newVal);
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
methods: {
|
||||
toDetailsPage() {
|
||||
// console.log();
|
||||
if (this.hasLogin) {
|
||||
this.$u.route({
|
||||
url: "/pageB/details/index",
|
||||
params: {
|
||||
id: this.info.member_id
|
||||
}
|
||||
});
|
||||
// 判断是否登录
|
||||
const toke = uni.getStorageSync('token');
|
||||
if (toke) {
|
||||
console.log(toke);
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pageA/login/login'
|
||||
@ -46,8 +32,8 @@ export default {
|
||||
// })
|
||||
},
|
||||
changeType:function(type){
|
||||
// console.log("111")
|
||||
this.$emit("pChangeType",type);
|
||||
console.log("111")
|
||||
this.$emit("pChangeType",type)
|
||||
},
|
||||
|
||||
},
|
||||
|
@ -37,13 +37,12 @@
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.video-item{
|
||||
flex-shrink: 0;
|
||||
width: 335rpx;
|
||||
padding-bottom: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 20rpx;
|
||||
width: 335rpx;
|
||||
box-shadow:0 3rpx 7rpx 0 rgba(153, 153, 153, 0.35);
|
||||
padding-bottom: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
.head{
|
||||
width: 100%;
|
||||
height: 334rpx;
|
||||
@ -196,40 +195,29 @@ export default {
|
||||
// console.log(this.item);
|
||||
this.show = -1;
|
||||
},
|
||||
watch: {
|
||||
item(newVal, old) {
|
||||
// console.log(newVal);
|
||||
this.item = newVal;
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
methods: {
|
||||
showAction() {
|
||||
this.show = this.show > 0 ? -1 : this.item.article_id;
|
||||
},
|
||||
// 点赞
|
||||
articleLike() {
|
||||
this.item.is_like = !this.item.is_like;
|
||||
this.$u.api.articleLike({
|
||||
article_id: this.item.article_id,
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if(res.errCode == 0) {
|
||||
this.$u.toast(res.message);
|
||||
// this.$emit("getArticlelist");
|
||||
this.$emit("getArticlelist");
|
||||
}
|
||||
})
|
||||
},
|
||||
// 收藏
|
||||
articleCollect() {
|
||||
this.item.is_collect = !this.item.is_collect;
|
||||
this.$u.api.articleCollect({
|
||||
article_id: this.item.article_id,
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if(res.errCode == 0) {
|
||||
this.$u.toast(res.message);
|
||||
// this.$emit("getArticlelist");
|
||||
this.$emit("getArticlelist");
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view id="info_title">
|
||||
<view>
|
||||
<view class="url_info" v-for="(item,index) in information" :key="index" @click="route_skip(index)">
|
||||
<view class="url_info" v-for="(item,index) in list" :key="index" @click="route_skip(index)">
|
||||
<image :src="item.url"></image>
|
||||
<text>{{item.text}}</text>
|
||||
</view>
|
||||
@ -56,15 +56,33 @@
|
||||
props:['information'],
|
||||
name: "info_title",
|
||||
data() {
|
||||
|
||||
return {
|
||||
list: [{
|
||||
id: 0,
|
||||
url: '../../static/pageD/info(11).png',
|
||||
text: '公告/资讯'
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
url: '../../static/pageD/info(6).png',
|
||||
text: '活动消息'
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
url: '../../static/pageD/info(14).png',
|
||||
text: '交易物流'
|
||||
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
url: '../../static/pageD/info(15).png',
|
||||
text: '关注消息'
|
||||
},
|
||||
|
||||
],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
information(newVal, old) {
|
||||
console.log(newVal);
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
methods: {
|
||||
// 点击顶部的标题模块跳转
|
||||
route_skip(index) {
|
||||
|
@ -187,9 +187,19 @@
|
||||
rgb.push(color)
|
||||
}
|
||||
return '#' + rgb.join('')
|
||||
},
|
||||
refreshToken_function(){
|
||||
this.$u.api.refreshToken({}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.errCode == 0) {
|
||||
let token = res.data.token;
|
||||
uni.setStorageSync('token', token);//存储toke值
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.refreshToken_function();
|
||||
// 3秒倒计时调用
|
||||
this.remaining_time();
|
||||
this.apiwelcome();
|
||||
|
@ -7,7 +7,7 @@
|
||||
<view class="label">
|
||||
<u-tabs-swiper ref="group" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="88"></u-tabs-swiper>
|
||||
</view>
|
||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish" style="height: 260rpx">
|
||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish" style="height: 130px">
|
||||
<swiper-item class="swiper-item list" v-for="(_, i) in classifyList" :key="i">
|
||||
<!-- 最多显示3个 -->
|
||||
<sitem :info="info" v-for="(info, index) in groupList.slice(0, 3)" :key="index"></sitem>
|
||||
@ -97,8 +97,8 @@ export default {
|
||||
box-sizing: border-box;
|
||||
padding: 0 30rpx;
|
||||
display: flex;
|
||||
> view {
|
||||
&:not(:nth-child(3n)) {
|
||||
&:not(:nth-child(3n)) {
|
||||
> view {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="item" @click="toDetailsPage">
|
||||
<image class="head" :src="info.pintuan_image" mode="widthFix"></image>
|
||||
<image class="head" :src="info.pintuan_image"></image>
|
||||
<text class="title u-line-1">{{ info.pintuan_goods_name }}</text>
|
||||
<view class="price">
|
||||
<view>¥{{ info.pintuan_goods_price }}</view>
|
||||
@ -47,9 +47,9 @@ export default {
|
||||
width: 210rpx;
|
||||
overflow: hidden;
|
||||
.head{
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
border-radius: 10rpx;
|
||||
width: 210rpx;
|
||||
height: 131rpx;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
.title{
|
||||
display: inline-block;
|
||||
|
@ -2,7 +2,7 @@
|
||||
<view class="list">
|
||||
<view class="top">商品推荐</view>
|
||||
<view>
|
||||
<u-tabs-swiper ref="uTabs" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="60"></u-tabs-swiper>
|
||||
<u-tabs-swiper ref="uTabs" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="60" ></u-tabs-swiper>
|
||||
</view>
|
||||
<swiper class="swiper-box" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" :style="{height: swiperHeight}">
|
||||
<swiper-item class="swiper-item" v-for="(_, index) in classifyList" :key="index">
|
||||
@ -39,7 +39,6 @@ export default {
|
||||
watch: {
|
||||
current(index) {
|
||||
this.page = 1;
|
||||
this.goodsList = [];
|
||||
const id = this.classifyList[index].gc_id;
|
||||
this.getGoodsRecommend({gc_id: id});
|
||||
}
|
||||
@ -69,7 +68,7 @@ export default {
|
||||
this.page--;
|
||||
})
|
||||
},
|
||||
getGoodsClassRecommend() {
|
||||
getGoodsClassRecommend(gc_id) {
|
||||
this.$u.api.getGoodsClassRecommend().then(res => {
|
||||
if (res.errCode == 0) {
|
||||
// 初始化 current
|
||||
@ -83,7 +82,6 @@ export default {
|
||||
page: page,
|
||||
gc_id: gc_id,
|
||||
})
|
||||
// this.swiperCurrent = this.current;
|
||||
if (res.errCode == 0) {
|
||||
this.timer = true;
|
||||
if(reload) this.goodsList = res.data.goodsList;
|
||||
@ -95,14 +93,13 @@ export default {
|
||||
},
|
||||
setSwiperHeight() {
|
||||
// height: 230px, margin-bottom: 13
|
||||
const height = Math.ceil(this.goodsList.length / 2) * (540 + 26);
|
||||
this.swiperHeight = height == 0 ? '230rpx' : height + 'rpx';
|
||||
// this.swiperHeight = Math.ceil(this.goodsList.length / 2) * (270 + 13) + 'px';
|
||||
// const height = Math.ceil(this.goodsList.length / 2) * (510 + 26);
|
||||
// this.swiperHeight = height == 0 ? '230rpx' : height + 'rpx';
|
||||
this.swiperHeight = Math.ceil(this.goodsList.length / 2) * (270 + 13) + 'px';
|
||||
},
|
||||
// tabs通知swiper切换
|
||||
tabsChange(index) {
|
||||
this.current = index;
|
||||
// this.getGoodsRecommend({ gc_id: this.classifyList[this.current].gc_id });
|
||||
this.swiperCurrent = index;
|
||||
},
|
||||
// swiper-item左右移动,通知tabs的滑块跟随移动
|
||||
transition(e) {
|
||||
@ -114,9 +111,8 @@ export default {
|
||||
animationfinish(e) {
|
||||
let current = e.detail.current;
|
||||
this.$refs.uTabs.setFinishCurrent(current);
|
||||
this.current = current;
|
||||
this.swiperCurrent = current;
|
||||
// this.getGoodsRecommend({ gc_id: this.classifyList[this.current].gc_id });
|
||||
this.current = current;
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 服务协议 -->
|
||||
<view class="pact" v-if="0">
|
||||
<view class="pact">
|
||||
<view>
|
||||
<view></view>
|
||||
<text>我已详细阅读并同意</text>
|
||||
|
@ -19,7 +19,7 @@ export default {
|
||||
console.log(option)
|
||||
// 协议类型调用不同的的协议
|
||||
let typeIindex = option.index;
|
||||
this.typeIndexRquest(typeIindex);
|
||||
this.typeIndexRquest(typeIindex)
|
||||
},
|
||||
methods: {
|
||||
typeIndexRquest(typeIindex){
|
||||
@ -28,22 +28,16 @@ export default {
|
||||
this.$u.api.documentInfo({
|
||||
document_code: 'agreement'
|
||||
}).then((res)=>{
|
||||
// console.log(res.data.document_title);
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.data.document_title
|
||||
})
|
||||
console.log(res)
|
||||
let data = common.unescapeHTML(res.data.document_content);
|
||||
this.document_content = data;
|
||||
this.document_content = data
|
||||
})
|
||||
}
|
||||
if(typeIindex == 1){
|
||||
this.$u.api.documentInfo({
|
||||
document_code: 'privacy'
|
||||
}).then((res)=>{
|
||||
// console.log(res.data.document_title);
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.data.document_title
|
||||
})
|
||||
console.log(res)
|
||||
let data = common.unescapeHTML(res.data.document_content);
|
||||
this.document_content = data
|
||||
})
|
||||
@ -52,10 +46,7 @@ export default {
|
||||
this.$u.api.documentInfo({
|
||||
document_code: 'use'
|
||||
}).then((res)=>{
|
||||
// console.log(res.data.document_title);
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.data.document_title
|
||||
})
|
||||
console.log(res)
|
||||
let data = common.unescapeHTML(res.data.document_content);
|
||||
this.document_content = data
|
||||
})
|
||||
|
@ -1,29 +1,27 @@
|
||||
<template>
|
||||
<view class="userinfo">
|
||||
|
||||
<view class="user">
|
||||
<view class="info">
|
||||
<view class="avatar">
|
||||
<image :src="item.member_avatar"></image>
|
||||
</view>
|
||||
<view class="box">
|
||||
<view class="name">{{ item.member_nickname }}</view>
|
||||
<view class="num">
|
||||
<text>粉丝数:{{ item.fans_num }}</text>
|
||||
<text>评论数:{{ item.comment_num }}</text>
|
||||
</view>
|
||||
<image></image>
|
||||
<view>
|
||||
<text>达人昵称</text>
|
||||
<text>关注数量</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="btn" :class="[ is_follow ? 'btn-follow' : 'btn-unfollow' ]" @click="following">{{ is_follow ? "已关注" : "关注" }}</view>
|
||||
<view class="guanzhu">关注</view>
|
||||
</view>
|
||||
<view class="profile" :class="{'u-line-2': is_open }" @click="openPro">
|
||||
个性签名:{{ item.recommend ? item.recommend : "对方很懒没有留下任何东西~~" }}
|
||||
</view>
|
||||
<view class="profile">个性签名</view>
|
||||
</view>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
image{
|
||||
background-color: #0f0;
|
||||
}
|
||||
.userinfo{
|
||||
height: 261rpx;
|
||||
width: 100%;
|
||||
// height: 261rpx;
|
||||
padding: 30rpx;
|
||||
.user{
|
||||
display: flex;
|
||||
@ -33,92 +31,53 @@
|
||||
.info{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.avatar {
|
||||
&>image{
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
>image{
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 50%;
|
||||
|
||||
}
|
||||
.box {
|
||||
>view{
|
||||
margin-left: 40rpx;
|
||||
display: flex;
|
||||
height: 79rpx;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
height: 79rpx;
|
||||
margin-left: 40rpx;
|
||||
color: #333;
|
||||
.name {
|
||||
>text:first-child{
|
||||
font-size: 28rpx;
|
||||
color:#333;
|
||||
}
|
||||
.num {
|
||||
>text:last-child{
|
||||
font-size: 24rpx;
|
||||
& > :first-child {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn{
|
||||
.guanzhu{
|
||||
width: 140rpx;
|
||||
height: 60rpx;
|
||||
font-size: 26rpx;
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
color:#fff;
|
||||
line-height: 60rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
.btn-follow {
|
||||
background-color: #007AFF;
|
||||
}
|
||||
.btn-unfollow {
|
||||
background-color: #FF780F;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.profile{
|
||||
margin-top: 20rpx;
|
||||
margin-top: 19rpx;
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
line-height: 1.2;
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
export default {
|
||||
name:"userinfo",
|
||||
props: ["list"],
|
||||
data(){
|
||||
return {
|
||||
item: {},
|
||||
is_open: true,
|
||||
is_follow: false,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
list(newVal, old) {
|
||||
// console.log(newVal);
|
||||
this.item = newVal;
|
||||
this.is_follow = newVal.is_attention;
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
methods: {
|
||||
// 打开个性
|
||||
openPro() {
|
||||
this.is_open = !this.is_open;
|
||||
},
|
||||
// 关注
|
||||
following() {
|
||||
this.$u.api.attentionMember({
|
||||
member_id: this.item.member_id
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.errCode == 0) {
|
||||
this.is_follow = !this.is_follow;
|
||||
this.$u.toast(res.message);
|
||||
} else {
|
||||
this.$u.toast(res.message);
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="details">
|
||||
<view style="border-top: 1rpx solid #ececec;"></view>
|
||||
<userinfo :list="userInfo"></userinfo>
|
||||
<userinfo></userinfo>
|
||||
<view style="border-top: 20rpx solid #ececec;"></view>
|
||||
<u-tabs :is-scroll="false" bar-width="70" ref="tabs" :list="list" :current="num" :bar-style="{
|
||||
'background-color':'#FF780F',
|
||||
@ -13,15 +13,39 @@
|
||||
}"
|
||||
:bold="false"
|
||||
@change="dianji"
|
||||
:show-bar="false">
|
||||
</u-tabs>
|
||||
<scroll-view class="scroll-box" scroll-y="true">
|
||||
<view class="box">
|
||||
<videoItem v-for="item in listInfo" :key="item.article_id" :item="item"
|
||||
@getArticlelist="getArticlelist"></videoItem>
|
||||
<view class="no-data" v-show="!listInfo && !page">暂无数据</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
:show-bar="false"></u-tabs>
|
||||
<swiper class="card" @change="dianji" :current="num">
|
||||
<swiper-item>
|
||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
||||
<view class="box">
|
||||
<view class="list">
|
||||
<view >
|
||||
<videoItem v-for="item in 10" :key="index"></videoItem>
|
||||
</view>
|
||||
<view style="margin-left:20rpx">
|
||||
<videoItem v-for="item in 10" :key="index"></videoItem>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
||||
<view class="box">
|
||||
<view class="list">
|
||||
<view >
|
||||
<zhiboItem v-for="item in 10" :key="index"></zhiboItem>
|
||||
</view>
|
||||
<view style="margin-left:20rpx">
|
||||
<zhiboItem v-for="item in 10" :key="index"></zhiboItem>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
@ -37,85 +61,39 @@
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
.scroll-box {
|
||||
// display: flex;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
.box {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
.no-data {
|
||||
margin: 100rpx auto 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import videoItem from "@/components/index/video-item/index"
|
||||
import zhiboItem from "@/components/index/zhibo-item/index"
|
||||
import userinfo from "../components/details/userinfo"
|
||||
import videoItem from "@/components/index/video-item/index"
|
||||
export default {
|
||||
// name:"details",
|
||||
name:"details",
|
||||
components:{
|
||||
userinfo,
|
||||
videoItem
|
||||
videoItem,
|
||||
zhiboItem
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
list:[
|
||||
{
|
||||
name: '图文'
|
||||
}, {
|
||||
name: '短视频'
|
||||
}, {
|
||||
name: '图文'
|
||||
}
|
||||
],
|
||||
num: 0,
|
||||
userInfo: {}, // 用户信息
|
||||
listInfo: [], // 列表详情
|
||||
member_id: 0,
|
||||
page: 0,
|
||||
num:0
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
// console.log(option);
|
||||
this.member_id = option.id;
|
||||
this.getUserInfo(option.id);
|
||||
this.getArticlelist();
|
||||
},
|
||||
methods:{
|
||||
// 获取信息
|
||||
getUserInfo(id) {
|
||||
this.$u.post("MemberExpert/expertInfo",{member_id: id}).then(res => {
|
||||
// console.log(res);
|
||||
this.userInfo = res.data.info;
|
||||
// console.log(this.userInfo);
|
||||
})
|
||||
},
|
||||
// 获取列表
|
||||
getArticlelist() {
|
||||
this.$u.api.getArticlelist({
|
||||
page: this.page,
|
||||
is_video_img: this.num + 1,
|
||||
member_id: this.member_id,
|
||||
}).then(res => {
|
||||
if (res.errCode == 0) {
|
||||
// console.log(res);
|
||||
this.listInfo = res.data.list;
|
||||
console.log(this.listInfo);
|
||||
} else {
|
||||
console.log(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
dianji(a){
|
||||
console.log(a);
|
||||
console.log(a)
|
||||
if(typeof a == "object"){
|
||||
this.num = a.detail.current
|
||||
}else{
|
||||
this.num = a
|
||||
}
|
||||
this.getArticlelist();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
<text>图片</text>
|
||||
<view v-for="(item,index) in list.photo" :key="index" :style="{'background-color':index == swiper_id ? '#fff' : '#ede8e8'}"></view>
|
||||
</view>
|
||||
<view class="username">@{{ list.member_nickname }}</view>
|
||||
<view class="username">{{ list.member_nickname }}</view>
|
||||
<view class="title">{{ list.article_title }}</view>
|
||||
<view class="info">{{ list.article_content }}</view>
|
||||
<view class="box">
|
||||
@ -29,7 +29,7 @@
|
||||
<text>评论</text>
|
||||
<u-icon name="arrow-down" color="#333" size="28" @click="is_comment=false"></u-icon>
|
||||
</view>
|
||||
<scroll-view class="scroll-box" scroll-y="true" @scrolltolower="scrollBottom">
|
||||
<scroll-view class="scroll-box" scroll-y="true" >
|
||||
<block v-for="(item,index) in commentList" :key="index" v-if="commentList.length">
|
||||
<view class="box">
|
||||
<image :src="item.member_avatar" mode="aspectFill"></image>
|
||||
@ -373,7 +373,6 @@ export default {
|
||||
return {
|
||||
list:{},
|
||||
swiper_id: "",
|
||||
page: 1, //
|
||||
cart_type: false, // 显示购物车
|
||||
is_comment: false, // 显示评论
|
||||
is_focus: false, // 聚焦
|
||||
@ -490,10 +489,6 @@ export default {
|
||||
current: e.currentTarget.dataset.url,
|
||||
})
|
||||
},
|
||||
// 评论滚动到底部
|
||||
scrollBottom(e) {
|
||||
console.log(e);
|
||||
},
|
||||
// 跳转到商品
|
||||
gotoInfo(id) {
|
||||
console.log(id);
|
||||
|
@ -135,7 +135,7 @@
|
||||
</u-popup>
|
||||
<!-- 普通商品 tool -->
|
||||
<view class="tloos" v-if="type == 1">
|
||||
<view class="navs" @click="toOthersPage('pageC/merchant/index?id=' + storeInfo.store_id)">
|
||||
<view class="navs">
|
||||
<image src="/static/image/common/18.png"></image>
|
||||
店铺
|
||||
</view>
|
||||
@ -155,7 +155,7 @@
|
||||
<!-- 秒杀 tool -->
|
||||
<view class="spike-tool" v-if="type==3">
|
||||
<view class="left">
|
||||
<view @click="toOthersPage('pageC/merchant/index?id=' + storeInfo.store_id)">
|
||||
<view>
|
||||
<image src="/static/image/common/18.png"></image>
|
||||
<text>店铺</text>
|
||||
</view>
|
||||
@ -183,8 +183,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
list: [], // 轮播图列表
|
||||
goodsInfo: {}, // 商品信息
|
||||
storeInfo: {},
|
||||
goodsInfo: {}, // 商品信息
|
||||
glist: [], // 规格列表
|
||||
id: 0, // 商品id/秒杀id/拼团 id
|
||||
type: '', // 商品类型 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||
@ -312,7 +311,6 @@ export default {
|
||||
if (res.errCode == 0) {
|
||||
this.evaluate = res.data.goods_evaluate_info;
|
||||
this.goodsInfo = res.data.goods;
|
||||
this.storeInfo = res.data.store;
|
||||
this.setSwiperList(res.data.goods_image);
|
||||
this.glist = res.data.spec_list;
|
||||
// console.log(this.goodsInfo.mobile_body);
|
||||
@ -454,9 +452,6 @@ export default {
|
||||
title: title
|
||||
});
|
||||
},
|
||||
toOthersPage(url) {
|
||||
this.$u.route(url);
|
||||
},
|
||||
viewComment() {
|
||||
this.$u.route({
|
||||
url: 'pageB/comment/index',
|
||||
|
@ -200,13 +200,11 @@ export default {
|
||||
if(!this.debounce) return;
|
||||
this.debounce = false;
|
||||
if(this.orderType == 2) {
|
||||
// this.sendOrder(0);
|
||||
this.withImmediate();
|
||||
} else if(this.orderType == 1) {
|
||||
this.sendOrder(0);
|
||||
} else {
|
||||
this.sendOrder(1);
|
||||
}
|
||||
else this.sendOrder(1);
|
||||
},
|
||||
// @params {Number} ifcart 是否是购物车商品
|
||||
sendOrder(ifcart) {
|
||||
@ -256,7 +254,6 @@ export default {
|
||||
// console.log(params);
|
||||
this.$u.api.sendOrder(params).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
// this.withImmediate();
|
||||
this.$u.route({
|
||||
type: 'redirect',
|
||||
url: '/pageC/cart/cashier',
|
||||
|
@ -1,215 +0,0 @@
|
||||
<template>
|
||||
<view class="classify-goods">
|
||||
<view class="tab-container">
|
||||
<view class="overall" :class="{ 'current' : current == 0 }" @click="switchCurrent(0)">综合</view>
|
||||
<view class="salenum" :class="{ 'current' : current == 1 }" @click="switchCurrent(1)">销量</view>
|
||||
<view class="new" :class="{ 'current' : current == 2 }" @click="switchCurrent(2)">新品</view>
|
||||
<view class="price" :class="{ 'current' : current == 3 }" @click="switchCurrent(3)">
|
||||
<view class="text">价格</view>
|
||||
<view class="icon">
|
||||
<u-icon name="arrow-up-fill" :color="(current == 3 && priceOrderAsc) ? '#FF780F' : '#333333'" size="22"></u-icon>
|
||||
<u-icon name="arrow-down-fill" :color="(current == 3 && !priceOrderAsc) ? '#FF780F' : '#333333'" size="22"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y class="scroll-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore">
|
||||
<view class="goods-container">
|
||||
<view v-for="goods in goodsList" :key="goods.goods_id" class="goods-view" @click="toDetailsPage(goods.goods_id)">
|
||||
<goodsItem :info="goods"></goodsItem>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
|
||||
<u-empty mode="list" v-if="!goodsList.length"></u-empty>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import goodsItem from "@/components/shop/list/item"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageSize: 15,
|
||||
cid: '',
|
||||
page: 1,
|
||||
current: 0,
|
||||
priceOrderAsc: true, // 是否升序
|
||||
goodsList: [],
|
||||
scrollHeight: '',
|
||||
loadStatus: 'loadmore',
|
||||
timer: true, // 防止上拉加载短时间内多次调用
|
||||
}
|
||||
},
|
||||
components: {
|
||||
goodsItem
|
||||
},
|
||||
watch: {
|
||||
current(value) {
|
||||
this.page = 1;
|
||||
this.goodsList = [];
|
||||
this.getStoreGoodsList({ laod: 'reload' });
|
||||
},
|
||||
priceOrderAsc(value) {
|
||||
this.page = 1;
|
||||
this.getStoreGoodsList({ laod: 'reload' });
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
if(option.cid == 'all') {
|
||||
this.current = 0;
|
||||
this.cid = 0;
|
||||
} else if(option.cid == 'new') {
|
||||
this.current = 2;
|
||||
this.cid = 0;
|
||||
} else {
|
||||
this.cid = option.cid;
|
||||
}
|
||||
this.setTitle(option.name);
|
||||
this.sid = option.sid;
|
||||
this.setViewHeight();
|
||||
this.getStoreGoodsList({ load: 'reload' });
|
||||
},
|
||||
methods: {
|
||||
setOrderSort() {
|
||||
let sort = '';
|
||||
if(this.current == 0) {
|
||||
sort = 'goods_sort';
|
||||
} else if(this.current == 1) {
|
||||
sort = 'goods_salenum';
|
||||
} else if(this.current == 2) {
|
||||
sort = 'goods_addtime';
|
||||
} else if(this.current == 3) {
|
||||
if(this.priceOrderAsc) sort = 'goods_price_asc';
|
||||
else sort = 'goods_price_desc';
|
||||
}
|
||||
return sort;
|
||||
},
|
||||
// 排序方式 goods_salenum:销量 evaluation_count:评价 goods_price_asc:价格从低到高 goods_price_desc:价格从高到低
|
||||
async getStoreGoodsList({ load = 'reload' } = {}) {
|
||||
const sort = this.setOrderSort();
|
||||
let params = {
|
||||
id: this.sid,
|
||||
page: this.page,
|
||||
order: sort,
|
||||
};
|
||||
console.log(this.cid);
|
||||
if(this.cid) Object.assign(params, { gc_id: this.cid })
|
||||
const res = await this.$u.api.getStoreGoodsList(params);
|
||||
this.timer = true;
|
||||
if(res.errCode == 0) {
|
||||
this.pageSize = res.data.per_page;
|
||||
if(load == 'reload') this.goodsList = res.data.data;
|
||||
else if(load == 'loadmore') this.goodsList.push(...res.data.data);
|
||||
}
|
||||
return res.data.data.length;
|
||||
},
|
||||
loadMore() {
|
||||
if(this.goodsList.length < this.pageSize) return false;
|
||||
if(!this.timer) return false;
|
||||
this.loadStatus = "loading";
|
||||
this.page++;
|
||||
this.getStoreGoodsList({ load: 'loadmore' }).then(length => {
|
||||
if(length == 0) {
|
||||
this.page--;
|
||||
this.loadStatus = 'nomore';
|
||||
} else {
|
||||
this.loadStatus = 'loading';
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loadStatus = "nomore";
|
||||
this.page--;
|
||||
})
|
||||
},
|
||||
switchCurrent(current) {
|
||||
if(current == 3 && this.current == 3) this.priceOrderAsc = !this.priceOrderAsc;
|
||||
this.current = current;
|
||||
},
|
||||
setViewHeight() {
|
||||
const res = uni.getSystemInfoSync();
|
||||
this.scrollHeight = res.windowHeight - 90 / 2 + 'px';
|
||||
// console.log(this.scrollHeight);
|
||||
},
|
||||
toDetailsPage(id) {
|
||||
this.$u.route('/pageB/sdetails/index', {
|
||||
id: id,
|
||||
type: 1 // 商品详情 商品类型 1普通 2拼团 3秒杀 4优惠券
|
||||
});
|
||||
},
|
||||
setTitle(title){
|
||||
uni.setNavigationBarTitle({
|
||||
title: title
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.classify-goods {
|
||||
width: 100%;
|
||||
background-color: #FFFFFF;
|
||||
.tab-container {
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 40rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
> view {
|
||||
height: 30rpx;
|
||||
line-height: 30rpx;
|
||||
font-size: 32rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
}
|
||||
.price {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
.text {
|
||||
margin-right: 5rpx;
|
||||
}
|
||||
.icon {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
.current {
|
||||
color: rgba(255,120,15,1);
|
||||
}
|
||||
}
|
||||
.scroll-container {
|
||||
box-sizing: border-box;
|
||||
padding: 0 30rpx;
|
||||
.goods-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
// .goods-view {
|
||||
// margin: 0 auto;
|
||||
// width: 690rpx;
|
||||
// display: flex;
|
||||
// background-color: #F5F5F5;
|
||||
// margin-bottom: 30rpx;
|
||||
// align-items: center;
|
||||
// > image {
|
||||
// width: 220rpx;
|
||||
// height: 170rpx;
|
||||
// flex-shrink: 0;
|
||||
// margin-right: 30rpx;
|
||||
// }
|
||||
// .right {
|
||||
// width: 418rpx;
|
||||
// .name {
|
||||
// font-size: 30rpx;
|
||||
// color: rgba(51,51,51,1);
|
||||
// margin-bottom: 20rpx;
|
||||
// }
|
||||
// .briefing {
|
||||
// font-size: 28rpx;
|
||||
// color: rgba(102,102,102,1);
|
||||
// line-height: 36rpx;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
</style>
|
@ -3,14 +3,14 @@
|
||||
<view class="top">
|
||||
<image :src="info.store_avatar"></image>
|
||||
<view class="name">{{info.store_name}}</view>
|
||||
<view class="info">创建时间:{{ info.store_addtime | date('yyyy年mm月dd日') }} | {{ info.live_store_address || '暂无地址' }}</view>
|
||||
<view class="info">创建时间:{{store_addtime|date}} | {{info.live_store_address}}</view>
|
||||
<view class="num">
|
||||
<view>
|
||||
<view class="value">{{info.store_collect}}</view>
|
||||
<view class="title">粉丝数</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="value">{{ info.evaluatecount }}</view>
|
||||
<view class="value">23435</view>
|
||||
<view class="title">评价</view>
|
||||
</view>
|
||||
<view>
|
||||
@ -22,9 +22,9 @@
|
||||
<view class="bottom">
|
||||
<view class="title">
|
||||
<view>工商执照</view>
|
||||
<u-icon name="arrow-down" color="#999999" size="28"></u-icon>
|
||||
<image></image>
|
||||
</view>
|
||||
<view class="image-list" v-if="info.business_licence_number_electronic">
|
||||
<view class="image-list">
|
||||
<image :src="info.business_licence_number_electronic"></image>
|
||||
</view>
|
||||
</view>
|
||||
@ -37,9 +37,9 @@ export default {
|
||||
info:{}
|
||||
}
|
||||
},
|
||||
onLoad(option){
|
||||
this.$u.api.getStoreInfo({id: option.id}).then((res)=>{
|
||||
// console.log(res)
|
||||
onLoad(){
|
||||
this.$u.api.getStoreInfo({id:1}).then((res)=>{
|
||||
console.log(res)
|
||||
this.info = res.data
|
||||
})
|
||||
}
|
||||
@ -113,6 +113,11 @@ export default {
|
||||
font-weight: 500;
|
||||
color: rgba(51,51,51,1);
|
||||
}
|
||||
> image {
|
||||
width: 24rpx;
|
||||
height: 14rpx;
|
||||
background-color: aqua;
|
||||
}
|
||||
}
|
||||
.image-list {
|
||||
background-color: #ffffff;
|
||||
|
@ -1,200 +0,0 @@
|
||||
<template>
|
||||
<view class="classify-goods">
|
||||
<view class="tab-container">
|
||||
<view class="overall" :class="{ 'current' : current == 0 }" @click="switchCurrent(0)">综合</view>
|
||||
<view class="salenum" :class="{ 'current' : current == 1 }" @click="switchCurrent(1)">销量</view>
|
||||
<view class="new" :class="{ 'current' : current == 2 }" @click="switchCurrent(2)">新品</view>
|
||||
<view class="price" :class="{ 'current' : current == 3 }" @click="switchCurrent(3)">
|
||||
<view class="text">价格</view>
|
||||
<view class="icon">
|
||||
<u-icon name="arrow-up-fill" :color="(current == 3 && priceOrderAsc) ? '#FF780F' : '#333333'" size="22"></u-icon>
|
||||
<u-icon name="arrow-down-fill" :color="(current == 3 && !priceOrderAsc) ? '#FF780F' : '#333333'" size="22"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y class="scroll-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore">
|
||||
<view class="goods-container">
|
||||
<view v-for="goods in goodsList" :key="goods.goods_id" class="goods-view" @click="toDetailsPage(goods.goods_id)">
|
||||
<goodsItem :info="goods"></goodsItem>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
|
||||
<u-empty mode="list" v-if="!goodsList.length"></u-empty>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import goodsItem from "@/components/shop/list/item"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageSize: 15,
|
||||
cid: '',
|
||||
page: 1,
|
||||
current: 0,
|
||||
priceOrderAsc: true, // 是否升序
|
||||
goodsList: [],
|
||||
scrollHeight: '',
|
||||
loadStatus: 'loadmore',
|
||||
timer: true, // 防止上拉加载短时间内多次调用
|
||||
}
|
||||
},
|
||||
components: {
|
||||
goodsItem
|
||||
},
|
||||
props: {
|
||||
sid: String
|
||||
},
|
||||
watch: {
|
||||
current(value) {
|
||||
this.page = 1;
|
||||
this.goodsList = [];
|
||||
this.getStoreGoodsList({ laod: 'reload' });
|
||||
},
|
||||
priceOrderAsc(value) {
|
||||
this.page = 1;
|
||||
this.getStoreGoodsList({ laod: 'reload' });
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.setViewHeight();
|
||||
this.getStoreGoodsList({ load: 'reload' });
|
||||
},
|
||||
methods: {
|
||||
setOrderSort() {
|
||||
let sort = '';
|
||||
if(this.current == 0) {
|
||||
sort = 'goods_sort';
|
||||
} else if(this.current == 1) {
|
||||
sort = 'goods_salenum';
|
||||
} else if(this.current == 2) {
|
||||
sort = 'goods_addtime';
|
||||
} else if(this.current == 3) {
|
||||
if(this.priceOrderAsc) sort = 'goods_price_asc';
|
||||
else sort = 'goods_price_desc';
|
||||
}
|
||||
return sort;
|
||||
},
|
||||
// 排序方式 goods_salenum:销量 evaluation_count:评价 goods_price_asc:价格从低到高 goods_price_desc:价格从高到低
|
||||
async getStoreGoodsList({ load = 'reload' } = {}) {
|
||||
const sort = this.setOrderSort();
|
||||
const res = await this.$u.api.getStoreGoodsList({
|
||||
id: this.sid,
|
||||
page: this.page,
|
||||
order: sort,
|
||||
})
|
||||
this.timer = true;
|
||||
if(res.errCode == 0) {
|
||||
this.pageSize = res.data.per_page;
|
||||
if(load == 'reload') this.goodsList = res.data.data;
|
||||
else if(load == 'loadmore') this.goodsList.push(...res.data.data);
|
||||
}
|
||||
return res.data.data.length;
|
||||
},
|
||||
loadMore() {
|
||||
if(this.goodsList.length < this.pageSize) return false;
|
||||
if(!this.timer) return false;
|
||||
this.loadStatus = "loading";
|
||||
this.page++;
|
||||
this.getStoreGoodsList({ load: 'loadmore' }).then(length => {
|
||||
if(length == 0) {
|
||||
this.page--;
|
||||
this.loadStatus = 'nomore';
|
||||
} else {
|
||||
this.loadStatus = 'loading';
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loadStatus = "nomore";
|
||||
this.page--;
|
||||
})
|
||||
},
|
||||
switchCurrent(current) {
|
||||
if(current == 1 && this.current == 1) this.priceOrderAsc = !this.priceOrderAsc;
|
||||
this.current = current;
|
||||
},
|
||||
setViewHeight() {
|
||||
const res = uni.getSystemInfoSync();
|
||||
const otherHeight = 347 + 140 + 20 + 98;
|
||||
this.scrollHeight = res.windowHeight - otherHeight / 2 + 'px';
|
||||
// console.log(this.scrollHeight);
|
||||
},
|
||||
toDetailsPage(id) {
|
||||
this.$u.route('/pageB/sdetails/index', {
|
||||
id: id,
|
||||
type: 1 // 商品详情 商品类型 1普通 2拼团 3秒杀 4优惠券
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.classify-goods {
|
||||
width: 100%;
|
||||
background-color: #FFFFFF;
|
||||
.tab-container {
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 40rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
> view {
|
||||
height: 30rpx;
|
||||
line-height: 30rpx;
|
||||
font-size: 32rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
}
|
||||
.price {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
.text {
|
||||
margin-right: 5rpx;
|
||||
}
|
||||
.icon {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
.current {
|
||||
color: rgba(255,120,15,1);
|
||||
}
|
||||
}
|
||||
.scroll-container {
|
||||
box-sizing: border-box;
|
||||
padding: 0 30rpx;
|
||||
.goods-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
// .goods-view {
|
||||
// margin: 0 auto;
|
||||
// width: 690rpx;
|
||||
// display: flex;
|
||||
// background-color: #F5F5F5;
|
||||
// margin-bottom: 30rpx;
|
||||
// align-items: center;
|
||||
// > image {
|
||||
// width: 220rpx;
|
||||
// height: 170rpx;
|
||||
// flex-shrink: 0;
|
||||
// margin-right: 30rpx;
|
||||
// }
|
||||
// .right {
|
||||
// width: 418rpx;
|
||||
// .name {
|
||||
// font-size: 30rpx;
|
||||
// color: rgba(51,51,51,1);
|
||||
// margin-bottom: 20rpx;
|
||||
// }
|
||||
// .briefing {
|
||||
// font-size: 28rpx;
|
||||
// color: rgba(102,102,102,1);
|
||||
// line-height: 36rpx;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="merchant">
|
||||
<!-- <view v-if="show" class="show-hide">
|
||||
<view v-if="show">
|
||||
<view>
|
||||
<image></image>
|
||||
<view>消息</view>
|
||||
@ -13,70 +13,67 @@
|
||||
<image></image>
|
||||
<view>我的</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="top" :style="{'background-image':'url(' + info.store_banner + ')'}">
|
||||
<image :src="info.store_avatar"></image>
|
||||
<view class="info">
|
||||
<view class="name u-line-1">{{info.store_name}}</view>
|
||||
<view class="num">粉丝数:{{info.store_collect}}</view>
|
||||
</view>
|
||||
<view class="btn" @click="attentionMember">
|
||||
<image src="/static/image/shop/8.png"></image>
|
||||
<view>{{ info.is_attention == 0 ? "关注" : "已关注" }}</view>
|
||||
<view class="btn">
|
||||
<image></image>
|
||||
<view>{{ 0 ? "关注" : "已关注" }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="follow" v-if="info.attention_member && info.attention_member.length">
|
||||
<view class="follow">
|
||||
<view class="title">关注</view>
|
||||
<scroll-view scroll-x class="list">
|
||||
<view class="list-items">
|
||||
<view v-for="(item, index) in info.attention_member" :key="index" class="item">
|
||||
<image :src="item.friend_frommavatar"></image>
|
||||
<view class="nickname u-line-1">{{ item.friend_frommname }}</view>
|
||||
<view v-for="(item, index) in 9" :key="index" class="item">
|
||||
<image></image>
|
||||
<view class="nickname u-line-1">用户昵称</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="main">
|
||||
<view class="video-image" v-if="cur==0 && indextop.length">
|
||||
<view class="classify" v-if="cur==0">
|
||||
<view v-for="item in indextop" :key="item.id">
|
||||
<videoTop :url="item.url" v-if="item.type == 2"></videoTop>
|
||||
<imageTop v-else :url="item.url"></imageTop>
|
||||
</view>
|
||||
<view style="display: flex;flex-wrap: wrap;" v-if="indexlist.length">
|
||||
<view style="display: flex;flex-wrap: wrap;">
|
||||
<listitem :style="{'margin-left': index%2 == 1 ? '20rpx':'0'}" v-for="(item,index) in indexlist" :key="item.id" :type="item.type" :url="item.url"></listitem>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- 商品筛选排序未完成 -->
|
||||
<view class="item" v-if="cur==1">
|
||||
<!-- <item v-for="item in list" :key="item.gc_id" :info="item" class="item"></item> -->
|
||||
<goods :sid="sid"></goods>
|
||||
<item v-for="item in list" :key="item.gc_id" :info="item" class="item"></item>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tabbar">
|
||||
<view @click="switchCurrent(0)">
|
||||
<image src="/static/image/shop/9.png"></image>
|
||||
<view @click="cur=0">
|
||||
<image></image>
|
||||
<view>商品分类</view>
|
||||
</view>
|
||||
<view @click="switchCurrent(1)">
|
||||
<image src="/static/image/shop/10.png" v-if="cur != 1"></image>
|
||||
<image src="/static/image/shop/13.png" v-else></image>
|
||||
<view :style="{ color: cur == 1 ? '#FF780F' : '#999999' }">商品列表</view>
|
||||
<view @click="cur=1">
|
||||
<image></image>
|
||||
<view>商品列表</view>
|
||||
</view>
|
||||
<view @click="switchCurrent(2)">
|
||||
<image src="/static/image/shop/11.png"></image>
|
||||
<view @click="toDetailsPage">
|
||||
<image></image>
|
||||
<view>店铺信息</view>
|
||||
</view>
|
||||
<view @click="switchCurrent(3)">
|
||||
<image src="/static/image/shop/12.png"></image>
|
||||
<view>
|
||||
<image></image>
|
||||
<view>联系客服</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
// import item from "@/components/shop/list/item"
|
||||
import goods from "./goods"
|
||||
import item from "@/components/shop/list/item"
|
||||
import videoTop from "../components/merchant/video-top"
|
||||
import imageTop from "../components/merchant/image-top"
|
||||
import listitem from "../components/merchant/list-item"
|
||||
@ -84,7 +81,6 @@ import listitem from "../components/merchant/list-item"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
sid: '',
|
||||
show: false,
|
||||
cur: 0,
|
||||
list:[],
|
||||
@ -94,64 +90,38 @@ export default {
|
||||
}
|
||||
},
|
||||
components:{
|
||||
goods,
|
||||
item,
|
||||
videoTop,
|
||||
imageTop,
|
||||
listitem
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getStoreInfo();
|
||||
this.getStoreImgVideoList();
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
// console.log(e.index);
|
||||
if(e.index == 1) this.$u.route('/pageC/cart/index');
|
||||
// if(e.index == 0) this.show = true;
|
||||
},
|
||||
methods: {
|
||||
switchCurrent(current) {
|
||||
this.cur = current;
|
||||
if(current == 0) {
|
||||
this.$u.route('/pageC/merchant/storeClassify', { id: this.sid });
|
||||
} else if(current == 2) {
|
||||
this.$u.route('./details', { id: this.sid });
|
||||
}
|
||||
},
|
||||
getStoreInfo() {
|
||||
this.$u.api.getStoreInfo({ id: this.sid }).then((res)=>{
|
||||
this.info = res.data;
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
getStoreImgVideoList() {
|
||||
this.$u.api.getStoreImgVideoList({ id: this.sid }).then((res)=>{
|
||||
if(res.data.length) {
|
||||
this.indextop = [res.data[0], res.data[1]];
|
||||
this.indexlist = res.data.slice(2,);
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
attentionMember() {
|
||||
this.$u.api.attentionMember({ member_id: this.info.member_id }).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.getStoreInfo();
|
||||
}
|
||||
this.$u.toast(res.message);
|
||||
})
|
||||
},
|
||||
toDetailsPage() {
|
||||
uni.navigateTo({
|
||||
url: './details'
|
||||
});
|
||||
}
|
||||
},
|
||||
onLoad(option){
|
||||
this.sid = option.id;
|
||||
console.log(this.sid);
|
||||
this.getStoreInfo();
|
||||
this.getStoreImgVideoList();
|
||||
onLoad(){
|
||||
this.$u.api.getStoreGoodsList({id:1}).then((res)=>{
|
||||
// console.log(res.data)
|
||||
this.list= res.data.list
|
||||
})
|
||||
this.$u.api.getStoreImgVideoList({id:1}).then((res)=>{
|
||||
console.log(res.data)
|
||||
this.indextop = [res.data[0],res.data[1]]
|
||||
this.indexlist = res.data.slice(2,)
|
||||
})
|
||||
this.$u.api.getStoreInfo({id:1}).then((res)=>{
|
||||
console.log(res)
|
||||
this.info = res.data
|
||||
})
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.merchant {
|
||||
// min-height: 100vh;
|
||||
min-height: 100vh;
|
||||
background-color: #ECECEC;
|
||||
padding-top: calc(350rpx - var(--window-top));
|
||||
.top {
|
||||
@ -198,6 +168,7 @@ export default {
|
||||
height: 28rpx;
|
||||
flex-shrink: 0;
|
||||
margin-right: 14rpx;
|
||||
background-color: aqua;
|
||||
}
|
||||
> view {
|
||||
white-space: nowrap;
|
||||
@ -259,18 +230,13 @@ export default {
|
||||
}
|
||||
}
|
||||
.main{
|
||||
.video-image {
|
||||
padding-bottom: 98rpx;
|
||||
}
|
||||
> view {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
padding-bottom: 98rpx;
|
||||
}
|
||||
.tabbar {
|
||||
border-top: 1rpx #DBDADA solid;
|
||||
width: 100%;
|
||||
height: 98rpx;
|
||||
background: rgba(251,251,251,1);
|
||||
background: rgb(95, 64, 64);
|
||||
display: flex;
|
||||
padding: 10rpx 55rpx;
|
||||
position: fixed;
|
||||
@ -285,6 +251,7 @@ export default {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-bottom: 15rpx;
|
||||
background-color: aqua;
|
||||
}
|
||||
> view {
|
||||
font-size: 24rpx;
|
||||
@ -292,5 +259,12 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.item{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
// margin-top: 20rpx;
|
||||
padding:25rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,88 +0,0 @@
|
||||
<template>
|
||||
<view class="classify">
|
||||
<view class="item-view" @click="viewGoods({ type: 'all', name: '全部宝贝' })">
|
||||
<view>全部宝贝</view>
|
||||
<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
|
||||
</view>
|
||||
<view class="item-view" @click="viewGoods({ type: 'new', name: '新品上架' })">
|
||||
<view>新品上架</view>
|
||||
<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
|
||||
</view>
|
||||
<view class="classify-container">
|
||||
<view v-for="classifyA in classifyList" :key="classifyA.gc_parent_id" class="classify-view">
|
||||
<view class="title">{{ classifyA.gc_parent_name }}</view>
|
||||
<view class="classifyA-view">
|
||||
<view v-for="classifyB in classifyA.gc_child" :key="classifyB.gc_id" class="classifyB-item u-line-1" @click="viewGoods({ type: classifyB.gc_parent_id, name: classifyB.gc_parent_name })">{{ classifyB.gc_parent_name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
classifyList: [],
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.sid = option.id;
|
||||
this.getStoreClassifyList();
|
||||
},
|
||||
methods: {
|
||||
viewGoods({ type, name }) {
|
||||
console.log(11);
|
||||
this.$u.route('pageC/merchant/classifyGoods', { sid: this.sid, cid: type, name: name });
|
||||
},
|
||||
getStoreClassifyList() {
|
||||
this.$u.api.getStoreClassifyList({ id: this.sid }).then(res => {
|
||||
this.classifyList = res.data;
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.classify {
|
||||
padding-top: 20rpx;
|
||||
background-color: #ECECEC;
|
||||
min-height: calc(100vh - var(--window-top));
|
||||
.item-view {
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 35rpx 30rpx;
|
||||
font-size: 30rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
.classify-container {
|
||||
.classify-view {
|
||||
padding: 30rpx 35rpx;
|
||||
background-color: #FFFFFF;
|
||||
margin-bottom: 20rpx;
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
margin-bottom: 34rpx;
|
||||
}
|
||||
.classifyA-view {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
.classifyB-item {
|
||||
width: 335rpx;
|
||||
height: 74rpx;
|
||||
line-height: 74rpx;
|
||||
background: rgba(255,241,230,1);
|
||||
padding: 0 20rpx;
|
||||
font-size: 30rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -3,13 +3,13 @@
|
||||
<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" margin-top="300"></u-empty>
|
||||
<u-swipe-action
|
||||
v-for="(item, index) in list" :key="index"
|
||||
:index='item.store_id'
|
||||
:index='item.favlog_id'
|
||||
:show="item.show"
|
||||
:options="options"
|
||||
@click="removeFavorite"
|
||||
@open="open"
|
||||
>
|
||||
<view class="item u-border-bottom" @click="toDetailsPage(item.store_id)">
|
||||
<view class="item u-border-bottom">
|
||||
<image :src="item.store_avatar"></image>
|
||||
<!-- 此层wrap在此为必写的,否则可能会出现标题定位错误 -->
|
||||
<view class="title-wrap">
|
||||
@ -46,15 +46,12 @@ export default {
|
||||
getStoreFavoritesList() {
|
||||
this.$u.api.getFavoritesList({
|
||||
type: 2 // 店铺 type: 2
|
||||
}).then(res => {
|
||||
this.list = res.data;
|
||||
})
|
||||
},
|
||||
removeFavorite(id) {
|
||||
console.log(id);
|
||||
this.$u.api.removeFavorite({
|
||||
id: id,
|
||||
type: 'store'
|
||||
id: id
|
||||
}).then(res => {
|
||||
this.$u.toast(res.message);
|
||||
if(res.errCode == 0) {
|
||||
@ -62,11 +59,6 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
toDetailsPage(id) {
|
||||
this.$u.route('pageC/merchant/index', {
|
||||
id: id
|
||||
});
|
||||
},
|
||||
open(index) {
|
||||
// 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
|
||||
// 原本为'false',再次设置为'false'会无效
|
||||
|
51
pages.json
51
pages.json
@ -84,7 +84,7 @@
|
||||
{
|
||||
"path": "follow/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "推荐达人",
|
||||
"navigationBarTitleText": "推荐达人列表",
|
||||
"app-plus":{
|
||||
"titleNView":{
|
||||
"backgroundColor":"#ffffff"
|
||||
@ -95,7 +95,7 @@
|
||||
{
|
||||
"path": "details/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "达人详情",
|
||||
"navigationBarTitleText": "",
|
||||
"app-plus":{
|
||||
"titleNView":{
|
||||
"backgroundColor":"#ffffff"
|
||||
@ -301,28 +301,23 @@
|
||||
{
|
||||
"path": "merchant/index",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"app-plus": {
|
||||
"titleSize": "36px",
|
||||
"titleNView": {
|
||||
"titleColor": "#333333",
|
||||
"backgroundColor": "rgba(255,255,255,0)",
|
||||
"buttons": [
|
||||
// {
|
||||
// "type":"none",
|
||||
// "text":"\ue62b",
|
||||
// "float":"right",
|
||||
// "fontSize":"20",
|
||||
// "fontSrc": "/static/fonts/more.ttf",
|
||||
// "color": "#FFFFFF"
|
||||
// },
|
||||
{
|
||||
"type":"none",
|
||||
"text":"...",
|
||||
"float":"right",
|
||||
"fontSize":"16"
|
||||
},
|
||||
{
|
||||
"type":"none",
|
||||
"text":"\ue636",
|
||||
"text":"\ue582",
|
||||
"float":"right",
|
||||
"fontSize":"22",
|
||||
"fontSrc": "/static/fonts/cart.ttf",
|
||||
"color": "#FFFFFF"
|
||||
"fontSize":"16"
|
||||
}
|
||||
],
|
||||
"searchInput": {
|
||||
@ -350,32 +345,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "merchant/storeClassify",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品分类",
|
||||
"app-plus": {
|
||||
"titleSize": "36px",
|
||||
"titleNView": {
|
||||
"titleColor": "#333333",
|
||||
"backgroundColor": "#FFFFFF"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "merchant/classifyGoods",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"app-plus": {
|
||||
"titleSize": "36px",
|
||||
"titleNView": {
|
||||
"titleColor": "#333333",
|
||||
"backgroundColor": "#FFFFFF"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "cart/ConfirmOrder",
|
||||
"style": {
|
||||
|
@ -61,7 +61,7 @@
|
||||
<view></view>
|
||||
<text>推荐达人</text>
|
||||
</view>
|
||||
<u-icon name="arrow-right" color="#666" size="28"></u-icon>
|
||||
<image class="right" src="/static/image/common/1.png"></image>
|
||||
</view>
|
||||
<view class="tuijianlist">
|
||||
<!-- <darenItem style="margin-right:23rpx"></darenItem>
|
||||
@ -69,12 +69,16 @@
|
||||
<darenItem v-for="item in recommendList.slice(0,3)" :key="item.id" :info="item" v-on:pChangeType="changeType"></darenItem>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rec-list">
|
||||
<view class="rec-box">
|
||||
<!-- {{ fansList }} -->
|
||||
<videoItem isguanzhu="true" v-for="item in fansList" :key="item.article_id"
|
||||
:item="item"></videoItem>
|
||||
<view class="no-data" v-show="!fansList.length">您还没有关注哦,赶紧去点点关注!</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>
|
||||
@ -177,17 +181,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.rec-list {
|
||||
width: 100%;
|
||||
.rec-box {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
.no-data {
|
||||
margin: 200rpx auto 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
@ -213,8 +206,7 @@
|
||||
recommendList: [], // 推荐达人
|
||||
indexImageSwiper: [],
|
||||
zhiboImageSwiper: [],
|
||||
tabLiveLists: [],
|
||||
fansList: [], // 关注的发现列表
|
||||
tabLiveLists: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@ -229,21 +221,18 @@
|
||||
this.getSwiper();
|
||||
this.getZhiBoSwiper();
|
||||
this.tabLiveList();
|
||||
this.getFollowList();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getArticlelist();
|
||||
// this.getManicureList({ load: 'reload' });
|
||||
},
|
||||
methods: {
|
||||
// 列表
|
||||
tabLiveList() {
|
||||
this.$u.api.tabLiveList().then((res) => {
|
||||
console.log(res)
|
||||
this.tabLiveLists = res.data;
|
||||
this.tabLiveLists = res.data
|
||||
})
|
||||
},
|
||||
// 轮播图
|
||||
getSwiper() {
|
||||
this.$u.api.getIndexSwiper().then(res => {
|
||||
if (res.errCode == 0) {
|
||||
@ -251,16 +240,14 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
// 关注
|
||||
changeType(member_id) {
|
||||
console.log(member_id);
|
||||
// this.$emit("pChangeType");
|
||||
this.$emit("pChangeType")
|
||||
this.$u.api.attentionMember({
|
||||
member_id: member_id
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
this.getRecommendList();
|
||||
this.getFollowList(); // 刷新发现的列表
|
||||
})
|
||||
},
|
||||
getZhiBoSwiper() {
|
||||
@ -270,29 +257,26 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
// 切换导航
|
||||
dianji(a) {
|
||||
console.log(a);
|
||||
// console.log(a)
|
||||
if (typeof a == "object") {
|
||||
this.num = a.detail.current
|
||||
} else {
|
||||
this.num = a
|
||||
}
|
||||
},
|
||||
// 发现别表
|
||||
getArticlelist() {
|
||||
this.$u.api.getArticlelist({
|
||||
page: this.page,
|
||||
is_video_img: 0, // 查询视频1 图文2 都查0
|
||||
}).then(res => {
|
||||
// uni.stopPullDownRefresh();
|
||||
// console.log('37647744ghj', res)
|
||||
uni.stopPullDownRefresh();
|
||||
console.log('37647744ghj', res)
|
||||
if (res.errCode == 0) {
|
||||
this.articleList = res.data.list;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 达人列表
|
||||
getRecommendList() {
|
||||
this.$u.api.getRecommendList().then(res => {
|
||||
console.log(res)
|
||||
@ -301,17 +285,6 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
// 关注发现列表
|
||||
getFollowList() {
|
||||
this.$u.post("article/attentionArticleList",{
|
||||
page: 0,
|
||||
}).then(res => {
|
||||
if (res.errCode == 0) {
|
||||
this.fansList = res.data.list;
|
||||
}
|
||||
// console.log(res);
|
||||
})
|
||||
},
|
||||
toSearchPage() {
|
||||
console.log("22");
|
||||
uni.navigateTo({
|
||||
|
@ -31,12 +31,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex';
|
||||
import titles from "@/components/informations/titles/titles"
|
||||
export default {
|
||||
computed: {
|
||||
...mapState(["hasLogin,token"])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
information_dles : [{
|
||||
@ -53,6 +49,7 @@
|
||||
id: 0,
|
||||
url: '../../static/pageD/info(14).png',
|
||||
text: '交易物流'
|
||||
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
@ -97,9 +94,7 @@
|
||||
},
|
||||
onLoad() {
|
||||
// /消息模块的请求
|
||||
if (this.hasLogin) {
|
||||
this.messageIndex();
|
||||
}
|
||||
this.messageIndex()
|
||||
if(this.$store.state.hasLogin){
|
||||
const user = uni.getStorageSync('user_info');
|
||||
console.log(user)
|
||||
|
@ -22,8 +22,8 @@
|
||||
<!-- <view @click="toOtherPage('/mine/GoodsCollection')">
|
||||
<view>{{ userInfo.member_fav_goods_num || 0 }}</view>
|
||||
<view>商品收藏</view>
|
||||
</view> -->
|
||||
<!-- <view @click="toOtherPage('/mine/StoreCollection')">
|
||||
</view>
|
||||
<view @click="toOtherPage('/mine/StoreCollection')">
|
||||
<view>{{ userInfo.member_fav_store_num || 0 }}</view>
|
||||
<view>店铺收藏</view>
|
||||
</view> -->
|
||||
@ -248,8 +248,8 @@ export default {
|
||||
box-sizing: border-box;
|
||||
padding: 0 30rpx;
|
||||
display: flex;
|
||||
// justify-content: space-between;
|
||||
justify-content: flex-start;
|
||||
justify-content: space-around;
|
||||
// justify-content: flex-start;
|
||||
> view {
|
||||
margin-right: 80rpx;
|
||||
text-align: center;
|
||||
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.0 KiB |
Loading…
x
Reference in New Issue
Block a user