Browse Source

Merge branch 'master' of ssh://8.134.10.79:222/Leadfyy.co/ec.uniapp-master

master
邓平艺 4 years ago
parent
commit
16e7d78956
  1. 122
      pages/discover/discover.vue
  2. 7
      pages/discover/discoverdetails.vue
  3. 6
      pages/index/activity/detail.vue
  4. 106
      pages/index/category/category.vue
  5. 6
      pages/index/collectCoupons/collectCoupons.vue
  6. 10
      pages/order/newdetail/newdetail.vue
  7. 70
      pages/shop/goodsdetail.vue
  8. 2
      pages/shop/shopdetail.vue
  9. 155
      pages/user/my/center.vue

122
pages/discover/discover.vue

@ -63,11 +63,22 @@
<text class="lf-iconfont icon-fabu lf-font-50"></text>
</view>
</view>
<view class="fixed-right1" v-if="showTotop">
<view class="fixed-right2" v-if="showTotop">
<view class="fixed-btn" hover-class="lf-opacity" @click="goTop()">
<text class="lf-iconfont icon-zhiding lf-font-50"></text>
</view>
</view>
<!-- 悬浮购物车入口 -->
<view class="fixed-right1">
<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>
<block v-if="$isRight(car_num)">
<view class="angle-mark" v-if="car_num<99">{{car_num || 0}}</view>
<view class="angle-mark" v-else>99+</view>
</block>
</view>
</view>
<!-- <view style="height: 30rpx;"></view> -->
<lf-tabbar></lf-tabbar>
</view>
@ -99,7 +110,8 @@
scrollH: 0,
nav_height: 0,
isRefresher: true,
pageSize: 10
pageSize: 10,
car_num: 0
}
},
computed: {
@ -113,9 +125,41 @@
onLoad(){
let info = uni.getSystemInfoSync();
this.scrollH = info.screenHeight;
this.getHotActivity()
this.getHotActivity();
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
});
});
},
scroll (e) {
//scroll
this.oldScrollTop = e.detail.scrollTop;
@ -395,6 +439,66 @@
</style>
<style lang="scss" scoped>
.fixed-right1{
position: fixed;
right: 32rpx;
bottom: 450rpx;
width: max-content;
height: max-content;
z-index: 9;
.fixed-cart{
width: 110rpx;
height: 110rpx;
border-radius: 50%;
background-color: #FFFFFF;
border: 1rpx solid #DEDEDE;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
color: #333333;
position: relative;
margin-top: 30rpx;
.icon-text{
font-size: 50rpx;
line-height: 1;
}
.tips{
font-size: 20rpx;
color: #333333;
}
.angle-mark{
position: absolute;
right: 4rpx;
top: 4rpx;
width: 40rpx;
height: 40rpx;
background-color: #15716E;
border-radius: 50%;
font-size: 20rpx;
display: flex;
justify-content: center;
align-items: center;
color: #FFFFFF;
}
}
.fixed-live{
background: #15716E;
border-radius: 100rpx 5rpx 100rpx 100rpx;
border: none;
color: #FFFFFF;
// animation: bounceIn 1s .2s ease both;
backface-visibility:visible;
transform-origin:center center;
animation: demo 2s 0s infinite ease normal none ;
// &>text:nth-child(1){
// animation: fadeInRightBig 1s .1s ease both;
// }
.tips{
color: #FFFFFF;
}
}
}
.tag-father {
position: relative;
}
@ -441,8 +545,8 @@
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
.fixed-btn{
width: 100rpx;
height: 100rpx;
width: 110rpx;
height: 110rpx;
border-radius: 50%;
background-color: #15716E;
display: flex;
@ -452,17 +556,17 @@
}
}
.fixed-right1{
.fixed-right2{
position: fixed;
right: 32rpx;
bottom: 320rpx;
bottom: 440rpx;
width: max-content;
height: max-content;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
.fixed-btn{
width: 100rpx;
height: 100rpx;
width: 110rpx;
height: 110rpx;
border-radius: 50%;
background-color: #15716E;
display: flex;

7
pages/discover/discoverdetails.vue

@ -44,7 +44,7 @@
<view class="lf-color-555 lf-font-24"> {{discover_details.comments_count}}条评论</view>
<!-- 评论开始 -->
<view v-for="(commentitem,commentindex) of commentList" :key="commentindex">
<view class="lf-m-t-20" @click="applySub(commentitem.user.id,commentitem.id)">
<view class="lf-m-t-40" @click="applySub(commentitem.user.id,commentitem.id)">
<view class="lf-flex">
<view @click="$url('/pages/user/my/my?user_id='+commentitem.user_id)">
<image class="comment-img" :src="commentitem.user.avatar" v-if="commentitem.user.avatar" mode="widthFix"></image>
@ -106,7 +106,7 @@
<!-- 底部tab -->
<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" confirm-type="send" type="text" v-if="ifApply" :focus="ifApply" @blur="changeState()" @confirm="applyComment(apply_userid,apply_commentid)" :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">
@ -148,6 +148,9 @@
this.getCommentList();
},
methods: {
changeState() {
this.ifApply = false;
},
checkPicture(image_list,current) {
if(image_list.length <= 0) return;
let list = [];

6
pages/index/activity/detail.vue

@ -39,6 +39,12 @@
:class="{'lf-opacity': is_end}"
@click="submit">{{ is_end ? '名额已满' : '立即报名' }}
</button>
<button v-if="activity_details.apply != null" class="btn lf-opacity"
:disabled="true"
>
已经报名
</button>
</view>
</view>
</template>

106
pages/index/category/category.vue

@ -85,6 +85,17 @@
</view>
</view>
</view>
<!-- 悬浮购物车入口 -->
<view class="fixed-right">
<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>
<block v-if="$isRight(car_num)">
<view class="angle-mark" v-if="car_num<99">{{car_num || 0}}</view>
<view class="angle-mark" v-else>99+</view>
</block>
</view>
</view>
<lf-tabbar></lf-tabbar>
</view>
</template>
@ -128,7 +139,8 @@
filter_active: '',
brand_list: [],
point_list: [],
scrollAnchorId: ''
scrollAnchorId: '',
car_num: 0
};
},
computed: {
@ -162,12 +174,44 @@
this.getCategoryList().then(() => {
self.computerH();
});
this.getcarNum();
// setTimeout(function() {
// self.computerH();
// }, 100);
// this.createAtoZ();
},
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
});
});
},
getBrandList(options = {}){
let par = {};
if(options.filter){
@ -320,6 +364,66 @@
</script>
<style lang="scss" scoped>
.fixed-right{
position: fixed;
right: 32rpx;
bottom: 400rpx;
width: max-content;
height: max-content;
z-index: 9;
.fixed-cart{
width: 110rpx;
height: 110rpx;
border-radius: 50%;
background-color: #FFFFFF;
border: 1rpx solid #DEDEDE;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
color: #333333;
position: relative;
margin-top: 30rpx;
.icon-text{
font-size: 50rpx;
line-height: 1;
}
.tips{
font-size: 20rpx;
color: #333333;
}
.angle-mark{
position: absolute;
right: 4rpx;
top: 4rpx;
width: 40rpx;
height: 40rpx;
background-color: #15716E;
border-radius: 50%;
font-size: 20rpx;
display: flex;
justify-content: center;
align-items: center;
color: #FFFFFF;
}
}
.fixed-live{
background: #15716E;
border-radius: 100rpx 5rpx 100rpx 100rpx;
border: none;
color: #FFFFFF;
// animation: bounceIn 1s .2s ease both;
backface-visibility:visible;
transform-origin:center center;
animation: demo 2s 0s infinite ease normal none ;
// &>text:nth-child(1){
// animation: fadeInRightBig 1s .1s ease both;
// }
.tips{
color: #FFFFFF;
}
}
}
.page {
display: grid;
grid-template-columns: 1fr 2fr;

6
pages/index/collectCoupons/collectCoupons.vue

@ -34,6 +34,12 @@
<view>抢光了</view>
</view>
</block>
<block v-if="item.coupon_count >= item.per_usage_limit && !item.ifpast">
<view class="coupon-opacity"></view>
<view class="coupon-end" :class="item.ifpast?'lf-bg-999':''">
<view>已领取</view>
</view>
</block>
</view>
</view>
<u-back-top :scrollTop="pageScrollTop"></u-back-top>

10
pages/order/newdetail/newdetail.vue

@ -68,7 +68,7 @@
<view class="lf-font-24 lf-color-777">{{item.item_meta.specs_text}}</view>
<view class="lf-row-between" style="line-height: 1;">
<text class="price" v-if="type == 'point'">{{item.redeem_point}}积分</text>
<text class="price" v-else>¥{{item.total_yuan}}</text>
<text class="price" v-else>¥{{item.unit_price_yuan}}</text>
<text class="lf-font-28 lf-color-777">x {{item.quantity}}</text>
</view>
</view>
@ -95,13 +95,13 @@
</view>
</view>
<view class="card" v-if="type == 'default'">
<view class="lf-row-between lf-font-28">
<view class="lf-row-between lf-font-28" v-if="order_details.adjustments[0].origin_type == 'coupon'">
<text class="lf-color-777">优惠券</text>
<text style="color: #F63434;">-¥20</text>
<text style="color: #F63434;">{{order_details.adjustments_total_yuan}}</text>
</view>
<view class="lf-row-between lf-m-t-30 lf-font-28">
<text class="lf-color-777">运费</text>
<text class="lf-color-222">+¥10</text>
<text class="lf-color-222">+{{order_details.payable_freight_yuan}}</text>
</view>
<view class="lf-row-between lf-m-t-30 lf-font-28">
<text class="lf-color-777">订单总价</text>
@ -178,7 +178,7 @@
</view>
<!-- 代付款 -->
<view class="order-btn" v-if="order_details.status == 1">
<view class="lf-font-28 lf-row-center lf-color-777">
<view class="lf-font-28 lf-row-center lf-color-price">
待付款
</view>
<view class="lf-flex">

70
pages/shop/goodsdetail.vue

@ -136,15 +136,15 @@
</view>
</view>
</view>
<!-- <view>
<button class="head-btn" @click="$url('/pages/user/my/chatonline')">
<view>
<button class="head-btn" @click="makePhone()">
<text class="lf-iconfont icon-kefuhdpi lf-font-24"></text>
<text class="lf-m-l-10">客服</text>
</button>
</view> -->
</view>
</view>
</view>
<scroll-view class="scroll-view" :scroll-x="true">
<scroll-view class="scroll-view" :scroll-x="true" v-if="brand_detail.goods.length!=0">
<view class="scroll-content">
<view class="goods-item"
v-for="(item, index) in brand_detail.goods"
@ -178,10 +178,10 @@
<!-- 吸底操作按钮 -->
<view class="lf-row-between fixed-bottom">
<view class="lf-flex lf-p-t-10 lf-p-b-10">
<!-- <view class="lf-flex-column lf-row-center icon-item" open-type="contact">
<view class="lf-flex-column lf-row-center icon-item" @click="makePhone()">
<text class="lf-iconfont icon-pinglun- icon-img"></text>
<view class="lf-m-t-1">客服</view>
</view> -->
</view>
<view class="lf-flex-column lf-row-center icon-item" @click="switchCollect">
<text class="lf-iconfont icon-shoucang2 icon-img lf-color-price" v-if="is_collect"></text>
<text class="lf-iconfont icon-shoucang11 icon-img" v-else></text>
@ -190,6 +190,10 @@
<button class="lf-flex-column lf-row-center icon-item" @click="$url('/pages/store/cart/cart')">
<text class="lf-iconfont icon-gouwulan icon-img"></text>
<view class="lf-m-t-1">购物车</view>
<block v-if="$isRight(car_num)">
<view class="angle-mark" v-if="car_num<99">{{car_num || 0}}</view>
<view class="angle-mark" v-else>99+</view>
</block>
</button>
</view>
<view v-if="type == 'seckill'">
@ -287,7 +291,8 @@
token: '',
coupons: [], //
goods_num: 1,
is_date_finish: false
is_date_finish: false,
car_num: 0
}
},
computed: {
@ -334,8 +339,45 @@
this.goods_id = options.id;
this.getNewdetail();
this.getGoodsStock(); //
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
});
});
},
makePhone() {
uni.makePhoneCall({
phoneNumber: '114' //
});
},
//
switchCollect(){
if(!this.token){
@ -717,6 +759,20 @@
}
</style>
<style lang="scss" scoped="scoped">
.angle-mark{
position: absolute;
right: 4rpx;
top: 4rpx;
width: 40rpx;
height: 40rpx;
background-color: #15716E;
border-radius: 50%;
font-size: 20rpx;
display: flex;
justify-content: center;
align-items: center;
color: #FFFFFF;
}
//scrollview
.scroll-view{
height: 310rpx;

2
pages/shop/shopdetail.vue

@ -50,7 +50,7 @@
<view class="recommend-box" >
<view class="goods-rom" v-for="(item,index) of detail.goods" :key="index" v-if="detail.goods.length" @click="$url('/pages/shop/goodsdetail?id='+item.id)">
<u-lazy-load threshold="-450" border-radius="8px 8px 0 0" :image="item.img" :index="index">
<view class="list-label">已售{{item.sale_count}}</view>
<!-- <view class="list-label">已售{{item.sale_count}}</view> -->
</u-lazy-load>
<view class="lf-p-20">
<view class="list-title">

155
pages/user/my/center.vue

@ -73,13 +73,40 @@
</view>
</view>
<view class="order-tag lf-flex-wrap">
<view class="order-children"
<view class="order-children" @click="$url('/pages/order/index/onlineorder?current=1')">
<view>
<view class="function-tag" v-if="centerInfo.newCount != 0 && $isRight(centerInfo)">{{centerInfo.newCount}}</view>
<view class="lf-iconfont lf-font-50 icon-daifukuan"></view>
</view>
<view class="lf-color-black lf-font-28 lf-m-t-20">待付款</view>
</view>
<view class="order-children" @click="$url('/pages/order/index/onlineorder?current=2')">
<view>
<view class="function-tag" v-if="centerInfo.paidCount != 0 && $isRight(centerInfo)">{{centerInfo.paidCount}}</view>
<view class="lf-iconfont lf-font-50 icon-31daifahuo"></view>
</view>
<view class="lf-color-black lf-font-28 lf-m-t-20">待发货</view>
</view>
<view class="order-children" @click="$url('/pages/order/index/onlineorder?current=3')">
<view>
<view class="function-tag" v-if="centerInfo.deliveredCount != 0 && $isRight(centerInfo)">{{centerInfo.deliveredCount}}</view>
<view class="lf-iconfont lf-font-50 icon-daishouhuo"></view>
</view>
<view class="lf-color-black lf-font-28 lf-m-t-20">待收货</view>
</view>
<view class="order-children" @click="$url('/pages/order/index/onlineorder?current=4')">
<view>
<view class="function-tag" v-if="centerInfo.receiveCount != 0 && $isRight(centerInfo)">{{centerInfo.receiveCount}}</view>
<view class="lf-iconfont lf-font-50 icon-tihuo"></view>
</view>
<view class="lf-color-black lf-font-28 lf-m-t-20">待提货</view>
</view>
<!-- <view class="order-children"
v-for="(item, index) in order_tablist" :key="index"
@click="$url(item.path)">
<!-- <view class="function-tag"></view> -->
<view class="lf-iconfont lf-font-50" :class="item.icon"></view>
<view class="lf-color-black lf-font-28 lf-m-t-20">{{ item.name }}</view>
</view>
</view> -->
</view>
</view>
</view>
@ -103,6 +130,17 @@
</view>
</view>
</view>
<!-- 悬浮购物车入口 -->
<view class="fixed-right">
<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>
<block v-if="$isRight(car_num)">
<view class="angle-mark" v-if="car_num<99">{{car_num || 0}}</view>
<view class="angle-mark" v-else>99+</view>
</block>
</view>
</view>
<lf-tabbar></lf-tabbar>
</view>
</template>
@ -168,7 +206,8 @@
token: '', // token
code: '',
centerInfo: {},
show_count: 0
show_count: 0,
car_num: 0
}
},
onLoad(){
@ -191,6 +230,7 @@
}
this.getMeInfo();
this.getUcenter();
this.getcarNum();
},
onShow(){
this.show_count++;
@ -210,6 +250,37 @@
}
},
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
});
});
},
//
getMeInfo(){
this.$http.get({
@ -321,8 +392,69 @@
}
</style>
<style lang="scss" scoped>
.fixed-right{
position: fixed;
right: 32rpx;
bottom: 400rpx;
width: max-content;
height: max-content;
z-index: 9;
.fixed-cart{
width: 110rpx;
height: 110rpx;
border-radius: 50%;
background-color: #FFFFFF;
border: 1rpx solid #DEDEDE;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
color: #333333;
position: relative;
margin-top: 30rpx;
.icon-text{
font-size: 50rpx;
line-height: 1;
}
.tips{
font-size: 20rpx;
color: #333333;
}
.angle-mark{
position: absolute;
right: 4rpx;
top: 4rpx;
width: 40rpx;
height: 40rpx;
background-color: #15716E;
border-radius: 50%;
font-size: 20rpx;
display: flex;
justify-content: center;
align-items: center;
color: #FFFFFF;
}
}
.fixed-live{
background: #15716E;
border-radius: 100rpx 5rpx 100rpx 100rpx;
border: none;
color: #FFFFFF;
// animation: bounceIn 1s .2s ease both;
backface-visibility:visible;
transform-origin:center center;
animation: demo 2s 0s infinite ease normal none ;
// &>text:nth-child(1){
// animation: fadeInRightBig 1s .1s ease both;
// }
.tips{
color: #FFFFFF;
}
}
}
.order-children {
width: 134rpx;
position: relative;
height: 100%;
display: flex;
flex-direction: column;
@ -355,11 +487,18 @@
}
}
.function-tag {
width: 50rpx;
height: 50rpx;
background: #D8D8D8;
border: 1rpx solid #979797;
color: white;
font-size: 24rpx;
position: absolute;
right: 18rpx;
width: 39rpx;
height: 40rpx;
background: red;
top: -12rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.order-tag {
padding: 50rpx 0;

Loading…
Cancel
Save