Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx

This commit is contained in:
luyuan 2020-08-13 10:09:49 +08:00
commit eb886368e9
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
17 changed files with 280 additions and 135 deletions

View File

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

View File

@ -408,8 +408,8 @@ export default {
return vm.$u.post('article/articleCollectList'); return vm.$u.post('article/articleCollectList');
}, },
// 关注用户列表 // 关注用户列表
attentionMemberList() { attentionMemberList({ page = 1 } = {}) {
return vm.$u.post('member/attentionMemberList'); return vm.$u.post('member/attentionMemberList', { page: page });
}, },
} }
} }

View File

@ -2,7 +2,7 @@
<view class="comment-item"> <view class="comment-item">
<view class="user"> <view class="user">
<u-avatar :src="content.member_avatar" class="avatar" size="60"></u-avatar> <u-avatar :src="content.member_avatar" class="avatar" size="60"></u-avatar>
<text class="name">{{ content.geval_frommembername }}</text> <text class="name">{{ content.member_nickname }}</text>
<u-rate v-if="reply" :disabled='true' :count="count" v-model="rate" size="23" active-color="#FF780F" inactive-color="#F0EDF1" gutter="10"></u-rate> <u-rate v-if="reply" :disabled='true' :count="count" v-model="rate" size="23" active-color="#FF780F" inactive-color="#F0EDF1" gutter="10"></u-rate>
</view> </view>
<view class="content"> <view class="content">

View File

