Authored by QC-L

修复页面布局错误的问题,添加占位符优化页面 review by 黄敬囿

... ... @@ -95,7 +95,7 @@ Component({
goMyList() {
wx.reLaunch({
url: '/pages/zeroSell/index?tabIndex=3',
url: '/pages/zeroSell/index?tabIndex=3&reload=0',
})
},
... ...
... ... @@ -11,8 +11,8 @@
<view class="group-product-name">{{group_product.product_name}}</view>
<view class="group-price">
<view class="group-prict-bg">
<text class="group-price-market">{{group_product.market_price_str}}</text>
<text class="group-price-collage">{{group_product.collage_price_str}}</text>
<text class="group-price-market">¥{{group_product.market_price}}</text>
<text class="group-price-collage">¥{{group_product.collage_price}}</text>
</view>
<image class="group-free-post" src="{{free_post}}"></image>
</view>
... ...
... ... @@ -53,11 +53,14 @@
.group-price-collage {
font-size: 32rpx;
color: #D0021B;
margin-left: 20rpx;
letter-spacing: 2rpx;
}
.group-prict-bg {
font-size: 22rpx;
color: #444444;
font-family: SanFranciscoText-Medium;
}
.group-free-post {
... ...
... ... @@ -4,9 +4,9 @@
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-around;
margin-left: 20rpx;
margin-right: 20rpx;
justify-content: space-between;
margin-left: 40rpx;
margin-right: 40rpx;
}
.space-line {
... ...
... ... @@ -17,7 +17,7 @@ import {
import {formatImageUrl} from '../../utils/util'
import {
Toast
Toast, Actionsheet
} from '../../vendors/zanui/index';
import router from './router/router';
import { jumpByUrl } from '../../libs/urlRoute';
... ... @@ -57,7 +57,28 @@ Page(Object.assign({
dialogUrl: null,
bannerSrc: null,
bannerUrl: null,
openType: 'getUserInfo'
openType: 'getUserInfo',
actionsheet: {
componentId: 'shareActionSheet',
show: false,
closeOnClickOverlay: true,
cancelText: '取消',
isNewShareStyle: true,
unionUserImageUrl: 'http://img12.static.yhbimg.com/sns/2018/08/02/15/029b6acc4f8bc0620ecd7ec2133fcf900c.png',
actions: [{
name: '分享给好友',
className: 'action-class',
loading: false,
openType: 'share',
image_src: '../../images/share_wechat@2x.png',
},
{
name: '生成海报分享',
className: 'action-class',
loading: false,
image_src: '../../images/share_wxpeng@2x.png'
}]
},
},
onLoad(options) {
... ... @@ -87,7 +108,9 @@ Page(Object.assign({
this._init();
}
new app.WeToast();
if(!(options && +options.reload === 0)) {
console.log(options.reload);
if(options && (Number(options.reload) !== 0)) {
console.log('执行了');
this._getResouceCode()
}
this._getBottomBanner()
... ... @@ -470,4 +493,71 @@ Page(Object.assign({
});
},
}, Toast));
\ No newline at end of file
share({ detail }) {
this.setData({
'actionsheet.show': true,
'shareProduct': detail
})
},
handleZanActionsheetCancel({ componentId }) {
this.setData({
'actionsheet.show': false
})
},
handleZanActionsheetClick({ componentId, index }) {
this.setData({
'actionsheet.show': false
});
let qrcode = this.service.getQrCode({
shareUid: app.getUid(),
actPrizeId: this.data.shareProduct.act_prize_id
});
if (index === 1) {
if (this.data.shareProduct.name) {
router.go('snapShare', {
product_name: this.data.shareProduct.name,
default_image: this.data.shareProduct.cover_img,
product_price: this.data.shareProduct.price,
product_qrCode: qrcode
});
}
};
},
onShareAppMessage(res) {
let params = {
TITLE: `【0元抽奖】点一下,免费拿走${this.data.shareProduct.name}`,
DESC: '我在YO!LUCK发现一个不错的商品赶快来看看吧!'
};
if (res.from === 'menu') {
// 用户点击右上角分享
return {
title: params.TITLE, // 分享标题
desc: params.DESC, // 分享描述
path: `pages/zeroSell/detail?actPrizeId=${this.data.shareProduct.act_prize_id}`,
imageUrl: this.data.shareProduct.cover_img,
success: function () {
},
fail: function () {
}
};
} else if (res.from === 'button') {
// 用户点击分享按钮
return {
title: params.TITLE, // 分享标题
desc: params.DESC, // 分享描述
path: `/pages/zeroSell/detail?actPrizeId=${this.data.shareProduct.act_prize_id}&shareUid=${app.getUid()}`,
imageUrl: this.data.shareProduct.cover_img,
success: function () {
},
fail: function () {
}
};
}
}
}, Toast, Actionsheet));
\ No newline at end of file
... ...
... ... @@ -32,17 +32,29 @@
<view class="space-line"></view>
<text class="title">进行中</text>
</view>
<block wx:if="{{my_zero_list[0].data && my_zero_list[0].data.length === 0}}">
<view class="list-foot-blank">您还没有参与的抽奖,赶紧去参加吧
</view>
</block>
<block wx:else>
<block wx:for="{{my_zero_list[0].data}}">
<prize-item item="{{item}}" bindshare="share"></prize-item>
</block>
</block>
<view class="title-view">
<view class="space-line"></view>
<text class="title">已公布</text>
</view>
<block wx:if="{{my_zero_list[1].data && my_zero_list[1].data.length === 0}}">
<view class="list-foot-blank">暂无已公布活动,请继续参加活动
</view>
</block>
<block wx:else>
<block wx:for="{{my_zero_list[1].data}}">
<prize-item item="{{item}}" bindshare="share"></prize-item>
</block>
</block>
</block>
<block wx:else>
<login theme="light" openType="{{openType}}"></login>
</block>
... ... @@ -82,4 +94,6 @@ id='dialog'
src="{{dialogSrc}}"
url="{{dialogUrl}}"
></dialog>
<import src="../../vendors/zanui/actionsheet/index.wxml" />
<template is="zan-actionsheet" data="{{...actionsheet}}" />
<!-- <quickNavigation id="quickNavigation" isShowIndicator="{{false}}" isShowShopCart="{{false}}" marginBottom="{{190}}"></quickNavigation> -->
\ No newline at end of file
... ...
@import '../../vendors/zanui/actionsheet/index.wxss';
.product {
display: block;
... ...