mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-17 07:55:53 +08:00
防抖登录,砍价优化,新增砍价记录,优化积分信息,优化组件复用。
This commit is contained in:
@@ -67,7 +67,7 @@ import { getGoods } from "@/api/goods.js";
|
||||
import { getPinTuanShare } from "@/api/order";
|
||||
import shares from "@/components/m-share/index";
|
||||
import storage from "@/utils/storage.js";
|
||||
import popupGoods from "./popup/goods"; //购物车商品的模块
|
||||
import popupGoods from "@/components/m-buy/goods"; //购物车商品的模块
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<span class="ybname">{{ item.storeName }}</span>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<div class="promotionNotice">{{ item.promotionNotice }}</div>
|
||||
<div class="promotionNotice">{{ item.promotionNotice || '' }}</div>
|
||||
<u-row class="goodsBorder" v-for="(val, i) in item.skuList" :key="i">
|
||||
<u-col class="tabL" :offset="0"
|
||||
@click="navigateTo('/pages/product/goods?id=' + val.goodsSku.id+'&goodsId='+val.goodsSku.goodsId)" :span="3">
|
||||
|
||||
@@ -505,6 +505,9 @@ page,
|
||||
|
||||
.swiper-box {
|
||||
height: calc(100vh - 40px);
|
||||
// #ifdef H5
|
||||
height: calc(100vh - 40px - 44px);
|
||||
// #endif
|
||||
}
|
||||
|
||||
.list-scroll-content {
|
||||
|
||||
@@ -134,11 +134,10 @@ export default {
|
||||
getUserInfo().then((user) => {
|
||||
storage.setUserInfo(user.data.result);
|
||||
storage.setHasLogin(true);
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
}, 500);
|
||||
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
@@ -228,7 +227,6 @@ text.shop {
|
||||
background: #fff !important;
|
||||
}
|
||||
|
||||
|
||||
.btn-auth {
|
||||
width: 92%;
|
||||
margin: 0 auto 40rpx;
|
||||
|
||||
@@ -81,7 +81,7 @@ page {
|
||||
align-items: center;
|
||||
}
|
||||
.-goods-price {
|
||||
flex: 8;
|
||||
flex: 7;
|
||||
color: $price-color;
|
||||
font-size: 32rpx;
|
||||
line-height: 1;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<u-navbar :custom-back="back" back-icon-color="#fff" :background="background" :border-bottom="false" title="">
|
||||
<u-navbar :custom-back="back" back-icon-color="#fff" :background="background" :border-bottom="false">
|
||||
</u-navbar>
|
||||
|
||||
<div class="wrapper">
|
||||
@@ -36,12 +36,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 参与砍价 -->
|
||||
<div class="bargaining" v-if="!activityData.pass" @click="shareBargain">
|
||||
<div class="bargaining" v-if="!activityData.pass && activityData.status!='END'" @click="shareBargain">
|
||||
邀请砍价
|
||||
</div>
|
||||
<!-- 立即购买 -->
|
||||
<div class="buy" v-else @click="getGoodsDetail">
|
||||
立即购买
|
||||
<div v-else>
|
||||
|
||||
<div v-if="activityData.status!='END'" class="buy" @click="getGoodsDetail">
|
||||
立即购买
|
||||
</div>
|
||||
</div>
|
||||
<!-- 我要开团 -->
|
||||
<div class="start" v-if="activityData.memberId != $options.filters.isLogin().id" @click="startOpenGroup">我要开团
|
||||
@@ -89,18 +92,17 @@
|
||||
|
||||
<u-modal :show-title="false" v-model="helpBargainFlage" :show-confirm-button="false">
|
||||
<view class="help-bargain" @click="handleClickHelpBargain">
|
||||
<u-image width="100%" height="600rpx" src="/pages/promotion/static/bargain.jpeg"></u-image>
|
||||
<u-image width="100%" height="600rpx"
|
||||
src="https://lilishop-oss.oss-cn-beijing.aliyuncs.com/91631d5a66c7426bbe3f7d644ee41946.jpeg"></u-image>
|
||||
<u-image class="help" width="300rpx" height="80rpx" src="/pages/promotion/static/help-bargain.png"></u-image>
|
||||
</view>
|
||||
</u-modal>
|
||||
|
||||
<!-- 分享 -->
|
||||
<shares @close="closeShare"
|
||||
:link="'/pages/promotion/bargain/detail?id='+routerVal.id+'&activityId='+activityData.id" type="kanjia"
|
||||
:thumbnail="bargainDetail.thumbnail" :goodsName="bargainDetail.goodsName" v-if="shareFlage " />
|
||||
<shares @close="closeShare" :link="share()" type="kanjia" :thumbnail="bargainDetail.thumbnail"
|
||||
:goodsName="bargainDetail.goodsName" v-if="shareFlage " />
|
||||
|
||||
<!-- 购买 -->
|
||||
|
||||
<popupGoods ref="popupGoods" :buyMask="maskFlag" @closeBuy="closePopupBuy" :goodsDetail="bargainDetail"
|
||||
:goodsSpec="goodsSpec" v-if="bargainDetail.id " @handleClickSku="getGoodsDetail" />
|
||||
|
||||
@@ -113,7 +115,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import popupGoods from "@/pages/cart/payment/popup/goods"; //购物车商品的模块
|
||||
import popupGoods from "@/components/m-buy/goods"; //购物车商品的模块
|
||||
import {
|
||||
getBargainDetail,
|
||||
getBargainActivity,
|
||||
@@ -121,7 +123,6 @@ import {
|
||||
getBargainLog,
|
||||
helpBargain,
|
||||
} from "@/api/promotions";
|
||||
import { getGoods } from "@/api/goods.js";
|
||||
import shares from "@/components/m-share/index";
|
||||
export default {
|
||||
components: {
|
||||
@@ -171,6 +172,17 @@ export default {
|
||||
this.params.kanjiaActivityId = options.activityId;
|
||||
}
|
||||
},
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
onShareAppMessage(res) {
|
||||
return {
|
||||
path: this.share(),
|
||||
title: `请快来帮我砍一刀${this.bargainDetail.goodsName}`,
|
||||
imageUrl: this.thumbnail || require("@/static/logo.png"),
|
||||
};
|
||||
},
|
||||
// #endif
|
||||
|
||||
onShow() {
|
||||
this.init();
|
||||
},
|
||||
@@ -209,6 +221,14 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
share() {
|
||||
return (
|
||||
"/pages/promotion/bargain/detail?id=" +
|
||||
this.routerVal.id +
|
||||
"&activityId=" +
|
||||
this.activityData.id
|
||||
);
|
||||
},
|
||||
// 返回上一级
|
||||
back() {
|
||||
// 进行路由栈判定如果当前路由栈是空的就返回拼团列表页面
|
||||
@@ -220,7 +240,7 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 跳转选择商品页面
|
||||
startOpenGroup() {
|
||||
uni.redirectTo({
|
||||
@@ -332,7 +352,7 @@ page {
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
.wrapper {
|
||||
background: url("../static/Bargaining.png");
|
||||
background: url("https://lilishop-oss.oss-cn-beijing.aliyuncs.com/aac88f4e8eff452a8010af42c4560b04.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
height: 700rpx;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<u-navbar :custom-back="back" back-icon-color="#fff" :background="background" :border-bottom="false" title="">
|
||||
<u-navbar :custom-back="back" back-icon-color="#fff" :background="background" :border-bottom="false" >
|
||||
</u-navbar>
|
||||
<div class="wrapper">
|
||||
<!-- 砍价列表 -->
|
||||
@@ -59,7 +59,7 @@ export default {
|
||||
// 返回上一级
|
||||
back() {
|
||||
uni.switchTab({
|
||||
url:"/pages/tabbar/home/index"
|
||||
url: "/pages/tabbar/home/index",
|
||||
});
|
||||
},
|
||||
/**
|
||||
@@ -88,7 +88,7 @@ page {
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.wrapper {
|
||||
background: url("../static/Bargaining.png");
|
||||
background: url("https://lilishop-oss.oss-cn-beijing.aliyuncs.com/aac88f4e8eff452a8010af42c4560b04.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
height: 700rpx;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div v-if="bargainLog.length != 0">
|
||||
<div v-for="(item,index) in bargainLog" class="flex" :key="index">
|
||||
<div>
|
||||
<u-image width='250' height="250" :src="item.thumbnail"></u-image>
|
||||
<u-image border-radius="20" width='230' height="230" :src="item.thumbnail"></u-image>
|
||||
</div>
|
||||
<div class="goods">
|
||||
<div class="wes-2">
|
||||
@@ -113,6 +113,7 @@ page {
|
||||
color: $light-color;
|
||||
}
|
||||
.goods {
|
||||
margin: 0 20rpx;
|
||||
display: flex;
|
||||
flex: 2;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import popupGoods from "@/pages/cart/payment/popup/goods"; //购物车商品的模块
|
||||
import popupGoods from "@/components/m-buy/goods"; //购物车商品的模块
|
||||
import { getPointsGoodsDetail } from "@/api/promotions";
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<div class="user-point">
|
||||
<!-- <div class="point-rule">积分规则</div> -->
|
||||
<div class="point-wrapper">
|
||||
<u-image shape="circle" :lazy-load="true" width="100" height="100" :src="userInfo.face || '/static/missing-face.png'"></u-image>
|
||||
<u-image shape="circle" :lazy-load="true" width="100" height="100"
|
||||
:src="userInfo.face || '/static/missing-face.png'"></u-image>
|
||||
<div class="whether-point">
|
||||
<div>你的可用积分:<span class="point">{{userInfo.point || 0}}</span></div>
|
||||
</div>
|
||||
@@ -10,18 +11,22 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getUserInfo } from "@/api/members";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userInfo: this.$options.filters.isLogin() || {},
|
||||
userInfo: {},
|
||||
};
|
||||
},
|
||||
mounted (){
|
||||
this.init()
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
|
||||
async init() {
|
||||
let res = await getUserInfo();
|
||||
if (res.data.success) {
|
||||
this.userInfo = res.data.result;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -33,8 +38,8 @@ export default {
|
||||
background: url("/static/point-bg.png") no-repeat;
|
||||
background-size: 100%;
|
||||
}
|
||||
.point{
|
||||
font-size: 40rpx;
|
||||
.point {
|
||||
font-size: 40rpx;
|
||||
}
|
||||
.point-rule {
|
||||
color: #fff;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 76 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 36 KiB |
Reference in New Issue
Block a user