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

This commit is contained in:
luyuan 2020-08-03 14:42:23 +08:00
commit b146783790
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
16 changed files with 439 additions and 128 deletions

View File

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

View File

@ -47,6 +47,9 @@ const store = new Vuex.Store({
uni.removeStorage({ uni.removeStorage({
key: "token" key: "token"
}) })
uni.removeStorage({
key: "user_info"
})
}, },
setOrderType(state, type) { setOrderType(state, type) {
state.orderType = type; state.orderType = type;

View File

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

View File

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

View File

@ -182,10 +182,7 @@
console.log(123) console.log(123)
me.loginIn(res.data.token); // me.loginIn(res.data.token); //
// //
uni.setStorageSync({ uni.setStorageSync('user_info',res.data);
key: 'user_info',
data: res.data
});
if (res.data.member.has_labels) { if (res.data.member.has_labels) {
uni.switchTab({ uni.switchTab({
@ -196,7 +193,6 @@
url: '/pageA/topick/topick' url: '/pageA/topick/topick'
}) })
} }
} }
// token // token

View File

@ -98,7 +98,7 @@ export default {
this.is_cart = newValue; this.is_cart = newValue;
}, },
comment(newValue,old) { comment(newValue,old) {
console.log(newValue,old); // console.log(newValue,old);
this.is_content = newValue; this.is_content = newValue;
}, },
deep: true deep: true

View File

