|
@@ -119,13 +119,13 @@
|
|
|
|
|
|
<view class="all-products-body" v-for="(item, index) in storeInfo.goodsList" :key="index">
|
|
|
|
|
|
- <view :id="'goods'+item.id" class="all-products-item" @click="getGoodsDetails(item.id)">
|
|
|
+ <view :id="'goods'+item.id" class="all-products-item">
|
|
|
<image
|
|
|
:src="item.goodsCover"
|
|
|
- mode="scaleToFill" />
|
|
|
+ mode="scaleToFill" @click="getGoodsDetails(item.id)"/>
|
|
|
|
|
|
<view class="all-products-item-content">
|
|
|
- <view class="all-products-item-content-t">
|
|
|
+ <view class="all-products-item-content-t" @click="getGoodsDetails(item.id)">
|
|
|
{{item.goodsName}}
|
|
|
</view>
|
|
|
<view class="all-products-item-content-b">
|
|
@@ -521,24 +521,22 @@ export default {
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
onLoad (options) {
|
|
|
- console.log("options -》 ",options);
|
|
|
- let that = this;
|
|
|
- that.selfTakeId = options.selfTakeId;
|
|
|
- that.organizerUserId = options.organizerUserId;
|
|
|
- console.log("+++++++++++获取到的推荐人ID:"+options.inviteUserId+"+++++++++++++++")
|
|
|
- if(options.inviteUserId){
|
|
|
- this.$Cache.set('INVITE_USER_ID', options.inviteUserId);
|
|
|
- if (this.isLogin){
|
|
|
- console.log("+++++++++++获取到的推荐人ID:"+options.inviteUserId+"+++++++++++++++")
|
|
|
- console.log("+++++++++++++++++调用绑定接口bindParentId开始+++++++++++++++++++++++")
|
|
|
- bindParentId(options.inviteUserId).then(res=>{
|
|
|
- this.$Cache.clear('INVITE_USER_ID');
|
|
|
- })
|
|
|
- console.log("+++++++++++++++++调用绑定接口bindParentId结束+++++++++++++++++++++++")
|
|
|
+ let that = this;
|
|
|
+ that.selfTakeId = options.selfTakeId;
|
|
|
+ that.organizerUserId = options.organizerUserId;
|
|
|
+ console.log("+++++++++++获取到的推荐人ID:"+options.inviteUserId+"+++++++++++++++")
|
|
|
+ if(options.inviteUserId){
|
|
|
+ this.$Cache.set('INVITE_USER_ID', options.inviteUserId);
|
|
|
+ if (this.isLogin){
|
|
|
+ console.log("+++++++++++获取到的推荐人ID:"+options.inviteUserId+"+++++++++++++++")
|
|
|
+ console.log("+++++++++++++++++调用绑定接口bindParentId开始+++++++++++++++++++++++")
|
|
|
+ bindParentId(options.inviteUserId).then(res=>{
|
|
|
+ this.$Cache.clear('INVITE_USER_ID');
|
|
|
+ })
|
|
|
+ console.log("+++++++++++++++++调用绑定接口bindParentId结束+++++++++++++++++++++++")
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- console.log(this.userInfo);
|
|
|
uni.hideShareMenu();
|
|
|
console.log("是否登录:" + this.isLogin);
|
|
|
// 判断是否登录
|
|
@@ -560,9 +558,16 @@ export default {
|
|
|
})
|
|
|
}, 1500);
|
|
|
} else {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中...'
|
|
|
+ });
|
|
|
+ this.getGrouponDetail(options.id);
|
|
|
+ setTimeout(()=>{
|
|
|
+
|
|
|
+
|
|
|
console.log("受邀的推荐码:" + options.inviteCode);
|
|
|
console.log("受邀的商品id:" + options.id);
|
|
|
- let that = this;
|
|
|
+
|
|
|
var pages = getCurrentPages();
|
|
|
that.returnShow = pages.length === 1 ? false : true;
|
|
|
// #ifdef MP
|
|
@@ -603,17 +608,20 @@ export default {
|
|
|
url: 1,
|
|
|
});
|
|
|
} else {
|
|
|
-
|
|
|
that.id = options.id;
|
|
|
- console.log("xxxx -> ", that.id, options.id)
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
//记录推广人uid
|
|
|
if (options.spid) app.globalData.spid = options.spid;
|
|
|
// #endif
|
|
|
// that.getGoodsDetails();
|
|
|
// that.getCouponList(0);
|
|
|
- that.getGrouponDetail();
|
|
|
+ uni.hideLoading();
|
|
|
+
|
|
|
+ },500)
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
onReady: function () {
|
|
|
this.isNodes++;
|
|
@@ -860,38 +868,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- /*
|
|
|
- *去商品详情页
|
|
|
- */
|
|
|
- goDetail (item) {
|
|
|
- if (item.activity.length == 0) {
|
|
|
- uni.redirectTo({
|
|
|
- url: "/pages/goods_details/index?id=" + item.id,
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- // 砍价
|
|
|
- if (item.activity && item.activity.type == 2) {
|
|
|
- uni.redirectTo({
|
|
|
- url: `/pages/activity/goods_bargain_details/index?id=${item.activity.id}&bargain=${this.uid}`,
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- // 拼团
|
|
|
- if (item.activity && item.activity.type == 3) {
|
|
|
- uni.redirectTo({
|
|
|
- url: `/pages/activity/goods_combination_details/index?id=${item.activity.id}`,
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- // 秒杀
|
|
|
- if (item.activity && item.activity.type == 1) {
|
|
|
- uni.redirectTo({
|
|
|
- url: `/pages/activity/goods_seckill_details/index?id=${item.activity.id}&time=${item.activity.time}&status=1`,
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- },
|
|
|
// 微信登录回调
|
|
|
onLoadFun: function (e) {
|
|
|
// this.getUserInfo();
|
|
@@ -993,10 +969,9 @@ export default {
|
|
|
.exec();
|
|
|
},
|
|
|
|
|
|
- getGrouponDetail() {
|
|
|
+ getGrouponDetail(id) {
|
|
|
let that = this;
|
|
|
- console.log(that.id)
|
|
|
- detailGroupon({grouponId: that.id}).then((res) => {
|
|
|
+ detailGroupon({grouponId: id}).then((res) => {
|
|
|
that.storeInfo = res.data
|
|
|
this.isShowBottom = this.getIsShowBottom(res.data.grouponEndTime)
|
|
|
if (this.isShowBottom ){
|
|
@@ -1030,53 +1005,25 @@ export default {
|
|
|
*
|
|
|
*/
|
|
|
getGoodsDetails (goodsId) {
|
|
|
- // uni.showLoading({ title: '团购信息加载中' });
|
|
|
- let that = this;
|
|
|
- this.$refs.popup.open()
|
|
|
- that.goods = {}
|
|
|
- // that.addGoodPopupShow = true
|
|
|
- goodsDetail({ id: goodsId, grouponId: that.id})
|
|
|
- .then((res) => {
|
|
|
-
|
|
|
- that.goods = res.data;
|
|
|
- // let storeInfo = res.data;
|
|
|
- // that.storeInfo = res.data
|
|
|
-
|
|
|
- // console.log('res.data.slideshowList', res.data.slideshowList);
|
|
|
- // res.data.imgList = res.data.slideshowList.map(e => {
|
|
|
- // return {
|
|
|
- // image: e,
|
|
|
- // title: ''
|
|
|
- // }
|
|
|
- // })
|
|
|
- // console.log('res.data', res.data);
|
|
|
- // // 处理分享
|
|
|
- // if (that.storeInfo.zoneType == 8) {
|
|
|
- // that.sharePacket.isState = true
|
|
|
- // }
|
|
|
- // that.skuArr = storeInfo.goodsSpecList
|
|
|
- // that.$set(that, "storeInfo", storeInfo);
|
|
|
- // that.$set(that.attr, "productAttr", storeInfo.goodsSpecList);
|
|
|
- // // that.downloadFilestoreImage();
|
|
|
- // that.getUserAddressByUserId()
|
|
|
- // setTimeout(function () {
|
|
|
- // that.infoScroll();
|
|
|
- // }, 500);
|
|
|
- // setTimeout(() => {
|
|
|
- // this.showSkeleton = false;
|
|
|
- // }, 100);
|
|
|
- }).catch((err) => {
|
|
|
- //状态异常返回上级页面
|
|
|
- return that.$util.Tips({
|
|
|
- title: err.toString(),
|
|
|
- }, {
|
|
|
- tab: 3,
|
|
|
- url: 1,
|
|
|
- });
|
|
|
- });
|
|
|
- // this.sharePacket.isCanShare = false
|
|
|
- // this.sharePacket.isFristUrl = true
|
|
|
- // this.listenerActionSheet()
|
|
|
+ uni.showLoading({ title: '团购信息加载中' });
|
|
|
+ let that = this;
|
|
|
+ this.$refs.popup.open()
|
|
|
+ that.goods = {}
|
|
|
+ // that.addGoodPopupShow = true
|
|
|
+ goodsDetail({ id: goodsId, grouponId: that.id})
|
|
|
+ .then((res) => {
|
|
|
+ uni.hideLoading()
|
|
|
+ that.goods = res.data;
|
|
|
+ }).catch((err) => {
|
|
|
+ uni.hideLoading()
|
|
|
+ //状态异常返回上级页面
|
|
|
+ return that.$util.Tips({
|
|
|
+ title: err.toString(),
|
|
|
+ }, {
|
|
|
+ tab: 3,
|
|
|
+ url: 1,
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
infoScroll: function () {
|
|
|
var that = this,
|
|
@@ -2729,32 +2676,32 @@ action-sheet-item {
|
|
|
}
|
|
|
.lookGoods{
|
|
|
background-color: white;
|
|
|
- width: 150rpx;
|
|
|
- height: 190rpx;
|
|
|
+ width: 120rpx;
|
|
|
+ height: 150rpx;
|
|
|
border-radius: 4rpx;
|
|
|
overflow: hidden;
|
|
|
padding: 4rpx 4rpx;
|
|
|
position:fixed;
|
|
|
- bottom:60px;
|
|
|
+ bottom:140px;
|
|
|
right:5px;
|
|
|
z-index: 99;
|
|
|
- background-color: #999999;
|
|
|
+ background-color: #d4d2d2;
|
|
|
}
|
|
|
.lookGoodsImageView{
|
|
|
- width: 142rpx;
|
|
|
- height: 142rpx;
|
|
|
+ width: 112rpx;
|
|
|
+ height: 112rpx;
|
|
|
border-radius: 4rpx;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.lookGoodsImage{
|
|
|
- width: 142rpx;
|
|
|
- height: 142rpx;
|
|
|
+ width: 112rpx;
|
|
|
+ height: 112rpx;
|
|
|
}
|
|
|
.lookGoodsTextView{
|
|
|
display: flex;
|
|
|
- font-size: 26rpx;
|
|
|
- height: 40rpx;
|
|
|
- line-height: 40rpx;
|
|
|
+ font-size: 23rpx;
|
|
|
+ height: 30rpx;
|
|
|
+ line-height: 30rpx;
|
|
|
flex-direction: row;
|
|
|
justify-content: center;
|
|
|
margin-top: 4rpx;
|
|
@@ -2762,17 +2709,17 @@ action-sheet-item {
|
|
|
}
|
|
|
.lookGoodsNumberView{
|
|
|
border-radius: 5rpx;
|
|
|
- height: 40rpx;
|
|
|
- width: 60rpx;
|
|
|
+ height: 30rpx;
|
|
|
+ width: 30rpx;
|
|
|
text-align: center;
|
|
|
- background-color: #999999;
|
|
|
+ background-color: rgb(102,102,102);
|
|
|
color: white;
|
|
|
- font-size: 30rpx;
|
|
|
- line-height: 40rpx;
|
|
|
+ font-size: 25rpx;
|
|
|
+ line-height: 30rpx;
|
|
|
position:absolute;
|
|
|
top: 0rpx;
|
|
|
right: 0rpx;
|
|
|
- opacity: 0.7;
|
|
|
+ opacity: 0.5;
|
|
|
}
|
|
|
.page{
|
|
|
height: auto !important;
|