20 Commits

Author SHA1 Message Date
22cdf3e415 Merge pull request 'xbx' (#160) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/160
2020-08-12 11:33:44 +08:00
ab4e50a9ae Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx 2020-08-12 11:33:34 +08:00
d2c6bcb1bc 列表刷新 2020-08-12 10:43:47 +08:00
1d48546424 Merge pull request 'show price 8.12' (#159) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/159
2020-08-12 10:16:51 +08:00
d8d3434988 show price 8.12 2020-08-12 10:16:14 +08:00
083153929b Merge pull request 'show price 8.12' (#158) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/158
2020-08-12 10:13:21 +08:00
d19771b182 show price 8.12 2020-08-12 10:10:59 +08:00
a45db4afbf 赋值page1 2020-08-12 09:32:02 +08:00
gyh
1db45d40a7 Merge pull request 'gdpaoup' (#157) from gyh into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/157
2020-08-11 22:18:08 +08:00
Gdpao
ef79718190 gdpaoup 2020-08-11 22:15:58 +08:00
91ca2fdd19 Merge pull request 'xbx' (#156) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/156
2020-08-11 18:28:08 +08:00
0e7139bc16 红点 这找曾 2020-08-11 18:27:19 +08:00
3acaf94a37 Merge pull request 'fixing bug 8.11' (#155) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/155
2020-08-11 18:25:29 +08:00
523dadd55d fixing bug 8.11 2020-08-11 18:24:56 +08:00
693048f1ab Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx 2020-08-11 16:03:48 +08:00
f9fa80665b 默认 2020-08-11 16:03:12 +08:00
cb178c1407 Merge pull request 'zhy' (#154) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/154
2020-08-11 15:59:14 +08:00
9a0dc4c6d1 Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into zhy 2020-08-11 15:40:53 +08:00
1ef4db7dc4 fixing bug 8.11 2020-08-11 15:39:56 +08:00
37d8ab7a2b fixing bug 8.11 2020-08-11 15:38:43 +08:00
31 changed files with 682 additions and 290 deletions

View File

@@ -41,6 +41,7 @@
@import "/static/css/normalize";
/* 顶部自定义导航留白 */
.status_bar {
z-index: 1000;
width: 100%;
height: var(--status-bar-height);
}

View File

@@ -202,9 +202,10 @@ export default {
return vm.$u.post('Spike/recommendedSpike');
},
// 秒杀详情
getSpikeInfo({ groupbuy_id }) {
getSpikeInfo({ groupbuy_id, goods_id }) {
return vm.$u.post('Spike/spikeInfo', {
groupbuy_id: groupbuy_id
groupbuy_id: groupbuy_id,
goods_id: goods_id,
});
},
// 秒杀列表
@@ -221,13 +222,23 @@ export default {
});
},
// 拼团商品详情
getPinTuanDetails({ pintuan_id }) {
return vm.$u.post('Specialci/pintuanInfo', { pintuan_id: pintuan_id });
getPinTuanDetails({ pintuan_id, goods_id }) {
return vm.$u.post('Specialci/pintuanInfo', {
pintuan_id: pintuan_id,
goods_id: goods_id,
});
},
// 推荐拼团
getPinTuanPush() {
return vm.$u.post('Specialci/pintuanPush');
},
// 拼团验证
pintuanVerify({ pintuan_id, pintuangroup_headid }) {
return vm.$u.post('Specialci/pintuanVerify', {
pintuan_id: pintuan_id,
pintuangroup_headid: pintuangroup_headid,
});
},
// 开团/参团
withImmediate({ pintuan_id, pintuangroup_headid, pintuangroup_id}) {
return vm.$u.post('Specialci/withImmediate', {

View File

@@ -304,8 +304,8 @@ export default {
return vm.$u.post('Message/informationList', { });
},
// 关注列表
snsfriendList({ }) {
return vm.$u.post('message/snsfriendList', { });
snsfriendList({page}) {
return vm.$u.post('message/snsfriendList', {page});
},
// 关注达人
attentionMember({ member_id }) {

View File

@@ -47,24 +47,30 @@ const install = (Vue, vm) => {
// 假设201为token失效这里跳转登录
// vm.$u.toast('您还没有登录哦,请先去登录!');
if (res.data.data.action != "memberinfo") {
uni.showModal({
title: "温馨提示",
content: "您还未登录,请立即登录",
cancelText: "以后再说",
confirmText: "立即登录",
confirmColor: "#FF780F",
success(res) {
// console.log(res);
if (res.confirm) {
setTimeout(() => {
// 此为uView的方法详见路由相关文档
vm.$u.route('/pageA/login/login')
}, 500)
}
if (res.cancel) {
}
}
})
setTimeout(() => {
// 此为uView的方法详见路由相关文档
uni.navigateTo({
url: "/pageA/login/login",
})
}, 1000)
// uni.showModal({
// title: "温馨提示",
// content: "您还未登录,请立即登录",
// cancelText: "以后再说",
// confirmText: "立即登录",
// confirmColor: "#FF780F",
// success(res) {
// // console.log(res);
// if (res.confirm) {
// setTimeout(() => {
// // 此为uView的方法详见路由相关文档
// vm.$u.route('/pageA/login/login')
// }, 500)
// }
// if (res.cancel) {
// }
// }
// })
}
return false;
} else if (res.errCode == 1) {

View File

@@ -79,6 +79,9 @@ export default {
case 9:
state = '拼团中';
break;
case 10:
state = '已取消';
break;
default:
break;
}

View File

@@ -14,7 +14,7 @@
</swiper-item>
</swiper>
<!-- 加载更多 -->
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" @loadmore="loadMore"></u-loadmore>
<u-loadmore class="load-size" :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" @loadmore="loadMore"></u-loadmore>
</view>
</template>
<script>

View File

@@ -57,7 +57,7 @@ export default {
props:['item','title'],
watch:{
select(){
console.log(this.select)
// console.log(this.select)
this.$emit("sel", this.select);
}
}

View File

@@ -1,8 +1,9 @@
<template>
<view class="userinfo">
<view class="userinfo" @click="stopClick()">
<view class="userhead">
<image class="avatar" :src="item.member_avatar"></image>
<text class="follow" @click="following(item.member_id)">{{ is_follow ? "" : "+" }}</text>
<!-- <text class="follow" @click="following(item.member_id)">{{ is_follow ? "" : "+" }}</text> -->
<image class="follow" :src=" !is_follow ? '../../static/image/userinfo/follow.png' : '../../static/image/userinfo/followed.png' " mode="" @click="following(item.member_id)"></image>
</view>
<!-- 点赞 -->
<view class="operat zan">
@@ -62,16 +63,10 @@
.follow {
z-index: 100;
position: absolute;
top: 90rpx;
left: 40rpx;
width: 36rpx;
height: 36rpx;
text-align: center;
line-height: 36rpx;
font-size: 34rpx;
border-radius: 50%;
color: #fff;
background-color: #FF780F;
top: 80rpx;
left: 30rpx;
width: 50rpx;
height: 50rpx;
}
.operat {
@@ -80,6 +75,7 @@
/* #endif */
align-items: center;
flex-direction: column;
padding: 0 30rpx;
}
.operat-span {
@@ -110,7 +106,7 @@
},
watch: {
list(newValue, old) {
console.log(newValue);
// console.log(newValue);
this.item = newValue || {};
this.is_follow = this.list.is_attention || false;
this.is_like = this.list.is_like || false;
@@ -152,6 +148,11 @@
title: res.data.message,
icon: "none"
})
} else if (res.data.errCode == 401) {
uni.showToast({
title: "您还没有登录,请先登录!",
icon: "none"
})
}
}
})
@@ -174,6 +175,11 @@
// console.log(res);
this.is_like = !this.is_like;
this.list.like_num = res.data.data.num;
} else if (res.data.errCode == 401) {
uni.showToast({
title: "您还没有登录,请先登录!",
icon: "none"
})
} else {
uni.showToast({
title: res.data.message,
@@ -200,6 +206,11 @@
console.log(res.data.num);
this.is_collect = !this.is_collect;
this.list.collect_num = res.data.data.num;
} else if (res.data.errCode == 401) {
uni.showToast({
title: "您还没有登录,请先登录!",
icon: "none"
})
} else {
uni.showToast({
title: res.data.message,
@@ -227,6 +238,9 @@
cart: this.is_cart
});
},
// 冒泡
stopClick() {
}
}
}
</script>

View File

@@ -56,17 +56,8 @@ export default {
},
onLoad(option) {
this.price = option.price;
// this.isNewmembervoucher();
},
methods: {
// 是否显示新人优惠券
isNewmembervoucher() {
this.$u.api.isNewmembervoucher().then(res => {
if(res.errCode == 0) {
this.price = res.data.price;
}
})
},
exchangeCoupon() {
this.$u.api.getCoupon({ id: 1 }).then(res => {
this.$u.toast(res.message);

89
pageB/coupon/index.vue Normal file
View File

@@ -0,0 +1,89 @@
<template>
<u-popup v-model="showCoupon" mode="center" class="u-coupon-popup">
<view class="coupon">
<view class="price">{{ newMemberCoupon.price }}</view>
<image src="/static/image/common/30.png" class="coupon-image" @click="viewCoupon"></image>
<image src="/static/image/common/24.png" class="close-image" @click="showCoupon=false"></image>
</view>
</u-popup>
</template>
<script>
export default {
data() {
return {
showCoupon: true,
newMemberCoupon: {},
}
},
watch: {
showCoupon(value) {
if(!value) {
uni.navigateBack();
}
}
},
onShow() {
this.isNewmembervoucher();
},
methods: {
viewCoupon() {
this.$u.route('/pageB/coupon/details', {
price: this.newMemberCoupon.price
});
},
// 是否显示新人优惠券
isNewmembervoucher() {
this.$u.api.isNewmembervoucher().then(res => {
if(res.errCode == 0) {
this.newMemberCoupon = res.data;
} else {
this.showCoupon = false;
}
})
},
}
}
</script>
<style lang="scss">
page{
background-color: rgba(0,0,0,0);
}
.u-coupon-popup {
/deep/ .u-mode-center-box {
background-color: transparent;
}
.coupon {
width: 750rpx;
height: 583rpx;
position: relative;
.price {
z-index: 3;
color: #EBB36E;
position: absolute;
font-size: 92rpx;
font-weight: bold;
top: 200rpx;
left: 50%;
font-family: PingFang SC;
transform: translate(-68%, 0);
}
.coupon-image {
width: 568rpx;
height: 583rpx;
position: absolute;
top: 0;
left: 50%;
transform: translate(-60%, 0);
}
.close-image {
position: absolute;
top: 0;
right: 155rpx;
width: 60rpx;
height: 60rpx;
}
}
}
</style>

View File

@@ -19,7 +19,7 @@
<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 class="no-data" v-show="!listInfo && page">暂无数据</view>
</view>
</scroll-view>
</view>
@@ -74,7 +74,7 @@ export default {
userInfo: {}, // 用户信息
listInfo: [], // 列表详情
member_id: 0,
page: 0,
page: 1,
}
},
onLoad(option) {

View File

@@ -76,7 +76,7 @@ export default {
},
searchValue() {
uni.navigateTo({
url: '/pageB/search/index?type=2'
url: '/pageB/search/index?type=2&curent=1'
})
},
},

View File

@@ -81,7 +81,6 @@
<image :src="item.goods_image" mode="aspectFill"></image>
<view>
<text class="title">{{ item.goods_advword }}</text>
<text class="name">{{ item.goods_name }}</text>
<text class="price">{{ item.goods_promotion_price }}</text>
</view>
</view>
@@ -330,7 +329,7 @@
& > view {
display: flex;
flex-direction: column;
justify-content: space-between;
justify-content: space-around;
color: #333;
font-size: 28rpx;
.title {

View File

@@ -27,10 +27,10 @@
<text>{{ goodsInfo.pintuan_price || '0.00' }}</text>
<s>{{ goodsInfo.goods_price || '0.00' }}</s>
</view>
<view class="collect" @click="switchCollect(goodsInfo.goods_collect)">
<u-icon name="star" color="#474747" size="28" v-if="!goodsInfo.goods_collect"></u-icon>
<view class="collect" @click="switchCollect(goodsInfo.is_collect)">
<u-icon name="star" color="#474747" size="28" v-if="goodsInfo.is_collect == 0"></u-icon>
<u-icon name="star-fill" color="#FF7807" size="28" v-else></u-icon>
<text>{{ !goodsInfo.goods_collect ? '收藏' : '已收藏' }}</text>
<text>{{ !goodsInfo.is_collect == 1 ? '收藏' : '已收藏' }}</text>
</view>
</view>
</view>
@@ -139,7 +139,6 @@
</view>
<view style="height:100rpx"></view>
</view>
<u-toast ref="uToast" />
</scroll-view>
</u-popup>
<!-- 普通商品 tool -->
@@ -180,7 +179,7 @@
<view class="btn" v-else @click="spikeGoods">立即秒杀</view>
</view>
<!-- <tloos @buy="buy" @xuanze="xuanze" :id="id" :info="goodsInfo" :type="type"></tloos> -->
<u-toast ref="uToast" />
<u-toast ref="uToast" :z-index='200000' />
</view>
</template>
<script>
@@ -196,7 +195,7 @@ export default {
goodsInfo: {}, // 商品信息
storeInfo: {}, // 店铺信息
glist: [], // 规格列表
id: 0, // 商品id/秒杀id/拼团 id
id: 0, // 商品id
type: '', // 商品类型 商品详情 1普通 2拼团 3秒杀 4优惠券
groupUser: [], // 拼团用户
user_suc: [], // 拼团成功用户
@@ -215,7 +214,9 @@ export default {
sel: "", // 拼接的规格
quanxuan: false, // 规格是否选择
debounce: true, // 防止多次提交订单
storeid:0 // 店铺id
storeid:0, // 店铺 id
pintuan_id: '', // 拼团 id
groupbuy_id: '', // 秒杀 id
}
},
components: {
@@ -383,10 +384,10 @@ export default {
this.ordinaryDetails(id);
break;
case 2:
this.pinTuanDetails(id);
this.pinTuanDetails();
break;
case 3:
this.spikeGoodsDetails(id);
this.spikeGoodsDetails();
break;
default:
break;
@@ -394,38 +395,40 @@ export default {
},
// 普通商品详情
ordinaryDetails(id) {
this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
// console.log(res)
this.$u.api.getGoodsDetails({ id: id }).then(res => {
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;
this.storeid = res.data.store.store_id
// console.log(this.goodsInfo.mobile_body);
this.storeid = res.data.store.store_id;
this.type = res.data.view_type;
this.setTitle();
if(this.type == 1) {
this.id = res.data.goods.goods_id;
} else if(this.type == 2) {
this.id = res.data.goods.pintuan_id;
this.getGoodsDetails(this.id);
this.id = res.data.goods.goods_id;
this.pintuan_id = res.data.goods.pintuan_id;
this.getGoodsDetails();
} else if(this.type == 3) {
this.id = res.data.groupbuy_id;
this.getGoodsDetails(this.id);
this.id = res.data.goods.goods_id;
this.groupbuy_id = res.data.groupbuy_id;
this.getGoodsDetails();
}
}
})
},
// 拼团详情
pinTuanDetails(id) {
pinTuanDetails() {
this.$u.api.getPinTuanDetails({
pintuan_id: id
pintuan_id: this.pintuan_id,
goods_id: this.id,
}).then(res => {
if(res.errCode == 0) {
this.evaluate = res.data.data.goods_evaluate_info;
this.goodsInfo = res.data.data.goods;
this.pintuan_id = res.data.data.pintuan_id;
this.setSwiperList(res.data.data.goods_image);
this.glist = res.data.data.spec_list;
this.user_suc = res.data.data.user_suc;
@@ -435,13 +438,14 @@ export default {
})
},
// 秒杀详情
spikeGoodsDetails(id) {
spikeGoodsDetails() {
this.$u.api.getSpikeInfo({
groupbuy_id: id
groupbuy_id: this.groupbuy_id,
goods_id: this.id,
}).then(res => {
if(res.errCode == 0) {
// this.id = res.data.groupbuy_id;
this.groupbuyInfo = res.data.groupbuyInfo;
this.groupbuy_id = res.data.groupbuyInfo.groupbuy_id;
this.evaluate = res.data.goodsInfo.goods_evaluate_info;
this.goodsInfo = res.data.goodsInfo.goods;
this.setSwiperList(res.data.goodsInfo.goods_image);
@@ -462,6 +466,19 @@ export default {
}
})
},
// 验证能否拼团
async pintuanVerify({ pintuan_id, pintuangroup_headid }) {
const res = await this.$u.api.pintuanVerify({
pintuan_id: pintuan_id,
pintuangroup_headid: pintuangroup_headid,
})
if(res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
});
}
return res.errCode;
},
/*
* @description 下单 订单步骤1展示结算数据
* @params {Number} type involvement 拼团或者 默认开团
@@ -490,26 +507,33 @@ export default {
}
}
if(!this.debounce) return;
this.debounce = false;
let params = {
ifcart: ifcart,
cart_id: [this.goodsInfo.goods_id + '|' + num],
}
if(this.type == 2) {
if(type == 'involvement') {
// const userId = uni.getStorageSync('user_info').member.member_id;
// 验证能否拼团
let status = this.pintuanVerify({
pintuan_id: this.pintuan_id,
pintuangroup_headid: this.involvemenGroupInfo[0].user_id
}).then(status => {
if(status != 0) return true;
})
// console.log(status);
if(status) return false;
this.$store.commit('setGroupHeadId', this.involvemenGroupInfo[0].user_id);
// console.log(this.$store.state.pintuangroup_headid);
Object.assign(params, {
pintuan_id: this.id,
pintuan_id: this.pintuan_id,
pintuangroup_id: this.involvemenGroupInfo[0].pintuangroup_id,
})
} else {
Object.assign(params, {
pintuan_id: this.id,
pintuan_id: this.pintuan_id,
})
}
}
this.debounce = false;
this.$u.api.settlementOrder(params).then(res => {
if(res.errCode == 0) {
// console.log('type' + this.type);
@@ -519,6 +543,7 @@ export default {
url: '/pageC/cart/ConfirmOrder'
})
} else {
this.$u.toast(res.message);
this.debounce = true;
this.$u.toast(res.message);
}
@@ -556,8 +581,9 @@ export default {
// console.log(id)
// 选择完规格后设商品type = 1
// this.type = 1;
this.getGoodsDetails(this.glist[id])
// 改变 goods_id
this.id = this.glist[id];
this.getGoodsDetails();
},
// 设置页面标题
setTitle() {
@@ -603,7 +629,7 @@ export default {
})
},
switchCollect(status) {
if(status) {
if(status == 1) {
this.removeFavorite();
} else {
this.addFavoriteGoods();

View File

@@ -18,10 +18,13 @@ export default {
searchwordlist: [],
}
},
// type: 2 商品 1: 其他
// type: 1 商品 2: 其他
onLoad(option) {
this.type = option.type;
this.curent = option.curent || 0
this.getWordList();
if(option.type == 1) this.setNavSearchInput('搜索您需要的商品');
else if(option.type == 2) this.setNavSearchInput('请输入搜索内容');
},
// 点击搜索按钮
onNavigationBarButtonTap(e) {
@@ -36,6 +39,18 @@ export default {
this.search(this.keyword);
},
methods:{
setNavSearchInput(placeholder) {
// #ifdef APP-PLUS
// 修改 placeholder
webview.setStyle({
'titleNView': {
"searchInput": { //修改当前窗口search样式
"placeholder": placeholder,
}
}
})
// #endif
},
getWordList() {
this.$u.api.searchwordlist({type:this.type}).then(res => {
console.log(res)
@@ -51,7 +66,8 @@ export default {
}
let params = {
value: value,
type: this.type,
type: this.type,
curent:this.curent
}
if(this.type == 2) {
this.$u.route({

View File

@@ -78,9 +78,11 @@ export default {
},
onLoad(option) {
this.value = option.value;
this.current = option.curent
this.setViewHeight();
this.ShopSearch()
this.setNavSearchInput(this.value);
},
onNavigationBarSearchInputConfirmed(value) {
this.value = value.text
@@ -203,6 +205,7 @@ export default {
},
switchCurrent(current) {
// if(current == 1 && this.current == 1) this.priceOrderAsc = !this.priceOrderAsc;
this.page = 1;
this.current = current;
this.goodsList = []
this.ShopSearch()

View File

@@ -16,7 +16,8 @@
<image :src="goods.goods_image"></image>
<view class="right">
<view class="name u-line-1">{{ goods.goods_name }}</view>
<view class="briefing u-line-2">{{ goods.goods_advword }}</view>
<view class="briefing u-line-1">{{ goods.goods_advword }}</view>
<view class="price">{{ goods.goods_price }}</view>
</view>
</view>
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
@@ -54,6 +55,8 @@ export default {
this.value = option.value
this.setViewHeight();
this.ShopSearch()
this.setNavSearchInput(this.value);
},
onNavigationBarSearchInputConfirmed(value) {
this.value = value.text
@@ -95,7 +98,6 @@ export default {
// 排序方式 goods_salenum销量 evaluation_count评价 goods_price_asc价格从低到高 goods_price_desc价格从高到低
async ShopSearch({ load = 'reload' } = {}) {
console.log(this.value);
this.setNavSearchInput(this.value);
const sort = this.setOrderSort();
const res = await this.$u.api.ShopSearch({
keyword: this.value,
@@ -127,8 +129,9 @@ export default {
})
},
switchCurrent(current) {
this.ShopSearch()
this.page = 1
if(current == 1 && this.current == 1) this.priceOrderAsc = !this.priceOrderAsc;
this.ShopSearch()
this.current = current;
},
setViewHeight() {
@@ -197,15 +200,21 @@ export default {
}
.right {
width: 418rpx;
height: 200rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
.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: 42rpx;
}
.price {
font-size: 26rpx;
color: rgba(255,49,49,1);
}
}
}

View File

@@ -1,18 +1,17 @@
<template>
<view>
<video id="videoId" :style="videoSize" :src="src" autoplay="true" :show-fullscreen-btn="false" @play="playing"
@timeupdate="timeupdate" :show-play-btn="false" controls="false" @click="stoping" :enable-progress-gesture="false"></video>
<cover-image class="close" @click="goBack" src="../../static/close.png">
</cover-image>
<cover-image class="pause" @click="stoping" src="../../static/videoPlay.png" v-if="!is_play">
</cover-image>
@pause="pausing" @ended="videoEnd" @timeupdate="timeupdate" :show-play-btn="false" controls="false" @click="stoping"
:enable-progress-gesture="false" :show-center-play-btn="false"></video>
<!-- 用户操作 -->
<userinfo class="user-info" :list="list" :cart="cart_type" :comment="is_comment" :num="comment_num" @openCart="openPopup"></userinfo>
<cover-view class="info-box" @click="stopClick">>
<userinfo class="user-info" :style="{ top: fixTop }" :list="list" :cart="cart_type" :comment="is_comment" :num="comment_num"
@openCart="openPopup"></userinfo>
<!-- 视频信息 -->
<cover-view class="info-box" @click="stopClick">
<view class="video-info-box">
<image class="image-play" src="../../static/videoIcon.png" mode=""></image>
<text class="video-slip">视频</text>
<text class="time">{{ time_count == 1 ? 0 : time_count }}s</text>
<text class="time">{{ time_count }}s</text>
</view>
<view>
<text class="name">@{{ list.member_nickname }}</text>
@@ -29,40 +28,81 @@
</block>
</view>
</cover-view>
<cover-view class="content-box" v-if="is_comment">
<view class="content-title">
<text class="tips">评论</text>
<text class="close-down" @click="closeComment">×</text>
<!-- 单个商品 -->
<cover-view class="good-one" v-if="cart_len == 1">
<view class="one-list" v-for="(item,index) in list.goods" :key="index">
<image class="one-image" :src="item.goods_image" mode=""></image>
<view class="one-box">
<view class="title-one">{{ item.goods_advword }}</view>
<view class="content-one">{{ item.goods_name }}</view>
<view class="good-price">¥{{ item.goods_promotion_price }}</view>
</view>
</view>
<scroller class="comment-list">
<view class="" v-for="(item,index) in commentList" :key="index">
<view class="comment-list-box">
<view class="comment-list-header">
<image class="avatar" :src="item.member_avatar" mode=""></image>
<view>
<text class="comment-title">{{ item.member_nickname }}</text>
<text class="comment-time">{{ item.create_time }}</text>
</cover-view>
<!-- 遮罩层 -->
<cover-view class="mask" @click.stop="stopClick" :style="videoSize" v-if="is_comment || cart_type">
<!-- 评论 -->
<cover-view class="content-box" v-if="is_comment" ref="contentBox">
<view class="content-title">
<text class="tips">评论</text>
<text class="close-down" @click="closeComment">×</text>
</view>
<scroller class="comment-list">
<view class="" v-for="(item,index) in commentList" :key="index">
<view class="comment-list-box">
<view class="comment-list-header">
<image class="avatar" :src="item.member_avatar" mode=""></image>
<view>
<text class="comment-title">{{ item.member_nickname }}</text>
<text class="comment-time">{{ item.create_time }}</text>
</view>
</view>
<text class="reply">回复</text>
</view>
<view class="content-main">
<text class="content-style">{{ item.content }}</text>
</view>
</view>
<view class="send-box">
<input class="send-val" type="text" value="" />
<text class="btn-send">发送</text>
</view>
<loading class="loading" @loading="onloading" :display="loadinging ? 'show' : 'hide'">
<loading-indicator class="indicator"></loading-indicator>
<text class="indicator-text">努力加载中</text>
</loading>
</scroller>
</cover-view>
<!-- 购物车 -->
<cover-view class="cart-box" v-if="cart_type">
<view class="cart-title">
<text class="tips">全部商品</text>
<text class="close-down" @click="cart_type = false">×</text>
</view>
<scroller class="cart-list">
<view class="" v-for="(item,index) in list.goods" :key="index">
<view class="cart-list-header" @click="goGoodInfo(item.goods_id)">
<image class="goods-img" :src="item.goods_image" mode=""></image>
<view class="goods-info">
<text class="good-title">{{ item.goods_advword }}</text>
<text class="good-price">{{ item.goods_promotion_price }}</text>
</view>
</view>
<text class="reply">回复</text>
</view>
<view class="content-main">
<text class="content-style">{{ item.content }}</text>
</view>
</view>
<view class="send-box">
<input class="send-val" type="text" value="" />
<text class="btn-send">发送</text>
</view>
<loading class="loading" @loading="onloading" :display="loadinging ? 'show' : 'hide'">
<loading-indicator class="indicator"></loading-indicator>
<text class="indicator-text">努力加载中</text>
</loading>
</scroller>
<loading class="loading" @loading="onloading" :display="loadinging ? 'show' : 'hide'">
<loading-indicator class="indicator"></loading-indicator>
<text class="indicator-text">努力加载中</text>
</loading>
</scroller>
</cover-view>
</cover-view>
<list class="cart-box">
<cell></cell>
</list>
<!-- 返回按钮 -->
<cover-image class="close" @click="goBack" src="../../static/close.png">
</cover-image>
<!-- 暂停按钮 -->
<cover-image class="pause" :style="{ top: fixTop + 100 }" @click="stoping" src="../../static/videoPlay.png"
v-if="!is_play">
</cover-image>
</view>
</template>
@@ -76,6 +116,7 @@
data() {
return {
videoSize: {},
fixTop: 0,
list: {},
labelLen: [],
cart_type: false, // 显示购物车
@@ -98,7 +139,22 @@
onReady() {
this.videoBox = uni.createVideoContext("videoId", this);
},
onBackPress() {
if (this.cart_type) {
this.cart_type = !this.cart_type;
} else if (this.is_edit) {
this.is_edit = !this.is_edit;
} else if (this.is_comment) {
this.is_comment = !this.is_comment;
} else {
return false;
}
return true;
},
methods: {
moveHandle() {
return false;
},
// 获取信息
getVideoInfo(article_id) {
uni.request({
@@ -113,6 +169,7 @@
success: (res) => {
this.list = res.data.data.info;
this.src = res.data.data.info.video_path;
this.cart_len = res.data.data.info.goods.length;
let item = res.data.data.info.label;
let arr = [];
item.forEach(data => {
@@ -139,40 +196,40 @@
},
success: (res) => {
if (res.data.errCode == 0) {
console.log(res.data);
// console.log(res.data);
this.commentList = res.data.data;
}
}
})
},
// 发布评论
sendComment() {
if (this.send_value.length == 0) {
this.$u.toast("内容不能为空!");
return;
}
uni.request({
url: temp_url + "article/articleAddComment",
method: "POST",
data: {
article_id: this.article_id,
content: this.send_value,
pid: this.pid,
reply_id: this.reply_id,
},
success: (res) => {
if (res.data.errCode == 0) {
this.send_value = "";
this.comment_num = res.data.num;
console.log(res.data);
} else {
uni.showToast({
title: res.data.message,
icon: "none"
})
}
}
})
sendComment() {
if (this.send_value.length == 0) {
this.$u.toast("内容不能为空!");
return;
}
uni.request({
url: temp_url + "article/articleAddComment",
method: "POST",
data: {
article_id: this.article_id,
content: this.send_value,
pid: this.pid,
reply_id: this.reply_id,
},
success: (res) => {
if (res.data.errCode == 0) {
this.send_value = "";
this.comment_num = res.data.num;
console.log(res.data);
} else {
uni.showToast({
title: res.data.message,
icon: "none"
})
}
}
})
},
// 获取手机信息
getInfo() {
@@ -180,8 +237,13 @@
success: (res) => {
this.videoSize = {
width: "750rpx",
height: res.screenHeight + "px"
height: res.screenHeight + "px",
}
this.fixTop = "400rpx";
this.fixTop = res.screenHeight / 3;
// #ifdef H5
this.fixTop = 400 + 'rpx'
// #endif
}
})
},
@@ -190,6 +252,19 @@
// console.log(e);
if (e.type == "play") {}
},
pausing(e) {
if (e.type == "pause") {
this.is_play = false;
}
},
// 结束
videoEnd(e) {
// console.log(e);
if (e.type == "ended") {
this.is_play = false;
this.time_count = 0;
}
},
// 暂停
stoping() {
this.is_play = !this.is_play;
@@ -202,8 +277,9 @@
// 监听视频
timeupdate(e) {
this.time_count = parseInt(e.detail.duration) - parseInt(e.detail.currentTime);
// console.log(e.detail.currentTime,e.detail.duration);
if (e.detail.duration == e.detail.currentTime) {
this.is_play = false;
// this.is_play = false;
}
// let num = parseInt((e.detail.currentTime/e.detail.duration)*100);
// this.linear = num + "%";
@@ -211,17 +287,23 @@
},
// 打开弹窗
openPopup(data) {
console.log(data);
// console.log(data);
this.cart_type = data.cart;
this.is_comment = data.comment;
if (this.is_comment) {
this.page = 0;
this.getComment();
// this.is_play = true;
}
},
// 关闭评论
closeComment() {
this.is_comment = false;
// console.log(this.is_comment,this.is_play);
// if (!this.is_comment && this.is_play) {
// console.log(1);
// this.is_play = false;
// }
},
// 下拉加载
onloading(e) {
@@ -231,6 +313,12 @@
this.loadinging = false;
}, 2000)
},
// 跳转
goGoodInfo(id) {
uni.navigateTo({
url: "/pageB/sdetails/index?id=" + id + "&type=" + 1,
})
},
// stop
stopClick(event) {
event.stopPropagation();
@@ -248,16 +336,16 @@
/* 关闭 */
.close {
position: fixed;
top: 80rpx;
right: 60rpx;
top: 100rpx;
right: 70rpx;
width: 30rpx;
height: 30rpx;
}
/* 暂停 */
.pause {
z-index: 99;
position: fixed;
top: 600rpx;
left: 330rpx;
width: 100rpx;
height: 100rpx;
@@ -266,7 +354,6 @@
/* 用户操作 */
.user-info {
position: fixed;
top: 360rpx;
right: 30rpx;
}
@@ -289,6 +376,53 @@
border-radius: 10rpx;
background-color: rgba(255, 255, 255, .6);
}
.good-one {
position: absolute;
bottom: 300rpx;
right: 100rpx;
width: 450rpx;
padding: 20rpx;
border-radius: 10rpx;
background-color: rgba(0,0,0,0.6);
}
.one-list {
flex-direction: row;
}
.one-image {
width: 160rpx;
height: 160rpx;
margin-right: 20rpx;
border-radius: 4rpx;
}
.one-box {
justify-content: space-between;
}
.title-one {
width: 100rpx;
font-size: 28rpx;
color: #fff;
lines: 1;
}
.content-one {
width: 100rpx;
font-size: 24rpx;
color: #fff;
lines: 2;
}
.mask {
z-index: 999999;
position: fixed;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.5);
}
.content-box {
z-index: 99;
@@ -320,19 +454,19 @@
align-items: center;
justify-content: space-between;
}
.content-main {
flex-direction: row;
padding-left: 100rpx;
}
.content-style {
width: 600rpx;
font-size: 26rpx;
color: #333;
lines: 2;
}
.comment-list-header {
flex-direction: row;
}
@@ -360,6 +494,7 @@
font-weight: 500;
color: #333;
}
.send-box {
z-index: 10000;
position: fixed;
@@ -375,24 +510,77 @@
border-color: #ececec;
background-color: #fff;
}
.send-val {
width: 600rpx;
height: 88rpx;
font-size: 36rpx;
}
.btn-send {
font-size: 30rpx;
color: #303133;
}
.close-down {
padding: 10rpx;
font-size: 50rpx;
text-align: center;
color: #333;
}
.cart-box {
z-index: 99;
position: fixed;
bottom: 0;
left: 0;
width: 750rpx;
height: 700rpx;
background-color: #fff;
}
.cart-title {
flex-direction: row;
align-items: center;
justify-content: space-between;
height: 88rpx;
padding: 0 20rpx;
border-color: #f2f2f2;
border-bottom-width: 1rpx;
background-color: #fff;
}
.cart-list {
}
.cart-list-header {
padding: 20rpx;
flex-direction: row;
border-bottom-width: 1rpx;
border-bottom-color: #ececec;
}
.goods-img {
width: 160rpx;
height: 160rpx;
margin-right: 10rpx;
}
.goods-info {
justify-content: space-around;
}
.good-title {
color: #333;
font-size: 30rpx;
}
.good-price {
font-size: 28rpx;
color: #FF3131;
}
.image-play {
width: 22rpx;
height: 20rpx;

View File

@@ -148,7 +148,7 @@ export default {
onLoad(option) {
this.orderType = this.$store.state.orderType;
this.orderInfo = this.$store.state.orderInfo;
console.log('orderType' + this.orderType);
// console.log('orderType' + this.orderType);
// console.log(this.orderInfo);
this.getGoodsClass();
this.setTotalPrice();

View File

@@ -326,10 +326,13 @@ export default {
font-weight: 500;
color: rgba(255,49,49,1);
}
.u-numberbox {
/deep/ .u-numberbox {
border: 1rpx solid rgba(217,215,215,1);
border-radius:4px;
/deep/ .u-number-input {
.u-icon-minus, .u-icon-plus {
width: 38rpx;
}
.u-number-input {
margin: 0;
color: #333 !important;
border: 1rpx #D9D7D7 solid {
@@ -338,31 +341,6 @@ export default {
}
}
}
// .num {
// display: flex;
// width: 118rpx;
// height: 39rpx;
// border: 1rpx solid rgba(217,215,215,1);
// border-radius:4px;
// .reduce, .increase {
// flex: 1;
// font-size: 11rpx;
// color: #FF780F;
// line-height: 39rpx;
// text-align: center;
// }
// .value {
// flex: 1;
// font-size: 22rpx;
// color:rgba(51,51,51,1);
// line-height: 39rpx;
// text-align: center;
// border: 1rpx #D9D7D7 solid {
// top: 0px;
// bottom: 0px;
// }
// }
// }
}
}
}

View File

@@ -16,7 +16,8 @@
<image :src="goods.goods_image"></image>
<view class="right">
<view class="name u-line-1">{{ goods.goods_name }}</view>
<view class="briefing u-line-2">{{ goods.goods_advword }}</view>
<view class="briefing u-line-1">{{ goods.goods_advword }}</view>
<view class="price">{{ goods.goods_price }}</view>
</view>
</view>
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
@@ -176,15 +177,21 @@ export default {
}
.right {
width: 418rpx;
height: 200rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
.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: 42rpx;
}
.price {
font-size: 26rpx;
color: rgba(255,49,49,1);
}
}
}

View File

@@ -88,7 +88,7 @@ export default {
indexlist: [],
indextop: [],
info: {},
page: 0,
page: 1,
scrollHeiht: '',
}
},

View File

@@ -1,15 +1,18 @@
<template>
<view class="attention">
<view class="attention_box" v-for="(item,index) in attention" :key="index" @click="navto(item.friend_tomid)">
<view>
<view style="position:relative">
<image :src="item.friend_tomavatar" mode="aspectFill"></image>
<view class="tishi" v-if="item.unread_message"></view>
</view>
<view>{{item.friend_tomname}}</view>
<view>{{item.live_status ? '正在直播' : '未直播'}}</view>
<view class="cur_two" @click="tapClick(index)" v-if = "item.about == 1">已关注</view>
<view class="cur" @click="tapClick(index)" v-else = "item.about == 2">未关注</view>
<view class="cur_two" @click="tapClick(index)">已关注</view>
<!-- <view class="cur" @click="tapClick(index)" v-else = "item.about == 2">未关注</view> -->
</view>
<u-loadmore :status="status" icon-type="iconType"/>
</view>
</template>
<script>
@@ -19,12 +22,27 @@
return {
rSelect:[],
type : '未关注',
attention: []
attention: [],
page:1,
status:'loadmore'
};
},
onReachBottom(){
if(this.status == 'loading' || this.status == 'nomore'){
return ;
}else{
this.status = "loading"
this.page++
this.snsfriendList()
}
},
onLoad(){
this.snsfriendList()
},
onShow(){
this.page = 1;
this.snsfriendList();
},
methods: {
// 点击切换颜色
tapClick(index) {
@@ -37,8 +55,17 @@
}
},
snsfriendList(){
this.$u.api.snsfriendList({}).then((res)=>{
this.attention = res.data;
this.$u.api.snsfriendList({page:this.page}).then((res)=>{
console.log(res)
if(this.page > 1){
this.attention.push(...res.data.data)
}else{
this.attention = res.data.data;
}
this.status = "loadmore"
if(res.data.data.length < 15){
this.status = "nomore"
}
})
},
navto(id){
@@ -58,6 +85,15 @@
</script>
<style lang="scss" scoped>
.tishi{
position: absolute;
top: 5rpx;
left: 80rpx;
background-color: #ff5d00;
width: 12rpx;
height: 12rpx;
border-radius: 50%;
}
.attention {
display: flex;
flex-wrap: wrap;

View File

@@ -3,7 +3,7 @@
<view class="container">
<view class="item-box" v-for="(item, index) in articleList" :key="index" @click="toDetailsPage(item.article_id)">
<view class="video-item" v-if="item">
<image class="head" :src="item.article_pic" mode="scaleToFill" v-if="item.type == 1"></image>
<image class="head" :src="item.article_pic" mode="aspectFill" v-if="item.type == 1"></image>
<view class="header_fist" v-else>
<view class="backes"></view>
<image class="head" :src="item.article_pic"></image>
@@ -219,7 +219,7 @@ export default {
.backes{
position: absolute;
top: 0;
background: rgba(0,0,0,0.6);
// background: rgba(0,0,0,0.6);
width: 100%;
height: 100%;
color: #fff;

View File

@@ -20,12 +20,12 @@
</view>
<view class="info-goods">
<view class="goods-store">
<view class="stoer-title">
<view class="stoer-title" @click="viewStoreDetails(orderInfo.extend_store.store_id)">
<image :src="orderInfo.extend_store.store_avatar" class="store-image"></image>
<view class="store-name">{{ orderInfo.extend_store.store_name }}</view>
<image src="../static/mine/21.png" class="right-icon"></image>
</view>
<view v-for="goods in orderInfo.extend_order_goods" :key="goods.goods_id">
<view v-for="goods in orderInfo.extend_order_goods" :key="goods.goods_id" @click="viewGoodsDetails(goods.goods_id)">
<view class="store-goods">
<image :src="goods.goods_image"></image>
<view class="goods-info">
@@ -118,6 +118,10 @@ export default {
text: '拼团中',
image: '../static/mine/37.png',
},
'9': {
text: '已取消',
image: '../static/mine/33.png',
},
},
orderInfo: {},
oid: '',
@@ -166,11 +170,27 @@ export default {
case 9:
state = '8';
break;
case 10:
state = '9';
break;
default:
break;
}
this.orderstate = state;
},
viewStoreDetails(id) {
this.$u.route('pageC/merchant/index', {
id: id
});
},
viewGoodsDetails(id) {
this.$u.route({
url: 'pageB/sdetails/index',
params: {
id: id,
}
})
},
setSpikeTime(time) {
// console.log(time);
this.timer = setInterval(() => {

View File

@@ -43,12 +43,12 @@ export default {
methods: {
getOrderLogistics(id) {
this.$u.api.orderLogistics({ id: id }).then(res => {
this.$u.toast(res.message);
if(res.errCode == 0) {
this.expressInfo = res.data.express_info;
this.list = res.data.express_list;
} else {
this.list = [];
this.$u.toast(res.message);
}
})
}

View File

@@ -57,8 +57,7 @@
"navigationBarTitleText": "",
"navigationStyle": "custom",
"app-plus": {
"titleNView": false,
"animationType": "slide-in-bottom"
"titleNView": false
}
}
},
@@ -105,7 +104,10 @@
{
"path" : "video/video",
"style" : {
"navigationStyle":"custom"
"navigationStyle":"custom",
"app-plus": {
"softinputMode": "adjustResize"
}
}
},
{
@@ -178,7 +180,7 @@
"searchInput": {
"align": "left",
"borderRadius": "15px",
"placeholder": "搜索您需要的商品",
"placeholder": "请输入搜索内容",
"backgroundColor": "rgb(236,236,236)",
"placeholderColor": "#999999",
"disabled": false,
@@ -198,7 +200,7 @@
"searchInput": {
"align": "left",
"borderRadius": "15px",
"placeholder": "搜索您需要的商品",
"placeholder": "请输入搜索内容",
"backgroundColor": "rgb(236,236,236)",
"placeholderColor": "#999999",
"disabled": false,
@@ -238,6 +240,18 @@
}
}
},
{
"path": "coupon/index",
"style": {
"navigationStyle": "custom",
"app-plus": {
"animationType": "fade-in",
"background": "transparent",
"backgroundColor": "rgba(0,0,0.5)",
"popGesture": "none"
}
}
},
{
"path": "coupon/details",
"style": {

View File

@@ -1,7 +1,7 @@
<template>
<view>
<view class="status_bar"></view>
<view class="index">
<view class="index" @touchmove.stop.prevent="moveHandle">
<view class="top">
<view class="sosuo" @click="goSearch">
<u-icon name="search" color="#555" size="34rpx"></u-icon>
@@ -20,7 +20,7 @@
</view>
<swiper class="card" @change="dianji" :current="num">
<swiper-item>
<scroll-view style="width:100%;height:100%" scroll-y="true" lower-threshold="200" @scrolltolower="swiperBottom">
<scroll-view style="width:100%;height:100%" scroll-y="true" lower-threshold="200" upper-threshold="100" @scrolltolower="swiperBottom" @scrolltoupper="swiperTop">
<view class="box">
<!-- <indexad style="width:690rpx"></indexad> -->
<u-swiper mode="dot" :list="indexImageSwiper" name="adv_code" @click="clickFImage"></u-swiper>
@@ -87,28 +87,28 @@
</swiper-item>
</swiper>
</view>
<u-popup v-model="showCoupon" mode="center" class="u-coupon-popup">
<view class="coupon">
<view class="price">{{ newMemberCoupon.price }}</view>
<image src="/static/image/common/30.png" class="coupon-image" @click="viewCoupon"></image>
<image src="/static/image/common/24.png" class="close-image" @click="showCoupon=false"></image>
</view>
</u-popup>
</view>
</template>
<style lang="scss" scoped>
page {
background-color: #fff;
}
.index {
width: 750rpx;
display: flex;
flex-direction: column;
height: 100vh;
/* #ifdef APP-PLUS */
padding-bottom: 100rpx;
padding-bottom: 88rpx;
/* #endif */
overflow: hidden;
.top {
z-index: 10000;
position: fixed;
top: var(--status-bar-height);
left: 0;
display: flex;
flex-shrink: 0;
align-items: center;
@@ -116,6 +116,7 @@
width: 100%;
height: 88rpx;
padding: 0 30rpx;
background-color: #fff;
.sosuo {
width: 32rpx;
@@ -133,8 +134,9 @@
}
.card {
height: 100%;
width: 100%;
height: 100%;
margin-top: 88rpx;
// pointer-events: none;
.box {
@@ -145,6 +147,8 @@
.list {
display: flex;
padding-bottom: 50rpx;
margin-bottom: 50rpx;
}
}
@@ -211,41 +215,6 @@
margin: 200rpx auto 0;
text-align: center;
}
.u-coupon-popup {
/deep/ .u-mode-center-box {
background-color: transparent;
}
.coupon {
width: 750rpx;
height: 583rpx;
position: relative;
.price {
z-index: 3;
color: #EBB36E;
position: absolute;
font-size: 108rpx;
font-weight: bold;
top: 200rpx;
left: 50%;
transform: translate(-68%, 0);
}
.coupon-image {
width: 568rpx;
height: 583rpx;
position: absolute;
top: 0;
left: 50%;
transform: translate(-60%, 0);
}
.close-image {
position: absolute;
top: 0;
right: 155rpx;
width: 60rpx;
height: 60rpx;
}
}
}
</style>
@@ -271,7 +240,7 @@
name: '关注'
}],
num: 0,
page: 0, // 0即第一页
page: 1, // 0即第一页
follow_page: 0, //
articleList: [],
recommendList: [], // 推荐达人
@@ -287,8 +256,6 @@
loading: '努力加载中',
nomore: '实在没有了'
},
showCoupon: false,
newMemberCoupon: {},
}
},
components: {
@@ -298,34 +265,44 @@
darenItem
},
onShow() {
this.articleList = [];
this.page = 0;
this.getArticlelist();
this.getSwiper();
this.page = 1;
if (this.page != 1) {
this.articleList = [];
}
this.getArticlelist();
// if (this.hasLogin) {
// this.isNewmembervoucher();
// }
},
onLoad(){
this.getSwiper();
// 优惠券
if(this.$store.state.hasLogin){
this.isNewmembervoucher();
const user = uni.getStorageSync('user_info');
console.log(user)
// console.log(user)
this.imService.login(user.member.member_id,user.member.member_nickname,user.member.member_avatar)
this.imService.connectIM()
let that = this
setTimeout(function(){
that.imService.disconnect()
console.log("guanbi")
// console.log("guanbi")
},1000)
setTimeout(function(){
console.log("lianjie")
// console.log("lianjie")
that.imService.connectIM()
},2000)
}
},
onPullDownRefresh() {
this.page = 1;
this.getArticlelist();
// this.getManicureList({ load: 'reload' });
},
methods: {
moveHandle() {
return;
},
// 直播列表
tabLiveList() {
this.$u.api.tabLiveList().then((res) => {
@@ -343,7 +320,7 @@
},
// 关注
changeType(member_id) {
console.log(member_id);
// console.log(member_id);
// this.$emit("pChangeType");
this.$u.api.attentionMember({
member_id: member_id
@@ -372,7 +349,8 @@
// 状态请求
if (a.type == "change") { // 强制请求一次
if (this.num == 0) {
this.page = 0;
this.page = 1;
this.articleList = [];
this.status = "loadmore";
this.getArticlelist();
this.getSwiper();
@@ -391,23 +369,30 @@
},
// 发现别表
getArticlelist() {
uni.showLoading({
title: "loading..."
})
this.$u.api.getArticlelist({
page: this.page,
is_video_img: 0, // 查询视频1 图文2 都查0
}).then(res => {
// uni.stopPullDownRefresh();
this.status = "loading";
if (res.errCode == 0) {
// uni.stopPullDownRefresh();
// console.log('37647744ghj', res)
if (this.page == 0) {
uni.hideLoading();
if (this.page == 1) {
this.articleList = res.data.list;
this.status = "loadmore";
} else if (res.data.length == 0 && this.page > 0) {
} else if (res.data.length == 0 && this.page > 1) {
this.status = "nomore";
} else {
this.articleList = this.articleList.concat(res.data.list);
}
this.page++;
if (res.data.length == 0 && this.page > 1) {
console.log(111);
} else {
this.page++;
}
} else {
this.status = "nomore"
}
@@ -415,8 +400,7 @@
},
// 屏蔽更新列表
updateList() {
console.log(111);
this.page = 0;
this.page = 1;
this.getArticlelist();
},
// 发现下拉加载
@@ -424,6 +408,10 @@
this.getArticlelist();
// console.log(e);
},
swiperTop() {
// uni.startPullDownRefresh();
},
// 关注下拉
followBotton(e) {
this.getFollowList();
// console.log(e);
@@ -507,24 +495,17 @@
goSearch() {
this.$u.route("/pageB/search/index", {
type: 2,
curent:2
});
},
// 是否显示新人优惠券
isNewmembervoucher() {
this.$u.api.isNewmembervoucher().then(res => {
if(res.errCode == 0) {
this.newMemberCoupon = res.data;
this.showCoupon = true;
} else {
this.showCoupon = false;
this.$u.route('/pageB/coupon/index');
}
})
},
viewCoupon() {
this.$u.route('/pageB/coupon/details', {
price: this.newMemberCoupon.price
});
}
},
}
</script>

View File

@@ -391,7 +391,7 @@ export default {
that.$forceUpdate();
console.log(that.room)
},60 * 1000)
},10 * 1000)
uni.request({
url:"https://dmmall.sdbairui.com/api/Specialci/livingUserInfo",
data:{

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB