This commit is contained in:
ghusermoon 2020-08-03 14:34:56 +08:00
parent 7ae10c200d
commit af768bff80
11 changed files with 258 additions and 36 deletions

View File

@ -392,6 +392,10 @@ export default {
sendCommentList() {
return vm.$u.post('member/sendCommentList');
},
// 发现收藏列表
articleCollectList() {
return vm.$u.post('article/articleCollectList');
},
}
}
}

View File

@ -233,7 +233,6 @@ export default {
uni.navigateTo({
url: '/pageB/photo/index?id=' + id
});
},
},
}

View File

@ -49,6 +49,7 @@ export default {
area: '', //
area_id: '', // id
city_id: '', // id
debounce: true,
}
},
props: {
@ -78,18 +79,20 @@ export default {
},
// 
confirmBtn() {
if(!this.debounce) return;
this.debounce = false;
this.info ? this.editAddress() : this.addAddress();
},
chooseArea() {
uni.chooseLocation({
success: function (res) {
console.log('位置名称:' + res.name);
console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
}
});
},
// chooseArea() {
// uni.chooseLocation({
// success: function (res) {
// console.log('' + res.name);
// console.log('' + res.address);
// console.log('' + res.latitude);
// console.log('' + res.longitude);
// }
// });
// },
//
validateValue() {
if(this.$u.test.isEmpty(this.name)) {
@ -134,6 +137,7 @@ export default {
back: true,
})
} else {
this.debounce = true;
this.showToast(res.message, 'warning');
}
})
@ -153,20 +157,13 @@ export default {
// latitude,
}).then((res)=>{
if (res.errCode == 0) {
uni.redirectTo({
url: '/pageE/more/Address'
});
// this.$refs.uToast.show({
// title: res.message,
// type: 'success',
// // url: '/pageE/more/Address',
// callback() {
// uni.redirectTo({
// url: '/pageE/more/Address'
// });
// }
// })
this.$refs.uToast.show({
title: res.message,
type: 'success',
back: true,
})
} else {
this.debounce = true;
this.showToast(res.message, 'warning');
}
})

View File