@ -22,21 +22,41 @@
</view> </view>
</view> </view>
<!-- 用户操作 --> <!-- 用户操作 -->
<userinfo class="userinfo" :list="list" :cart="cart_type" :comment="is_comment" @openCart="openCart"></userinfo> <userinfo class="userinfo" :list="list" :cart="cart_type" :comment="is_comment" @openCart="openPopup"></userinfo>
<!-- 评论 --> <!-- 评论 -->
<u-popup v-model="is_comment" class="pl" mode="bottom" border-radius="10" height="700rpx"> <u-popup v-model="is_comment" class="pl" mode="bottom" border-radius="10" height="700rpx">
<view class="top"> <view class="top">
<text>评论</text> <text>评论</text>
<u-icon name="arrow-down" color="#333" size="28" @click="close"></u-icon> <u-icon name="arrow-down" color="#333" size="28" @click="is_comment=false"></u-icon>
</view> </view>
<scroll-view class="scroll-box" scroll-y="true" > <scroll-view class="scroll-box" scroll-y="true" >
<view></view> <block v-for="(item,index) in commentList" :key="index" v-if="commentList.length">
<view class="box">
<image :src="item.member_avatar" mode=""></image>
<view class="info">
<text>{{ item.member_nickname }}</text>
<text class="time">{{ item.create_time }}</text>
</view>
<text class="reply" @click="openKeyInput(item)">回复</text>
</view>
<view class="content">
{{ item.content }}
</view>
</block>
<view class="no-data" v-else>111</view>
</scroll-view> </scroll-view>
<view class="editing"> <view class="editing" @click="openKeyInput()">
<input type="text" value="" /> <input type="text" value="" :placeholder="edit_text" disabled="disabled" />
<text>发送</text> <text>发送</text>
</view> </view>
</u-popup> </u-popup>
<!-- 评论box -->
<u-popup v-model="is_edit" mode="bottom" border-radius="10" height="100rpx">
<view class="edit-box">
<input type="text" :placeholder="edit_text" :focus="is_focus" @focus="focus" v-model="send_value">
<text @click="sendComment">发送</text>
</view>
</u-popup>
<!-- 购物车 --> <!-- 购物车 -->
<u-popup v-if="cart_len > 1" class="cart" v-model="cart_type" mode="bottom" length="782" border-radius="20"> <u-popup v-if="cart_len > 1" class="cart" v-model="cart_type" mode="bottom" length="782" border-radius="20">
<view class="top"> <view class="top">
@ -95,6 +115,7 @@
.item{ .item{
display: flex; display: flex;
align-items: center; align-items: center;
width: 50%;
padding: 8rpx 16rpx; padding: 8rpx 16rpx;
font-size: 24rpx; font-size: 24rpx;
color: #fff; color: #fff;
@ -147,6 +168,7 @@
} }
.pl { .pl {
.top { .top {
z-index: 1000;
position: fixed; position: fixed;
top: 0; top: 0;
width: 100%; width: 100%;
@ -162,8 +184,45 @@
} }
} }
.scroll-box { .scroll-box {
margin: 88rpx 0 100rpx 0; z-index: 99;
margin: 88rpx 0 150rpx 0;
height: 100%; height: 100%;
.box {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx;
& > image {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
margin-right: 10rpx;
}
.info {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
height: 60rpx;
font-size: 26rpx;
color: #333;
.time {
font-size: 22rpx;
color: #999;
}
}
.reply {
font-size: 26rpx;
color: #333;
}
}
.content {
padding: 0 20rpx 10rpx 90rpx;
border-bottom: 1px solid #ececec;
}
}
.no-data {
margin-top: 100rpx;
} }
.editing { .editing {
position: fixed; position: fixed;
@ -172,18 +231,30 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
height: 90rpx; height: 88rpx;
padding: 0 30rpx; padding: 0 30rpx;
background-color: #ECECEC; border-top: 1px solid #ececec;
background-color: #fff;
& > input { & > input {
width: 80%; width: 80%;
height: 60rpx; height: 50rpx;
padding: 0 20rpx; padding: 0 20rpx;
border-radius: 30rpx; border-radius: 20rpx;
background-color: #fff; background-color: #fff;
} }
} }
} }
//
.edit-box {
display: flex;
align-items: center;
height: 90rpx;
& > input {
width: 80%;
padding: 4rpx 20rpx;
border-radius: 20rpx;
}
}
.cart { .cart {
.top{ .top{
z-index: 1000; z-index: 1000;
@ -293,15 +364,20 @@ export default {
return { return {
list:{}, list:{},
swiper_id: "", swiper_id: "",
cart_type: false, cart_type: false, //
is_comment: false, is_comment: false, //
is_focus: false, //
is_edit: false, //
send_value: "", //
cartList: [], cartList: [],
cart_len: 0, cart_len: 0,
edit_text: "有爱评论,说点好听的 ~",
commentList: [], //
} }
}, },
onLoad(o){ onLoad(option){
this.id = o.id; this.article_id = option.id;
this.articleInfo(this.id); this.articleInfo(this.article_id);
}, },
methods:{ methods:{
// //
@ -317,17 +393,47 @@ export default {
this.swiper_id = e.detail.current; // swiper id this.swiper_id = e.detail.current; // swiper id
}, },
// //
openCart(data) { openPopup(data) {
console.log(data);
this.cart_type = data.cart;
this.is_comment = data.comment;
},
hideCart(data) {
// console.log(data); // console.log(data);
this.cart_type = data.cart; this.cart_type = data.cart;
this.is_comment = data.comment;
if (this.is_comment) {
this.getComment(this.article_id,0);
}
}, },
close() { //
this.is_comment = false; getComment(id,page) {
this.$u.post("article/articleCommentList",{
article_id: id,
page: page,
}).then(res => {
console.log(res);
if (res.errCode == 0) {
this.commentList = res.data;
}
})
},
//
openKeyInput(data) {
console.log(data);
this.is_edit = true;
this.is_focus = true;
},
//
sendComment(data) {
this.$u.post("article/articleAddComment",{
article_id: this.article_id,
content: this.send_value,
pid: data.id,
reply_id: data.member_id,
}).then(res => {
console.log(res);
if (res.errCode == 0) {
this.is_edit = false;
} else {
this.$u.toast(res.message);
}
})
}, },
// //
viewImage(e) { viewImage(e) {
@ -351,6 +457,11 @@ export default {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
},
focus() {
setTimeout(function(){
uni.showSoftKeybord;
}, 200)
} }
}, },
} }

View File

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

View File

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

View File

@ -1,18 +1,78 @@
<template> <template>
<view class="collection"> <view class="collection">
<view class="item-box" v-for="(item, index) in 5" :key="index"> <view class="item-box" v-for="(item, index) in articleList" :key="index">
<videoItem></videoItem> <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>
</view> </view>
</template> </template>
<script> <script>
import videoItem from "@/components/index/video-item/index"
export default { export default {
data() { data() {
return {} return {
show: -1,
articleList: [],
}
},
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
});
}, },
components: {
videoItem
} }
}; };
</script> </script>
@ -26,6 +86,152 @@ export default {
&:not(:nth-child(2n)) { &:not(:nth-child(2n)) {
margin-right: 20rpx; 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> </style>

View File

@ -17,6 +17,9 @@ export default {
}, },
onLoad() { onLoad() {
this.getPolicyList(); this.getPolicyList();
},
onPullDownRefresh() {
this.getPolicyList();
}, },
methods: { methods: {
getPolicyList () { getPolicyList () {
@ -24,6 +27,7 @@ export default {
page: this.page, page: this.page,
tid: 2 // 1:使 2: tid: 2 // 1:使 2:
}).then((res)=>{ }).then((res)=>{
uni.stopPullDownRefresh();
if (res.errCode == 0) { if (res.errCode == 0) {
this.policyList = res.data.helpList; this.policyList = res.data.helpList;
} }

View File

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

View File

@ -109,16 +109,7 @@
"navigationBarTitleText": "商品详情", "navigationBarTitleText": "商品详情",
"app-plus":{ "app-plus":{
"titleNView":{ "titleNView":{
"backgroundColor":"#ffffff", "backgroundColor":"#ffffff"
"buttons": [
{
"type":"none",
"text":"\ue636",
"float":"right",
"fontSize":"18",
"fontSrc": "/static/fonts/cart.ttf"
}
]
} }
} }
} }
@ -140,16 +131,7 @@
"navigationBarTitleText": "商品评价", "navigationBarTitleText": "商品评价",
"app-plus":{ "app-plus":{
"titleNView":{ "titleNView":{
"backgroundColor":"#ffffff", "backgroundColor":"#ffffff"
"buttons": [
{
"type":"none",
"text":"\ue636",
"float":"right",
"fontSize":"18",
"fontSrc": "/static/fonts/cart.ttf"
}
]
} }
} }
} }
@ -214,8 +196,10 @@
"path": "photo/index", "path": "photo/index",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle": "custom" "navigationStyle": "custom",
"app-plus": {
"softinputMode": "adjustResize"
}
} }
} }
] ]
@ -253,7 +237,6 @@
{ {
"path": "cart/index", "path": "cart/index",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "购物车", "navigationBarTitleText": "购物车",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -621,7 +604,6 @@
{ {
"path": "tool/Manicure", "path": "tool/Manicure",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "美甲", "navigationBarTitleText": "美甲",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -658,19 +640,6 @@
} }
} }
}, },
{
"path": "tool/washComment",
"style": {
"navigationBarTitleText": "送洗评价",
"app-plus": {
"titleSize": "36px",
"titleNView": {
"titleColor": "#333333",
"backgroundColor": "#FFFFFF"
}
}
}
},
{ {
"path": "tool/WashOrder", "path": "tool/WashOrder",
"style": { "style": {
@ -700,6 +669,7 @@
{ {
"path": "mine/ImageTextCollection", "path": "mine/ImageTextCollection",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "图文收藏", "navigationBarTitleText": "图文收藏",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -863,7 +833,6 @@
{ {
"path": "order/Index", "path": "order/Index",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "我的订单", "navigationBarTitleText": "我的订单",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -877,7 +846,6 @@
{ {
"path": "order/Details", "path": "order/Details",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "订单详情", "navigationBarTitleText": "订单详情",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -937,7 +905,6 @@
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
@ -961,7 +928,6 @@
{ {
"path": "pages/mine/index", "path": "pages/mine/index",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "我的", "navigationBarTitleText": "我的",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",

View File

@ -2,7 +2,7 @@
<view> <view>
<view class="status_bar"></view> <view class="status_bar"></view>
<view class="index"> <view class="index">
<navigator url="/pageB/photo/index?id=28">qqq</navigator> <navigator url="/pageB/photo/index?id=28">bbb</navigator>
<view class="top"> <view class="top">
<view class="sosuo"></view> <view class="sosuo"></view>
<view class="tabs"> <view class="tabs">
@ -34,7 +34,6 @@
</view> </view>
</view> </view>
</view> </view>
</view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item> <swiper-item>
@ -43,13 +42,15 @@
<u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code" @click="clickSImage($event, 2)"></u-swiper> <u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code" @click="clickSImage($event, 2)"></u-swiper>
<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" :key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url"></zhiboItem> <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"></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" :key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url"></zhiboItem> <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"></zhiboItem>
</view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item> <swiper-item>
@ -293,20 +294,33 @@
clickFImage(index) { clickFImage(index) {
const item = this.indexImageSwiper[index]; const item = this.indexImageSwiper[index];
console.log(item); console.log(item);
this.activityLink({ type: item.url_type, id: item.info_id }); this.activityLink({
type: item.url_type,
id: item.info_id
});
}, },
clickSImage(index) { clickSImage(index) {
const item = this.zhiboImageSwiper[index]; const item = this.zhiboImageSwiper[index];
console.log(item); console.log(item);
this.activityLink({ type: item.url_type, id: item.info_id }); this.activityLink({
type: item.url_type,
id: item.info_id
});
}, },
activityLink({ type, id }) { activityLink({
type,
id
}) {
if (type == 0) return false; if (type == 0) return false;
// type 1 , 2 // type 1 , 2
const url = type == 1 ? 'pageB/sdetails/index' : 'pageC/merchant/index'; const url = type == 1 ? 'pageB/sdetails/index' : 'pageC/merchant/index';
let params = { id: id }; let params = {
id: id
};
// type: 1 // 1 2 3 4 // type: 1 // 1 2 3 4
if(type == 1) Object.assign(params, { type: 1 }); if (type == 1) Object.assign(params, {
type: 1
});
this.$u.route({ this.$u.route({
url: url, url: url,
params: params params: params

View File

@ -158,10 +158,10 @@ export default {
methods: { methods: {
getUserInfo() { getUserInfo() {
this.$u.api.getMemberInfo().then(res => { this.$u.api.getMemberInfo().then(res => {
uni.stopPullDownRefresh();
if (res.errCode == 0) { if (res.errCode == 0) {
// this.userInfo = res.data.MemberArray; // this.userInfo = res.data.MemberArray;
this.$set(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; if(format) result = hours + format + minutes + format + seconds;
else result = hours + ':' + minutes + ':' + seconds; else result = hours + ':' + minutes + ':' + seconds;
return result; return result;
} },
} }
export default common export default common