【调整】重写拼团前端列表,拼团详情,拼团首页组件,拼团海报等数据获取规则,减少不必要的数据查询,增加redis缓存,提升访问速度,调整拼团海报为新海报模式。

【优化】优化分享识别跳转页面【jump】代码。
This commit is contained in:
大灰灰
2022-10-21 05:41:25 +08:00
parent 91e6cb2432
commit adfbbc783e
21 changed files with 485 additions and 329 deletions

View File

@@ -57,7 +57,7 @@
type: Number,
default: 1
},
//拼团id
//拼团Id/团购Id/秒杀Id
groupId: {
type: Number,
default: 0
@@ -83,6 +83,11 @@
},
// 生成海报
createPoster() {
uni.showLoading({
title: '加载中',
mask: true
});
this.close()
let data = {};
if (this.shareType == this.$globalConstVars.shareType.index) {
data = {
@@ -100,9 +105,10 @@
}
} else if (this.shareType == this.$globalConstVars.shareType.pinTuan) {
data = {
page: this.shareType, //拼团
page: this.shareType,
url: this.$globalConstVars.shareUrl,
params: {
groupId: this.groupId,
goodsId: this.goodsId,
teamId: this.teamId
},
@@ -117,7 +123,7 @@
}
else if (this.shareType == this.$globalConstVars.shareType.group || this.shareType == this.$globalConstVars.shareType.seckill) {
data = {
page: this.shareType, //拼团
page: this.shareType,
url: this.$globalConstVars.shareUrl,
params: {
goodsId: this.goodsId,
@@ -182,9 +188,11 @@
}
this.$u.api.share(data).then(res => {
if (res.status) {
this.close()
if (this.shareType == this.$globalConstVars.shareType.goods) {
uni.hideLoading();
if (
this.shareType == this.$globalConstVars.shareType.goods ||
this.shareType == this.$globalConstVars.shareType.pinTuan
) {
//data.posterUrl = encodeURIComponent(res.data);
data.params.posterUrl = res.data;
data.params.shareType = this.shareType;
@@ -194,6 +202,7 @@
this.$u.route('/pages/share/sharePoster/sharePoster?poster=' + encodeURIComponent(res.data))
}
} else {
uni.hideLoading();
this.$u.toast(res.msg)
}
});

View File

@@ -1,5 +1,5 @@
.group-wrap { background: url('/static/images/pinTuan/pinTuanListBg.png') no-repeat; background-size: 100% 186px; }
.group-head { padding: 0 12.5px; height: 50px; line-height: 50px;
.group-head { padding: 0 12.5px; height: 80px; line-height: 80px;
.group-head__title { font-size: 16px; font-family: PingFang SC; font-weight: 500; color: rgba(255, 255, 255, 1); }
.group-head__notice { font-size: 13px; font-family: PingFang SC; font-weight: 500; color: rgba(255, 255, 255, 1); }
}

View File

@@ -19,29 +19,25 @@
</view>
<view class="group-box">
<view class="goods-item" v-for="(item, index) in goodsList" :key="item.id" v-if="goodsList.length>0">
<view class="activity-goods-box coreshop-flex coreshop-justify-start">
<view class="img-box">
<view class="coreshop-flex coreshop-justify-start coreshop-padding-left-10 coreshop-padding-top-10 coreshop-padding-bottom-10">
<view>
<view class="tag" v-if="index < 3">TOP{{ index + 1 }}</view>
<u--image :src="item.image" mode="widthFix" width="100%" height="104px" radius="10"></u--image>
<u--image :src="item.image" mode="widthFix" width="100px" height="100px" radius="10"></u--image>
</view>
<view class="goods-right coreshop-flex coreshop-flex-direction">
<view class="title u-line-2">{{ item.name }}</view>
<view class="tip u-line-1">{{ item.brief }}</view>
<view class="slod-end">
<view class="coreshop-flex coreshop-align-center">
<view class="sell-box">
<text class="cuIcon-hotfill"></text>
<text class="sell-num">已拼{{ item.buyPinTuanCount }}</text>
</view>
<text class="group-num">{{ item.pinTuanRule.peopleNumber || 0 }}人团</text>
</view>
<view class="goods-right coreshop-flex coreshop-flex-direction coreshop-padding-left-10 coreshop-padding-right-10">
<view class="title u-line-2 coreshop-text-black">{{ item.pinTuanRule.name }}</view>
<view class="tip u-line-2 coreshop-text-grey">{{ item.name }}</view>
<view class="coreshop-flex coreshop-align-center coreshop-padding-top-10 coreshop-padding-bottom-10">
<u-tag :text="'已拼'+item.pinTuanRecordNums+'单'" type="warning coreshop-margin-right-5 coreshop-font-10" shape="circle" size="mini"></u-tag>
<u-tag :text="'已售'+item.buyCount+ item.unit" type="warning coreshop-margin-right-5 coreshop-font-10" shape="circle" size="mini"></u-tag>
<u-tag :text="(item.pinTuanRule.peopleNumber || 0) +'人团'" type="success coreshop-font-10" shape="circle" size="mini"></u-tag>
</view>
<view class="coreshop-flex coreshop-justify-between coreshop-margin-top-2">
<view class="coreshop-flex coreshop-justify-between coreshop-flex-direction-row coreshop-align-center">
<view class="coreshop-flex coreshop-align-center">
<view class="current">{{ item.pinTuanPrice }}</view>
<view class="original">{{ item.price }}</view>
</view>
<button class="cu-btn buy-btn" @tap="goPinTuanDetail(item.id,item.pinTuanRule.id)">马上拼</button>
<view class="cu-btn buy-btn" @tap="goPinTuanDetail(item.id,item.pinTuanRule.id)">马上拼</view>
</view>
</view>
</view>
@@ -62,9 +58,8 @@
</template>
<script>
var _this;
export default {
data() {
return {
goodsList: [],
@@ -79,14 +74,18 @@
},
//加载执行
onShow: function () {
this.getGoods();
_this = this
_this.getGoods();
},
methods: {
//取得列表数据
getGoods: function () {
uni.showLoading({
title: '加载中',
mask: true
});
var _this = this;
let data = {};
_this.$u.api.pinTuanList(data).then(res => {
_this.$u.api.pinTuanList().then(res => {
if (res.status) {
_this.goodsList = res.data;
if (_this.goodsList) {
@@ -94,10 +93,13 @@
if (item.pinTuanPrice <= 0) {
item.pinTuanPrice = '0.00';
} else {
item.pinTuanPrice = this.$common.moneySub(item.price, item.pinTuanRule.discountAmount);
item.pinTuanPrice = _this.$common.moneySub(item.price, item.pinTuanRule.discountAmount);
}
});
}
uni.hideLoading();
} else {
uni.hideLoading();
}
});
}

View File

@@ -1,5 +1,4 @@

.groupHeight { height: 61px !important; }
.groupHeight { height: 61px !important; }
.group-swiper-c { height: 121px; }
.group-swiper-c .swiper-item .coreshop-cell-item { height: 50%; }

View File

@@ -318,13 +318,13 @@
<view class="coreshop-padding-0">
<u-popup mode="bottom" :show="shareBox" ref="share">
<!-- #ifdef H5 -->
<coreshop-share-h5 :shareType='$globalConstVars.shareType.pinTuan' :goodsId="goodsInfo.id" :shareImg="goodsInfo.image" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></coreshop-share-h5>
<coreshop-share-h5 :shareType='$globalConstVars.shareType.pinTuan' :goodsId="goodsInfo.id" :groupId="pinTuanId" :shareImg="goodsInfo.image" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></coreshop-share-h5>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<coreshop-share-wx :shareType='$globalConstVars.shareType.pinTuan' :goodsId="goodsInfo.id" :shareImg="goodsInfo.image" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></coreshop-share-wx>
<coreshop-share-wx :shareType='$globalConstVars.shareType.pinTuan' :goodsId="goodsInfo.id" :groupId="pinTuanId" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></coreshop-share-wx>
<!-- #endif -->
<!-- #ifdef APP-PLUS || APP-PLUS-NVUE -->
<coreshop-share-app :shareType='$globalConstVars.shareType.pinTuan' :goodsId="goodsInfo.id" :shareImg="goodsInfo.image" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></coreshop-share-app>
<coreshop-share-app :shareType='$globalConstVars.shareType.pinTuan' :goodsId="goodsInfo.id" :groupId="pinTuanId" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></coreshop-share-app>
<!-- #endif -->
</u-popup>
<div id="qrCode" ref="qrCodeDiv"></div>
@@ -548,7 +548,7 @@
discountsGoodsSkuInfo: {},
goodsId: 0, // 商品id
pinTuanId: 0, // 团ID
pinTuanId: 0, // 团ID
goodsInfo: {}, // 商品详情
cartNums: 0, // 购物车数量
product: {}, // 货品详情
@@ -771,8 +771,8 @@
// 获取商品详情
getGoodsInfo() {
let data = {
id: this.goodsId,
data: 1
id: this.pinTuanId,
data: true,
};
// 如果用户已经登录 要传用户token
let userToken = this.$db.get('userToken');
@@ -1003,14 +1003,11 @@
type: 1,
page: 3,
params: {
groupId: this.pinTuanId,
goodsId: this.goodsId,
teamId: this.teamId
}
};
//let userToken = this.$db.get('userToken');
//if (userToken && userToken != '') {
// data['token'] = userToken;
//}
this.$u.api.share(data).then(res => {
this.shareUrl = res.data
});

View File

@@ -4,69 +4,87 @@
</view>
</template>
<script>
var _this;
export default {
data() {
return {};
},
onLoad(e) {
_this = this;
if (e.scene) {
this.deshare(e.scene);
_this.deshare(e.scene);
} else {
this.gotoIndex();
_this.gotoIndex();
}
},
methods: {
deshare(data) {
this.$u.api.deshare({ code: data }).then(res => {
//console.log("跳转接值", data);
_this.$u.api.deshare({ code: data }).then(res => {
//console.log("解密参数", data);
if (res.status) {
this.saveInviteCode(res.data.userShareCode); //存储邀请码
switch (res.data.page) {
case '1': //首页
this.gotoIndex(); //正常
_this.saveInviteCode(res.data.userShareCode); //存储邀请码
var pageType = parseInt(res.data.page);
switch (pageType) {
//首页
case _this.$globalConstVars.shareType.index:
_this.gotoIndex();
break;
case '2': //商品
this.gotoGoods(res.data.params.goodsId); //正常
//商品
case _this.$globalConstVars.shareType.goods:
_this.gotoGoods(res.data.params.goodsId);
break;
case '3': //拼团
this.gotoPinTuan(res.data.params.goodsId, res.data.params.teamId); //正常
//拼团
case _this.$globalConstVars.shareType.pinTuan:
_this.gotoPinTuan(res.data.params.groupId, res.data.params.goodsId, res.data.params.teamId)
break;
case '4': //店铺邀请
this.gotoStore(res.data.params.store); //正常
//店铺邀请
case _this.$globalConstVars.shareType.inv:
_this.gotoStore(res.data.params.store);
break;
case '5': //文章页面
this.gotoArticle(res.data.params.articleId, res.data.params.articleType); //正常
//文章页面
case _this.$globalConstVars.shareType.article:
_this.gotoArticle(res.data.params.articleId, res.data.params.articleType);
break;
case '6': //参团页面
this.gotoInvitationGroup(res.data.params.goodsId, res.data.params.groupId, res.data.params.teamId)
//参团页面
case _this.$globalConstVars.shareType.addPinTuan:
_this.gotoInvitationGroup(res.data.params.groupId, res.data.params.goodsId, res.data.params.teamId)
break;
case '7': //自定义页面
this.gotoCustom(res.data.params.pageCode);
//自定义页面
case _this.$globalConstVars.shareType.page:
_this.gotoCustom(res.data.params.pageCode);
break;
case '8': //智能表单
this.gotoForm(res.data.params.id)
//智能表单
case _this.$globalConstVars.shareType.form:
_this.gotoForm(res.data.params.id)
break;
case '9': //团购
this.gotoGroup(res.data.params.goodsId, res.data.params.groupId); //正常
//团购
case _this.$globalConstVars.shareType.group:
_this.gotoGroup(res.data.params.goodsId, res.data.params.groupId);
break;
case '10': //秒杀
this.gotoSeckill(res.data.params.goodsId, res.data.params.groupId); //正常
//秒杀
case _this.$globalConstVars.shareType.seckill:
_this.gotoSeckill(res.data.params.goodsId, res.data.params.groupId);
break;
case '11': //代理商
this.gotoAgentStore(res.data.params.store); //正常
//代理商
case _this.$globalConstVars.shareType.agent:
_this.gotoAgentStore(res.data.params.store);
break;
case '12': //接龙
this.gotoSolitaire(res.data.params.id); //正常
//接龙
case _this.$globalConstVars.shareType.solitaire:
_this.gotoSolitaire(res.data.params.id);
break;
default:
this.gotoIndex();//正常
_this.gotoIndex();
break;
}
} else {
this.$refs.uToast.show({
message: '失败', type: 'error', complete: function () {
uni.navigateBack({
delta: 1
});
_this.$refs.uToast.show({
message: '跳转失败', type: 'error', complete: function () {
//uni.navigateBack({
// delta: 1
//});
_this.gotoIndex();
}
});
}
@@ -75,108 +93,172 @@
//存储邀请码
saveInviteCode(invite) {
if (invite && invite != '') {
this.$db.set('invitecode', invite);
_this.$db.set('invitecode', invite);
}
},
//跳转到首页
gotoIndex() {
this.$u.route({ type: 'switchTab', url: '/pages/index/default/default' });
_this.$u.route({ type: 'switchTab', url: '/pages/index/default/default' });
},
//跳转到商品
gotoGoods(id) {
if (id && id != '') {
let url = '/pages/goods/goodDetails/goodDetails?id=' + id;
this.$u.route({ type: 'redirectTo', url: url });
if (id) {
uni.$u.route({
url: '/pages/goods/goodDetails/goodDetails',
type: 'redirectTo',
params: {
id: id
}
})
} else {
this.gotoIndex();
_this.gotoIndex();
}
},
//跳转到文章
gotoArticle(id, idType) {
if (id && id != '') {
let url = '/pages/article/details/details?id=' + id + '&idType=' + idType;
this.$u.route({ type: 'redirectTo', url: url });
if (id) {
uni.$u.route({
url: '/pages/article/details/details',
type: 'redirectTo',
params: {
id: id,
idType: idType
}
})
} else {
this.gotoIndex();
_this.gotoIndex();
}
},
//跳转到拼团
gotoPinTuan(id, teamId) {
if (id && id != '') {
let url = '/pages/activity/pinTuan/pinTuanDetails/pinTuanDetails?id=' + id + '&teamId=' + teamId;
this.$u.route({ type: 'redirectTo', url: url });
gotoPinTuan(groupId, goodsId, teamId) {
if (groupId && goodsId && teamId) {
uni.$u.route({
url: '/pages/activity/pinTuan/pinTuanDetails/pinTuanDetails',
type: 'redirectTo',
params: {
id: goodsId,
teamId: teamId,
pinTuanId: groupId,
}
})
} else {
this.gotoIndex();
_this.gotoIndex();
}
},
//跳转到参团
gotoInvitationGroup(groupId, goodsId, teamId) {
if (groupId && goodsId && teamId) {
uni.$u.route({
url: '/pages/activity/pinTuan/pinTuanDetails/pinTuanDetails',
type: 'redirectTo',
params: {
id: goodsId,
teamId: teamId,
pinTuanId: groupId,
}
})
} else {
_this.gotoIndex();
}
},
//跳转到团购
gotoGroup(id, groupId) {
if (id && id != '') {
let url = '/pages/activity/groupBuying/groupBuyingDetails/groupBuyingDetails?id=' + id + '&groupId=' + groupId;
this.$u.route({ type: 'redirectTo', url: url });
if (id && groupId) {
uni.$u.route({
url: '/pages/activity/groupBuying/groupBuyingDetails/groupBuyingDetails',
type: 'redirectTo',
params: {
id: id,
groupId: groupId
}
})
} else {
this.gotoIndex();
_this.gotoIndex();
}
},
//跳转到秒杀
gotoSeckill(id, groupId) {
if (id && id != '') {
let url = '/pages/activity/seckill/seckillDetails/seckillDetails?id=' + id + '&groupId=' + groupId;
this.$u.route({ type: 'redirectTo', url: url });
if (id && groupId) {
uni.$u.route({
url: '/pages/activity/seckill/seckillDetails/seckillDetails',
type: 'redirectTo',
params: {
id: id,
groupId: groupId
}
})
} else {
this.gotoIndex();
}
},
//跳转到参团
gotoInvitationGroup(goodsId, groupId, teamId) {
if (goodsId && groupId && teamId) {
let url = '/pages/activity/pinTuan/pinTuanDetails/pinTuanDetails?id=' + goodsId + '&pinTuanId=' + groupId + '&teamId=' + teamId;
this.$u.route({ type: 'redirectTo', url: url });
} else {
this.gotoIndex();
_this.gotoIndex();
}
},
//跳转到自定义页
gotoCustom(pageCode) {
if (pageCode && pageCode != '') {
let url = '/pages/index/custom/custom?pageCode=' + pageCode;
this.$u.route({ type: 'redirectTo', url: url });
if (pageCode) {
uni.$u.route({
url: '/pages/index/custom/custom',
type: 'redirectTo',
params: {
pageCode: pageCode
}
})
} else {
this.gotoIndex();
_this.gotoIndex();
}
},
//跳转分销商商家门店
gotoStore(id) {
if (id && id != '') {
let url = '/pages/member/distribution/myStore/myStore?store=' + id;
this.$u.route({ type: 'redirectTo', url: url });
if (id) {
uni.$u.route({
url: '/pages/member/distribution/myStore/myStore',
type: 'redirectTo',
params: {
id: id
}
})
} else {
this.gotoIndex();
_this.gotoIndex();
}
},
//跳转代理商商家门店
gotoAgentStore(id) {
if (id && id != '') {
let url = '/pages/member/agent/myStore/myStore?store=' + id;
this.$u.route({ type: 'redirectTo', url: url });
if (id) {
uni.$u.route({
url: '/pages/member/agent/myStore/myStore',
type: 'redirectTo',
params: {
id: id
}
})
} else {
this.gotoIndex();
_this.gotoIndex();
}
},
//跳转表单
gotoForm(id) {
if (id && id != '') {
let url = '/pages/form/details/details?id=' + id;
this.$u.route({ type: 'redirectTo', url: url });
if (id) {
uni.$u.route({
url: '/pages/form/details/details',
type: 'redirectTo',
params: {
id: id
}
})
} else {
this.gotoIndex();
_this.gotoIndex();
}
},
//跳转表单
//跳转接龙
gotoSolitaire(id) {
if (id && id != '') {
let url = '/pages/activity/solitaire/solitaireDetails/solitaireDetails?id=' + id;
this.$u.route({ type: 'redirectTo', url: url });
if (id) {
uni.$u.route({
url: '/pages/activity/solitaire/solitaireDetails/solitaireDetails',
type: 'redirectTo',
params: {
id: id
}
})
} else {
this.gotoIndex();
_this.gotoIndex();
}
}
}

View File

@@ -18,25 +18,27 @@
<l-painter-image :src="userInfo.avatarImage" css="margin-left: 40rpx; margin-top: 40rpx; width: 84rpx; height: 84rpx; border-radius: 50%;" />
<l-painter-view css="margin-top: 40rpx; padding-left: 20rpx; display: inline-block">
<l-painter-text :text="userInfo.nickName" css="display: block; padding-bottom: 10rpx; color: #fff; font-size: 32rpx; fontWeight: bold" />
<l-painter-text text="为您挑选了一个好物" css="color: rgba(255,255,255,.7); font-size: 24rpx" />
<l-painter-text :text="showModel.describe" css="color: rgba(255,255,255,.7); font-size: 24rpx" />
</l-painter-view>
<l-painter-view css="margin-left: 40rpx; margin-top: 30rpx; padding: 32rpx; box-sizing: border-box; background: #fff; border-radius: 16rpx; width: 670rpx; box-shadow: 0 20rpx 58rpx rgba(0,0,0,.15)">
<l-painter-image :src="goodsInfo.image" css="object-fit: cover; object-position: 50% 50%; width: 606rpx; height: 606rpx; border-radius: 12rpx;" />
<l-painter-image :src="showModel.image" css="object-fit: cover; object-position: 50% 50%; width: 606rpx; height: 606rpx; border-radius: 12rpx;" />
<l-painter-view css="margin-top: 32rpx; color: #FF0000; font-weight: bold; font-size: 28rpx; line-height: 1em;">
<l-painter-text text="¥" css="vertical-align: bottom" />
<l-painter-text :text="products.price" css="vertical-align: bottom; font-size: 58rpx" />
<l-painter-text :text="showModel.price" css="vertical-align: bottom; font-size: 58rpx" />
<l-painter-text text="元" css="vertical-align: bottom" />
<l-painter-text :text="'¥'+ products.mktprice" css="vertical-align: bottom; padding-left: 10rpx; font-weight: normal; text-decoration: line-through; color: #999999" />
<l-painter-text :text="'¥'+ showModel.mktprice" css="vertical-align: bottom; padding-left: 10rpx; font-weight: normal; text-decoration: line-through; color: #999999" />
</l-painter-view>
<l-painter-view css="margin-top: 32rpx; font-size: 26rpx; color: #8c5400" v-if="showPinTuanArguments">
<l-painter-text :text="'截止:'+showModel.pinTuan.endTime" css="color: #212121; background: #ffb400;" />
<l-painter-text :text="showModel.pinTuan.peopleNumber+'人团'" css="margin-left: 16rpx; background: #fff4d9; text-decoration: line-through;" />
<!--<l-painter-text text="满减优惠" css="margin-left: 16rpx; background: #fff4d9" />-->
</l-painter-view>
<l-painter-view css="margin-top: 32rpx; font-size: 26rpx; color: #8c5400">
<!--<l-painter-text text="自营" css="color: #212121; background: #ffb400;" />
<l-painter-text text="30天最低价" css="margin-left: 16rpx; background: #fff4d9; text-decoration: line-through;" />
<l-painter-text text="满减优惠" css="margin-left: 16rpx; background: #fff4d9" />-->
<l-painter-text :text="goodsInfo.brief" css="margin-left: 16rpx; background: #fff4d9" />
<l-painter-text :text="showModel.brief" css="margin-left: 16rpx; background: #fff4d9" />
</l-painter-view>
<l-painter-view css="margin-top: 30rpx">
<l-painter-text css="line-clamp: 2; color: #333333; line-height: 1.8em; font-size: 36rpx; width: 478rpx; padding-right:32rpx; box-sizing: border-box"
:text="goodsInfo.name"></l-painter-text>
:text="showModel.name"></l-painter-text>
<l-painter-image :src="poster" css="width: 128rpx; height: 128rpx;" />
<!--<l-painter-qrcode css="width: 128rpx; height: 128rpx;" text="limeui.qcoon.cn"></l-painter-qrcode>-->
</l-painter-view>
@@ -65,40 +67,90 @@
</view>
</template>
<script>
var _this;
export default {
data() {
return {
poster: '',
path: '',
userInfo: {},
goodsInfo: {},
products: {},
priceSection:'',
priceSection: '',
showModel: {
describe: '为您挑选了一个好物',
price: 0.00,
mktprice: 0.00,
brief: '',
image: '',
name: '',
pinTuan: {
endTime: '',
peopleNumber: 0,
},
},
showPinTuanArguments: false
};
},
onLoad(options) {
var _this = this;
this.poster = decodeURIComponent(options.posterUrl);
this.userInfo = this.$store.state.userInfo;
console.log("接收传输数据:", options);
_this = this;
_this.poster = decodeURIComponent(options.posterUrl);
_this.userInfo = this.$store.state.userInfo;
uni.showLoading({
title: '加载中'
});
if (options.shareType == this.$globalConstVars.shareType.goods) {
if (options.shareType == _this.$globalConstVars.shareType.goods) {
let data = {
id: parseInt(options.goodsId)
}
this.$u.api.goodsDetail(data).then(res => {
_this.$u.api.goodsDetail(data).then(res => {
if (res.status == true) {
console.log(res.data);
_this.goodsInfo = res.data;
_this.products = res.data.product;
_this.showModel.image = res.data.image;
_this.showModel.brief = res.data.brief;
_this.showModel.name = res.data.name;
_this.showModel.price = res.data.product.price;
_this.showModel.mktprice = res.data.product.mktprice;
setTimeout(function () {
_this.canvasToTempFilePath();
uni.hideLoading();
}, 1000);
} else {
_this.$refs.uToast.show({
message: res.msg, type: 'error', complete: function () {
uni.navigateBack({
delta: 1
});
}
})
}
})
} else if (options.shareType == _this.$globalConstVars.shareType.pinTuan) {
let data = {
id: parseInt(options.groupId),
data: false,
}
_this.$u.api.pinTuanGoodsInfo(data).then(res => {
if (res.status == true) {
console.log(res.data);
_this.showModel.describe = "为您推荐了一个拼团活动";
_this.showModel.image = res.data.image;
_this.showModel.brief = res.data.name;
_this.showModel.name = res.data.pinTuanRule.name;
_this.showModel.price = res.data.pinTuanPrice;
_this.showModel.mktprice = res.data.mktprice;
_this.showPinTuanArguments = true;
_this.showModel.pinTuan.endTime = res.data.pinTuanRule.endTime;
_this.showModel.pinTuan.peopleNumber = res.data.pinTuanRule.peopleNumber;
setTimeout(function () {
_this.canvasToTempFilePath();
uni.hideLoading();
}, 1000);
} else {
_this.$refs.uToast.show({
message: res.msg, type: 'error', complete: function () {

View File

@@ -616,13 +616,16 @@ u-icon { line-height: 0; }
/*拼团*/
.group-box { background: linear-gradient(#fff, #f5f5f5); border-radius: 10px; margin: 0 10px 10px 10px; min-height: 500px;
.goods-item { border-radius: 10px; overflow: hidden; position: relative; margin-bottom: 10px;
.goods-item { border-radius: 10px; overflow: hidden; position: relative; margin-bottom: 10px; background: #fff;
.tag { position: absolute; left: 0; top: 5px; z-index: 2; line-height: 17.5px; background: linear-gradient(132deg, rgba(255, 153, 93, 1), rgba(255, 99, 97, 1)); border-radius: 0px 9px 9px 0px; padding: 0 5px; font-size: 12px; font-family: PingFang SC; font-weight: bold; color: rgba(255, 255, 255, 0.8); }
.goods-right {
.title { color: $u-main-color }
.tip { }
.title { font-size: 14px; line-height: 20px; }
.tip { font-size: 11px; color: #a8700d; padding: 3px 0; }
.current { font-size: 14px; font-weight: 500; color: rgba(225, 33, 43, 1); }
.original { font-size: 11px; font-weight: 400; text-decoration: line-through; color: rgba(153, 153, 153, 1); margin-left: 7px; }
.u-tag__text { font-size: 11px; }
}
.buy-btn { width: 130px; height: 30px; background: linear-gradient(90deg, rgba(254, 131, 42, 1), rgba(255, 102, 0, 1)); box-shadow: 0px 3.5px 3px 0px rgba(255, 104, 4, 0.22); border-radius: 15px; font-size: 14px; font-family: PingFang SC; font-weight: 500; color: #fff; padding: 0; }
.buy-btn { width: 130px; height: 30px; background: linear-gradient(90deg, rgba(254, 131, 42, 1), rgba(255, 102, 0, 1)); box-shadow: 0px 3.5px 3px 0px rgba(255, 104, 4, 0.22); border-radius: 15px; font-size: 14px; font-family: PingFang SC; font-weight: 500; color: #fff; padding: 0; text-align: center; line-height: 30px; }
.group-num { font-size: 10px; font-family: PingFang SC; font-weight: 500; color: rgba(153, 153, 153, 1); margin-left: 10px; }
.sell-box { background: rgba(255, 224, 226, 0.3); border-radius: 8px; line-height: 16px; padding: 0 5px;
.sell-num { font-size: 10px; font-family: PingFang SC; font-weight: 400; color: rgba(247, 151, 156, 1); }
@@ -637,7 +640,7 @@ u-icon { line-height: 0; }
.img { width: 100px; height: 100px; background-color: #ccc; }
}
.goods-right { min-height: 100px; position: relative;
.title { font-size: 14px; line-height: 20px; }
.title { font-size: 15px; line-height: 20px; }
.tip { font-size: 11px; color: #a8700d; padding: 3px 0; }
.current { font-size: 14px; font-weight: 500; color: rgba(225, 33, 43, 1); }
.original { font-size: 11px; font-weight: 400; text-decoration: line-through; color: rgba(153, 153, 153, 1); margin-left: 7px; }

View File

@@ -616,13 +616,16 @@ u-icon { line-height: 0; }
/*拼团*/
.group-box { background: linear-gradient(#fff, #f5f5f5); border-radius: 10px; margin: 0 10px 10px 10px; min-height: 500px;
.goods-item { border-radius: 10px; overflow: hidden; position: relative; margin-bottom: 10px;
.goods-item { border-radius: 10px; overflow: hidden; position: relative; margin-bottom: 10px; background: #fff;
.tag { position: absolute; left: 0; top: 5px; z-index: 2; line-height: 17.5px; background: linear-gradient(132deg, rgba(255, 153, 93, 1), rgba(255, 99, 97, 1)); border-radius: 0px 9px 9px 0px; padding: 0 5px; font-size: 12px; font-family: PingFang SC; font-weight: bold; color: rgba(255, 255, 255, 0.8); }
.goods-right {
.title { color: $u-main-color }
.tip { }
.title { font-size: 14px; line-height: 20px; }
.tip { font-size: 11px; color: #a8700d; padding: 3px 0; }
.current { font-size: 14px; font-weight: 500; color: rgba(225, 33, 43, 1); }
.original { font-size: 11px; font-weight: 400; text-decoration: line-through; color: rgba(153, 153, 153, 1); margin-left: 7px; }
.u-tag__text { font-size: 11px; }
}
.buy-btn { width: 130px; height: 30px; background: linear-gradient(90deg, rgba(254, 131, 42, 1), rgba(255, 102, 0, 1)); box-shadow: 0px 3.5px 3px 0px rgba(255, 104, 4, 0.22); border-radius: 15px; font-size: 14px; font-family: PingFang SC; font-weight: 500; color: #fff; padding: 0; }
.buy-btn { width: 130px; height: 30px; background: linear-gradient(90deg, rgba(254, 131, 42, 1), rgba(255, 102, 0, 1)); box-shadow: 0px 3.5px 3px 0px rgba(255, 104, 4, 0.22); border-radius: 15px; font-size: 14px; font-family: PingFang SC; font-weight: 500; color: #fff; padding: 0; text-align: center; line-height: 30px; }
.group-num { font-size: 10px; font-family: PingFang SC; font-weight: 500; color: rgba(153, 153, 153, 1); margin-left: 10px; }
.sell-box { background: rgba(255, 224, 226, 0.3); border-radius: 8px; line-height: 16px; padding: 0 5px;
.sell-num { font-size: 10px; font-family: PingFang SC; font-weight: 400; color: rgba(247, 151, 156, 1); }
@@ -637,7 +640,7 @@ u-icon { line-height: 0; }
.img { width: 100px; height: 100px; background-color: #ccc; }
}
.goods-right { min-height: 100px; position: relative;
.title { font-size: 14px; line-height: 20px; }
.title { font-size: 15px; line-height: 20px; }
.tip { font-size: 11px; color: #a8700d; padding: 3px 0; }
.current { font-size: 14px; font-weight: 500; color: rgba(225, 33, 43, 1); }
.original { font-size: 11px; font-weight: 400; text-decoration: line-through; color: rgba(153, 153, 153, 1); margin-left: 7px; }