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

This commit is contained in:
luyuan 2020-08-14 14:50:57 +08:00
commit 12efa8d79c
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
10 changed files with 167 additions and 142 deletions

View File

@ -217,6 +217,12 @@ export default {
page: page,
});
},
// 删除浏览记录
delMemberBrowse({ goods_id }) {
return vm.$u.post('Member/delMemberBrowse', {
goods_id: goods_id,
});
},
// 意见反馈列表
getFeedbackList({ page }) {
return vm.$u.post('Member/feedbackList', {

View File

@ -12,9 +12,7 @@
<image :src="goods.goods_image"></image>
<view class="goods-text">
<view class="goods-name u-line-2">{{ goods.goods_name }}</view>
<view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40 && goods.goods_spec">
<text v-for="(spec, index) in goods.goods_spec" :key="index">{{ spec + ';' }}</text>
</view>
<view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40 && goods.goods_spec">{{ goods.goods_spec | concatSpec }}</view>
<!-- <view class="goods-time u-line-1" v-if="order.view_type == 1">结束时间{{ order.end_time | date('yyyy-mm-dd hh:MM') }}</view> -->
<view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价{{ goods.goods_price }}实付款{{ goods.goods_pay_price }}</view>
<view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40">
@ -53,6 +51,18 @@ export default {
mounted() {
this.viewState();
},
filters: {
concatSpec(value) {
let spec = '';
for (const key in value) {
if (value.hasOwnProperty(key)) {
const element = value[key];
spec = spec + element + ';'
}
}
return spec;
}
},
methods: {
viewState() {
let state;
@ -181,7 +191,7 @@ export default {
line-height: 38rpx;
}
.goods-sku {
display: inline-block;
align-self: baseline;
max-width: 230rpx;
background: rgba(236,236,236,1);
border-radius: 6rpx;

View File

@ -229,6 +229,7 @@
console.log(res.errCode);
if (res.errCode == 0) {
this.loginIn(res.data.token);
uni.setStorageSync('user_info',res.data);
this.show = false;
uni.switchTab({
url: "../../pages/index/index"
@ -259,6 +260,7 @@
console.log(res);
if (res.errCode == 0) {
this.loginIn(res.data.token);
uni.setStorageSync('user_info',res.data);
this.show = false;
uni.switchTab({
url: "../../pages/index/index"

View File

@ -251,6 +251,7 @@
}
.child_content {
margin: 18rpx 0 18rpx 30rpx;
font-size: 26rpx;
}
}
.more-reply {
@ -578,16 +579,15 @@ export default {
this.$u.post("article/articleReplyList", {id: id, page: this.page_[id]}).then(res => {
uni.hideLoading();
if (res.errCode == 0) {
if (res.data.length < 10) {
this.is_more = false;
}
// if (res.data.length < 10) {
// this.is_more = false;
// }
this.page_[id]++;
console.log(this.page_[id]);
this.$nextTick(() => {
this.allList[id] = res.data;
})
console.log(this.allList);
}
})
},

View File

@ -140,7 +140,7 @@
<text>购买数量</text>
<u-number-box v-model="goodsNumber" :min="1"></u-number-box>
</view>
<view style="height:100rpx"></view>
<!-- <view style="height:100rpx"></view> -->
</view>
</scroll-view>
</u-popup>
@ -1169,9 +1169,11 @@ export default {
}
.spec-popup {
padding: 30rpx;
margin-bottom: 130rpx;
box-sizing: border-box;
max-height: 750rpx;
.head{
// height: 600rpx;
max-height: 60vh;
.head {
display: flex;
margin-bottom: 30rpx;
.image{
@ -1196,14 +1198,13 @@ export default {
}
}
}
.num{
.num {
height: 84rpx;
display: flex;
border-bottom: #ececec solid 2rpx;
justify-content: space-between;
align-items: center;
>text{
> text {
font-size: 26rpx;
color: #666;
}

View File

@ -8,7 +8,7 @@
@openCart="openPopup"></userinfo>
<!-- 视频信息 -->
<cover-view class="info-box" @click="stopClick">
<view class="video-info-box" :style="{ width: time_count > 99 ? '200rpx' : '160rpx' }">
<view class="video-info-box" :style="{ width: time_count > 99 ? '180rpx' : '160rpx' }">
<image class="image-play" src="../../static/videoIcon.png" mode=""></image>
<text class="video-slip">视频</text>
<text class="time">{{ time_count }}s</text>
@ -69,10 +69,11 @@
<text class="child-name">{{ child.member_nickname }}</text>
<text v-if="0">{{ child.reply_member_nickname }}</text>
</view>
<view class="child_content">{{ child.content }}</view>
<text class="child_content">{{ child.content }}</text>
</view>
<view class="more-comment" v-if="item.reply_count">
展开更多回复
<view>
<text class="more-comment" @click="getReplyList(item.id)" v-if="item.reply_count">展开更多回复</text>
<text></text>
</view>
</view>
</view>
@ -154,6 +155,7 @@
pid: 0, // 主键
reply_id: 0, // 回复id
allList: {}, // 全部子评论
page_: {},
page: 0,
comment_id: 0,
send_value: "", // 评论
@ -298,6 +300,40 @@
}
})
},
// 发现回复列表
getReplyList(id) {
uni.showLoading({
title: "loading..."
})
if (!this.page_[id] === 0) {
}
console.log(id);
uni.request({
url: temp_url + "article/articleReplyList",
method: "POST",
data: {
id: id,
page: this.page_[id],
},
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
success: (res) => {
uni.hideLoading();
if (res.data.errCode == 0) {
if (res.data.data.length < 10) {
this.is_more = false;
}
this.page_[id]++;
console.log(this.page_[id]);
this.$nextTick(function(){
this.allList[id] = res.data.data;
})
console.log(this.allList);
}
}
})
},
// 获取手机信息
getInfo() {
uni.getSystemInfo({

View File

@ -1,11 +1,13 @@
<template>
<view class="collection">
<view class="container">
<view class="item-box" v-for="(item, index) in articleList" :key="index" @click="toDetailsPage(item.article_id)">
<view class="item-box" v-for="(item, index) in articleList" :key="index" @click="toDetailsPage({ id: item.article_id, type: item.type })">
<view class="video-item" v-if="item">
<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>
<view class="backs">
<image class="play-icon" src="/static/videoPlay.png"></image>
</view>
<image class="head" :src="item.article_pic"></image>
</view>
<view class="title u-line-1">{{ item.article_title }}</view>
@ -15,23 +17,14 @@
<image :src="item.member_avatar"></image>
<text>{{ item.member_nickname }}</text>
</view>
<view @click.stop="delArticle(item.article_id)">
<u-icon name="trash" color="#333" size="36"></u-icon>
<view @click.stop="viewAction(item.article_id)">
<u-icon name="more-dot-fill" color="#333" size="36"></u-icon>
</view>
<!-- <image src="/static/image/common/4.png" @click.stop="showAction(item)"></image> -->
<!-- <view class="action" v-if="show == item.article_id">
<view class="bubble">
<view @click.stop="delArticle(item.article_id)">
<image src="/static/image/common/8.png"></image>
<text>删除</text>
</view>
</view>
</view> -->
<view class="layer" v-if="show == item.article_id" @click.stop="show=-1"></view>
</view>
</view>
</view>
</view>
<u-action-sheet :list="actionList" v-model="showAction" :cancel-btn="true" @click="delArticle" border-radius="20"></u-action-sheet>
<u-empty mode="list" v-if="!articleList.length" color="#000" img-width="200" font-size="30" margin-top="120"></u-empty>
</view>
</template>
@ -39,8 +32,17 @@
export default {
data() {
return {
tid: '',
show: -1,
articleList: [],
showAction: false,
actionList: [
{
text: '删除',
color: '#000000',
fontSize: 36
}
]
}
},
onShow() {
@ -51,9 +53,6 @@ export default {
this.articleCollectList();
},
methods: {
showAction(item) {
this.show = this.show > 0 ? -1 : item.article_id;
},
articleCollectList() {
this.$u.api.articleCollectList().then(res => {
uni.stopPullDownRefresh();
@ -64,8 +63,16 @@ export default {
}
})
},
delArticle(id) {
this.$u.api.articleCollect({ article_id: id }).then(res => {
viewAction(id) {
this.showAction = true;
this.tid = id;
},
toDetailsPage({ id, type }) {
let src = type == 1 ? 'pageB/photo/index' : 'pageB/video/video';
this.$u.route(src, { id: id });
},
delArticle() {
this.$u.api.articleCollect({ article_id: this.tid }).then(res => {
if(res.errCode == 0) {
this.articleCollectList();
} else {
@ -73,11 +80,6 @@ export default {
}
})
},
toDetailsPage(id) {
uni.navigateTo({
url: '/pageB/photo/index?id=' + id
});
},
}
};
</script>
@ -88,11 +90,9 @@ export default {
padding: 21rpx 30rpx 0;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.item-box {
&:not(:nth-child(2n)) {
margin-right: 20rpx;
}
.video-item{
.video-item {
width: 330rpx;
height: 510rpx;
margin-top: 20rpx;
@ -104,30 +104,28 @@ export default {
height: 330rpx !important;
}
.title{
margin:0 auto;
margin-top: 20rpx;
margin: 20rpx auto 0;
font-size: 22rpx;
color: #333;
font-weight: 500;
height: 30rpx;
line-height: 30rpx;
width: 300rpx;
}
.jianjie{
// height: 60rpx;
margin:0 auto;
margin-top: 20rpx;
height: 30rpx;
margin: 20rpx auto 0;
font-size: 22rpx;
color: #666;
line-height: 30rpx;
width: 300rpx;
margin-left: 18rpx;
}
.user{
.user {
display: flex;
justify-content: space-between;
align-items: center;
margin:0 auto;
margin-top: 20rpx;
margin: 20rpx auto 0;
width: 300rpx;
position: relative;
.info {
@ -149,82 +147,27 @@ export default {
width: 37rpx;
height: 8rpx;
}
.action {
z-index: 19;
position: absolute;
right: 0rpx;
bottom: 55rpx;
// width: 234rpx;
background: rgba(255,255,255,1);
box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(35,24,21,0.12);
border-radius: 6rpx;
.bubble {
position: relative;
background-color: #fff;
&::after {
position: absolute;
right: 10rpx;
bottom: 0;
content: '';
width: 60rpx;
height: 40rpx;
background-color: inherit;
transform: rotate(45deg);
margin-top: -10rpx;
z-index: -1;
box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(35,24,21,0.12);
}
> view {
padding: 9rpx 12rpx;
display: flex;
align-items: center;
&:not(:last-child) {
border-bottom: 2rpx #ECECEC solid;
}
@mixin image-class($width, $height, $right) {
width: $width;
height: $height;
margin-right: $right;
}
> image {
&:first-child {
@include image-class($width: 21rpx, $height: 22rpx, $right: 12rpx);
}
&:nth-child(2) {
@include image-class($width: 22rpx, $height: 22rpx, $right: 12rpx);
}
&:last-child {
@include image-class($width: 24rpx, $height: 20rpx, $right: 9rpx);
}
}
> text {
font-size: 20rpx;
color: rgba(51,51,51,1);
}
}
}
}
.layer {
position: fixed;
top: 0;
left: 0;
}
.header_fist {
width: 330rpx;
height: 330rpx;
position: relative;
.backs {
width: 100%;
height: 100%;
z-index: 9;
background-color: transparent;
}
}
.header_fist{
position: relative;
.backes{
position: absolute;
top: 0;
// background: rgba(0,0,0,0.6);
width: 100%;
height: 100%;
color: #fff;
background-color: rgba(0, 0, 0, 0.35);
.play-icon {
z-index: 19;
position: absolute;
width: 100rpx;
height: 100rpx;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
}
}
}

View File

@ -146,7 +146,8 @@ export default {
let files = [];
// console.log(this.uploadImageList);
this.uploadImageList.forEach((item, index) => {
// files[index] = '';
//
files[index] = '';
// console.log(item);
item.forEach((img, idx) => {
if(idx < item.length-1) {

View File

@ -8,16 +8,16 @@
<image :src="item.store_avatar"></image>
<view class="u-line-1">{{ item.store_name }}</view>
</view>
<image :src="item.goods_image" class="item-image" @click="viewGoodsDetails(item.goods_id)"></image>
<image :src="item.goods_image" class="item-image" mode="aspectFit" @click="viewGoodsDetails(item.goods_id)"></image>
<view class="item-info" @click="viewGoodsDetails(item.goods_id)">
<view class="info-name u-line-1">{{ item.goods_name }}</view>
<u-icon name="trash" color="#666" size="32"></u-icon>
<view @click.stop="viewAction(item.goods_id)">
<u-icon name="more-dot-fill" color="#333" size="32"></u-icon>
</view>
</view>
<!-- <view @click.stop="delArticle(item.article_id)">
</view> -->
</view>
</view>
<u-action-sheet :list="actionList" v-model="showAction" :cancel-btn="true" @click="delHistory" border-radius="20"></u-action-sheet>
<u-empty text="暂无足迹" mode="list" color="#000" v-if="!historyList.length"></u-empty>
<u-loadmore :status="loadStatus" bgColor="#ECECEC" margin-bottom="20" v-if="historyList.length > 9"></u-loadmore>
</scroll-view>
@ -28,16 +28,40 @@
export default {
data() {
return {
hid: '', // id
historyList: [],
page: 1, // 1
loadStatus: 'loadmore',
timer: true,
showAction: false,
actionList: [
{
text: '删除',
color: '#000000',
fontSize: 36
}
]
};
},
onLoad() {
this.getBrowseList();
},
methods: {
viewAction(id) {
this.showAction = true;
this.hid = id;
},
delHistory() {
let glist = [];
glist.push(this.hid);
this.$u.api.delMemberBrowse({ goods_id: glist }).then(res => {
if(res.errCode == 0) {
this.getBrowseList();
} else {
this.$u.toast(res.message);
}
})
},
viewStoreDetails(sid) {
this.$u.route({
url: 'pageC/merchant/index',
@ -54,11 +78,13 @@ export default {
}
})
},
async getBrowseList () {
async getBrowseList ({ load = 'reload' } = {}) {
if(load == 'reload') this.page = 1;
const res = await this.$u.api.getBrowseList({ page: this.page });
this.timer = true;
if(res.errCode == 0) {
this.historyList.push(...res.data.storeInfo);
if(load == 'reload') this.historyList = res.data.storeInfo;
else if(load == 'loadmore') this.historyList.push(...res.data.storeInfo);
}
return res.data.storeInfo.length;
},
@ -67,7 +93,7 @@ export default {
this.timer = false;
this.loadStatus = "loading";
this.page++;
this.getBrowseList().then(length => {
this.getBrowseList({ load: 'loadmore' }).then(length => {
if(length == 0) {
this.page--;
this.loadStatus = 'nomore';
@ -99,10 +125,11 @@ export default {
background: rgba(255,255,255,1);
border-radius: 10rpx;
padding: 20rpx 20rpx 22rpx;
margin: 0 10rpx 20rpx 0;
margin: 0 11rpx 20rpx 0;
.item-title {
display: flex;
align-items: center;
margin-bottom: 20rpx;
> image {
width: 50rpx;
height: 50rpx;
@ -115,25 +142,24 @@ export default {
}
}
.item-image {
margin: 20rpx 0 17rpx;
width: 180rpx;
height: 140rpx;
border-radius: 10rpx;
}
.item-info {
height: 60rpx;
font-size: 22rpx;
display: flex;
justify-content: space-between;
align-items: center;
.info-name {
margin-right: 10rpx;
height: 60rpx;
line-height: 60rpx;
margin-right: 14rpx;
flex: 1;
font-size: 22rpx;
color: rgba(51,51,51,1);
}
// > image {
// width: 37rpx;
// height: 8rpx;
// }
}
}
}

View File

@ -13,7 +13,7 @@
</view>
<view class="info-right">
<view class="info-phone">{{ userInfo.member_mobile | phoneFormat }}</view>
<view class="user-rank">等级:{{ userInfo.member_level }}</view>
<view class="user-rank">等级:{{ userInfo.member_level || 0 }}</view>
</view>
</view>
<view class="member-service" @click="toOtherPage('/mine/MemberServe')">会员服务</view>