@ -80,7 +80,6 @@ export default {
//  // 
confirmBtn() { confirmBtn() {
if(!this.debounce) return; if(!this.debounce) return;
this.debounce = false;
this.info ? this.editAddress() : this.addAddress(); this.info ? this.editAddress() : this.addAddress();
}, },
// chooseArea() { // chooseArea() {
@ -119,6 +118,7 @@ export default {
}, },
addAddress() { addAddress() {
if(!this.validateValue()) return false; if(!this.validateValue()) return false;
this.debounce = false;
this.$u.api.addressAdd({ this.$u.api.addressAdd({
area_id: this.area_id, area_id: this.area_id,
city_id: this.city_id, city_id: this.city_id,
@ -144,6 +144,7 @@ export default {
}, },
editAddress() { editAddress() {
if(!this.validateValue()) return false; if(!this.validateValue()) return false;
this.debounce = false;
this.$u.api.addressEdit({ this.$u.api.addressEdit({
address_id: this.info.address_id, address_id: this.info.address_id,
area_id: this.area_id, area_id: this.area_id,

View File

@ -34,7 +34,7 @@ export default {
url: 'pageB/sdetails/index', url: 'pageB/sdetails/index',
params: { params: {
id: this.info.goods_id, id: this.info.goods_id,
type: 1, // type: 1,
} }
}) })
} }

View File

@ -66,7 +66,7 @@
<!-- 评论box --> <!-- 评论box -->
<u-popup v-model="is_edit" mode="bottom" border-radius="10" height="100rpx"> <u-popup v-model="is_edit" mode="bottom" border-radius="10" height="100rpx">
<view class="edit-box"> <view class="edit-box">
<input type="text" focus :placeholder="edit_text_other" @focus="focus" v-model="send_value"> <input type="text" :focus="is_focus" :placeholder="edit_text_other" @focus="focus" v-model="send_value">
<text @click="sendComment">发送</text> <text @click="sendComment">发送</text>
</view> </view>
</u-popup> </u-popup>
@ -419,7 +419,7 @@ export default {
edit_text: "有爱评论,说点好听的 ~", edit_text: "有爱评论,说点好听的 ~",
edit_text_other: "有爱评论,说点好听的 ~", edit_text_other: "有爱评论,说点好听的 ~",
commentList: [], // commentList: [], //
allList: [], // allList: {}, //
status: 'loadmore', status: 'loadmore',
iconType: 'circle', iconType: 'circle',
loadText: { loadText: {
@ -433,6 +433,7 @@ export default {
onLoad(option){ onLoad(option){
this.article_id = option.id; this.article_id = option.id;
this.articleInfo(this.article_id); this.articleInfo(this.article_id);
this.allList = {};
}, },
// //
onBackPress() { onBackPress() {
@ -491,18 +492,28 @@ export default {
this.commentList = this.commentList.concat(res.data); this.commentList = this.commentList.concat(res.data);
} }
this.page++; this.page++;
let list = this.commentList;
// list.forEach((item,index) => {
// console.log(item);
// })
} }
}) })
}, },
// //
openKeyInput(data,index) { openKeyInput(data,index) {
// console.log(data); let me = this;
console.log(data);
this.is_edit = true; this.is_edit = true;
setTimeout(() => { setTimeout(() => {
this.is_focus = true; this.is_focus = true;
}, 200) }, 200)
uni.onKeyboardHeightChange(function(res){
if (res.height == 0) {
me.is_focus = false;
}
})
this.comment_id = index; this.comment_id = index;
if (data.id) { if (data.content) {
this.edit_text_other = "回复@" + data.member_nickname; this.edit_text_other = "回复@" + data.member_nickname;
this.pid = data.id; this.pid = data.id;
this.reply_id = data.member_id; this.reply_id = data.member_id;
@ -525,15 +536,19 @@ export default {
pid: this.pid, pid: this.pid,
reply_id: this.reply_id, reply_id: this.reply_id,
}).then(res => { }).then(res => {
// console.log(res.data.data); // console.log(res.data);
if (res.errCode == 0) { if (res.errCode == 0) {
this.send_value = ""; this.send_value = "";
this.comment_num = res.data.num; this.comment_num = res.data.num;
// console.log(this.comment_num); // console.log(this.comment_num);
this.is_edit = false; this.is_edit = false;
if (res.data.data.pid) { console.log(res.data.data.reply_id);
if (res.data.data.reply_id) {
console.log(this.allList);
this.commentList[this.comment_id].reply_count = true; this.commentList[this.comment_id].reply_count = true;
this.allList[this.comment_id].unshift(res.data.data); this.allList[this.comment_id] = [];
this.allList[this.comment_id].push(res.data.data);
console.log(this.allList);
} else { } else {
this.commentList.unshift(res.data.data); this.commentList.unshift(res.data.data);
} }
@ -544,14 +559,14 @@ export default {
}, },
// //
getReplyList(id) { getReplyList(id) {
this.page_[id] = 0;
if (!this.page_[id] === 0) { if (!this.page_[id] === 0) {
} }
console.log(this.page_[id]); console.log(this.page_[id]);
this.$u.post("article/articleReplyList", {id: id, page: this.page_[id]}).then(res => { this.$u.post("article/articleReplyList", {id: id, page: this.page_[id]}).then(res => {
console.log(this.page_); console.log(res);
if (res.errCode == 0) { if (res.errCode == 0) {
this.page_[id]++; this.page_[id]++;
console.log(this.page_[id]);
this.allList[id] = res.data; this.allList[id] = res.data;
} }
}) })
@ -583,7 +598,7 @@ export default {
delta: 1 delta: 1
}) })
}, },
focus() { focus(e) {
setTimeout(function(){ setTimeout(function(){
uni.showSoftKeybord; uni.showSoftKeybord;
}, 200) }, 200)

View File

@ -23,10 +23,13 @@
<text class="goods-name">{{ goodsInfo.goods_name }}</text> <text class="goods-name">{{ goodsInfo.goods_name }}</text>
</view> </view>
<view class="price-collect"> <view class="price-collect">
<view class="pic" v-if="type != 3"> <view class="pic" v-if="type == 2">
<text>{{ goodsInfo.pintuan_price || '0.00' }}</text> <text>{{ goodsInfo.pintuan_price || '0.00' }}</text>
<s>{{ goodsInfo.goods_price || '0.00' }}</s> <s>{{ goodsInfo.goods_price || '0.00' }}</s>
</view> </view>
<view class="pic" v-else-if="type == 1">
<text>{{ goodsInfo.goods_price || '0.00' }}</text>
</view>
<view class="collect" @click="switchCollect(goodsInfo.is_collect)"> <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" 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> <u-icon name="star-fill" color="#FF7807" size="28" v-else></u-icon>
@ -485,7 +488,7 @@ export default {
* @params {Number} num 数量 * @params {Number} num 数量
* @params {Number} ifcart 结算方式 1:购物车 0:直接结算立即购买/拼团/秒杀 * @params {Number} ifcart 结算方式 1:购物车 0:直接结算立即购买/拼团/秒杀
**/ **/
settlementOrder({type, num = this.goodsNumber, ifcart = 0} = {}) { async settlementOrder({type, num = this.goodsNumber, ifcart = 0} = {}) {
if(type != 'involvement') { if(type != 'involvement') {
if(!this.showSpec) { if(!this.showSpec) {
this.showSpec = true; this.showSpec = true;
@ -514,14 +517,14 @@ export default {
if(this.type == 2) { if(this.type == 2) {
if(type == 'involvement') { if(type == 'involvement') {
// //
let status = this.pintuanVerify({ const whether = await this.pintuanVerify({
pintuan_id: this.pintuan_id, pintuan_id: this.pintuan_id,
pintuangroup_headid: this.involvemenGroupInfo[0].user_id pintuangroup_headid: this.involvemenGroupInfo[0].user_id
}).then(status => { }).then(status => {
if(status != 0) return true; if(status != 0) return true;
else return false;
}) })
// console.log(status); if(whether) return false;
if(status) return false;
this.$store.commit('setGroupHeadId', this.involvemenGroupInfo[0].user_id); this.$store.commit('setGroupHeadId', this.involvemenGroupInfo[0].user_id);
Object.assign(params, { Object.assign(params, {
pintuan_id: this.pintuan_id, pintuan_id: this.pintuan_id,

View File

@ -1,5 +1,5 @@
<template> <template>
<view> <view class="container">
<video id="videoId" :style="videoSize" :src="src" autoplay="true" :show-fullscreen-btn="false" @play="playing" <video id="videoId" :style="videoSize" :src="src" autoplay="true" :show-fullscreen-btn="false" @play="playing"
@pause="pausing" @ended="videoEnd" @timeupdate="timeupdate" :show-play-btn="false" controls="false" @click="stoping" @pause="pausing" @ended="videoEnd" @timeupdate="timeupdate" :show-play-btn="false" controls="false" @click="stoping"
:enable-progress-gesture="false" :show-center-play-btn="false"></video> :enable-progress-gesture="false" :show-center-play-btn="false"></video>
@ -29,18 +29,18 @@
</view> </view>
</cover-view> </cover-view>
<!-- 单个商品 --> <!-- 单个商品 -->
<cover-view class="good-one" v-if="cart_len == 1"> <cover-view class="good-one" :style="{ bottom: fixTop - 100 }" v-if="cart_len == 1 && cart_type">
<view class="one-list" v-for="(item,index) in list.goods" :key="index"> <view class="one-list" v-for="(item,index) in list.goods" :key="index" @click="goGoodInfo(item.goods_id)">
<image class="one-image" :src="item.goods_image" mode=""></image> <image class="one-image" :src="item.goods_image" mode=""></image>
<view class="one-box"> <view class="one-box">
<view class="title-one">{{ item.goods_advword }}</view> <text class="title-one">{{ item.goods_advword }}</text>
<view class="content-one">{{ item.goods_name }}</view> <text class="content-one">{{ item.goods_name }}</text>
<view class="good-price">¥{{ item.goods_promotion_price }}</view> <text class="good-price">¥{{ item.goods_promotion_price }}</text>
</view> </view>
</view> </view>
</cover-view> </cover-view>
<!-- 遮罩层 --> <!-- 遮罩层 -->
<cover-view class="mask" @click.stop="stopClick" :style="videoSize" v-if="is_comment || cart_type"> <cover-view class="mask" @click.stop="stopClick" :style="videoSize" v-if="is_edit || is_comment || cart_type && cart_len >= 2">
<!-- 评论 --> <!-- 评论 -->
<cover-view class="content-box" v-if="is_comment" ref="contentBox"> <cover-view class="content-box" v-if="is_comment" ref="contentBox">
<view class="content-title"> <view class="content-title">
@ -57,14 +57,15 @@
<text class="comment-time">{{ item.create_time }}</text> <text class="comment-time">{{ item.create_time }}</text>
</view> </view>
</view> </view>
<text class="reply">回复</text> <text class="reply" @click="openKeyInput(item,index)">回复</text>
</view> </view>
<view class="content-main"> <view class="content-main">
<text class="content-style">{{ item.content }}</text> <text class="content-style">{{ item.content }}</text>
</view> </view>
</view> </view>
<view class="send-box"> <view class="send-box">
<input class="send-val" type="text" value="" /> <input class="send-val" type="text" :placeholder="edit_text" placeholder-class="placeholder-class"
disabled="true" @blur="blue" @click="openKeyInput" value="" />
<text class="btn-send">发送</text> <text class="btn-send">发送</text>
</view> </view>
<loading class="loading" @loading="onloading" :display="loadinging ? 'show' : 'hide'"> <loading class="loading" @loading="onloading" :display="loadinging ? 'show' : 'hide'">
@ -73,6 +74,15 @@
</loading> </loading>
</scroller> </scroller>
</cover-view> </cover-view>
<!-- 评论框 -->
<cover-view class="edit-box" :style="videoSize" v-if="is_edit">
<view class="input-main" :style="{ bottom: editTop }">
<input class="edit-input" type="text" value="" :focus="is_focus" :placeholder=" edit_text_other ? edit_text_other : edit_text"
placeholder-class="placeholder-class" v-model="send_value" />
<text class="btn-send" @click="sendComment">发送</text>
</view>
<view></view>
</cover-view>
<!-- 购物车 --> <!-- 购物车 -->
<cover-view class="cart-box" v-if="cart_type"> <cover-view class="cart-box" v-if="cart_type">
<view class="cart-title"> <view class="cart-title">
@ -89,7 +99,7 @@
</view> </view>
</view> </view>
</view> </view>
<loading class="loading" @loading="onloading" :display="loadinging ? 'show' : 'hide'"> <loading v-if="0" class="loading" @loading="onloading" :display="loadinging ? 'show' : 'hide'">
<loading-indicator class="indicator"></loading-indicator> <loading-indicator class="indicator"></loading-indicator>
<text class="indicator-text">努力加载中</text> <text class="indicator-text">努力加载中</text>
</loading> </loading>
@ -117,12 +127,22 @@
return { return {
videoSize: {}, videoSize: {},
fixTop: 0, fixTop: 0,
editTop: 0,
list: {}, list: {},
labelLen: [], labelLen: [],
cart_len: 0, // 购物车个数
cart_type: false, // 显示购物车 cart_type: false, // 显示购物车
is_comment: false, // 显示评论 is_comment: false, // 显示评论
is_edit: false, // 显示输入
is_focus: false, //
comment_num: 0, // 评论数 comment_num: 0, // 评论数
edit_text: "有爱评论,说点好听的 ~",
edit_text_other: "有爱评论,说点好听的 ~",
pid: 0, // 主键
reply_id: 0, // 回复id
page: 0, page: 0,
comment_id: 0,
send_value: "", // 评论
commentList: [], // 评论列表 commentList: [], // 评论列表
src: "", src: "",
is_play: true, is_play: true,
@ -170,6 +190,7 @@
this.list = res.data.data.info; this.list = res.data.data.info;
this.src = res.data.data.info.video_path; this.src = res.data.data.info.video_path;
this.cart_len = res.data.data.info.goods.length; this.cart_len = res.data.data.info.goods.length;
console.log(this.cart_len);
let item = res.data.data.info.label; let item = res.data.data.info.label;
let arr = []; let arr = [];
item.forEach(data => { item.forEach(data => {
@ -217,11 +238,27 @@
pid: this.pid, pid: this.pid,
reply_id: this.reply_id, reply_id: this.reply_id,
}, },
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
success: (res) => { success: (res) => {
this.is_edit = false;
if (res.data.errCode == 0) { if (res.data.errCode == 0) {
this.send_value = ""; this.send_value = "";
this.comment_num = res.data.num; this.comment_num = res.data.num;
console.log(res.data); if (res.data.data.data.reply_id) {
// this.commentList[this.comment_id].reply_count = true;
// this.allList[this.comment_id].unshift(res.data.data);
// console.log(this.allList, 111);
} else {
this.commentList.unshift(res.data.data.data);
}
console.log(this.commentList);
} else if (res.data.errCode == 401) {
uni.showToast({
title: "您还没有登录,请先登录!",
icon: "none"
})
} else { } else {
uni.showToast({ uni.showToast({
title: res.data.message, title: res.data.message,
@ -288,6 +325,9 @@
// 打开弹窗 // 打开弹窗
openPopup(data) { openPopup(data) {
// console.log(data); // console.log(data);
if (this.cart_len >= 2) {
}
this.cart_type = data.cart; this.cart_type = data.cart;
this.is_comment = data.comment; this.is_comment = data.comment;
if (this.is_comment) { if (this.is_comment) {
@ -296,9 +336,41 @@
// this.is_play = true; // this.is_play = true;
} }
}, },
// 打开评论输入
openKeyInput(data, index) {
let me = this;
this.is_focus = true;
setTimeout(() => {
this.is_edit = true;
}, 500)
uni.onKeyboardHeightChange(function(res) {
console.log(res);
if (res.height == 0) {
me.is_focus = false;
me.is_edit = false;
} else {
me.editTop = res.height;
}
})
this.comment_id = index;
if (data.id) {
this.edit_text_other = "回复@" + data.member_nickname;
this.pid = data.id;
this.reply_id = data.member_id;
} else {
this.edit_text_other = "有爱评论,说点好听的 ~";
this.pid = "";
this.reply_id = "";
}
// console.log(this.pid, this.edit_text_other);
},
blue() {
this.is_focus = false;
},
// 关闭评论 // 关闭评论
closeComment() { closeComment() {
this.is_comment = false; this.is_comment = false;
this.is_edit = false;
// console.log(this.is_comment,this.is_play); // console.log(this.is_comment,this.is_play);
// if (!this.is_comment && this.is_play) { // if (!this.is_comment && this.is_play) {
// console.log(1); // console.log(1);
@ -316,7 +388,7 @@
// 跳转 // 跳转
goGoodInfo(id) { goGoodInfo(id) {
uni.navigateTo({ uni.navigateTo({
url: "/pageB/sdetails/index?id=" + id + "&type=" + 1, url: "/pageB/sdetails/index?id=" + id + "&type=" + 1,
}) })
}, },
// stop // stop
@ -333,6 +405,10 @@
</script> </script>
<style> <style>
.container {
position: relative;
}
/* 关闭 */ /* 关闭 */
.close { .close {
position: fixed; position: fixed;
@ -376,44 +452,46 @@
border-radius: 10rpx; border-radius: 10rpx;
background-color: rgba(255, 255, 255, .6); background-color: rgba(255, 255, 255, .6);
} }
.good-one { .good-one {
position: absolute; position: fixed;
bottom: 300rpx; right: 160rpx;
right: 100rpx; width: 420rpx;
width: 450rpx;
padding: 20rpx; padding: 20rpx;
border-radius: 10rpx; border-radius: 10rpx;
background-color: rgba(0,0,0,0.6); background-color: rgba(0, 0, 0, 0.6);
} }
.one-list { .one-list {
flex-direction: row; flex-direction: row;
} }
.one-image { .one-image {
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
margin-right: 20rpx; margin-right: 20rpx;
border-radius: 4rpx; border-radius: 4rpx;
} }
.one-box { .one-box {
justify-content: space-between; justify-content: space-around;
color: #333;
} }
.title-one { .title-one {
width: 100rpx; width: 200rpx;
font-size: 28rpx; font-size: 28rpx;
color: #fff; color: #fff;
lines: 1; lines: 1;
text-overflow: ellipsis;
} }
.content-one { .content-one {
width: 100rpx; width: 200rpx;
font-size: 24rpx; font-size: 24rpx;
color: #fff; color: #fff;
lines: 2; lines: 2;
text-overflow: ellipsis;
} }
.mask { .mask {
@ -431,6 +509,7 @@
left: 0; left: 0;
width: 750rpx; width: 750rpx;
height: 700rpx; height: 700rpx;
padding-bottom: 50rpx;
margin-bottom: 88rpx; margin-bottom: 88rpx;
background-color: #fff; background-color: #fff;
} }
@ -518,8 +597,8 @@
} }
.btn-send { .btn-send {
font-size: 30rpx; font-size: 28rpx;
color: #303133; color: #666;
} }
.close-down { .close-down {
@ -529,6 +608,38 @@
color: #333; color: #333;
} }
.edit-box {
z-index: 1000;
position: fixed;
bottom: 0;
left: 0;
width: 750rpx;
background-color: rgba(0, 0, 0, 0.8);
}
.input-main {
position: fixed;
left: 0;
/* #ifdef H5 */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
justify-content: space-between;
width: 750rpx;
padding: 0 20rpx;
line-height: 80rpx;
background-color: #fff;
}
.edit-input {
width: 600rpx;
height: 80rpx;
padding: 0 10rpx;
font-size: 24rpx;
color: #333;
}
.cart-box { .cart-box {
z-index: 99; z-index: 99;
position: fixed; position: fixed;
@ -549,33 +660,35 @@
border-bottom-width: 1rpx; border-bottom-width: 1rpx;
background-color: #fff; background-color: #fff;
} }
.cart-list { .cart-list {}
}
.cart-list-header { .cart-list-header {
padding: 20rpx; padding: 20rpx;
flex-direction: row; flex-direction: row;
border-bottom-width: 1rpx; border-bottom-width: 1rpx;
border-bottom-color: #ececec; border-bottom-color: #ececec;
} }
.goods-img { .goods-img {
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
margin-right: 10rpx; border-radius: 10rpx;
margin-right: 20rpx;
} }
.goods-info { .goods-info {
justify-content: space-around; justify-content: space-around;
} }
.good-title { .good-title {
width: 500rpx;
color: #333; color: #333;
font-size: 30rpx; font-size: 30rpx;
lines: 2;
text-overflow: ellipsis;
} }
.good-price { .good-price {
font-size: 28rpx; font-size: 28rpx;
color: #FF3131; color: #FF3131;
@ -624,7 +737,6 @@
} }
.label { .label {
lines: 3;
width: 100rpx; width: 100rpx;
height: 40rpx; height: 40rpx;
padding: 4rpx 10rpx; padding: 4rpx 10rpx;
@ -632,6 +744,7 @@
margin-bottom: 10rpx; margin-bottom: 10rpx;
font-size: 26rpx; font-size: 26rpx;
text-align: center; text-align: center;
line-height: 38rpx;
color: #666666; color: #666666;
border-radius: 10rpx; border-radius: 10rpx;
background-color: rgba(255, 255, 255, .6); background-color: rgba(255, 255, 255, .6);
@ -655,4 +768,9 @@
height: 30rpx; height: 30rpx;
color: #999; color: #999;
} }
.placeholder-class {
font-size: 13px;
color: #666;
}
</style> </style>

View File

@ -10,8 +10,8 @@
<view v-if="pinTuanList[index]"> <view v-if="pinTuanList[index]">
<SpecialGoods v-for="(item, index) in pinTuanList[index]" :key="index" :item="item" type='group'></SpecialGoods> <SpecialGoods v-for="(item, index) in pinTuanList[index]" :key="index" :item="item" type='group'></SpecialGoods>
</view> </view>
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" v-if="!pinTuanList[index] || pinTuanList[index].length>=pageSize" @loadmore="onreachBottom"></u-loadmore> <u-empty text="暂无商品" mode="list" color="#000" margin-top="120" v-if="!pinTuanList[index] || !pinTuanList[index].length"></u-empty>
<u-empty text="暂无商品" mode="list" color="#000" v-if="!pinTuanList[index] || !pinTuanList[index].length"></u-empty> <u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" v-if="pinTuanList[index] && pinTuanList[index].length>=pageSize" @loadmore="onreachBottom"></u-loadmore>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
</swiper> </swiper>
@ -22,7 +22,7 @@ import SpecialGoods from "../../components/shop/special-shop/index";
export default { export default {
data() { data() {
return { return {
pageSize: 12, pageSize: 6,
tabList: [], tabList: [],
current: -1, current: -1,
swiperCurrent: 0, swiperCurrent: 0,

View File

@ -3,8 +3,8 @@
<view class="concerns-container"> <view class="concerns-container">
<view v-for="(info, index) in list" :key="index"> <view v-for="(info, index) in list" :key="index">
<view class="daren-item"> <view class="daren-item">
<image class="head" :src="info.friend_tomavatar" @click="viewDetails(info.friend_tomid)"></image> <image class="head" :src="info.friend_tomavatar" @click="viewDetails({ id: info.friend_tomid, type: info.role })"></image>
<text class="name" @click="viewDetails(info.friend_tomid)">{{ info.friend_tomname || '' }}</text> <text class="name" @click="viewDetails({ id: info.friend_tomid, type: info.role })">{{ info.friend_tomname || '' }}</text>
<view class="guanzhu" @click="changeType(info.friend_tomid)" v-if="info.friend_followstate == 1">取消关注</view> <view class="guanzhu" @click="changeType(info.friend_tomid)" v-if="info.friend_followstate == 1">取消关注</view>
</view> </view>
</view> </view>
@ -31,14 +31,15 @@ export default {
this.$u.api.attentionMemberList().then(res => { this.$u.api.attentionMemberList().then(res => {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
if(res.errCode == 0) { if(res.errCode == 0) {
this.list = res.data; this.list = res.data.data;
} else { } else {
this.list = []; this.list = [];
} }
}) })
}, },
viewDetails(id) { viewDetails({ id, type }) {
this.$u.route('pageB/details/index', { let src = type == 3 ? 'pageB/details/index' : 'pageC/merchant/index';
this.$u.route(src, {
id: id id: id
}); });
}, },

View File

@ -67,8 +67,10 @@
<view>创建时间{{ orderInfo.add_time | date}}</view> <view>创建时间{{ orderInfo.add_time | date}}</view>
</view> </view>
</view> </view>
<view class="btn" v-if="['1', '2', '4', '6', '8'].indexOf(orderstate) >= 0"> <!-- '4', -->
<view class="cancel" v-if="(orderstate == '4' || orderstate == '1') && orderInfo.is_refund == 1" @click="toOtherPage('RefundOrder')">申请退款</view> <view class="btn" v-if="['1', '2', '6', '8'].indexOf(orderstate) >= 0">
<!-- orderstate == '4' || -->
<view class="cancel" v-if="(orderstate == '1') && orderInfo.is_refund == 1" @click="toOtherPage('RefundOrder')">申请退款</view>
<view class="cancel" v-if="orderstate == '1'" @click="toOtherPage('Logistics')">查看物流</view> <view class="cancel" v-if="orderstate == '1'" @click="toOtherPage('Logistics')">查看物流</view>
<view class="logistics" v-if="orderstate == '1'" @click="confirmReceive">确认收货</view> <view class="logistics" v-if="orderstate == '1'" @click="confirmReceive">确认收货</view>
<view class="comment" v-if="orderstate == '2'" @click="toOtherPage('Comment')">立即评价</view> <view class="comment" v-if="orderstate == '2'" @click="toOtherPage('Comment')">立即评价</view>

View File

@ -75,6 +75,7 @@ export default {
}) })
// console.log(goodsList); // console.log(goodsList);
this.goods = goodsList[0]; this.goods = goodsList[0];
this.num = this.goods.goods_num;
console.log(this.goods); console.log(this.goods);
}, },
getOrderInfo(id) { getOrderInfo(id) {

View File

@ -6,12 +6,16 @@
<view v-for="(item, index) in historyList.slice(0, 50)" :key="index" class="history-item"> <view v-for="(item, index) in historyList.slice(0, 50)" :key="index" class="history-item">
<view class="item-title" @click="viewStoreDetails(item.store_id)"> <view class="item-title" @click="viewStoreDetails(item.store_id)">
<image :src="item.store_avatar"></image> <image :src="item.store_avatar"></image>
<view class="u-line-2">{{ item.store_name }}</view> <view class="u-line-1">{{ item.store_name }}</view>
</view> </view>
<image :src="item.goods_image" class="item-image" @click="viewGoodsDetails(item.goods_id)"></image> <image :src="item.goods_image" class="item-image" @click="viewGoodsDetails(item.goods_id)"></image>
<view class="item-info" @click="viewGoodsDetails(item.goods_id)"> <view class="item-info" @click="viewGoodsDetails(item.goods_id)">
<view class="info-name u-line-1">{{ item.goods_name }}</view> <view class="info-name u-line-1">{{ item.goods_name }}</view>
<u-icon name="trash" color="#666" size="32"></u-icon>
</view> </view>
<!-- <view @click.stop="delArticle(item.article_id)">
</view> -->
</view> </view>
</view> </view>
<u-empty text="暂无足迹" mode="list" color="#000" v-if="!historyList.length"></u-empty> <u-empty text="暂无足迹" mode="list" color="#000" v-if="!historyList.length"></u-empty>
@ -126,10 +130,10 @@ export default {
font-size: 22rpx; font-size: 22rpx;
color: rgba(51,51,51,1); color: rgba(51,51,51,1);
} }
> image { // > image {
width: 37rpx; // width: 37rpx;
height: 8rpx; // height: 8rpx;
} // }
} }
} }
} }

View File

@ -21,7 +21,7 @@
<view class="order-status">{{ item.order_status | viewStatus }}</view> <view class="order-status">{{ item.order_status | viewStatus }}</view>
</view> </view>
<view class="order-info"> <view class="order-info">
<image :src="item.goods_image"></image> <image :src="type == 1 ? item.goods_image : item.images[0]"></image>
<view v-if="item.deliver_goods_type == 2 && item.order_status == 20"> <view v-if="item.deliver_goods_type == 2 && item.order_status == 20">
<view>骑手名字{{ item.takeawayer_name || '' }}</view> <view>骑手名字{{ item.takeawayer_name || '' }}</view>
<view>联系方式{{ item.takeawayer_mobile || '' }}</view> <view>联系方式{{ item.takeawayer_mobile || '' }}</view>
@ -40,13 +40,9 @@
<view>商家在正路途中请耐心等待</view> <view>商家在正路途中请耐心等待</view>
</view> </view>
</view> </view>
<view class="send-btn" v-if="item.order_status == 20 || item.order_status == 50"> <view class="send-btn" v-if="item.order_status == 20 || (item.order_status == 50&& !item.comment)">
<view class="btn" v-if="item.order_status == 20" @click="sendLaundryOrderConfirm(item.laundry_id)"> <view class="btn" v-if="item.order_status == 20" @click="sendLaundryOrderConfirm(item.laundry_id)">确认完成</view>
确认完成 <view class="btn" v-if="item.order_status == 50 && !item.comment" @click="toComment(item.laundry_id)">去评价</view>
</view>
<view class="btn" v-if="item.order_status == 50 && !item.comment" @click="toComment(item.laundry_id)">
去评价
</view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@ -87,6 +83,7 @@ export default {
timer: true, timer: true,
commentList: [], commentList: [],
swiperHeight: '', swiperHeight: '',
type: 1, // 1 2
} }
}, },
components: { components: {
@ -139,9 +136,9 @@ export default {
}, },
methods: { methods: {
async sendLaundryOrderList({ load = 'reload' } = {}) { async sendLaundryOrderList({ load = 'reload' } = {}) {
let type = this.list[0].name == '平台历史订单' ? 1 : 2; // let type = this.list[0].name == '' ? 1 : 2;
const res = await this.$u.api.sendLaundryOrderList({ const res = await this.$u.api.sendLaundryOrderList({
type: type, type: this.type,
page: this.page, page: this.page,
}) })
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
@ -214,8 +211,10 @@ export default {
}, },
replaces(e){ replaces(e){
if(e == 1){ if(e == 1){
this.type = 2;
this.$set(this.list,0,{name: '实体店历史订单'} ) this.$set(this.list,0,{name: '实体店历史订单'} )
} else { } else {
this.type = 1;
this.$set(this.list,0,{name: '平台历史订单'} ) this.$set(this.list,0,{name: '平台历史订单'} )
} }
this.sendLaundryOrderList(); this.sendLaundryOrderList();
@ -322,17 +321,21 @@ export default {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
margin-top: 30rpx; margin-top: 30rpx;
.btn{ .btn {
box-sizing: border-box;
width: 154rpx; width: 154rpx;
height: 54rpx; height: 54rpx;
border-radius: 49rpx; border-radius: 49rpx;
transform: translate(-50%, 0); // transform: translate(-50%, 0);
font-size: 26rpx; font-size: 26rpx;
border: 1rpx solid rgba(255,120,15,1); border: 1rpx solid rgba(255,120,15,1);
color:rgba(255,120,15,1); color:rgba(255,120,15,1);
text-align: center; // text-align: center;
line-height: 54rpx; // line-height: 54rpx;
margin-right: -80rpx; // margin-right: -80rpx;
display: flex;
align-items: center;
justify-content: center;
} }
} }
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<view> <view>
<view class="status_bar"></view> <view class="status_bar"></view>
<view class="index" @touchmove.stop.prevent="moveHandle"> <view class="index">
<view class="top"> <view class="top">
<view class="sosuo" @click="goSearch"> <view class="sosuo" @click="goSearch">
<u-icon name="search" color="#555" size="34rpx"></u-icon> <u-icon name="search" color="#555" size="34rpx"></u-icon>
@ -18,7 +18,7 @@
</view> </view>
<view class="sosuo"></view> <view class="sosuo"></view>
</view> </view>
<swiper class="card" @change="dianji" :current="num"> <swiper class="card" @change="dianji" :current="num" @touchmove.stop.prevent="moveHandle">
<swiper-item> <swiper-item>
<scroll-view style="width:100%;height:100%" scroll-y="true" lower-threshold="200" upper-threshold="100" @scrolltolower="swiperBottom" @scrolltoupper="swiperTop"> <scroll-view style="width:100%;height:100%" scroll-y="true" lower-threshold="200" upper-threshold="100" @scrolltolower="swiperBottom" @scrolltoupper="swiperTop">
<view class="box"> <view class="box">
@ -45,11 +45,11 @@
<view class="list"> <view class="list">
<view> <view>
<zhiboItem v-for="item in tabLiveLists.filter((_, index) => !(index&1))" :zid="item.live_id" :rid="item.chatroom_id" <zhiboItem v-for="item in tabLiveLists.filter((_, index) => !(index&1))" :zid="item.live_id" :rid="item.chatroom_id"
:key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url" :item="item" @updateList="updateList"></zhiboItem> :key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url" :item="item" @updateList="updateList"></zhiboItem>
</view> </view>
<view style="margin-left:20rpx"> <view style="margin-left:20rpx">
<zhiboItem v-for="item in tabLiveLists.filter((_, index) => index&1)" :zid="item.live_id" :rid="item.chatroom_id" <zhiboItem v-for="item in tabLiveLists.filter((_, index) => index&1)" :zid="item.live_id" :rid="item.chatroom_id"
:key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url" :item="item" @updateList="updateList"></zhiboItem> :key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url" :item="item" @updateList="updateList"></zhiboItem>
</view> </view>
</view> </view>
</view> </view>
@ -79,7 +79,7 @@
<videoItem isguanzhu="true" v-for="(item,id) in fansList" :key="id" :item="item"></videoItem> <videoItem isguanzhu="true" v-for="(item,id) in fansList" :key="id" :item="item"></videoItem>
</view> </view>
<view class="no-data" v-if="!fansList.length">您还没有关注哦赶紧去点点关注</view> <view class="no-data" v-if="!fansList.length">您还没有关注哦赶紧去点点关注</view>
<u-loadmore class="load-size" v-else :status="status_1" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" /> <u-loadmore class="load-size" v-else :status="status_1" icon-type="iconType" margin-top="50" :load-text="loadText" />
</view> </view>
</view> </view>
</view> </view>
@ -98,11 +98,6 @@
width: 750rpx; width: 750rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100vh;
/* #ifdef APP-PLUS */
padding-bottom: 88rpx;
/* #endif */
overflow: hidden;
.top { .top {
z-index: 10000; z-index: 10000;
@ -135,29 +130,31 @@
.card { .card {
width: 100%; width: 100%;
height: 100%; height: calc(100vh - 150rpx);
margin-top: 88rpx; margin-top: 100rpx;
// pointer-events: none; // padding-top: 100rpx;
.box { .box {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 0 30rpx; padding: 0 30rpx 0;
// margin-top: 30rpx;
} }
.list { .list {
display: flex; display: flex;
padding-bottom: 50rpx; // height: 100vh;
margin-bottom: 50rpx; // padding-bottom: 100rpx;
// margin-bottom: 50rpx;
} }
} }
.tuijian { .tuijian {
width: 750rpx; width: 750rpx;
padding: 30rpx;
margin-left: -30rpx; margin-left: -30rpx;
height: 400rpx; height: 400rpx;
background-color: #ececec; background-color: #ececec;
padding: 30rpx;
.title { .title {
width: 100%; width: 100%;
@ -389,7 +386,6 @@
this.articleList = this.articleList.concat(res.data.list); this.articleList = this.articleList.concat(res.data.list);
} }
if (res.data.length == 0 && this.page > 1) { if (res.data.length == 0 && this.page > 1) {
console.log(111);
} else { } else {
this.page++; this.page++;
} }

View File

@ -47,7 +47,7 @@
<view class="title-text">我的订单</view> <view class="title-text">我的订单</view>
<view class="more" @click="toOtherPage('/order/Index')"> <view class="more" @click="toOtherPage('/order/Index')">
<view class="title-text-more">查看全部订单</view> <view class="title-text-more">查看全部订单</view>
<image src="/static/image/mine/21.png"></image> <u-icon name="arrow-right" color="#999" size="22"></u-icon>
</view> </view>
</view> </view>
<view class="content"> <view class="content">
@ -180,7 +180,7 @@ export default {
.mine-top { .mine-top {
// width: 100%; // width: 100%;
height: 272rpx; height: 272rpx;
background: #FF780F; background-color: #F0AD4E;
.top { .top {
padding: 40rpx 0 0 30rpx; padding: 40rpx 0 0 30rpx;
display: flex; display: flex;
@ -242,13 +242,11 @@ export default {
} }
} }
.bottom { .bottom {
box-sizing: border-box;
padding: 0 30rpx;
display: flex; display: flex;
// justify-content: space-between; justify-content: space-around;
justify-content: flex-start; padding: 0 10rpx;
box-sizing: border-box;
> view { > view {
margin-right: 80rpx;
text-align: center; text-align: center;
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 500;
@ -268,35 +266,35 @@ export default {
} }
@mixin common-mine($content-padding-top, $content-padding-bottom, $image-width, $image-height) { @mixin common-mine($content-padding-top, $content-padding-bottom, $image-width, $image-height) {
box-sizing: border-box; box-sizing: border-box;
width: 690rpx; width: 750rpx;
background: rgba(255,255,255,1); background: rgba(255,255,255,1);
border-radius: 10rpx; // border-radius: 10rpx;
margin: 30rpx auto 0; margin: 20rpx auto 0;
padding: 0 20rpx;
.title { .title {
height: 76rpx;
font-size: 28rpx;
color: #666;
position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
&::after { height: 76rpx;
content: ""; padding: 0 20rpx;
position: absolute; font-size: 28rpx;
width: 650rpx; color: #666;
height: 1rpx; border-bottom: 1px solid #ececec;
background: rgba(234,234,234,1); // &::after {
bottom: 0; // content: "";
left: 50%; // position: absolute;
transform: translate(-50%,0); // width: 650rpx;
} // height: 1rpx;
// background: rgba(234,234,234,1);
// bottom: 0;
// left: 50%;
// transform: translate(-50%,0);
// }
} }
.title-text-more { .title-text-more {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
} }
.content { .content {
padding: $content-padding-top 0 $content-padding-bottom; padding: $content-padding-top 20rpx $content-padding-bottom;
display: flex; display: flex;
> view { > view {
text-align: center; text-align: center;

View File

@ -510,7 +510,11 @@ export default {
}, },
success(res){ success(res){
console.log(res) console.log(res)
that.info = res.data.data that.info = res.data.data;
uni.showToast({
title: res.data.message,
icon: "none"
})
// that.list= res.data.data // that.list= res.data.data
} }
}) })