Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<scroll-view style="width:100%;height:100%" scroll-y="true" @scrolltolower="swiperBottom" :refresher-enabled="true" @refresherrefresh="dianji(1)" :refresher-triggered="refresher" @refresherpulling="onPulling"
|
||||
<scroll-view style="width:100%;height:100%" scroll-y="true" @scrolltolower="swiperBottomLive(e)" :refresher-enabled="true" @refresherrefresh="dianji(1)" :refresher-triggered="refresher" @refresherpulling="onPulling"
|
||||
@refresherrestore="onRestore" @refresherabort="onAbort">
|
||||
<view class="box">
|
||||
<u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code" @click="clickSImage($event, 2)"></u-swiper>
|
||||
@@ -222,6 +222,7 @@
|
||||
|
||||
</style>
|
||||
<script>
|
||||
import common from '@/static/js/common.js';
|
||||
import { mapState } from 'vuex'
|
||||
import videoItem from "@/components/index/video-item/index"
|
||||
import zhiboItem from "@/components/index/zhibo-item/index"
|
||||
@@ -271,9 +272,6 @@
|
||||
darenItem
|
||||
},
|
||||
onShow() {
|
||||
this.page = 1;
|
||||
if (this.page != 1) {
|
||||
}
|
||||
console.log(this.imService.status)
|
||||
if(!this.imService.status && this.$store.state.hasLogin){
|
||||
const user = uni.getStorageSync('user_info');
|
||||
@@ -305,17 +303,15 @@
|
||||
// that.imService.connectIM()
|
||||
// },2000)
|
||||
// }
|
||||
|
||||
// if (this.hasLogin) {
|
||||
// this.isNewmembervoucher();
|
||||
// }
|
||||
// 新人优惠券
|
||||
if (this.$store.state.showCoupons) {
|
||||
this.isNewmembervoucher();
|
||||
}
|
||||
},
|
||||
async onLoad(){
|
||||
this.articleList = [];
|
||||
this.getArticlelist();
|
||||
this.getSwiper();
|
||||
this.isNewmembervoucher();
|
||||
|
||||
// 优惠券
|
||||
// if(this.$store.state.hasLogin){
|
||||
// const user = uni.getStorageSync('user_info');
|
||||
@@ -420,7 +416,7 @@
|
||||
console.log(a);
|
||||
|
||||
if (a.type == "change") {
|
||||
this.num = a.detail.current
|
||||
this.num = a.detail.current;
|
||||
} else {
|
||||
this.num = a;
|
||||
}
|
||||
@@ -430,16 +426,18 @@
|
||||
if (this.num == 0) {
|
||||
this.page = 1;
|
||||
this.articleList = [];
|
||||
this.status = "loadmore";
|
||||
this.status = "nomore";
|
||||
this.getArticlelist();
|
||||
this.getSwiper();
|
||||
} else if (this.num == 1) {
|
||||
this.live_page = 1;
|
||||
this.status_live = "nomore";
|
||||
this.getZhiBoSwiper(); // 直播轮播
|
||||
this.tabLiveList();
|
||||
} else if (this.num == 2) {
|
||||
this.follow_page = 0;
|
||||
this.fansList = [];
|
||||
this.status_1 = "nomore";
|
||||
if (this.hasLogin) {
|
||||
this.getFollowList(); // 关注列表
|
||||
}
|
||||
@@ -466,9 +464,9 @@
|
||||
} else {
|
||||
this.articleList = this.articleList.concat(res.data.list);
|
||||
}
|
||||
this.page++;
|
||||
}
|
||||
})
|
||||
console.log(this.page);
|
||||
},
|
||||
// 屏蔽更新列表
|
||||
updateList() {
|
||||
@@ -479,12 +477,11 @@
|
||||
},
|
||||
// 发现下拉加载
|
||||
swiperBottom(e) {
|
||||
if(this.num == 0){
|
||||
this.getArticlelist();
|
||||
}else if(this.num == 1){
|
||||
this.tabLiveList();
|
||||
}
|
||||
// console.log(e);
|
||||
this.page++;
|
||||
this.getArticlelist();
|
||||
},
|
||||
swiperBottomLive() {
|
||||
this.tabLiveList();
|
||||
},
|
||||
swiperTop() {
|
||||
// uni.startPullDownRefresh();
|
||||
@@ -536,40 +533,20 @@
|
||||
},
|
||||
clickFImage(index) {
|
||||
const item = this.indexImageSwiper[index];
|
||||
console.log(item);
|
||||
this.activityLink({
|
||||
// console.log(item);
|
||||
this.jumpPage({
|
||||
type: item.url_type,
|
||||
id: item.info_id
|
||||
id: item.info_id,
|
||||
});
|
||||
},
|
||||
clickSImage(index) {
|
||||
const item = this.zhiboImageSwiper[index];
|
||||
console.log(item);
|
||||
this.activityLink({
|
||||
// console.log(item);
|
||||
this.jumpPage({
|
||||
type: item.url_type,
|
||||
id: item.info_id
|
||||
id: item.info_id,
|
||||
});
|
||||
},
|
||||
activityLink({
|
||||
type,
|
||||
id
|
||||
}) {
|
||||
console.log(type,id);
|
||||
if (type == 0) return false;
|
||||
// type 1 商品详情页, 2 店铺详情页
|
||||
const url = type == 1 ? 'pageB/sdetails/index' : 'pageC/merchant/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
|
||||
})
|
||||
},
|
||||
goSearch() {
|
||||
this.$u.route("/pageB/search/index", {
|
||||
type: 2,
|
||||
@@ -578,6 +555,7 @@
|
||||
},
|
||||
// 是否显示新人优惠券
|
||||
isNewmembervoucher() {
|
||||
this.$store.commit('updateShowCoupons', false);
|
||||
this.$u.api.isNewmembervoucher().then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.$u.route('/pageB/coupon/index');
|
||||
@@ -593,7 +571,11 @@
|
||||
},
|
||||
onAbort() {
|
||||
console.log("onAbort");
|
||||
}
|
||||
},
|
||||
jumpPage(uri) {
|
||||
// console.log(uri);
|
||||
common.jumpPage({ type: uri.type, id: uri.id });
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -4,17 +4,6 @@
|
||||
<view class="top">
|
||||
<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 u-line-1">{{ userInfo.member_nickname }}</view>
|
||||
<view class="user-medal" @click="toOtherPage('/mine/MedalIntroduction')">
|
||||
<image src="/static/image/mine/13.png"></image>
|
||||
<view class="rank-title">{{ userInfo.member_grade_name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-right">
|
||||
<view class="info-phone">{{ userInfo.member_mobile | phoneFormat }}</view>
|
||||
<view class="user-rank">等级:{{ userInfo.member_level || 0 }}级</view>
|
||||
</view> -->
|
||||
<view class="info-top">
|
||||
<view class="user-nickname u-line-1">{{ userInfo.member_nickname }}</view>
|
||||
<view class="info-phone">{{ userInfo.member_mobile | phoneFormat }}</view>
|
||||
@@ -62,9 +51,15 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view @click="toOtherPage('/order/Index?current=1')">
|
||||
<view v-for="(item, index) in orderList" :key="index" @click="toOtherPage(item.link)">
|
||||
<image :src="item.img"></image>
|
||||
<view>{{ item.title }}</view>
|
||||
<view class="order-num" v-if="item.number">{{ item.number }}</view>
|
||||
</view>
|
||||
<!-- <view @click="toOtherPage('/order/Index?current=1')">
|
||||
<image src="/static/image/mine/6.png"></image>
|
||||
<view>待支付</view>
|
||||
<view class="order-num">{{ 99 }}</view>
|
||||
</view>
|
||||
<view @click="toOtherPage('/order/Index?current=2')">
|
||||
<image src="/static/image/mine/35.png"></image>
|
||||
@@ -89,7 +84,7 @@
|
||||
<view @click="toOtherPage('/order/Index?current=7')">
|
||||
<image src="/static/image/mine/9.png"></image>
|
||||
<view>售后</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="tool">
|
||||
@@ -111,6 +106,10 @@
|
||||
<image src="/static/image/mine/25.png"></image>
|
||||
<view>优惠券</view>
|
||||
</view>
|
||||
<view @click="toOtherPage('/order/Index?current=4')">
|
||||
<image src="/static/image/mine/39.png"></image>
|
||||
<view>试穿试送</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="more-tool">
|
||||
@@ -132,6 +131,7 @@
|
||||
<image src="/static/image/mine/15.png"></image>
|
||||
<view>投诉意见</view>
|
||||
</view>
|
||||
<!-- <view></view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -146,7 +146,51 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
userInfo: {},
|
||||
userInfo: {},
|
||||
orderList: [
|
||||
{
|
||||
name: 'wait_pay',
|
||||
title: '待支付',
|
||||
img: '/static/image/mine/6.png',
|
||||
link: '/order/Index?current=1',
|
||||
number: '',
|
||||
},
|
||||
{
|
||||
name: 'already_pay',
|
||||
title: '待发货',
|
||||
img: '/static/image/mine/35.png',
|
||||
link: '/order/Index?current=2',
|
||||
number: '',
|
||||
},
|
||||
{
|
||||
name: 'wait_receipt',
|
||||
title: '待收货',
|
||||
img: '/static/image/mine/2.png',
|
||||
link: '/order/Index?current=3',
|
||||
number: '',
|
||||
},
|
||||
{
|
||||
name: 'pintuan',
|
||||
title: '拼团中',
|
||||
img: '/static/image/mine/37.png',
|
||||
link: '/order/Index?current=5',
|
||||
number: '',
|
||||
},
|
||||
{
|
||||
name: 'wait_evaluation',
|
||||
title: '待评价',
|
||||
img: '/static/image/mine/3.png',
|
||||
link: '/order/Index?current=6',
|
||||
number: '',
|
||||
},
|
||||
{
|
||||
name: 'refund',
|
||||
title: '售后',
|
||||
img: '/static/image/mine/9.png',
|
||||
link: '/order/Index?current=7',
|
||||
number: '',
|
||||
},
|
||||
]
|
||||
};
|
||||
},
|
||||
filters: {
|
||||
@@ -162,9 +206,11 @@ export default {
|
||||
})
|
||||
}
|
||||
this.getUserInfo();
|
||||
this.getOrderNumber();
|
||||
},
|
||||
onNavigationBarButtonTap() {
|
||||
this.toOtherPage("/setting/Index");
|
||||
onNavigationBarButtonTap(e) {
|
||||
console.log(e);
|
||||
if(e.index == 0) this.$u.route('/pageE/setting/Index');
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
@@ -176,7 +222,22 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
getOrderNumber() {
|
||||
this.$u.api.getOrderNumber().then(res => {
|
||||
const object = res.data;
|
||||
for (const key in object) {
|
||||
if (object.hasOwnProperty(key)) {
|
||||
let element = object[key];
|
||||
const order = this.orderList.filter(item => item.name == key);
|
||||
if(element > 99) element = "99+";
|
||||
this.$set(order[0], 'number', element);
|
||||
}
|
||||
}
|
||||
// console.log(this.orderList);
|
||||
})
|
||||
},
|
||||
toOtherPage(url) {
|
||||
console.log(url);
|
||||
uni.navigateTo({
|
||||
url: '/pageE' + url
|
||||
});
|
||||
@@ -200,45 +261,6 @@ export default {
|
||||
.user-info {
|
||||
margin-left: 30rpx;
|
||||
// display: flex;
|
||||
.info-left {
|
||||
margin-right: 15rpx;
|
||||
.user-nickname {
|
||||
max-width: 200rpx;
|
||||
font-size: 30rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
margin-bottom: 19rpx;
|
||||
}
|
||||
.user-medal {
|
||||
display: flex;
|
||||
width: 110rpx;
|
||||
// height: 25rpx;
|
||||
background: linear-gradient(269deg,rgba(175,175,175,1) 0%,rgba(224,224,224,1) 100%);
|
||||
border-radius: 13rpx;
|
||||
align-items: center;
|
||||
padding: 0 17rpx 0 10rpx;
|
||||
> image {
|
||||
margin-right: 9rpx;
|
||||
width: 20rpx;
|
||||
height: 22rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.rank-title {
|
||||
font-size: 16rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
.info-right {
|
||||
.info-phone {
|
||||
font-size: 24rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
margin-bottom: 26rpx;
|
||||
}
|
||||
.user-rank {
|
||||
font-size: 24rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
}
|
||||
}
|
||||
.info-top {
|
||||
height: 30rpx;
|
||||
display: flex;
|
||||
@@ -336,16 +358,6 @@ export default {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
border-bottom: 1px solid #ececec;
|
||||
// &::after {
|
||||
// content: "";
|
||||
// position: absolute;
|
||||
// width: 650rpx;
|
||||
// height: 1rpx;
|
||||
// background: rgba(234,234,234,1);
|
||||
// bottom: 0;
|
||||
// left: 50%;
|
||||
// transform: translate(-50%,0);
|
||||
// }
|
||||
}
|
||||
.title-text-more {
|
||||
font-size: 24rpx;
|
||||
@@ -397,24 +409,42 @@ export default {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
.order-num {
|
||||
z-index: 9;
|
||||
position: absolute;
|
||||
top: -12rpx;
|
||||
right: -16rpx;
|
||||
border: 1rpx solid #FF7807;
|
||||
height: 24rpx;
|
||||
border-radius: 12rpx;
|
||||
padding: 6rpx 8rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #FF7807;
|
||||
background-color: #ffffff;
|
||||
font-size: 18rpx;
|
||||
color:rgba(255,120,15,1);
|
||||
}
|
||||
}
|
||||
> view:nth-child(1){
|
||||
@include image-size($image-width: 36rpx, $image-height: 34rpx);
|
||||
@include image-size($image-width: 33rpx, $image-height: 36rpx);
|
||||
}
|
||||
> view:nth-child(2){
|
||||
@include image-size($image-width: 38rpx, $image-height: 36rpx);
|
||||
@include image-size($image-width: 38rpx, $image-height: 32rpx);
|
||||
}
|
||||
> view:nth-child(3){
|
||||
@include image-size($image-width: 40rpx, $image-height: 36rpx);
|
||||
@include image-size($image-width: 41rpx, $image-height: 33rpx);
|
||||
}
|
||||
> view:nth-child(4){
|
||||
@include image-size($image-width: 38rpx, $image-height: 38rpx);
|
||||
@include image-size($image-width: 35rpx, $image-height: 35rpx);
|
||||
}
|
||||
> view:nth-child(5){
|
||||
@include image-size($image-width: 36rpx, $image-height: 40rpx);
|
||||
@include image-size($image-width: 37rpx, $image-height: 37rpx);
|
||||
}
|
||||
> view:nth-child(6){
|
||||
@include image-size($image-width: 36rpx, $image-height: 40rpx);
|
||||
@include image-size($image-width: 33rpx, $image-height: 35rpx);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -426,8 +456,11 @@ export default {
|
||||
$image-width: 71rpx
|
||||
);
|
||||
.content {
|
||||
> view {
|
||||
width: 100rpx;
|
||||
}
|
||||
> view:not(:last-child) {
|
||||
margin-right: 58rpx;
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -439,8 +472,11 @@ export default {
|
||||
$image-width: 71rpx
|
||||
);
|
||||
.content {
|
||||
> view {
|
||||
width: 100rpx;
|
||||
}
|
||||
> view:not(:last-child) {
|
||||
margin-right: 46rpx;
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<!-- 拼团列表 -->
|
||||
<group></group>
|
||||
<view class="activity-view">
|
||||
<image class="lingquan" :src="activityInfo.adv_code" @click="activityLink({ type: activityInfo.url_type, id: activityInfo.info_id })"></image>
|
||||
<image class="lingquan" :src="activityInfo.adv_code" @click="jumpPage({ type: activityInfo.url_type, id: activityInfo.info_id })"></image>
|
||||
</view>
|
||||
<!-- 优惠券 -->
|
||||
<youhq></youhq>
|
||||
@@ -61,6 +61,7 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import common from '@/static/js/common.js';
|
||||
import shopitem from "@/components/shop/shop-item/index";
|
||||
import recommend from "@/components/shop/recommend/index";
|
||||
import pintuan from "@/components/shop/recommend/pintuan";
|
||||
@@ -190,31 +191,11 @@
|
||||
clickImage(index) {
|
||||
// console.log(this.list[index]);
|
||||
let item = this.list[index];
|
||||
this.activityLink({
|
||||
type: item.url_type,
|
||||
this.jumpPage({
|
||||
type: item.url_type,
|
||||
id: item.info_id,
|
||||
});
|
||||
});
|
||||
},
|
||||
activityLink({
|
||||
type,
|
||||
id
|
||||
}) {
|
||||
console.log(type,id);
|
||||
if (type == 0) return false;
|
||||
// type 1 商品详情页, 2 店铺详情页
|
||||
const url = type == 1 ? 'pageB/sdetails/index' : 'pageC/merchant/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
|
||||
})
|
||||
},
|
||||
// 下拉加载更多推荐商品
|
||||
onreachBottom() {
|
||||
this.$refs.recommendGoods.loadMore();
|
||||
@@ -240,18 +221,10 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
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
|
||||
})
|
||||
},
|
||||
jumpPage(uri) {
|
||||
// console.log(uri);
|
||||
common.jumpPage({ type: uri.type, id: uri.id });
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user