Browse Source

一系列优化

master
Enzo 4 years ago
parent
commit
73dfbb9fbc
  1. 7
      pages/discover/discover.vue
  2. 4
      pages/discover/discoverdetails.vue
  3. 17
      pages/discover/publish.vue
  4. 3
      pages/index/index/index.vue
  5. 46
      pages/point/shoppingMall/shoppingMall.vue

7
pages/discover/discover.vue

@ -17,8 +17,11 @@
<view class="head-tag">V</view>
</view>
<view class="lf-flex-column lf-m-l-20">
<view class="lf-font-32 lf-color-black lf-font-bold" v-if="item.user.nick_name">{{item.user.nick_name}}</view>
<view class="lf-font-32 lf-color-black lf-font-bold" v-else>{{item.user.mobile_replace}}</view>
<view class="lf-flex" style="align-items: center;">
<view class="lf-font-32 lf-color-black lf-font-bold" v-if="item.user.nick_name">{{item.user.nick_name}}</view>
<view class="lf-font-32 lf-color-black lf-font-bold" v-else>{{item.user.mobile_replace}}</view>
<text class="lf-iconfont icon-xiangyou lf-color-777 lf-m-l-10 lf-text-vertical" style="font-size: 18rpx;"></text>
</view>
<view class="lf-font-24 lf-color-777 lf-m-t-15">{{item.created_at}}</view>
</view>
</view>

4
pages/discover/discoverdetails.vue

@ -8,7 +8,7 @@
<view class="head-tag">V</view>
</view>
<view class="lf-flex-column lf-m-l-20">
<view>
<view @click="$url('/pages/user/my/my?user_id='+discover_details.user_id)">
<text class="lf-font-32 lf-color-black lf-font-bold lf-m-r-15" v-if="discover_details.user.nick_name">{{discover_details.user.nick_name}}</text>
<text class="lf-font-32 lf-color-black lf-font-bold lf-m-r-15" v-else>{{discover_details.user.mobile_replace}}</text>
<text class="lf-iconfont icon-xiangyou lf-color-777 lf-text-vertical" style="font-size: 18rpx;"></text>
@ -107,7 +107,7 @@
<view class="comment-tab">
<view>
<input class="rom-search" confirm-type="send" type="text" v-if="ifApply" :focus="ifApply" @confirm="applyComment(apply_userid,apply_commentid)" :cursor-spacing="8" v-model="comment" placeholder="说点什么" />
<input class="rom-search" type="text" v-else @confirm="sendComment(discover_details.id)" :cursor-spacing="8" v-model="comment" placeholder="说点什么" />
<input class="rom-search" type="text" confirm-type="send" v-else @confirm="sendComment(discover_details.id)" :cursor-spacing="8" v-model="comment" placeholder="说点什么" />
</view>
<view class="lf-row-center">
<view class="lf-row-center lf-m-r-35" style="align-items: center;" @click.stop="addLike(discover_details.id)">

17
pages/discover/publish.vue

@ -6,7 +6,7 @@
<textarea class="textarea" placeholder="这一刻的想法…" v-model="content"></textarea>
<!-- 上传图片 -->
<view class="my-images">
<view class="my-image-item" @click="uploadImage" v-if="image_list.length < 6">
<view class="my-image-item" @click="uploadImage" v-if="image_list.length < 9">
<text class="lf-iconfont icon-jia my-image-item-after"></text>
</view>
<view class="my-image-item" v-for="(item, index) in image_list" :key="index" @click="lookImage(index)">
@ -69,7 +69,7 @@
.then(res => {
if (res.data.code == 200) {
if (res.data.status) {
this.$msg('发布成功').then(() => {
this.$msg('发布成功',{duration: 2500}).then(() => {
this.$toBack();
})
} else {
@ -118,7 +118,7 @@
let current_count = this.image_count - this.image_list.length;
if(current_count == 0) return;
uni.chooseImage({
count: 1,
count: current_count,
complete: result => {
if(result.errMsg == "chooseImage:fail cancel"){
return; //
@ -203,11 +203,16 @@
}
.remove-image{
position: absolute;
right: -4rpx;
top: -18rpx;
right: 0;
top: 0;
width: 50rpx;
height: 50rpx;
display: flex;
align-items: center;
justify-content: center;
color: #e74c3c;
font-size: 40rpx;
padding: 8rpx;
background-color: rgba(0,0,0,0.4);
}
}
.my-image-item-after{

3
pages/index/index/index.vue

@ -317,7 +317,8 @@
<view class="fixed-cart" hover-class="lf-opacity" @click="$url('/pages/store/cart/cart')">
<text class="lf-iconfont icon-gouwulan icon-text"></text>
<text class="tips">购物车</text>
<view class="angle-mark">{{car_num || 0}}</view>
<view class="angle-mark" v-if="car_num<99">{{car_num || 0}}</view>
<view class="angle-mark" v-else>99+</view>
</view>
</view>
<!-- ad广告弹出组件 TODO 暂时先注释 -->

46
pages/point/shoppingMall/shoppingMall.vue

@ -21,7 +21,8 @@
<view class="item" @click="$url('/pages/store/cart/cart')">
<text class="lf-iconfont icon-gouwulan lf-font-50"></text>
<text>购物车</text>
<view class="angle-mark">99+</view>
<view class="angle-mark" v-if="car_num<99">{{car_num}}</view>
<view class="angle-mark" v-else>99+</view>
</view>
</view>
</view>
@ -43,7 +44,7 @@
</view>
</view>
<view class="goods" v-if="$isRight(tab_list)">
<lf-waterfall :list="tab_list[tab_current].list"></lf-waterfall>
<lf-waterfall :ifsale='false' :list="tab_list[tab_current].list"></lf-waterfall>
<lf-nocontent src="/static/images/empty.png" v-if="tab_list[tab_current].list.length <= 0"></lf-nocontent>
</view>
</view>
@ -84,7 +85,8 @@
}],
filter_current: null,
token: '',
point: {point: 0}
point: {point: 0},
car_num: 0
}
},
onLoad(){
@ -92,7 +94,41 @@
this.getTotalPoint();
this.getCategoryList();
},
onShow() {
this.getcarNum();
},
methods: {
getcarNum() {
this.$http
.get({
api: 'api/shopping/cart/count',
header: {
Authorization: this.$cookieStorage.get('user_token')
},
})
.then(res => {
if (res.data.code == 200) {
if(res.data.data == null) {
this.car_num = 0;
}else {
this.car_num = res.data.data;
}
} else {
wx.showModal({
content: '请下拉页面刷新重试',
showCancel: false
});
}
})
.catch(() => {
wx.stopPullDownRefresh();
wx.hideLoading();
wx.showModal({
content: '请求失败',
showCancel: false
});
});
},
getTotalPoint(){
this.$http.get({
api: 'api/users/point',
@ -158,7 +194,7 @@
sale: item.sale_count,
picture: item.img,
title: item.name,
store_nums: item.store_nums
store_nums: item.redeem_point
}
})
let pagination = res.data.meta.pagination;
@ -314,7 +350,7 @@
display: flex;
justify-content: center;
align-items: center;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
// border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
width: max-content;
}
/deep/.u-scroll-box .u-tab-bar {

Loading…
Cancel
Save