41 Commits

Author SHA1 Message Date
cmxdd
5e0162e3ea Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into cmx 2020-08-11 14:20:12 +08:00
gyh
20259ddf00 Merge pull request 'gdpaomg1' (#153) from gyh into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/153
2020-08-11 11:13:04 +08:00
Gdpao
703689d272 gdpaomg1 2020-08-11 11:12:32 +08:00
cmxdd
282502a8d6 优惠券弹窗不关闭 2020-08-11 10:45:10 +08:00
gyh
6c724d4f4c Merge pull request 'gdpaoup' (#152) from gyh into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/152
2020-08-11 10:36:48 +08:00
Gdpao
b3a7b2d032 Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into gyh 2020-08-11 10:36:18 +08:00
Gdpao
b34ac35821 gdpaoup 2020-08-11 10:35:01 +08:00
def8f0cf1b Merge pull request 'xbx' (#151) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/151
2020-08-11 10:26:19 +08:00
6984ea9374 消息 2020-08-11 10:25:41 +08:00
39b2749ac9 Merge pull request 'zhy' (#150) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/150
2020-08-11 10:23:43 +08:00
c01470b52d fixing bug 8.11 2020-08-11 10:23:04 +08:00
6e900dcd3b Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into zhy 2020-08-11 10:10:13 +08:00
7956517c4a solve bug 8.11 2020-08-11 10:06:51 +08:00
gyh
43e15cc4a7 Merge pull request 'gdpao' (#149) from gyh into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/149
2020-08-11 10:04:46 +08:00
Gdpao
e1c908152a gdpao 2020-08-11 10:04:25 +08:00
Gdpao
aad2bca5c6 gdpao 2020-08-11 10:00:06 +08:00
f79db4aa62 Merge pull request 'fixed bug 8.11' (#147) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/147
2020-08-11 09:46:49 +08:00
4739ef71a9 fixed bug 8.11 2020-08-11 09:46:05 +08:00
a22b3fba71 图片 2020-08-11 09:36:03 +08:00
gyh
003bc07c6b Merge pull request 'gdpao' (#146) from gyh into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/146
2020-08-10 19:19:54 +08:00
Gdpao
e6f73f01cd gdpao 2020-08-10 19:19:29 +08:00
gyh
52bce327cc Merge pull request 'gdpaoup' (#145) from gyh into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/145
2020-08-10 19:08:19 +08:00
Gdpao
74fcc50696 gdpaoup 2020-08-10 19:06:47 +08:00
33b0137c06 Merge pull request 'zhy' (#144) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/144
2020-08-10 17:47:31 +08:00
7c05459daf send wash 8.9 2020-08-10 17:46:57 +08:00
610d012e67 Merge pull request 'xbx' (#143) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/143
2020-08-10 17:39:14 +08:00
8c3121d5ed new member 8.9 2020-08-10 17:38:54 +08:00
8df5bc2701 状态 2020-08-10 17:30:41 +08:00
0c8e81f484 跳转提示 2020-08-10 17:03:15 +08:00
e3407b1046 关注跳转 2020-08-10 16:55:45 +08:00
55297a6587 消息 2020-08-10 10:41:13 +08:00
52508a1098 Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx 2020-08-10 08:53:11 +08:00
22a67d23c4 out 2020-08-10 08:52:33 +08:00
gyh
39466d3360 Merge pull request 'gdpao' (#142) from gyh into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/142
2020-08-09 19:11:25 +08:00
Gdpao
2e95172a75 upct 2020-08-09 19:11:12 +08:00
Gdpao
234f11eeef gdpao 2020-08-09 19:08:12 +08:00
8b6bf2da03 Merge pull request 'serach input 8.9' (#141) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/141
2020-08-09 19:07:20 +08:00
520fa5497c serach input 8.9 2020-08-09 19:06:54 +08:00
9a4e4f5efe Merge pull request 'bug 8.9' (#140) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/140
2020-08-09 18:40:07 +08:00
9b93b6a5a9 bug 8.9 2020-08-09 18:39:35 +08:00
199a1d3d96 Merge pull request '搜索完成' (#139) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/139
2020-08-09 18:37:02 +08:00
67 changed files with 1449 additions and 427 deletions

View File

@@ -43,6 +43,12 @@
.status_bar { .status_bar {
width: 100%; width: 100%;
height: var(--status-bar-height); height: var(--status-bar-height);
}
/* 自定义下拉 */
.load-size {
::v-deep.u-more-text {
font-size: 20rpx !important;
}
} }
/* #endif */ /* #endif */
</style> </style>

View File

@@ -339,7 +339,11 @@ export default {
page, page,
name_search: name_search name_search: name_search
}) })
} },
// 是否弹出新人优惠券
isNewmembervoucher() {
return vm.$u.post('Coupon/isNewmembervoucher')
},
} }
} }

View File

@@ -46,7 +46,7 @@ const install = (Vue, vm) => {
} else if(res.data.errCode == 401) { } else if(res.data.errCode == 401) {
// 假设201为token失效这里跳转登录 // 假设201为token失效这里跳转登录
// vm.$u.toast('您还没有登录哦,请先去登录!'); // vm.$u.toast('您还没有登录哦,请先去登录!');
if (res.data.action != "memberinfo") { if (res.data.data.action != "memberinfo") {
uni.showModal({ uni.showModal({
title: "温馨提示", title: "温馨提示",
content: "您还未登录,请立即登录", content: "您还未登录,请立即登录",

View File

@@ -174,7 +174,6 @@
.backes{ .backes{
position: absolute; position: absolute;
top: 0; top: 0;
background: rgba(0,0,0,0.6);
width: 100%; width: 100%;
height: 100%; height: 100%;
color: #fff; color: #fff;
@@ -233,6 +232,7 @@ export default {
} }
}) })
}, },
// 屏蔽
articleAddShield() { articleAddShield() {
this.$u.api.articleAddShield({ this.$u.api.articleAddShield({
article_id: this.item.article_id, article_id: this.item.article_id,
@@ -241,7 +241,7 @@ export default {
// console.log(res) // console.log(res)
if(res.errCode == 0) { if(res.errCode == 0) {
this.$u.toast(res.message); this.$u.toast(res.message);
this.$emit("getArticlelist"); this.$emit("updateList");
} }
}) })
}, },

View File

@@ -1,11 +1,11 @@
<template> <template>
<view class="notice"> <view class="notice">
<view v-for="(item,index) in notice" :key="index"> <view v-for="(item,index) in notice" :key="index" @click="gotoInfo(index)">
<view class="time_notice">{{ item.addtime }}</view> <view class="time_notice">{{ item.addtime }}</view>
<view class="notice_view"> <view class="notice_view">
<image :src="item.picture" mode="aspectFill" ></image> <image :src="item.picture" mode="aspectFill" ></image>
<view class="text_view u-line-2">{{ item.content }}</view> <view class="text_view u-line-2">{{ item.content }}</view>
<view class="notice_list" @click="gotoInfo(index)"> <view class="notice_list">
<text>查看详情</text> <text>查看详情</text>
<u-icon name="arrow-right" color="#666"></u-icon> <u-icon name="arrow-right" color="#666"></u-icon>
</view> </view>

View File

@@ -177,7 +177,7 @@
console.log('视频错误信息:',e); console.log('视频错误信息:',e);
}, },
timeupdate(e) { timeupdate(e) {
console.log(e); console.log(e);
}, },
getRandomColor: function() { getRandomColor: function() {
const rgb = [] const rgb = []
@@ -205,7 +205,7 @@
z-index: 1000; z-index: 1000;
position: absolute; position: absolute;
bottom: 100rpx; bottom: 100rpx;
right: 30%; right: 230rpx;
width: 300rpx; width: 300rpx;
height: 80rpx; height: 80rpx;
line-height: 80rpx; line-height: 80rpx;

View File

@@ -181,7 +181,6 @@
me.loginIn(res.data.token); //存储一个字符传值 me.loginIn(res.data.token); //存储一个字符传值
// 缓存用户的信息 // 缓存用户的信息
uni.setStorageSync('user_info',res.data); uni.setStorageSync('user_info',res.data);
if (res.data.member.has_labels) { if (res.data.member.has_labels) {
uni.switchTab({ uni.switchTab({
url: '/pages/index/index' url: '/pages/index/index'

View File

@@ -71,7 +71,7 @@
value: '', value: '',
login: '注册', login: '注册',
show: false, show: false,
is_check: null, is_check: true,
member_mobile: '', //手机号 member_mobile: '', //手机号
smslog_type : '1',//状态 smslog_type : '1',//状态
sms_code : '', //验证码 sms_code : '', //验证码
@@ -104,9 +104,10 @@
}, },
// 用户注册 // 用户注册
loginIns(){ loginIns(){
console.log(this.is_check);
let me = this; let me = this;
let type_phone = this.$u.test.mobile( this.member_mobile) let type_phone = this.$u.test.mobile(this.member_mobile)
if( this.member_mobile == ''){ if(this.member_mobile == ''){
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '手机号不能为空!', title: '手机号不能为空!',
}) })
@@ -118,13 +119,13 @@
}); });
return false; return false;
} }
if( this.sms_code == ''){ if(this.sms_code == ''){
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '验证码不能为空!', title: '验证码不能为空!',
}) })
return false; return false;
} }
if (this.is_check) { if (!this.is_check) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '请同意协议!', title: '请同意协议!',
}) })
@@ -151,16 +152,9 @@
// type: 'success', // type: 'success',
// url: '/pageA/topick/topick' // url: '/pageA/topick/topick'
// }) // })
} else if(res.errCode == 2){
this.$refs.uToast.show({
title: res.message,
type: 'primary',
url: '/pageA/login/login'
})
} else { } else {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.message, title: res.message,
type: 'primary'
}) })
} }
}) })
@@ -446,10 +440,6 @@
.pact { .pact {
position: relative; position: relative;
padding-left: 40rpx; padding-left: 40rpx;
overflow: hidden;
// overflow: hidden; //超出的文本隐藏
// text-overflow: ellipsis; //溢出用省略号显示
// white-space: nowrap; //溢出不换行
} }
.phones{ .phones{
margin-bottom: 90rpx!important; margin-bottom: 90rpx!important;

View File

@@ -1,22 +0,0 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

View File

@@ -1,162 +1,232 @@
<template> <template>
<view class="userinfo"> <view class="userinfo">
<view class="userhead"> <view class="userhead">
<image :src="item.member_avatar"></image> <image class="avatar" :src="item.member_avatar"></image>
<text class="follow" v-if="!is_follow" @click="following(item.member_id)">+</text> <text class="follow" @click="following(item.member_id)">{{ is_follow ? "" : "+" }}</text>
<u-icon v-else name="checkmark" color="#ffffff" :size="28" class="follow" @click="following(item.member_id)"></u-icon>
</view> </view>
<!-- 点赞 --> <!-- 点赞 -->
<view class="operat zan"> <view class="operat zan">
<u-icon name="thumb-up-fill" :color=" is_like ? '#FF7807' : '#ffffff' " :size="50" @click="likeType(item.article_id)"></u-icon> <image class="operat-img" :src=" is_like ? '../../static/image/userinfo/dianzan1.png' : '../../static/image/userinfo/dianzan.png' "
<text>{{item.like_num}}</text> mode="" @click="likeType(item.article_id)"></image>
<text class="operat-span">{{item.like_num}}</text>
</view> </view>
<!-- 收藏 --> <!-- 收藏 -->
<view class="operat shoucang"> <view class="operat shoucang">
<u-icon name="star-fill" :color=" is_collect ? '#FF7807' : '#ffffff' " :size="50" @click="collecting(item.article_id)"></u-icon> <image class="operat-img" :src=" is_collect ? '../../static/image/userinfo/shoucang1.png' : '../../static/image/userinfo/shoucang.png' "
<text>{{item.collect_num}}</text> mode="" @click="collecting(item.article_id)"></image>
<text class="operat-span">{{item.collect_num}}</text>
</view> </view>
<!-- 评论 --> <!-- 评论 -->
<view class="operat pinglun"> <view class="operat pinglun">
<u-icon name="more-circle-fill" :color=" is_content ? '#FF7807' : '#ffffff' " :size="50" @click="editing()"></u-icon> <image class="operat-img" :src=" is_content ? '../../static/image/userinfo/pinglun1.png' : '../../static/image/userinfo/pinglun.png' "
<text>{{ comment_num }}</text> mode="" @click="editing(item.article_id)"></image>
<text class="operat-span">{{ comment_num }}</text>
</view> </view>
<!-- 购物车 --> <!-- 购物车 -->
<view class="operat gouwu"> <view class="operat gouwu">
<u-icon name="shopping-cart-fill" :color=" is_cart ? '#FF7807' : '#ffffff' " :size="50" @click="carting()"></u-icon> <image class="operat-img" :src=" is_cart ? '../../static/image/userinfo/gouwuche1.png' : '../../static/image/userinfo/gouwuche.png' "
mode="" @click="carting()"></image>
</view> </view>
</view> </view>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.userinfo{ .userinfo {
width: 110rpx; width: 110rpx;
height: 570rpx; height: 570rpx;
display: flex; /* #ifndef APP-PLUS-NVUE */
flex-direction: column;
justify-content: space-between;
align-items: center;
.userhead{
position: relative;
display: flex; display: flex;
position: relative; /* #endif */
flex-direction: column;
justify-content: space-between;
align-items: center; align-items: center;
&>image{
width: 110rpx;
height: 110rpx;
border-radius: 50%;
border: 2rpx solid #fff;
}
.follow {
position: absolute;
top: 90rpx;
left: 35%;
width: 36rpx;
height: 36rpx;
text-align: center;
line-height: 36rpx;
font-size: 36rpx;
border-radius: 50%;
color: #fff;
background-color: #FF780F;
}
} }
.operat {
display: flex; .userhead {
align-items: center; position: relative;
flex-direction: column; /* #ifndef APP-PLUS-NVUE */
& > text { display: flex;
margin-top: 10rpx; /* #endif */
font-size: 28rpx; align-items: center;
color: #fff; padding-bottom: 20rpx;
} }
}
} .avatar {
width: 110rpx;
height: 110rpx;
border-radius: 50%;
/* #ifndef APP-PLUS-NVUE */
border: 2rpx solid #fff;
/* #endif */
}
.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;
}
.operat {
/* #ifndef APP-PLUS-NVUE */
display: flex;
/* #endif */
align-items: center;
flex-direction: column;
}
.operat-span {
margin-top: 10rpx;
font-size: 28rpx;
color: #fff;
}
.operat-img {
width: 50rpx;
height: 50rpx;
}
</style> </style>
<script> <script>
export default { export default {
name:'userinfo', name: 'userinfo',
props:['list','cart','comment','num'], props: ['list', 'cart', 'comment', 'num'],
data(){ data() {
return { return {
is_follow: this.list.is_attention || false, is_follow: this.list.is_attention || false,
is_like: this.list.is_like || false, is_like: this.list.is_like || false,
is_collect: this.list.is_collect || false, is_collect: this.list.is_collect || false,
is_content: false, is_content: false,
is_cart: false, is_cart: false,
comment_num: this.list.comment_num || 0, comment_num: this.list.comment_num || 0,
item: this.list || {} item: this.list || {}
} }
},
watch: {
list(newValue,old) {
// console.log(newValue,old);
this.item = newValue || {};
this.is_follow = this.list.is_attention || false;
this.is_like = this.list.is_like || false;
this.is_collect = this.list.is_collect || false;
this.comment_num = this.list.comment_num || 0;
},
cart(newValue,old) {
// console.log(newValue);
this.is_cart = newValue;
},
comment(newValue,old) {
// console.log(newValue,old);
this.is_content = newValue;
},
num(newVal,old) {
// console.log(newVal);
this.comment_num = newVal;
// this.item.comment_num = newVal;
}, },
deep: true watch: {
}, list(newValue, old) {
methods: { console.log(newValue);
// 关注 this.item = newValue || {};
following(id) { this.is_follow = this.list.is_attention || false;
this.$u.api.attentionMember({member_id: id}).then(res => { this.is_like = this.list.is_like || false;
if (res.errCode == 0) { this.is_collect = this.list.is_collect || false;
this.is_follow = !this.is_follow; this.comment_num = this.list.comment_num || 0;
this.$u.toast(res.message); },
} cart(newValue, old) {
}) // console.log(newValue);
}, this.is_cart = newValue;
// 点赞 },
likeType(id) { comment(newValue, old) {
// console.log(id); // console.log(newValue,old);
this.$u.post("article/articleLike",{article_id: id}).then(res => { this.is_content = newValue;
if (res.errCode == 0) { },
// console.log(res); num(newVal, old) {
this.is_like = !this.is_like; // console.log(newVal);
this.list.like_num = res.data.num; this.comment_num = newVal;
} else { // this.item.comment_num = newVal;
this.$u.toast(res.message); },
} deep: true
}) },
}, methods: {
// 收藏 // 关注
collecting(id) { following(id) {
this.$u.post("article/articleCollect",{article_id: id}).then(res => { uni.request({
if (res.errCode == 0) { url: "https://dmmall.sdbairui.com/api/member/attentionMember",
// console.log(res); method: "POST",
this.is_collect = !this.is_collect; data: {
this.list.collect_num = res.data.num; member_id: id
} else { },
this.$u.toast(res.message); header: {
} Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
}) },
}, success: (res) => {
// 评论 if (res.data.errCode == 0) {
editing() { this.is_follow = !this.is_follow;
this.is_content = !this.is_content; console.log(this.is_follow);
// console.log(this.is_content); uni.showToast({
this.$emit("openCart",{ comment: this.is_content, cart: this.is_cart}); title: res.data.message,
}, icon: "none"
// 购物车 })
carting() { }
this.is_cart = !this.is_cart; }
// console.log(this.is_cart); })
this.$emit("openCart",{ comment: this.is_content, cart: this.is_cart}); },
}, // 点赞
} likeType(id) {
} // console.log(id);
</script> uni.request({
url: "https://dmmall.sdbairui.com/api/article/articleLike",
method: "POST",
data: {
article_id: id
},
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
success: (res) => {
console.log(res);
if (res.data.errCode == 0) {
// console.log(res);
this.is_like = !this.is_like;
this.list.like_num = res.data.data.num;
} else {
uni.showToast({
title: res.data.message,
icon: "none"
})
}
}
})
},
// 收藏
collecting(id) {
uni.request({
url: "https://dmmall.sdbairui.com/api/article/articleCollect",
method: "POST",
data: {
article_id: id
},
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
success: (res) => {
console.log(res);
if (res.data.errCode == 0) {
console.log(res.data.num);
this.is_collect = !this.is_collect;
this.list.collect_num = res.data.data.num;
} else {
uni.showToast({
title: res.data.message,
icon: "none"
})
}
}
})
},
// 评论
editing() {
this.is_content = !this.is_content;
// console.log(this.is_content);
this.$emit("openCart", {
comment: this.is_content,
cart: this.is_cart
});
},
// 购物车
carting() {
this.is_cart = !this.is_cart;
// console.log(this.is_cart);
this.$emit("openCart", {
comment: this.is_content,
cart: this.is_cart
});
},
}
}
</script>

253
pageB/coupon/details.vue Normal file
View File

@@ -0,0 +1,253 @@
<template>
<view class="coupon-details">
<view class="coupon-container">
<view class="title">新人专享好礼</view>
<view class="coupon-main">
<image src="/static/image/common/29.png" class="bg"></image>
<view class="left">
<view class="price"><text class="sign"></text><text class="value">{{ price }}</text></view>
<view class="label">专属优惠券</view>
</view>
<view class="btn" @click="exchangeCoupon">立即领取</view>
</view>
<view class="tag">
<view>
<image src="/static/image/common/25.png"></image>
<text>全场包邮</text>
</view>
<view>
<image src="/static/image/common/26.png"></image>
<text>延误必赔</text>
</view>
<view>
<image src="/static/image/common/27.png"></image>
<text>免费上门取件</text>
</view>
<view>
<image src="/static/image/common/28.png"></image>
<text>退货免运费</text>
</view>
</view>
</view>
<view class="title-container">
<image src="/static/image/common/22.png" class="bg"></image>
<view class="title">首席搭配师</view>
</view>
<view class="content-container">
<image src="/static/image/common/23.png" class="people"></image>
<view class="tag">
<view class="">双十一成交破亿</view>
<view class="">单场千万级大咖</view>
<view class="">品牌特卖TOP1</view>
</view>
<view class="btn">
<view class="bg-view"></view>
<view>我们有万能穿搭公式</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
price: 0
}
},
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);
if(res.errCode == 0) {}
})
},
}
};
</script>
<style lang="scss" scoped>
.coupon-details {
min-height: calc(100vh - var(--window-top));
background-color: #FFDFAC;
padding-top: 30rpx;
.coupon-container {
width: 690rpx;
height: 368rpx;
background: linear-gradient(-87deg, rgba(247,162,30,1), rgba(255,120,15,1));
box-shadow: 0rpx 4rpx 2rpx 0rpx rgba(102,102,102,0.2);
border-radius: 20rpx;
margin: 0 auto 70rpx;
padding: 22rpx {
top: 40rpx
};
.title {
font-size: 48rpx;
font-weight: bold;
color: rgba(255,255,255,1);
line-height: 34rpx;
text-shadow: 0rpx 4rpx 2rpx rgba(102,102,102,0.2);
text-align: center;
}
.coupon-main {
margin: 26rpx auto 20rpx;
width: 665rpx;
height: 194rpx;
position: relative;
.bg {
position: absolute;
top: 0;
left: 0;
width: 665rpx;
height: 194rpx;
z-index: 1;
}
.left {
z-index: 2;
position: absolute;
top: 40rpx;
left: 122rpx;
.price {
margin-bottom: 16rpx;
display: flex;
align-items: flex-end;
line-height: 80rpx;
> text {
font-weight: bold;
color: rgba(255,120,15,1);
}
.sign {
font-size: 54rpx;
}
.value {
font-size: 102rpx;
}
}
.label {
font-size: 32rpx;
font-weight: 500;
color: rgba(255,120,15,1);
}
}
.btn {
z-index: 2;
position: absolute;
top: 62rpx;
right: 60rpx;
width: 192rpx;
height: 70rpx;
background: linear-gradient(-87deg, rgba(247,162,30,1), rgba(255,120,15,1));
border-radius: 20rpx;
line-height: 70rpx;
text-align: center;
font-size: 27rpx;
font-weight: bold;
color: rgba(255,255,255,1);
}
}
.tag {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 20rpx;
font-weight: 500;
color: rgba(255,255,255,1);
> view {
> image {
width: 20rpx;
height: 20rpx;
margin-right: 10rpx;
}
}
}
}
.title-container {
position: relative;
height: 124rpx;
.bg {
position: absolute;
width: 504rpx;
height: 124rpx;
z-index: 1;
top: 50%;
left: 50%;
transform: translate(-50%, -75%);
}
.title {
position: absolute;
z-index: 2;
width: 750rpx;
height: 59rpx;
background: rgba(255,255,255,0.27);
font-size: 60rpx;
font-weight: 800;
color: rgba(255,122,16,1);
text-align: center;
top: 0;
left: 0;
}
}
.content-container {
height: 684rpx;
position: relative;
.people {
width: 348rpx;
height: 684rpx;
position: absolute;
top: 0;
left: 50%;
transform: translate(-50%, 0%);
}
.tag {
> view {
position: absolute;
height: 48rpx;
background: rgba(229,0,79,0.36);
border-radius: 20rpx;
font-size: 24rpx;
font-weight: bold;
color: rgba(255,255,255,1);
line-height: 48rpx;
padding: 0 24rpx;
&:nth-child(1) {
top: 104rpx;
right: 71rpx;
}
&:nth-child(2) {
top: 271rpx;
left: 30rpx;
}
&:nth-child(3) {
top: 373rpx;
right: 33rpx;
}
}
}
.btn {
position: absolute;
top: 459rpx;
left: 50%;
transform: translate(-50%, 0%);
width: 581rpx;
height: 86rpx;
background: linear-gradient(-87deg,rgba(247,162,30,1),rgba(255,120,15,1));
border-radius: 20rpx;
font-size: 40rpx;
font-weight: bold;
color: rgba(255,255,255,1);
line-height: 86rpx;
text-align: center;
}
}
}
</style>