@ -12,10 +12,10 @@
<view class="area" @click="show=true">
<label for="address">省市区:</label>
<input type="text" id="address" placeholder="" v-model="address" disabled />
<view>
<!-- <view>
<image src="/static/image/mine/24.png"></image>
<text>定位</text>
</view>
</view> -->
</view>
<view>
<label for="area">详细地址:</label>
@ -78,6 +78,7 @@ export default {
minute: true,
second: false
},
debounce: true,
}
},
mounted() {
@ -127,7 +128,9 @@ export default {
this.time = time;
},
confirmBtn() {
if(!this.debounce) return;
if(!this.verification()) return false;
this.debounce = false;
this.$u.api.saveGoodsTry({
member_name: this.name,
member_mobile: this.phone,
@ -139,7 +142,6 @@ export default {
appointment_time: new Date(this.time),
}).then(res => {
if (res.errCode == 0) {
// this.$u.route({ type: 'navigateBack' });
this.$refs.uToast.show({
title: res.message,
back: true,
@ -149,6 +151,7 @@ export default {
title: res.message,
type: 'error',
})
this.debounce = true;
}
})
},

View File

@ -54,6 +54,7 @@ export default {
checkedAll: false,
checkedGoods: [],
totalPrice: '0.00',
debounce: true,
}
},
watch: {
@ -74,9 +75,11 @@ export default {
}
},
onPullDownRefresh() {
this.debounce = true;
this.getCartList();
},
onShow() {
this.debounce = true;
this.getCartList();
},
methods: {
@ -91,6 +94,8 @@ export default {
},
//
settlementOrder() {
if(!this.debounce) return;
this.debounce = false;
if(!this.checkedGoods.length) return false;
//
let id = [], temp = '';
@ -108,6 +113,9 @@ export default {
this.$u.route({
url: '/pageC/cart/ConfirmOrder'
})
} else {
this.$u.toast(res.message);
this.debounce = true;
}
})
},

View File

@ -1,18 +1,78 @@
<template>
<view class="collection">
<view class="item-box" v-for="(item, index) in 5" :key="index">
<videoItem></videoItem>
<view class="item-box" v-for="(item, index) in articleList" :key="index">
<view class="video-item" v-if="item">
<image class="head" :src="item.article_pic" v-if="item.type == 1"></image>
<view class="header_fist" v-else>
<view class="backes"></view>
<image class="head" :src="item.article_pic" @click="toDetailsPage(item.article_id)"></image>
</view>
<view class="title">{{ item.article_title }}</view>
<view class="jianjie">{{ item.article_content }}</view>
<view class="user">
<view class="info">
<image :src="item.member_avatar"></image>
<text>{{ item.member_nickname }}</text>
</view>
<u-icon name="trash" color="#333" size="36" @click="delArticle(item.article_id)"></u-icon>
<!-- <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>
</template>
<script>
import videoItem from "@/components/index/video-item/index"
export default {
data() {
return {}
return {
show: -1,
articleList: [],
}
},
components: {
videoItem
onShow() {
this.articleCollectList();
},
//
onPullDownRefresh() {
this.articleCollectList();
},
methods: {
showAction(item) {
this.show = this.show > 0 ? -1 : item.article_id;
},
articleCollectList() {
this.$u.api.articleCollectList().then(res => {
uni.stopPullDownRefresh();
if(res.errCode == 0) {
this.articleList = res.data;
} else {
this.articleList = [];
}
})
},
delArticle(id) {
this.$u.api.articleCollect({ article_id: id }).then(res => {
if(res.errCode == 0) {
this.articleCollectList();
} else {
this.$u.toast(res.message);
}
})
},
toDetailsPage(id) {
uni.navigateTo({
url: '/pageB/photo/index?id=' + id
});
},
}
};
</script>
@ -26,6 +86,152 @@ export default {
&:not(:nth-child(2n)) {
margin-right: 20rpx;
}
.video-item{
height: 540rpx;
margin-top: 20rpx;
width: 335rpx;
box-shadow:0 3rpx 7rpx 0 rgba(153, 153, 153, 0.35);
padding-bottom: 20rpx;
border-radius: 20rpx;
overflow: hidden;
.head{
width: 100%;
height: 334rpx;
}
.title{
margin:0 auto;
margin-top: 20rpx;
font-size: 22rpx;
color: #333;
font-weight: 500;
line-height: 30rpx;
width: 300rpx;
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
}
.jianjie{
height: 60rpx;
margin:0 auto;
margin-top: 20rpx;
font-size: 22rpx;
color: #666;
line-height: 30rpx;
width: 300rpx;
margin-left: 18rpx;
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
}
.user{
display: flex;
justify-content: space-between;
align-items: center;
margin:0 auto;
margin-top: 20rpx;
width: 300rpx;
position: relative;
.info {
display: flex;
align-items: center;
>image{
width: 38rpx;
height: 38rpx;
border-radius: 50%;
}
>text{
font-size: 20rpx;
color:#333;
margin-left: 9rpx;
}
}
>image{
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;
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;
}
}
}
}
}
</style>

View File

@ -18,12 +18,16 @@ export default {
onLoad() {
this.getPolicyList();
},
onPullDownRefresh() {
this.getPolicyList();
},
methods: {
getPolicyList () {
this.$u.api.getUseHelpList({
page: this.page,
tid: 2 // 1:使 2:
}).then((res)=>{
uni.stopPullDownRefresh();
if (res.errCode == 0) {
this.policyList = res.data.helpList;
}

View File

@ -96,7 +96,7 @@ export default {
},
tabsChange(index) {
this.swiperCurrent = index;
this.toApplyPage(index);
// this.toApplyPage(index);
},
animationfinish(e) {
let current = e.detail.current;

View File

@ -706,6 +706,7 @@
{
"path": "mine/ImageTextCollection",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "图文收藏",
"app-plus": {
"titleSize": "36px",

View File

@ -158,10 +158,10 @@ export default {
methods: {
getUserInfo() {
this.$u.api.getMemberInfo().then(res => {
uni.stopPullDownRefresh();
if (res.errCode == 0) {
// this.userInfo = res.data.MemberArray;
this.$set(this, 'userInfo', res.data.MemberArray);
uni.stopPullDownRefresh();
}
})
},

View File

@ -66,6 +66,6 @@ const common = {
if(format) result = hours + format + minutes + format + seconds;
else result = hours + ':' + minutes + ':' + seconds;
return result;
}
},
}
export default common