This commit is contained in:
2020-08-09 18:39:35 +08:00
parent 9631e9f827
commit 9b93b6a5a9
20 changed files with 148 additions and 66 deletions

View File

@@ -98,8 +98,37 @@ export default {
},
onNavigationBarButtonTap(e) {
if( e.index == 0 ) uni.navigateBack();
if( e.index == 1 ) this.customers();
},
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() {
const url = this.$u.http.config.baseUrl + '/Upload/uploadfile';
uni.chooseImage({

View File

@@ -40,7 +40,7 @@ export default {
setIntegralHeight() {
const res = uni.getSystemInfoSync();
// console.log(res.windowHeight);
this.integralHeight = res.windowHeight - 251 / 2 + 'px';
this.integralHeight = res.windowHeight - (res.windowWidth / 750) * 251 + 'px';
},
getMemberPointsStat() {
this.$u.api.getMemberPointsStat().then((res)=>{

View File

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

View File

@@ -117,9 +117,9 @@ export default {
setViewHeight() {
const res = uni.getSystemInfoSync();
// 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);
this.swiperHeight = res.windowHeight - 88 / 2 + 'px';
this.swiperHeight = res.windowHeight - (res.windowWidth / 750) * 88 + 'px';
},
viewProgress() {
this.$u.route({

View File

@@ -7,11 +7,11 @@
<swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{ height: swiperHeight }">
<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">
<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>
</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.length"></u-empty>
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList[i] || !couponList[i].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>
</swiper-item>
</swiper>
@@ -49,7 +49,7 @@ export default {
},
watch: {
couponCurrent(index) {
this.couponList = [];
// this.couponList = [];
const id = this.couponGroupList[index].gc_id;
this.getCouponList({ gc_id: id, load: 'reload' });
},
@@ -89,9 +89,10 @@ export default {
})
this.timer = true;
if(res.errCode == 0) {
if(load == 'reload') this.couponList = res.data;
else if(load == 'loadmore') this.couponList.push(...res.data);
if(load == 'reload') this.couponList[this.couponCurrent] = res.data;
else if(load == 'loadmore') this.couponList[this.couponCurrent].push(...res.data);
}
this.$forceUpdate();
return res.data.length;
},
exchangeCoupon(id) {
@@ -109,7 +110,7 @@ export default {
},
setViewHeight() {
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

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