View File

@@ -4,8 +4,8 @@
<image src="/static/image/common/10.png"></image> <image src="/static/image/common/10.png"></image>
<text>输入达人名称</text> <text>输入达人名称</text>
</view> </view>
<view class="list"> <view class="list" style="margin-left:-20rpx">
<darenItem style="margin-top:20rpx;" v-for="item in recommendList" :key="item.id" :info="item" v-on:pChangeType="changeType"></darenItem> <darenItem style="margin-top:20rpx;margin-left:20rpx;" v-for="item in recommendList" :key="item.id" :info="item" v-on:pChangeType="changeType"></darenItem>
</view> </view>
</view> </view>
</template> </template>
@@ -76,7 +76,7 @@ export default {
}, },
searchValue() { searchValue() {
uni.navigateTo({ uni.navigateTo({
url: '/pageB/search/index?type=1' url: '/pageB/search/index?type=2'
}) })
}, },
}, },

View File

@@ -27,7 +27,7 @@
<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="is_comment=false"></u-icon> <u-icon name="close" color="#333" size="28" @click="is_comment=false"></u-icon>
</view> </view>
<scroll-view class="scroll-box" scroll-y="true" lower-threshold="50" @scrolltolower="scrollBottom"> <scroll-view class="scroll-box" scroll-y="true" lower-threshold="50" @scrolltolower="scrollBottom">
<block v-for="(item,index) in commentList" :key="index"> <block v-for="(item,index) in commentList" :key="index">
@@ -56,7 +56,7 @@
</view> </view>
</block> </block>
<view class="no-data" v-if="!commentList.length">还没有评论快来评论吧</view> <view class="no-data" v-if="!commentList.length">还没有评论快来评论吧</view>
<u-loadmore v-else :status="status" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" /> <u-loadmore v-else class="load-size" :status="status" size="20" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" />
</scroll-view> </scroll-view>
<view class="editing" @touchend.prevent="openKeyInput"> <view class="editing" @touchend.prevent="openKeyInput">
<input type="text" value="" :placeholder="edit_text" disabled="disabled" /> <input type="text" value="" :placeholder="edit_text" disabled="disabled" />
@@ -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="is_focus" :placeholder="edit_text_other" @focus="focus" v-model="send_value"> <input type="text" 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>
@@ -180,13 +180,15 @@
z-index: 1000; z-index: 1000;
position: fixed; position: fixed;
top: 0; top: 0;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%; width: 100%;
height: 88rpx; height: 88rpx;
padding: 0 20rpx; padding: 0 20rpx;
line-height: 88rpx; line-height: 88rpx;
background-color: #ECECEC; background-color: #ECECEC;
& > text { & > text {
margin-right: 280rpx;
color: #333; color: #333;
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 500;
@@ -392,7 +394,7 @@
</style> </style>
<script> <script>
import userinfo from "../components/userinfo/index" // 点赞组件 import userinfo from "../components/userinfo/index" // 点赞组件
import contentBox from "../components/shpoone/index" // 评论 // import contentBox from "../components/shpoone/index" // 评论
// import shoplist from "../components/shoplist/index" // 商品列表 // import shoplist from "../components/shoplist/index" // 商品列表
export default { export default {
@@ -514,6 +516,10 @@ export default {
}, },
// 发布评论 // 发布评论
sendComment() { sendComment() {
if (this.send_value.length == 0) {
this.$u.toast("内容不能为空!");
return;
}
this.$u.post("article/articleAddComment",{ this.$u.post("article/articleAddComment",{
article_id: this.article_id, article_id: this.article_id,
content: this.send_value, content: this.send_value,

View File

@@ -4,10 +4,10 @@
<view class="spike-view" v-if="type == 3"> <view class="spike-view" v-if="type == 3">
<view class="left"> <view class="left">
<view class="price"> <view class="price">
<view class="now-price">{{ groupbuyInfo.groupbuy_price }}</view> <view class="now-price">{{ groupbuyInfo.groupbuy_price || '0.00' }}</view>
<view class="origin-price">{{ groupbuyInfo.goods_price }}</view> <view class="origin-price">{{ groupbuyInfo.goods_price || '0.00' }}</view>
</view> </view>
<view class="num">剩余数量{{ groupbuyInfo.inventory - groupbuyInfo.groupbuy_buy_quantity }}</view> <view class="num">剩余数量{{ groupbuyInfo.inventory - groupbuyInfo.groupbuy_buy_quantity || '0' }}</view>
</view> </view>
<view class="right" v-if="!isSrartSpike || !isEndSpike"> <view class="right" v-if="!isSrartSpike || !isEndSpike">
<view class="title">{{ isSrartSpike ? '结束倒计时' : '秒杀倒计时' }}</view> <view class="title">{{ isSrartSpike ? '结束倒计时' : '秒杀倒计时' }}</view>
@@ -24,8 +24,8 @@
</view> </view>
<view class="price-collect"> <view class="price-collect">
<view class="pic" v-if="type != 3"> <view class="pic" v-if="type != 3">
<text>{{ goodsInfo.goods_price }}</text> <text>{{ goodsInfo.pintuan_price || '0.00' }}</text>
<s>{{ goodsInfo.goods_marketprice }}</s> <s>{{ goodsInfo.goods_price || '0.00' }}</s>
</view> </view>
<view class="collect" @click="switchCollect(goodsInfo.goods_collect)"> <view class="collect" @click="switchCollect(goodsInfo.goods_collect)">
<u-icon name="star" color="#474747" size="28" v-if="!goodsInfo.goods_collect"></u-icon> <u-icon name="star" color="#474747" size="28" v-if="!goodsInfo.goods_collect"></u-icon>
@@ -98,7 +98,7 @@
<image class="close" src="/static/image/common/17.png" @click="showGroupUser=false"></image> <image class="close" src="/static/image/common/17.png" @click="showGroupUser=false"></image>
</view> </view>
</u-popup> </u-popup>
<u-popup v-model="showInvolvementUser" mode="center"> <u-popup v-model="showInvolvementUser" mode="center" z-index="10078">
<view class="involvement-container" v-if="involvemenGroupInfo.length"> <view class="involvement-container" v-if="involvemenGroupInfo.length">
<view class="title u-line-1">参与{{ involvemenGroupInfo[0].member_nickname }}的拼团</view> <view class="title u-line-1">参与{{ involvemenGroupInfo[0].member_nickname }}的拼团</view>
<view class="involvement-view"> <view class="involvement-view">
@@ -127,13 +127,15 @@
<image class="image" :src="goodsInfo.goods_image"></image> <image class="image" :src="goodsInfo.goods_image"></image>
<view class="info"> <view class="info">
<text class="u-line-2">{{goodsInfo.goods_name}}</text> <text class="u-line-2">{{goodsInfo.goods_name}}</text>
<text>{{goodsInfo.goods_price}}</text> <text v-if="type == 1">{{ goodsInfo.goods_price }}</text>
<text v-else-if="type == 2">{{ goodsInfo.pintuan_price }}</text>
<text v-else-if="type == 3">{{ groupbuyInfo.groupbuy_price }}</text>
</view> </view>
</view> </view>
<guige @sel="self" ref="guige" v-for="(item,index) in goodsInfo.spec_value" :key="index" :title="goodsInfo.spec_name[index]" :item="item"></guige> <guige @sel="self" ref="guige" v-for="(item,index) in goodsInfo.spec_value" :key="index" :title="goodsInfo.spec_name[index]" :item="item"></guige>
<view class="num"> <view class="num">
<text>购买数量</text> <text>购买数量</text>
<u-number-box v-model="goodsNumber"></u-number-box> <u-number-box v-model="goodsNumber" :min="1"></u-number-box>
</view> </view>
<view style="height:100rpx"></view> <view style="height:100rpx"></view>
</view> </view>
@@ -213,7 +215,7 @@ export default {
sel: "", // 拼接的规格 sel: "", // 拼接的规格
quanxuan: false, // 规格是否选择 quanxuan: false, // 规格是否选择
debounce: true, // 防止多次提交订单 debounce: true, // 防止多次提交订单
storeid:0 //店铺id storeid:0 // 店铺id
} }
}, },
components: { components: {
@@ -256,32 +258,41 @@ export default {
}, },
methods: { methods: {
customers(){ customers(){
function Friend(uuid, name, avatar,time = "", text = "",date = "") { console.log(this.$store.state.hasLogin)
this.uuid = uuid; if(!this.$store.state.hasLogin){
this.name = name; this.$refs.uToast.show({
this.avatar = avatar; title: "请先登录",
this.online = false; type: 'warning'
this.unReadMessage = 0;
this.text = text;
this.time = time;
this.date = date
}
console.log(123)
this.$u.api.getAtwillUserInfo({
id:this.storeid
}).then((res)=>{
console.log(res)
let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar)
this.$u.route({
url:"/pageD/privateChat/privateChat",
params:{
id:JSON.stringify(user)
}
}) })
}).catch((err)=>{ }else{
console.log(err) function Friend(uuid, name, avatar,time = "", text = "",date = "") {
}) this.uuid = uuid;
this.name = name;
this.avatar = avatar;
this.online = false;
this.unReadMessage = 0;
this.text = text;
this.time = time;
this.date = date
}
// console.log(123)
this.$u.api.getAtwillUserInfo({
id:this.storeid
}).then((res)=>{
console.log(res)
let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar)
this.$u.route({
url:"/pageD/privateChat/privateChat",
params:{
id:JSON.stringify(user)
}
})
}).catch((err)=>{
console.log(err)
})
}
}, },
setSwiperList(list) { setSwiperList(list) {
let img = []; let img = [];
@@ -338,13 +349,28 @@ export default {
this.showSpec = true; this.showSpec = true;
return false; return false;
} }
// 如果没有规格设规格已全选
if(this.goodsInfo.spec_value == null) {
this.quanxuan = true;
}
if(!this.quanxuan) {
this.$refs.uToast.show({
title: '请选择规格'
})
return false;
}
this.$u.api.addCart({ this.$u.api.addCart({
goods_id: this.id, goods_id: this.id,
quantity: this.goodsNumber, quantity: this.goodsNumber,
}).then(res => { }).then(res => {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.message, title: res.message,
type: res.errCode == 0 ? 'success' : 'warning', duration: 1000,
callback: () => {
if(res.errCode == 0) {
this.showSpec = false;
}
}
}) })
}) })
}, },
@@ -369,7 +395,7 @@ export default {
// 普通商品详情 // 普通商品详情
ordinaryDetails(id) { ordinaryDetails(id) {
this.$u.api.getGoodsDetails({ id: id }).then((res)=>{ this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
console.log(res) // console.log(res)
if (res.errCode == 0) { if (res.errCode == 0) {
this.evaluate = res.data.goods_evaluate_info; this.evaluate = res.data.goods_evaluate_info;
this.goodsInfo = res.data.goods; this.goodsInfo = res.data.goods;
@@ -486,6 +512,7 @@ export default {
} }
this.$u.api.settlementOrder(params).then(res => { this.$u.api.settlementOrder(params).then(res => {
if(res.errCode == 0) { if(res.errCode == 0) {
// console.log('type' + this.type);
this.$store.commit('setOrderType', this.type); this.$store.commit('setOrderType', this.type);
this.$store.commit('updateOrderInfo', res.data) this.$store.commit('updateOrderInfo', res.data)
this.$u.route({ this.$u.route({
@@ -493,6 +520,7 @@ export default {
}) })
} else { } else {
this.debounce = true; this.debounce = true;
this.$u.toast(res.message);
} }
}) })
}, },
@@ -527,7 +555,7 @@ export default {
xuanze(id){ xuanze(id){
// console.log(id) // console.log(id)
// 选择完规格后设商品type = 1 // 选择完规格后设商品type = 1
this.type = 1; // this.type = 1;
this.getGoodsDetails(this.glist[id]) this.getGoodsDetails(this.glist[id])
this.id = this.glist[id]; this.id = this.glist[id];
}, },
@@ -609,7 +637,7 @@ export default {
background-color: #EEEBEE; background-color: #EEEBEE;
.spike-view { .spike-view {
position: absolute; position: absolute;
top: 396rpx; top: 400rpx;
left: 0; left: 0;
width: 100%; width: 100%;
height: 104rpx; height: 104rpx;
@@ -1027,13 +1055,13 @@ export default {
} }
} }
.spike-tool { .spike-tool {
z-index: 10076;
display: flex;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 98rpx; height: 100rpx;
display: flex;
z-index: 10076;
background-color: #FFFFFF; background-color: #FFFFFF;
.left { .left {
width: 190rpx; width: 190rpx;
@@ -1056,8 +1084,8 @@ export default {
} }
.btn { .btn {
flex: 1; flex: 1;
height: 98rpx; height: 104rpx;
line-height: 98rpx; line-height: 104rpx;
text-align: center; text-align: center;
font-size: 32rpx; font-size: 32rpx;
color: rgba(255,255,255,1); color: rgba(255,255,255,1);

View File

@@ -77,17 +77,37 @@ export default {
} }
}, },
onLoad(option) { onLoad(option) {
this.value = option.value this.value = option.value;
this.setViewHeight(); this.setViewHeight();
this.ShopSearch() this.ShopSearch()
this.setNavSearchInput(this.value);
}, },
onNavigationBarSearchInputConfirmed(value) { onNavigationBarSearchInputConfirmed(value) {
this.value = value.text this.value = value.text
console.log(this.value) // console.log(this.value)
this.ShopSearch() this.ShopSearch()
}, },
methods: { methods: {
// 动态设置导航栏搜索框内容
setNavSearchInput(keyword) {
// #ifdef APP-PLUS
let webView = this.$mp.page.$getAppWebview();
webView.setTitleNViewSearchInputText(keyword);
// #endif
// #ifdef H5
let inputSearch=document.querySelector('.uni-input-input[type=search]');
var evt = new InputEvent('input', {
inputType: 'insertText',
data: keyword,
dataTransfer: null,
isComposing: false
});
if(inputSearch){
inputSearch.value = keyword;
inputSearch.dispatchEvent(evt);
}
// #endif
},
changeType(member_id){ changeType(member_id){
console.log(member_id); console.log(member_id);
this.$emit("pChangeType") this.$emit("pChangeType")

View File

@@ -58,9 +58,28 @@ export default {
onNavigationBarSearchInputConfirmed(value) { onNavigationBarSearchInputConfirmed(value) {
this.value = value.text this.value = value.text
this.ShopSearch() this.ShopSearch()
}, },
methods: { methods: {
setNavSearchInput(keyword) {
console.log(keyword);
// #ifdef APP-PLUS
let webView = this.$mp.page.$getAppWebview();
webView.setTitleNViewSearchInputText(keyword);
// #endif
// #ifdef H5
let inputSearch=document.querySelector('.uni-input-input[type=search]');
const evt = new InputEvent('input', {
inputType: 'insertText',
data: keyword,
dataTransfer: null,
isComposing: false
});
if(inputSearch){
inputSearch.value = keyword;
inputSearch.dispatchEvent(evt);
}
// #endif
},
setOrderSort() { setOrderSort() {
let sort = ''; let sort = '';
if(this.current == 0) { if(this.current == 0) {
@@ -75,6 +94,8 @@ export default {
}, },
// 排序方式 goods_salenum销量 evaluation_count评价 goods_price_asc价格从低到高 goods_price_desc价格从高到低 // 排序方式 goods_salenum销量 evaluation_count评价 goods_price_asc价格从低到高 goods_price_desc价格从高到低
async ShopSearch({ load = 'reload' } = {}) { async ShopSearch({ load = 'reload' } = {}) {
console.log(this.value);
this.setNavSearchInput(this.value);
const sort = this.setOrderSort(); const sort = this.setOrderSort();
const res = await this.$u.api.ShopSearch({ const res = await this.$u.api.ShopSearch({
keyword: this.value, keyword: this.value,

View File

@@ -1,16 +1,18 @@
<template> <template>
<view> <view>
<video id="videoId" :style="videoSize" :src="src" autoplay="true" :loop="true" :show-fullscreen-btn="false" @play="playing" <video id="videoId" :style="videoSize" :src="src" autoplay="true" :show-fullscreen-btn="false" @play="playing"
:show-play-btn="false" controls="false" @click="stoping" :enable-progress-gesture="false"></video> @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 class="close" @click="goBack" src="../../static/close.png">
</cover-image> </cover-image>
<cover-view class="" src="../../static/videoPlay.png"> <cover-image class="pause" @click="stoping" src="../../static/videoPlay.png" v-if="!is_play">
</cover-view> </cover-image>
<cover-view class="info-box"> <!-- 用户操作 -->
<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">>
<view class="video-info-box"> <view class="video-info-box">
<image class="image-play" src="../../static/videoPlay.png" mode=""></image> <image class="image-play" src="../../static/videoIcon.png" mode=""></image>
<text class="video-slip">视频</text> <text class="video-slip">视频</text>
<text class="time">{{ time_count }}s</text> <text class="time">{{ time_count == 1 ? 0 : time_count }}s</text>
</view> </view>
<view> <view>
<text class="name">@{{ list.member_nickname }}</text> <text class="name">@{{ list.member_nickname }}</text>
@@ -23,30 +25,75 @@
</view> </view>
<view class="label-box"> <view class="label-box">
<block v-for="(item,index) in list.label" :key="index"> <block v-for="(item,index) in list.label" :key="index">
<text class="label" :style="{ width: item.name.length * 40 + 'rpx' }">{{ item.name }}</text> <text class="label" :style="{ width: labelLen[index] * 40 + 'rpx' }">{{ item.name }}</text>
</block> </block>
</view> </view>
</cover-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>
</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>
<list class="cart-box">
<cell></cell>
</list>
</view> </view>
</template> </template>
<script> <script>
import userinfo from "../components/userinfo/index" // 点赞组件
const temp_url = "https://dmmall.sdbairui.com/api/";
export default { export default {
components: {
userinfo
},
data() { data() {
return { return {
videoSize: {}, videoSize: {},
list: {}, list: {},
labelLen: [],
cart_type: false, // 显示购物车
is_comment: false, // 显示评论
comment_num: 0, // 评论数
page: 0,
commentList: [], // 评论列表
src: "", src: "",
is_play: true, is_play: true,
timer: null, time_count: 0,
alltime: 7, linear: null,
time_count: 7, loadinging: false,
}; };
}, },
onLoad(option) { onLoad(option) {
this.article_id = option.id;
this.getVideoInfo(option.id); this.getVideoInfo(option.id);
this.getInfo(); this.getInfo();
this.aaa();
}, },
onReady() { onReady() {
this.videoBox = uni.createVideoContext("videoId", this); this.videoBox = uni.createVideoContext("videoId", this);
@@ -55,17 +102,78 @@
// 获取信息 // 获取信息
getVideoInfo(article_id) { getVideoInfo(article_id) {
uni.request({ uni.request({
url: "https://dmmall.sdbairui.com/api/article/articleInfo", url: temp_url + "article/articleInfo",
method: "POST", method: "POST",
data: { data: {
article_id: article_id article_id: article_id
}, },
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
success: (res) => { success: (res) => {
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;
let item = res.data.data.info.label;
let arr = [];
item.forEach(data => {
let str = escape(data.name);
if (str.indexOf('%u')) {
// console.log(data.name);
arr.push(Math.floor(data.name.length / 2));
} else {
arr.push(data.name.length);
}
})
this.labelLen = arr;
} }
}) })
}, },
// 获取评论
getComment() {
uni.request({
url: temp_url + "article/articleCommentList",
method: "POST",
data: {
article_id: this.article_id,
page: this.page,
},
success: (res) => {
if (res.data.errCode == 0) {
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"
})
}
}
})
},
// 获取手机信息 // 获取手机信息
getInfo() { getInfo() {
uni.getSystemInfo({ uni.getSystemInfo({
@@ -79,36 +187,53 @@
}, },
// 播放 // 播放
playing(e) { playing(e) {
console.log(e); // console.log(e);
if (e.type == "play") { if (e.type == "play") {}
this.alltime = 7;
this.time_count = 7;
this.aaa();
}
}, },
// 暂停 // 暂停
stoping() { stoping() {
this.is_play = !this.is_play; this.is_play = !this.is_play;
if (this.is_play) { if (this.is_play) {
this.videoBox.play(); this.videoBox.play();
this.aaa();
} else { } else {
this.videoBox.pause(); this.videoBox.pause();
clearInterval(this.timer);
this.temp_time = this.time_count;
console.log(this.temp_time);
} }
}, },
// 倒计时 // 监听视频
aaa() { timeupdate(e) {
this.timer = setInterval(() => { this.time_count = parseInt(e.detail.duration) - parseInt(e.detail.currentTime);
if (this.time_count > 0 && this.time_count <= this.alltime) { if (e.detail.duration == e.detail.currentTime) {
this.time_count--; this.is_play = false;
} else { }
clearInterval(this.timer); // let num = parseInt((e.detail.currentTime/e.detail.duration)*100);
this.timer = null; // this.linear = num + "%";
} // console.log(this.time_count);
}, 1000); },
// 打开弹窗
openPopup(data) {
console.log(data);
this.cart_type = data.cart;
this.is_comment = data.comment;
if (this.is_comment) {
this.page = 0;
this.getComment();
}
},
// 关闭评论
closeComment() {
this.is_comment = false;
},
// 下拉加载
onloading(e) {
console.log(e);
this.loadinging = true;
setTimeout(() => {
this.loadinging = false;
}, 2000)
},
// stop
stopClick(event) {
event.stopPropagation();
}, },
goBack() { goBack() {
uni.navigateBack({ uni.navigateBack({
@@ -129,6 +254,22 @@
height: 30rpx; height: 30rpx;
} }
/* 暂停 */
.pause {
position: fixed;
top: 600rpx;
left: 330rpx;
width: 100rpx;
height: 100rpx;
}
/* 用户操作 */
.user-info {
position: fixed;
top: 360rpx;
right: 30rpx;
}
/* 底部信息 */ /* 底部信息 */
.info-box { .info-box {
position: fixed; position: fixed;
@@ -149,6 +290,109 @@
background-color: rgba(255, 255, 255, .6); background-color: rgba(255, 255, 255, .6);
} }
.content-box {
z-index: 99;
position: fixed;
bottom: 0;
left: 0;
width: 750rpx;
height: 700rpx;
margin-bottom: 88rpx;
background-color: #fff;
}
.content-title {
justify-content: space-between;
flex-direction: row;
align-items: center;
height: 88rpx;
padding: 0 20rpx;
background-color: #ECECEC;
}
.comment-list {
margin-bottom: 50rpx;
}
.comment-list-box {
padding: 30rpx;
flex-direction: row;
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;
}
.avatar {
width: 60rpx;
height: 60rpx;
margin-right: 20rpx;
border-radius: 50%;
}
.comment-title {
font-size: 26rpx;
color: #333;
}
.comment-time,
.reply {
font-size: 22rpx;
color: #999;
}
.tips {
font-size: 30rpx;
font-weight: 500;
color: #333;
}
.send-box {
z-index: 10000;
position: fixed;
bottom: 0;
left: 0;
flex-direction: row;
align-items: center;
justify-content: space-between;
width: 750rpx;
height: 88rpx;
padding: 10rpx 30rpx;
border-top-width: 1rpx;
border-color: #ececec;
background-color: #fff;
}
.send-val {
width: 600rpx;
height: 88rpx;
font-size: 36rpx;
}
.btn-send {
font-size: 30rpx;
color: #303133;
}
.close-down {
font-size: 50rpx;
text-align: center;
color: #333;
}
.image-play { .image-play {
width: 22rpx; width: 22rpx;
height: 20rpx; height: 20rpx;
@@ -204,4 +448,23 @@
border-radius: 10rpx; border-radius: 10rpx;
background-color: rgba(255, 255, 255, .6); background-color: rgba(255, 255, 255, .6);
} }
.loading {
width: 750rpx;
flex-direction: row;
align-items: center;
justify-content: center;
}
.indicator-text {
font-size: 20rpx;
text-align: center;
color: #999;
}
.indicator {
width: 30rpx;
height: 30rpx;
color: #999;
}
</style> </style>

View File

@@ -26,7 +26,7 @@
<view class="info"> <view class="info">
<view class="name u-line-2">{{ goods.goods_name }}</view> <view class="name u-line-2">{{ goods.goods_name }}</view>
<view class="cart-info"> <view class="cart-info">
<view class="price">{{ goods.goods_price }}</view> <view class="price">{{ goods.goods_total }}</view>
<view>×{{ goods.goods_num }}</view> <view>×{{ goods.goods_num }}</view>
</view> </view>
</view> </view>
@@ -148,7 +148,7 @@ export default {
onLoad(option) { onLoad(option) {
this.orderType = this.$store.state.orderType; this.orderType = this.$store.state.orderType;
this.orderInfo = this.$store.state.orderInfo; this.orderInfo = this.$store.state.orderInfo;
// console.log(this.orderType); console.log('orderType' + this.orderType);
// console.log(this.orderInfo); // console.log(this.orderInfo);
this.getGoodsClass(); this.getGoodsClass();
this.setTotalPrice(); this.setTotalPrice();
@@ -204,6 +204,8 @@ export default {
this.withImmediate(); this.withImmediate();
} else if(this.orderType == 1) { } else if(this.orderType == 1) {
this.sendOrder(0); this.sendOrder(0);
} else if(this.orderType == 3) {
this.sendOrder(0);
} else { } else {
this.sendOrder(1); this.sendOrder(1);
} }

View File

@@ -106,7 +106,7 @@ export default {
}, },
setViewHeight() { setViewHeight() {
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
this.scrollHeight = res.windowHeight - (90 / 2) + 'px'; this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * 90 + 'px';
}, },
setTitle(title) { setTitle(title) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({

View File

@@ -1,16 +1,17 @@
<template> <template>
<view class="imageTop"> <view class="imageTop">
<image :src="url" mode="aspectFit"></image> <image :src="url" mode="widthFix"></image>
</view> </view>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.imageTop{ .imageTop{
width: 100%; width: 100%;
height: 500rpx; height: 500rpx;
margin-bottom: 20rpx; overflow: hidden;
>image{ >image{
width: 100%; width: 100%;
height: 100%; height: 100%;
margin-bottom: 20rpx;
} }
} }
</style> </style>
@@ -21,6 +22,6 @@ export default {
return { return {
} }
}, },
props:['url'] props:['url'],
} }
</script> </script>

View File

@@ -1,17 +1,18 @@
<template> <template>
<view class="listItem"> <view class="listItem">
<video v-if="type == '2'" :src="url" :show-fullscreen-btn="true"></video> <video v-if="type == '2'" :src="url" :show-fullscreen-btn="true"></video>
<image v-else :src="url" mode="aspectFit"></image> <image v-else :src="url" mode="aspectFill"></image>
</view> </view>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.listItem{ .listItem{
width: 365rpx; width: 365rpx;
height: 500rpx; height: 500rpx;
margin-bottom: 20rpx; overflow: hidden;
>image,video{ >image,video{
width: 100%; width: 100%;
height: 100%; height: 100%;
margin-bottom: 20rpx;
} }
} }
</style> </style>

View File

@@ -104,7 +104,7 @@ export default {
}, },
setViewHeight() { setViewHeight() {
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
this.swiperHeight = res.windowHeight - (88 / 2) + 'px'; this.swiperHeight = res.windowHeight - (res.windowWidth / 750) * 88 + 'px';
}, },
} }
}; };

View File

@@ -125,7 +125,7 @@ export default {
}, },
setViewHeight() { setViewHeight() {
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
this.scrollHeight = res.windowHeight - 90 / 2 + 'px'; this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * 90 + 'px';
// console.log(this.scrollHeight); // console.log(this.scrollHeight);
}, },
toDetailsPage(id) { toDetailsPage(id) {

View File

@@ -109,13 +109,13 @@ export default {
}) })
}, },
switchCurrent(current) { switchCurrent(current) {
if(current == 1 && this.current == 1) this.priceOrderAsc = !this.priceOrderAsc; if(current == 3 && this.current == 3) this.priceOrderAsc = !this.priceOrderAsc;
this.current = current; this.current = current;
}, },
setViewHeight() { setViewHeight() {
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
const otherHeight = 347 + 140 + 20 + 98; const otherHeight = 347 + 140 + 20 + 98;
this.scrollHeight = res.windowHeight - otherHeight / 2 + 'px'; this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * otherHeight + 'px';
// console.log(this.scrollHeight); // console.log(this.scrollHeight);
}, },
toDetailsPage(id) { toDetailsPage(id) {

View File

@@ -38,12 +38,12 @@
</view> </view>
<view class="main"> <view class="main">
<scroll-view class="video-image" scroll-y v-if="cur==0 && indextop.length" :style="{ height: scrollHeiht }"> <scroll-view class="video-image" scroll-y v-if="cur==0 && indextop.length" :style="{ height: scrollHeiht }">
<view v-for="item in indextop" :key="item.id"> <view v-for="item in indextop" :key="item.id" class="container-top">
<videoTop :url="item.article_pic" v-if="item.type == 2"></videoTop> <videoTop :url="item.article_pic" v-if="item.type == 2" @click.native="toDetailsPage(item.article_id)"></videoTop>
<imageTop v-else :url="item.article_pic"></imageTop> <imageTop v-else :url="item.article_pic" @click.native="toDetailsPage(item.article_id)"></imageTop>
</view> </view>
<view style="display: flex;flex-wrap: wrap;" v-if="indexlist.length"> <view v-if="indexlist.length" class="container-bottom">
<listitem :style="{'margin-left': index%2 == 1 ? '20rpx':'0'}" v-for="(item,index) in indexlist" :key="item.id" :type="item.type" :url="item.article_pic"></listitem> <listitem v-for="item in indexlist" :key="item.id" :type="item.type" :url="item.article_pic" class="bottom-item" @click.native="toDetailsPage(item.article_id)"></listitem>
</view> </view>
</scroll-view> </scroll-view>
<view class="item" v-if="cur==1"> <view class="item" v-if="cur==1">
@@ -64,7 +64,7 @@
<image src="/static/image/shop/11.png"></image> <image src="/static/image/shop/11.png"></image>
<view>店铺信息</view> <view>店铺信息</view>
</view> </view>
<view @click="switchCurrent(3)"> <view @click="customers()">
<image src="/static/image/shop/12.png"></image> <image src="/static/image/shop/12.png"></image>
<view>联系客服</view> <view>联系客服</view>
</view> </view>
@@ -109,6 +109,49 @@ export default {
// if(e.index == 0) this.show = true; // if(e.index == 0) this.show = true;
}, },
methods: { methods: {
customers(){
console.log(this.$store.state.hasLogin)
if(!this.$store.state.hasLogin){
this.$refs.uToast.show({
title: "请先登录",
type: 'warning'
})
}else{
function Friend(uuid, name, avatar,time = "", text = "",date = "") {
this.uuid = uuid;
this.name = name;
this.avatar = avatar;
this.online = false;
this.unReadMessage = 0;
this.text = text;
this.time = time;
this.date = date
}
console.log(123)
this.$u.api.getAtwillUserInfo({
id:this.sid
}).then((res)=>{
console.log(res)
let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar)
this.$u.route({
url:"/pageD/privateChat/privateChat",
params:{
id:JSON.stringify(user)
}
})
}).catch((err)=>{
console.log(err)
})
}
},
toDetailsPage(id) {
// console.log(11);
this.$u.route('pageB/photo/index', {
id: id
});
},
switchCurrent(current) { switchCurrent(current) {
this.cur = current; this.cur = current;
if(current == 0) { if(current == 0) {
@@ -123,15 +166,15 @@ export default {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}) })
}, },
getStoreImgVideoList() { // getStoreImgVideoList() {
this.$u.api.getStoreImgVideoList({ id: this.sid }).then((res)=>{ // this.$u.api.getStoreImgVideoList({ id: this.sid }).then((res)=>{
if(res.data.length) { // if(res.data.length) {
this.indextop = [res.data[0], res.data[1]]; // this.indextop = [res.data[0], res.data[1]];
this.indexlist = res.data.slice(2,); // this.indexlist = res.data.slice(2,);
} // }
uni.stopPullDownRefresh(); // uni.stopPullDownRefresh();
}) // })
}, // },
attentionMember() { attentionMember() {
this.$u.api.attentionMember({ member_id: this.info.member_id }).then(res => { this.$u.api.attentionMember({ member_id: this.info.member_id }).then(res => {
if(res.errCode == 0) { if(res.errCode == 0) {
@@ -149,13 +192,15 @@ export default {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
if (res.errCode == 0) { if (res.errCode == 0) {
// this.articleList = res.data.list; // this.articleList = res.data.list;
if(res.data.list.length > 0) { if(JSON.stringify(res.data) != '[]') {
this.indextop = [res.data.list[0]] if(res.data.list.length > 0) {
this.indextop = [res.data.list[0], res.data.list[1]]; this.indextop = [res.data.list[0]]
} // this.indextop = [res.data.list[0], res.data.list[1]];
if(res.data.list.length > 1) { }
this.indextop.push(res.data.list[1]); if(res.data.list.length > 1) {
this.indexlist.push(...res.data.list.slice(2,)); this.indextop.push(res.data.list[1]);
this.indexlist.push(...res.data.list.slice(2,));
}
} }
} }
}) })
@@ -288,9 +333,23 @@ export default {
.video-image { .video-image {
padding-bottom: 98rpx; padding-bottom: 98rpx;
} }
> view { .container-top {
margin-top: 20rpx; > view {
margin-bottom: 10rpx;
}
} }
.container-bottom {
margin-top: 20rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.bottom-item {
margin-bottom: 10rpx;
}
}
// > view {
// margin-top: 20rpx;
// }
} }
.tabbar { .tabbar {
border-top: 1rpx #DBDADA solid; border-top: 1rpx #DBDADA solid;

View File

@@ -1,6 +1,6 @@
<template> <template>
<view class="attention"> <view class="attention">
<view class="attention_box" v-for="(item,index) in attention" :key="index"> <view class="attention_box" v-for="(item,index) in attention" :key="index" @click="navto(item.friend_tomid)">
<view> <view>
<image :src="item.friend_tomavatar" mode="aspectFill"></image> <image :src="item.friend_tomavatar" mode="aspectFill"></image>
</view> </view>
@@ -40,6 +40,15 @@
this.$u.api.snsfriendList({}).then((res)=>{ this.$u.api.snsfriendList({}).then((res)=>{
this.attention = res.data; this.attention = res.data;
}) })
},
navto(id){
// /pageB/details/index
this.$u.route({
url:"/pageB/details/index",
params:{
id
}
})
} }
}, },
components: { components: {

View File

@@ -98,8 +98,37 @@ export default {
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
if( e.index == 0 ) uni.navigateBack(); if( e.index == 0 ) uni.navigateBack();
// if( e.index == 1 ) this.customers();
}, },
methods: { methods: {
customers(){
function Friend(uuid, name, avatar,time = "", text = "",date = "") {
this.uuid = uuid;
this.name = name;
this.avatar = avatar;
this.online = false;
this.unReadMessage = 0;
this.text = text;
this.time = time;
this.date = date
}
// console.log(123)
this.$u.api.getAtwillUserInfo({
id: 1 // 平台店铺 id
}).then((res)=>{
// console.log(res)
let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar)
this.$u.route({
url:"/pageD/privateChat/privateChat",
params:{
id:JSON.stringify(user)
}
})
}).catch((err)=>{
console.log(err)
})
},
changeAvatar() { changeAvatar() {
const url = this.$u.http.config.baseUrl + '/Upload/uploadfile'; const url = this.$u.http.config.baseUrl + '/Upload/uploadfile';
uni.chooseImage({ uni.chooseImage({

View File

@@ -40,13 +40,13 @@ export default {
setIntegralHeight() { setIntegralHeight() {
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
// console.log(res.windowHeight); // console.log(res.windowHeight);
this.integralHeight = res.windowHeight - 251 / 2 + 'px'; this.integralHeight = res.windowHeight - (res.windowWidth / 750) * 251 + 'px';
}, },
getMemberPointsStat() { getMemberPointsStat() {
this.$u.api.getMemberPointsStat().then((res)=>{ this.$u.api.getMemberPointsStat().then((res)=>{
if (res.errCode == 0) { if (res.errCode == 0) {
this.memberInfo = res.data; this.memberInfo = res.data;
this.nodes = common.unescapeHTML(this.memberInfo.points_rule); this.nodes = common.unescapeHTML(this.memberInfo.points_rule.document_content);
} }
}) })
}, },

View File

@@ -3,7 +3,7 @@
<scroll-view scroll-y class="medal-article"> <scroll-view scroll-y class="medal-article">
<view class="medal-title"> <view class="medal-title">
<image src="../static/mine/29.png"></image> <image src="../static/mine/29.png"></image>
<view>了解勋章</view> <view>{{ title }}</view>
<image src="../static/mine/30.png"></image> <image src="../static/mine/30.png"></image>
</view> </view>
<view class="medal-content"> <view class="medal-content">
@@ -18,6 +18,7 @@ export default {
data() { data() {
return { return {
nodes: '', nodes: '',
title: '',
} }
}, },
created() { created() {
@@ -27,7 +28,8 @@ export default {
getMemberPointsStat() { getMemberPointsStat() {
this.$u.api.getMemberPointsStat().then((res)=>{ this.$u.api.getMemberPointsStat().then((res)=>{
if (res.errCode == 0) { if (res.errCode == 0) {
const nodes = res.data.grade_rule; this.title = res.data.grade_rule.document_title;
const nodes = res.data.grade_rule.document_content;
this.nodes = common.unescapeHTML(nodes); this.nodes = common.unescapeHTML(nodes);
} }
}) })

View File

@@ -117,9 +117,9 @@ export default {
setViewHeight() { setViewHeight() {
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
// console.log(res.windowHeight); // console.log(res.windowHeight);
this.richHeight = res.windowHeight - (88 + 250) / 2 + 'px'; this.richHeight = res.windowHeight - (88 + 250) * (res.windowWidth / 750) + 'px';
// console.log(this.richHeight); // console.log(this.richHeight);
this.swiperHeight = res.windowHeight - 88 / 2 + 'px'; this.swiperHeight = res.windowHeight - (res.windowWidth / 750) * 88 + 'px';
}, },
viewProgress() { viewProgress() {
this.$u.route({ this.$u.route({

View File

@@ -7,11 +7,11 @@
<swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{ height: swiperHeight }"> <swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{ height: swiperHeight }">
<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i"> <swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
<scroll-view scroll-y style="height: 100%;" @scrolltolower="onreachBottom" class="coupon-scroll"> <scroll-view scroll-y style="height: 100%;" @scrolltolower="onreachBottom" class="coupon-scroll">
<view v-for="(coupon, index) in couponList" :key="index" class="coupon-item"> <view v-for="(coupon, index) in couponList[i]" :key="index" class="coupon-item">
<Coupon :couponInfo="coupon" :status='0' :type="0" @exchange="exchangeCoupon($event)"></Coupon> <Coupon :couponInfo="coupon" :status='0' :type="0" @exchange="exchangeCoupon($event)"></Coupon>
</view> </view>
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" v-if="couponList.length>=pageSize" @loadmore="onreachBottom"></u-loadmore> <u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList[i] || !couponList[i].length"></u-empty>
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList.length"></u-empty> <u-loadmore :status="loadStatus" bgColor="#FFF" margin-bottom="60" v-if="!couponList[i] || couponList[i].length>=pageSize" @loadmore="onreachBottom"></u-loadmore>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
</swiper> </swiper>
@@ -49,7 +49,7 @@ export default {
}, },
watch: { watch: {
couponCurrent(index) { couponCurrent(index) {
this.couponList = []; // this.couponList = [];
const id = this.couponGroupList[index].gc_id; const id = this.couponGroupList[index].gc_id;
this.getCouponList({ gc_id: id, load: 'reload' }); this.getCouponList({ gc_id: id, load: 'reload' });
}, },
@@ -89,9 +89,10 @@ export default {
}) })
this.timer = true; this.timer = true;
if(res.errCode == 0) { if(res.errCode == 0) {
if(load == 'reload') this.couponList = res.data; if(load == 'reload') this.couponList[this.couponCurrent] = res.data;
else if(load == 'loadmore') this.couponList.push(...res.data); else if(load == 'loadmore') this.couponList[this.couponCurrent].push(...res.data);
} }
this.$forceUpdate();
return res.data.length; return res.data.length;
}, },
exchangeCoupon(id) { exchangeCoupon(id) {
@@ -109,7 +110,7 @@ export default {
}, },
setViewHeight() { setViewHeight() {
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
this.swiperHeight = res.windowHeight - ((88 + 10 + 88) / 2) + 'px'; this.swiperHeight = res.windowHeight - ((88 + 10 + 88) * (res.windowWidth / 750)) + 'px';
}, },
}, },
}; };

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"></image> <image class="head" :src="info.friend_tomavatar" @click="viewDetails(info.friend_tomid)"></image>
<text class="name">{{ info.friend_tomname || '' }}</text> <text class="name" @click="viewDetails(info.friend_tomid)">{{ 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>
@@ -37,6 +37,11 @@ export default {
} }
}) })
}, },
viewDetails(id) {
this.$u.route('pageB/details/index', {
id: id
});
},
changeType(id) { changeType(id) {
console.log(id); console.log(id);
this.$u.api.attentionMember({ this.$u.api.attentionMember({

View File

@@ -13,7 +13,7 @@
<view class="distance">距离下一级还需要 {{ memberInfo.next_member_level_exppoints_diff }} 经验值</view> <view class="distance">距离下一级还需要 {{ memberInfo.next_member_level_exppoints_diff }} 经验值</view>
</view> </view>
<view class="body"> <view class="body">
<view class="title"> <view class="title" v-if="memberInfo.level_rule">
<image src="/static/image/mine/34.png"></image> <image src="/static/image/mine/34.png"></image>
<text>{{ memberInfo.level_rule.document_title }}</text> <text>{{ memberInfo.level_rule.document_title }}</text>
</view> </view>
@@ -121,7 +121,7 @@ export default {
} }
} }
.body { .body {
margin-top: 60rpx; margin-top: 20rpx;
.title { .title {
height: 88rpx; height: 88rpx;
display: flex; display: flex;
@@ -131,7 +131,7 @@ export default {
font-weight: 500; font-weight: 500;
color: rgba(51,51,51,1); color: rgba(51,51,51,1);
// border-bottom: #ECECEC 1rpx solid; // border-bottom: #ECECEC 1rpx solid;
margin-bottom: 30rpx; margin-bottom: 20rpx;
> image { > image {
width: 29rpx; width: 29rpx;
height: 36rpx; height: 36rpx;

View File

@@ -154,6 +154,9 @@ export default {
case 4: case 4:
state = '2'; state = '2';
break; break;
case 5:
state = '3';
break;
case 6: case 6:
state = '7'; state = '7';
break; break;

View File

@@ -33,11 +33,12 @@
fontSize: 24 fontSize: 24
}, },
sheetStatus: false, sheetStatus: false,
list: [{ list: [
text: '换个账号登录', // {
color: '#FF780F', // text: '换个账号登录',
fontSize: 28 // color: '#FF780F',
}, // fontSize: 28
// },
{ {
text: '退出登录', text: '退出登录',
color: '#FF780F', color: '#FF780F',
@@ -78,7 +79,7 @@
// 退出登录选择 0切换账号 | 1退出登录 // 退出登录选择 0切换账号 | 1退出登录
choiceOption(index) { choiceOption(index) {
console.log(index); console.log(index);
if (index == 1) { if (index == 0) {
this.show = true; this.show = true;
} }
}, },

View File

@@ -90,7 +90,7 @@ export default {
}, },
setViewHeight() { setViewHeight() {
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
this.swiperHeight = res.windowHeight - (88 / 2) + 'px'; this.swiperHeight = res.windowHeight - (88 * (res.windowWidth / 750)) + 'px';
}, },
tabsChange(index) { tabsChange(index) {
this.swiperCurrent = index; this.swiperCurrent = index;

View File

@@ -6,7 +6,7 @@
<scroll-view scroll-y class="scroll-coupon"> <scroll-view scroll-y class="scroll-coupon">
<view v-if="couponList[index]"> <view v-if="couponList[index]">
<view class="coupon-item" v-for="(coupon, c_index) in couponList[index]" :key="c_index"> <view class="coupon-item" v-for="(coupon, c_index) in couponList[index]" :key="c_index">
<Coupon :couponInfo="coupon" :status='index' :type="1" @use="useCoupon($event)" :goodsClass="goodsClass"></Coupon> <Coupon :couponInfo="coupon" :status='index' @use="useCoupon($event)" :goodsClass="goodsClass"></Coupon>
</view> </view>
</view> </view>
<u-empty text="暂无优惠券" mode="coupon" v-if="!couponList[index] || !couponList[index].length"></u-empty> <u-empty text="暂无优惠券" mode="coupon" v-if="!couponList[index] || !couponList[index].length"></u-empty>
@@ -68,12 +68,22 @@ export default {
this.$forceUpdate(); this.$forceUpdate();
}) })
}, },
useCoupon(id) { useCoupon(coupon) {
console.log(id); // console.log(coupon);
if(coupon.type == 1) {
this.$u.route({
type: 'switchTab',
url: 'pages/shop/index',
})
} else if(coupon.type == 2) {
this.$u.route('pageC/merchant/index', {
id: coupon.voucher_store_id,
});
}
}, },
setViewHeight() { setViewHeight() {
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
this.swiperHeight = res.windowHeight - (88 / 2 + 11 / 2) + 'px'; this.swiperHeight = res.windowHeight - (100 * (res.windowWidth / 750)) + 'px';
}, },
tabsChange(index) { tabsChange(index) {
this.swiperCurrent = index; this.swiperCurrent = index;

View File

@@ -4,12 +4,12 @@
<view class="item-box"> <view class="item-box">
<!-- 需求只显示最近五十条数据 后台未作限制 --> <!-- 需求只显示最近五十条数据 后台未作限制 -->
<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"> <view class="item-title" @click="viewStoreDetails(item.store_id)">
<image :src="item.store_avatar"></image> <image :src="item.store_avatar"></image>
<view>{{ item.store_name }}</view> <view class="u-line-2">{{ item.store_name }}</view>
</view> </view>
<image :src="item.goods_image" class="item-image"></image> <image :src="item.goods_image" class="item-image" @click="viewGoodsDetails(item.goods_id)"></image>
<view class="item-info"> <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>
</view> </view>
</view> </view>
@@ -34,6 +34,22 @@ export default {
this.getBrowseList(); this.getBrowseList();
}, },
methods: { methods: {
viewStoreDetails(sid) {
this.$u.route({
url: 'pageC/merchant/index',
params: {
id: sid,
}
})
},
viewGoodsDetails(id) {
this.$u.route({
url: 'pageB/sdetails/index',
params: {
id: id,
}
})
},
async getBrowseList () { async getBrowseList () {
const res = await this.$u.api.getBrowseList({ page: this.page }); const res = await this.$u.api.getBrowseList({ page: this.page });
this.timer = false; this.timer = false;

View File

@@ -44,7 +44,7 @@
<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>
<view class="btn" v-if="item.order_status == 50" @click="toComment(item.laundry_id)"> <view class="btn" v-if="item.order_status == 50 && !item.comment" @click="toComment(item.laundry_id)">
去评价 去评价
</view> </view>
</view> </view>
@@ -192,7 +192,7 @@ export default {
}, },
setViewHeight() { setViewHeight() {
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
this.swiperHeight = res.windowHeight - (88 / 2) + 'px'; this.swiperHeight = res.windowHeight - (88 * (res.windowWidth / 750)) + 'px';
}, },
toComment(id) { toComment(id) {
this.$u.route('/pageE/tool/washComment', { this.$u.route('/pageE/tool/washComment', {

View File

@@ -3,7 +3,7 @@
<view> <view>
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88"></u-tabs-swiper> <u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88"></u-tabs-swiper>
</view> </view>
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ minHeight: swiperHeight }"> <swiper :current="swiperCurrent" @animationfinish="animationfinish" class="aaa" :style="{ minHeight: swiperHeight }">
<swiper-item class="swiper-item"> <swiper-item class="swiper-item">
<scroll-view scroll-y="true" style="height: 100%;"> <scroll-view scroll-y="true" style="height: 100%;">
<view class="order-info"> <view class="order-info">
@@ -175,7 +175,7 @@
<view class="checkd"> <view class="checkd">
<label class="radio-view" v-for="(item, index) in items.extend_order_goods" :key="index"> <label class="radio-view" v-for="(item, index) in items.extend_order_goods" :key="index">
<view class="radio"> <view class="radio">
<u-radio color="#F0AD4E" :name="items.order_id + ' ' + item.goods_id" active-color="#FF780F" icon-size="34" shape="circle"></u-radio> <u-radio color="#F0AD4E" :name="items.order_id + ' ' + item.goods_id" active-color="#FF780F" icon-size="24" shape="circle"></u-radio>
</view> </view>
<view class="store_info"> <view class="store_info">
<view class="info_img"> <view class="info_img">
@@ -259,6 +259,16 @@ export default {
this.getAreaData(); this.getAreaData();
this.getClothesTypeList(); this.getClothesTypeList();
}, },
watch: {
swiperCurrent() {
this.goodsStatus = '';
this.type = {};
this.name = '';
this.phone = '';
this.area = '';
this.address = '';
}
},
methods: { methods: {
getClothesTypeList() { getClothesTypeList() {
this.$u.api.getClothesTypeList().then(res => { this.$u.api.getClothesTypeList().then(res => {
@@ -267,7 +277,7 @@ export default {
} else { } else {
this.typeList = []; this.typeList = [];
} }
console.log(this.typeList); // console.log(this.typeList);
}) })
}, },
confirmType(e) { confirmType(e) {
@@ -388,7 +398,7 @@ export default {
}, },
radioChange(e){ radioChange(e){
const ids = e.split(" "); const ids = e.split(" ");
console.log(ids) // console.log(ids)
let checkedGoods = {}; let checkedGoods = {};
this.orderList.forEach(order => { this.orderList.forEach(order => {
if(order.order_id == ids[0]) { if(order.order_id == ids[0]) {
@@ -424,12 +434,6 @@ export default {
}) })
}, },
animationfinish(e) { animationfinish(e) {
this.goodsStatus = '';
this.type = {};
this.name = '';
this.phone = '';
this.area = '';
this.address = '';
// 可重新提交订单 // 可重新提交订单
this.debounce = true; this.debounce = true;
let current = e.detail.current; let current = e.detail.current;
@@ -438,8 +442,7 @@ export default {
}, },
setViewHeight() { setViewHeight() {
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
// this.swiperHeight = res.windowHeight - (88 / 2) + 'px'; this.swiperHeight = res.windowHeight - (res.windowWidth / 750) * 88 + 'px';
this.swiperHeight = res.windowHeight + 'px';
}, },
confirm(e){ confirm(e){
this.showPopup = false; this.showPopup = false;
@@ -467,6 +470,9 @@ export default {
flex: 1; flex: 1;
// height: 95vh; // height: 95vh;
} }
.aaa {
overflow-y: scroll;
}
.order-info { .order-info {
.choose-info{ .choose-info{
display: flex;flex-wrap: wrap; display: flex;flex-wrap: wrap;

View File

@@ -237,6 +237,18 @@
"softinputMode": "adjustResize" "softinputMode": "adjustResize"
} }
} }
},
{
"path": "coupon/details",
"style": {
"navigationBarTitleText": "优惠券介绍",
"app-plus": {
"titleNView": {
"titleColor": "#333333",
"backgroundColor": "#FFFFFF"
}
}
}
} }
] ]
}, },
@@ -869,14 +881,14 @@
"text":"取消", "text":"取消",
"float":"left", "float":"left",
"fontSize":"14" "fontSize":"14"
},
{
"type":"none",
"text":"\ue62d",
"float":"right",
"fontSrc": "/static/fonts/customer.ttf",
"fontSize":"20"
} }
// {
// "type":"none",
// "text":"\ue62d",
// "float":"right",
// "fontSrc": "/static/fonts/customer.ttf",
// "fontSize":"20"
// }
] ]
} }
} }
@@ -1017,6 +1029,12 @@
} }
], ],
"pages": [ "pages": [
// {
// "path" : "pageA/start/start",
// "style": {
// "navigationStyle": "custom"
// }
// },
{ {
"path": "pageA/welcome/welcome", "path": "pageA/welcome/welcome",
"style": { "style": {
@@ -1077,10 +1095,6 @@
} }
} }
} }
,{
"path" : "pageB/components/nuserinfo/nuserinfo",
"style" : {}
}
], ],
"tabBar": { "tabBar": {
"color": "#999999", "color": "#999999",

View File

@@ -14,7 +14,7 @@
inactive-color="#333" :active-item-style="{ inactive-color="#333" :active-item-style="{
'color':'#333' 'color':'#333'
}" :bold="false" }" :bold="false"
@change="dianji"></u-tabs> @change="dianji($event)"></u-tabs>
</view> </view>
<view class="sosuo"></view> <view class="sosuo"></view>
</view> </view>
@@ -27,14 +27,14 @@
<view class="list"> <view class="list">
<view> <view>
<videoItem v-for="(item,id) in articleList.filter((_, index) => !(index&1))" :key="id" :item="item" <videoItem v-for="(item,id) in articleList.filter((_, index) => !(index&1))" :key="id" :item="item"
@getArticlelist="getArticlelist"></videoItem> @updateList="updateList"></videoItem>
</view> </view>
<view style="margin-left:20rpx"> <view style="margin-left:20rpx">
<videoItem v-for="(item,id) in articleList.filter((_, index) => index&1)" :key="id" :item="item" <videoItem v-for="(item,id) in articleList.filter((_, index) => index&1)" :key="id" :item="item"
@getArticlelist="getArticlelist"></videoItem> @updateList="updateList"></videoItem>
</view> </view>
</view> </view>
<u-loadmore :status="status" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" /> <u-loadmore class="load-size" color="#999999" :status="status" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" />
</view> </view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
@@ -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 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" margin-bottom="50" :load-text="loadText" />
</view> </view>
</view> </view>
</view> </view>
@@ -87,6 +87,13 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </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> </view>
</template> </template>
@@ -96,6 +103,10 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100vh; height: 100vh;
/* #ifdef APP-PLUS */
padding-bottom: 100rpx;
/* #endif */
overflow: hidden;
.top { .top {
display: flex; display: flex;
@@ -113,7 +124,8 @@
.tabs { .tabs {
width: 334rpx; width: 334rpx;
// pointer-events: none;
/deep/ .u-tab-item { /deep/ .u-tab-item {
font-weight: bold; font-weight: bold;
} }
@@ -123,6 +135,7 @@
.card { .card {
height: 100%; height: 100%;
width: 100%; width: 100%;
// pointer-events: none;
.box { .box {
width: 100%; width: 100%;
@@ -198,6 +211,43 @@
margin: 200rpx auto 0; margin: 200rpx auto 0;
text-align: center; 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> </style>
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'
@@ -236,7 +286,10 @@
loadmore: '轻轻上拉', loadmore: '轻轻上拉',
loading: '努力加载中', loading: '努力加载中',
nomore: '实在没有了' nomore: '实在没有了'
} },
showCoupon: false,
newMemberCoupon: {},
exchangestate:false
} }
}, },
components: { components: {
@@ -245,14 +298,19 @@
indexad, indexad,
darenItem darenItem
}, },
onShow() { onShow() {
// 页面返回,页面登陆的情况下检查是否显示领取优惠卷优惠券弹窗
if(this.exchangestate==true){
this.isNewmembervoucher()
}
this.articleList = []; this.articleList = [];
this.page = 0; this.page = 0;
this.getArticlelist(); this.getArticlelist();
this.getSwiper(); this.getSwiper();
}, },
onLoad(){ onLoad(){
if(this.$store.state.hasLogin){ if(this.$store.state.hasLogin){
this.exchangestate = true
const user = uni.getStorageSync('user_info'); 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.login(user.member.member_id,user.member.member_nickname,user.member.member_avatar)
@@ -295,7 +353,6 @@
this.$u.api.attentionMember({ this.$u.api.attentionMember({
member_id: member_id member_id: member_id
}).then((res) => { }).then((res) => {
console.log(res);
this.follow_page = 0; this.follow_page = 0;
this.getRecommendList(); // 关注列表 this.getRecommendList(); // 关注列表
this.getFollowList(); // 刷新发现的列表 this.getFollowList(); // 刷新发现的列表
@@ -310,28 +367,31 @@
}, },
// 切换导航 // 切换导航
dianji(a) { dianji(a) {
// console.log(a); // console.log(a);
if (typeof a == "object") { if (a.type == "change") {
this.num = a.detail.current this.num = a.detail.current
} else { } else {
this.num = a this.num = a;
} }
// console.log(this.num);
// 状态请求 // 状态请求
if (this.num == 0) { if (a.type == "change") { // 强制请求一次
this.page = 0; if (this.num == 0) {
this.status = "loadmore"; this.page = 0;
this.getArticlelist(); this.status = "loadmore";
this.getSwiper(); this.getArticlelist();
} else if (this.num == 1) { this.getSwiper();
this.getZhiBoSwiper(); // 直播轮播 } else if (this.num == 1) {
this.tabLiveList(); this.getZhiBoSwiper(); // 直播轮播
} else if (this.num == 2) { this.tabLiveList();
this.follow_page = 0; } else if (this.num == 2) {
this.status = "loadmore"; this.follow_page = 0;
if (this.hasLogin) { this.fansList = [];
this.getFollowList(); // 关注列表 if (this.hasLogin) {
this.getFollowList(); // 关注列表
}
this.getRecommendList(); // 推荐达人
} }
this.getRecommendList(); // 推荐达人
} }
}, },
// 发现别表 // 发现别表
@@ -358,6 +418,12 @@
} }
}) })
}, },
// 屏蔽更新列表
updateList() {
console.log(111);
this.page = 0;
this.getArticlelist();
},
// 发现下拉加载 // 发现下拉加载
swiperBottom(e) { swiperBottom(e) {
this.getArticlelist(); this.getArticlelist();
@@ -383,11 +449,14 @@
}).then(res => { }).then(res => {
this.status_1 = "loading"; this.status_1 = "loading";
if (res.errCode == 0) { if (res.errCode == 0) {
if (this.fansList.length < 4) {
this.status_1 = "nomore";
}
// uni.stopPullDownRefresh(); // uni.stopPullDownRefresh();
// console.log('37647744ghj', res) // console.log('37647744ghj', res)
if (this.follow_page == 0) { if (this.follow_page == 0) {
this.fansList = res.data.list; this.fansList = res.data.list;
this.status_1 = "loadmore"; // this.status_1 = "loadmore";
} else if (res.data.list.length == 0 && this.follow_page > 0) { } else if (res.data.list.length == 0 && this.follow_page > 0) {
this.status_1 = "nomore"; this.status_1 = "nomore";
} else { } else {
@@ -444,7 +513,23 @@
this.$u.route("/pageB/search/index", { this.$u.route("/pageB/search/index", {
type: 2, type: 2,
}); });
} },
// 是否显示新人优惠券
isNewmembervoucher() {
this.$u.api.isNewmembervoucher().then(res => {
if(res.errCode == 0) {
this.newMemberCoupon = res.data;
this.showCoupon = true;
} else {
this.showCoupon = false;
}
})
},
viewCoupon() {
this.$u.route('/pageB/coupon/details', {
price: this.newMemberCoupon.price
});
}
}, },
} }
</script> </script>

View File

@@ -3,14 +3,14 @@
<u-navbar :is-back="false" :title-size="36" title="消息"> <u-navbar :is-back="false" :title-size="36" title="消息">
<view class="slot-wrap"> <view class="slot-wrap">
<image src="../../static/pageD/info(3).png" @click="delMessage()"></image> <image src="../../static/pageD/info(3).png" @click="delMessage()"></image>
<image src="../../static/pageD/info(2).png"></image> <image src="../../static/pageD/info(2).png" @click="kefu()"></image>
</view> </view>
</u-navbar> </u-navbar>
<view class="content"> <view class="content">
<!-- 正文内容 --> <!-- 正文内容 -->
</view> </view>
<!-- <view class="sousuo"></view> --> <!-- <view class="sousuo"></view> -->
<view class="backes"> <view class="backes" style="border-bottom: 1px #ececec solid;">
<titles :information="information_dles"></titles> <titles :information="information_dles"></titles>
</view> </view>
<!-- 消息通知 --> <!-- 消息通知 -->
@@ -105,6 +105,49 @@
}, },
methods: { methods: {
kefu(){
if(!this.$store.state.hasLogin){
this.$refs.uToast.show({
title: "请先登录",
type: 'warning'
})
}else{
function Friend(uuid, name, avatar,time = "", text = "",date = "") {
this.uuid = uuid;
this.name = name;
this.avatar = avatar;
this.online = false;
this.unReadMessage = 0;
this.text = text;
this.time = time;
this.date = date
}
const token = uni.getStorageSync('token');
let that = this
uni.request({
url:"https://dmmall.sdbairui.com/api/Specialci/getAtwillUserInfo",
data:{
userId: 1
},
method:"POST",
header:{
"Authorization" : 'Bearer' + " " + token
},
success(res){
console.log(res)
res = res.data
let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar)
that.$u.route({
url:"/pageD/privateChat/privateChat",
params:{
id:JSON.stringify(user)
}
})
}
})
}
},
gochat(id){ gochat(id){
this.$u.route({ this.$u.route({
url:"/pageD/privateChat/privateChat", url:"/pageD/privateChat/privateChat",

View File

@@ -5,7 +5,7 @@
<u-avatar @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar + '?' + new Date().getTime()" :size="110"></u-avatar> <u-avatar @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar + '?' + new Date().getTime()" :size="110"></u-avatar>
<view class="user-info"> <view class="user-info">
<view class="info-left"> <view class="info-left">
<view class="user-nickname">{{ userInfo.member_nickname }}</view> <view class="user-nickname u-line-1">{{ userInfo.member_nickname }}</view>
<view class="user-medal" @click="toOtherPage('/mine/MedalIntroduction')"> <view class="user-medal" @click="toOtherPage('/mine/MedalIntroduction')">
<image src="/static/image/mine/13.png"></image> <image src="/static/image/mine/13.png"></image>
<view class="rank-title">{{ userInfo.member_grade_name }}</view> <view class="rank-title">{{ userInfo.member_grade_name }}</view>
@@ -46,7 +46,7 @@
<view class="title"> <view class="title">
<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">查看全部订单</view> <view class="title-text-more">查看全部订单</view>
<image src="/static/image/mine/21.png"></image> <image src="/static/image/mine/21.png"></image>
</view> </view>
</view> </view>
@@ -71,14 +71,14 @@
<image src="/static/image/mine/37.png"></image> <image src="/static/image/mine/37.png"></image>
<view>拼团中</view> <view>拼团中</view>
</view> </view>
<view @click="toOtherPage('/order/Index?current=6')">
<image src="/static/image/mine/9.png"></image>
<view>售后</view>
</view>
<view @click="toOtherPage('/order/Index?current=7')"> <view @click="toOtherPage('/order/Index?current=7')">
<image src="/static/image/mine/3.png"></image> <image src="/static/image/mine/3.png"></image>
<view>待评价</view> <view>待评价</view>
</view> </view>
<view @click="toOtherPage('/order/Index?current=6')">
<image src="/static/image/mine/9.png"></image>
<view>售后</view>
</view>
</view> </view>
</view> </view>
<view class="tool"> <view class="tool">
@@ -110,7 +110,7 @@
<view>收货地址</view> <view>收货地址</view>
</view> </view>
<view @click="toOtherPage('/more/AfterSalesHelp')"> <view @click="toOtherPage('/more/AfterSalesHelp')">
<image src="/static/image/mine/9.png"></image> <image src="/static/image/mine/38.png"></image>
<view>售后政策</view> <view>售后政策</view>
</view> </view>
<view @click="toOtherPage('/more/MineHelp')"> <view @click="toOtherPage('/more/MineHelp')">
@@ -192,13 +192,14 @@ export default {
.info-left { .info-left {
margin-right: 15rpx; margin-right: 15rpx;
.user-nickname { .user-nickname {
width: 100rpx;
font-size: 30rpx; font-size: 30rpx;
color: rgba(51,51,51,1); color: rgba(51,51,51,1);
margin-bottom: 19rpx; margin-bottom: 19rpx;
} }
.user-medal { .user-medal {
display: flex; display: flex;
width: 110rpx; // width: 110rpx;
// height: 25rpx; // height: 25rpx;
background: linear-gradient(269deg,rgba(175,175,175,1) 0%,rgba(224,224,224,1) 100%); background: linear-gradient(269deg,rgba(175,175,175,1) 0%,rgba(224,224,224,1) 100%);
border-radius: 13rpx; border-radius: 13rpx;
@@ -249,8 +250,9 @@ export default {
> view { > view {
margin-right: 80rpx; margin-right: 80rpx;
text-align: center; text-align: center;
font-size: 24rpx; font-size: 26rpx;
color:rgba(51,51,51,1); font-weight: 500;
color: #333;
> view:first-child { > view:first-child {
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
@@ -274,7 +276,7 @@ export default {
.title { .title {
height: 76rpx; height: 76rpx;
font-size: 28rpx; font-size: 28rpx;
color: rgba(51,51,51,1); color: #666;
position: relative; position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -289,6 +291,10 @@ export default {
transform: translate(-50%,0); transform: translate(-50%,0);
} }
} }
.title-text-more {
font-size: 24rpx;
color: #999;
}
.content { .content {
padding: $content-padding-top 0 $content-padding-bottom; padding: $content-padding-top 0 $content-padding-bottom;
display: flex; display: flex;
@@ -328,6 +334,7 @@ export default {
} }
} }
.content { .content {
align-items: center;
justify-content: space-between; justify-content: space-between;
> view { > view {
display: flex; display: flex;
@@ -336,22 +343,22 @@ export default {
justify-content: space-between; justify-content: space-between;
} }
> view:nth-child(1){ > view:nth-child(1){
@include image-size($image-width: 33rpx, $image-height: 36rpx); @include image-size($image-width: 36rpx, $image-height: 34rpx);
} }
> view:nth-child(2){ > view:nth-child(2){
@include image-size($image-width: 38rpx, $image-height: 32rpx); @include image-size($image-width: 38rpx, $image-height: 36rpx);
} }
> view:nth-child(3){ > view:nth-child(3){
@include image-size($image-width: 41rpx, $image-height: 33rpx); @include image-size($image-width: 40rpx, $image-height: 36rpx);
} }
> view:nth-child(4){ > view:nth-child(4){
@include image-size($image-width: 40rpx, $image-height: 35rpx); @include image-size($image-width: 38rpx, $image-height: 38rpx);
} }
> view:nth-child(5){ > view:nth-child(5){
@include image-size($image-width: 37rpx, $image-height: 37rpx); @include image-size($image-width: 36rpx, $image-height: 40rpx);
} }
> view:nth-child(6){ > view:nth-child(6){
@include image-size($image-width: 33rpx, $image-height: 35rpx); @include image-size($image-width: 36rpx, $image-height: 40rpx);
} }
} }
} }

View File

@@ -21,10 +21,10 @@
<image class="cart" src="../../static/cart.png" @click="show = true"> <image class="cart" src="../../static/cart.png" @click="show = true">
</image> </image>
<view class="danmufasongbox" @click="danmu = true"> <view class="danmufasongbox" @click="danmu = $store.state.hasLogin">
<view class="danmufasongboxback"></view> <view class="danmufasongboxback"></view>
<image src="../../static/danmu.png" class="danmubianji"></image> <image src="../../static/danmu.png" class="danmubianji"></image>
<text style="font-size:26rpx;color:#fff;margin-left:20rpx">想说点什么</text> <text style="font-size:26rpx;color:#fff;margin-left:20rpx">{{ $store.state.hasLogin ? '想说点什么' : '请先登录'}}</text>
</view> </view>
<image class="liketap" src="../../static/like.png" @click=""> <image class="liketap" src="../../static/like.png" @click="">

BIN
static/image/common/21.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 KiB

BIN
static/image/common/22.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
static/image/common/23.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 KiB

BIN
static/image/common/24.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
static/image/common/25.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/image/common/26.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/image/common/27.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
static/image/common/28.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/image/common/29.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
static/image/common/30.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
static/image/mine/38.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -297,7 +297,8 @@ IMService.prototype.initialIMListeners = function () {
friend.text = message.type != "text" ? "其他消息" : message.payload.text friend.text = message.type != "text" ? "其他消息" : message.payload.text
let time = new Date(message.timestamp) let time = new Date(message.timestamp)
friend.date = message.timestamp friend.date = message.timestamp
friend.time = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds() friend.time = (time.getHours() < 10 ? '0' + time.getHours() : time.getHours()) + ":" + (time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes()) + ":" + (time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds())
console.log(that.friends) console.log(that.friends)
that.friendsarr = [] that.friendsarr = []
for(let i in that.friends){ for(let i in that.friends){
@@ -322,7 +323,7 @@ IMService.prototype.initialIMListeners = function () {
friend.text = message.type != "text" ? "其他消息" : message.payload.text friend.text = message.type != "text" ? "其他消息" : message.payload.text
let time = new Date(message.timestamp) let time = new Date(message.timestamp)
friend.date = message.timestamp friend.date = message.timestamp
friend.time = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds() friend.time = (time.getHours() < 10 ? '0' + time.getHours() : time.getHours()) + ":" + (time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes()) + ":" + (time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds())
console.log(this.friends) console.log(this.friends)
that.friendsarr = [] that.friendsarr = []
for(let i in this.friends){ for(let i in this.friends){
@@ -458,6 +459,8 @@ IMService.prototype.sendPrivateTextMessage = function (friendId, text) {
text: text text: text
}); });
this.sendPrivateMessage(friendId, textMessage); this.sendPrivateMessage(friendId, textMessage);
this.sendMessagesSetStorage(friendId, text)
}; };
//私聊图片消息 //私聊图片消息
@@ -469,6 +472,7 @@ IMService.prototype.sendPrivateImageMessage = function (friendId, imageFile) {
} }
}); });
this.sendPrivateMessage(friendId, imageMessage); this.sendPrivateMessage(friendId, imageMessage);
this.sendMessagesSetStorage(friendId, '其他消息')
}; };
//私聊视频消息 //私聊视频消息
@@ -480,6 +484,8 @@ IMService.prototype.sendPrivateVideoMessage = function (friendId, videoFile) {
} }
}); });
this.sendPrivateMessage(friendId, videoMessage); this.sendPrivateMessage(friendId, videoMessage);
this.sendMessagesSetStorage(friendId, '其他消息')
}; };
IMService.prototype.sendPrivateAudioMessage = function (friendId, audiofile) { IMService.prototype.sendPrivateAudioMessage = function (friendId, audiofile) {
@@ -491,8 +497,92 @@ IMService.prototype.sendPrivateAudioMessage = function (friendId, audiofile) {
}); });
this.sendPrivateMessage(friendId, audioMessage); this.sendPrivateMessage(friendId, audioMessage);
}; this.sendMessagesSetStorage(friendId, '其他消息')
};
IMService.prototype.sendMessagesSetStorage = function (friendId,message){
let friend = this.friends[friendId];
console.log(friend)
// return ;
let sorts = function (friends){
let paixu = function (a,b){
if(a.date > b.date){
return 0;
}else{
return 1;
}
}
friends.sort(paixu)
}
let that = this
if(!friend && friend == undefined){
const token = uni.getStorageSync('token');
console.log(token)
uni.request({
url:"https://dmmall.sdbairui.com/api/Specialci/getAtwillUserInfo",
data:{
userId:friendId
},
method:"POST",
header:{
"Authorization" : 'Bearer' + " " + token
},
success(res){
console.log(res)
that.friends[friendId] = new Friend(res.data.data.member_id, res.data.data.member_nickname, res.data.data.member_avatar);
friend = that.friends[friendId];
console.log(friend)
friend.text = message
let time = new Date()
friend.date = time.getTime()
friend.time = (time.getHours() < 10 ? '0' + time.getHours() : time.getHours()) + ":" + (time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes()) + ":" + (time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds())
console.log(that.friends)
that.friendsarr = []
for(let i in that.friends){
console.log(i)
that.friendsarr.push(that.friends[i])
}
sorts(that.friendsarr)
let arr = []
for(let i in that.friends){
arr.push([that.friends[i].uuid,that.friends[i].time,that.friends[i].text,that.friends[i].date,0])
}
console.log(arr)
uni.setStorageSync('imlist',JSON.stringify(arr))
that.onFriendListChange(that.friends);
}
})
}else{
console.log(friend)
friend.text = message
let time = new Date()
friend.date = time.getTime()
friend.time = (time.getHours() < 10 ? '0' + time.getHours() : time.getHours()) + ":" + (time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes()) + ":" + (time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds())
console.log(this.friends)
that.friendsarr = []
for(let i in this.friends){
that.friendsarr.push(this.friends[i])
}
sorts(that.friendsarr)
let arr = []
for(let i in that.friends){
arr.push([that.friends[i].uuid,that.friends[i].time,that.friends[i].text,that.friends[i].date,0])
}
console.log(arr)
uni.setStorageSync('imlist',JSON.stringify(arr))
this.onFriendListChange(this.friends);
}
}
//发送私聊消息 //发送私聊消息
IMService.prototype.sendPrivateMessage = function (friendId, message) { IMService.prototype.sendPrivateMessage = function (friendId, message) {

BIN
static/videoIcon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB