Authored by 陈峰

Merge branch '2941-optimization' into 'master'

2941 optimization

Closes #2941

See merge request !12
... ... @@ -50,13 +50,14 @@ export default {
* @param {*} params
* @returns
*/
addAssist({userId, helpUserId, helpUserName, helpUserImgUrl, limitProductCode}) {
addAssist({userId, helpUserId, helpUserYohoId, helpUserName, helpUserImgUrl, limitProductCode}) {
return api.get({
url: '',
data: {
method: 'app.limitProduct.addHelpUserInfo',
userId,
helpUserId,
helpUserYohoId,
helpUserName,
helpUserImgUrl,
limitProductCode
... ... @@ -143,5 +144,19 @@ export default {
}).catch(e => {
console.log('error', e);
});
}
},
/**
* 用户是否关注过有货服务号
* 返回值:"isSubscribe": "Y" 已关注 "N"未关注
*/
getUserWechatRelateInfo(uid) {
return api.get({
url: '',
data: {
method: 'app.passport.userWechatRelateInfo',
uid
}
});
},
};
... ...
... ... @@ -16,22 +16,22 @@ Page({
userInfo: {},
tabBarArr: [
{
icon: '../../static/images/limit/icon_rmfs_n@3x.png',
iconSelected: '../../static/images/limit/icon_rmfs_p@3x.png',
name: '热门发售',
method: 'app.limitProduct.hotLimitProduct',
reportName: 'home_hot'
},
{
icon: '../../static/images/limit/icon_jjfs_n@3x.png',
iconSelected: '../../static/images/limit/icon_jjfs_p@3x.png',
// icon: '../../static/images/limit/icon_jjfs_n@3x.png',
// iconSelected: '../../static/images/limit/icon_jjfs_p@3x.png',
name: '即将发售',
method: 'app.limitProduct.soonToSaleLimitProduct',
reportName: 'home_soon'
},
{
icon: '../../static/images/limit/icon_yjfs_n@3x.png',
iconSelected: '../../static/images/limit/icon_yjfs_p@3x.png',
// icon: '../../static/images/limit/icon_rmfs_n@3x.png',
// iconSelected: '../../static/images/limit/icon_rmfs_p@3x.png',
name: '热门发售',
method: 'app.limitProduct.hotLimitProduct',
reportName: 'home_hot'
},
{
// icon: '../../static/images/limit/icon_yjfs_n@3x.png',
// iconSelected: '../../static/images/limit/icon_yjfs_p@3x.png',
name: '已经发售',
method: 'app.limitProduct.alreadySaleLimitProduct',
reportName: 'home_already'
... ... @@ -149,6 +149,16 @@ Page({
console.log(e);
let id = e.currentTarget.dataset.id;
let limitProductCode = e.currentTarget.dataset.code;
let isApp = e.currentTarget.dataset.isApp;
if (isApp == 'Y') {
wx.showModal({
title: '',
content: '请打开有货APP参与活动',
showCancel: false
})
return;
}
if (app.getUid() && app.getUserInfo().wechat) {
router.go('productDetail', {limitProductCode});
... ... @@ -161,5 +171,9 @@ Page({
},
navigateToHome: function(e) { // 跳转到我的限购码
router.go('userCenter');
},
goToRule: function (e) {
router.goUrl('https://activity.yoho.cn/feature/2593.html?share_id=5035&title=限定频道说明');
}
});
... ...
... ... @@ -5,11 +5,11 @@
<view class='tab-bar-container'>
<view wx:for="{{tabBarArr}}" wx:key="name" class='tab-bar-item' bindtap='tabChange' data-index="{{index}}">
<block wx:if="{{tabSelected === index}}"><!--选中的tabBarIndex和循环里的index相同时-->
<image src="{{item.iconSelected}}"></image>
<!-- <image src="{{item.iconSelected}}"></image> -->
<text class='selected'>{{item.name}}</text>
</block>
<block wx:else>
<image src="{{item.icon}}"></image>
<!-- <image src="{{item.icon}}"></image> -->
<text>{{item.name}}</text>
</block>
</view>
... ... @@ -20,14 +20,17 @@
<view class='list-container'>
<block wx:for='{{listData}}' wx:key='index' wx:for-item='nowList'>
<block wx:if='{{index === tabSelected}}'>
<view class='item-container' wx:for='{{nowList.limitProductVoList}}' wx:key="listItem.id" wx:for-item='listItem' data-id='{{listItem.id}}' data-code='{{listItem.limitProductCode}}' bindtap='navigateToDetail'>
<view class='item-container' wx:for='{{nowList.limitProductVoList}}' wx:key="listItem.id" wx:for-item='listItem' wx:for-index="index" data-id='{{listItem.id}}' data-code='{{listItem.limitProductCode}}' data-is-app='{{listItem.isApp}}' bindtap='navigateToDetail'>
<image src="{{helper.image(listItem.defaultUrl, 690, 460, 1)}}"></image>
<image wx:if="{{tabSelected == 1 && index < 5}}" src="../../static/images/no{{index+1}}@3x.png" class="rank" />
<image wx:if="{{tabSelected == 0 && listItem.hotFlag}}" src="../../static/images/hot@3x.png" class="rank" />
<image wx:if="{{listItem.isApp == 'Y'}}" src="../../static/images/app_only@3x.png" class="app_only" />
<view class='item-content'>
<text class='item-name'>{{listItem.productName}}</text>
<view class='item-info'>
<text class='item-price'>{{listItem.price || '¥0.00'}}</text>
<view class='item-date'>
<image src='{{icon.clock}}'></image>
<!-- <image src='{{icon.clock}}'></image> -->
<text>{{listItem.saleTime}}发售</text>
</view>
</view>
... ... @@ -38,6 +41,10 @@
</view>
<view class='list-foot-blank'>{{footText}}</view>
</view>
<view class="rule-bg" bindtap="goToRule">
<text class="rule-text">参与规则</text>
</view>
<!--我的限购码按钮-->
<view class='my-code-button' bindtap='navigateToHome'>
我的限购码
... ...
... ... @@ -14,6 +14,7 @@ page {
.tab-bar-container {
display: flex;
position: fixed;
z-index: 9999;
left: 0;
top: 0;
flex-direction: row;
... ... @@ -35,13 +36,15 @@ page {
}
.tab-bar-item text {
font-family: PingFang-SC-Medium;
font-weight: bold;
margin-left: 4rpx;
font-size: 28rpx;
color: #afafaf;
color: #B0B0B0 ;
}
.tab-bar-item text.selected {
color: #000;
color: #444444;
}
.tab-bar-item image {
... ... @@ -50,7 +53,8 @@ page {
}
.tab-bar-item:nth-child(n + 2) {
border-left: 2rpx solid #afafaf;
height: 30rpx;
border-left: 2rpx solid #e0e0e0;
}
/* END */
... ... @@ -83,27 +87,48 @@ page {
.list-wrapper .list-container .item-container {
display: flex;
flex-direction: column;
width: 690rpx;
margin-top: 30rpx;
margin-bottom: 10rpx;
box-shadow: 0 0 10rpx #e0e0e0;
width: 750rpx;
margin-bottom: 20rpx;
position: relative;
}
/* 列表item大图 */
.item-container image {
width: 100%;
height: 432rpx;
border-radius: 20rpx 20rpx 0 0;
height: 470rpx;
margin: 0;
padding: 0;
}
.list-wrapper .list-container .rank {
position: absolute;
width: 90rpx;
height: 38rpx;
top: 30rpx;
left: 30rpx;
}
.list-wrapper .list-container .app_only {
position: absolute;
width: 100rpx;
height: 100rpx;
top: 0rpx;
right: 0rpx;
}
.list-wrapper .list-container .sold_out {
position: absolute;
width: 200rpx;
height: 200rpx;
top: 40rpx;
right: 40rpx;
}
/* 列表item文字及价格等信息容器 */
.item-container .item-content {
display: flex;
width: 100%;
flex-direction: column;
border-radius: 0 0 20rpx 20rpx;
background-color: #fff;
line-height: 42rpx;
font-size: 30rpx;
... ... @@ -111,9 +136,12 @@ page {
/* 列表item标题文字 */
.item-content .item-name {
padding: 20rpx 30rpx 0rpx 30rpx;
padding: 36rpx 30rpx 0rpx 40rpx;
margin-bottom: 22rpx;
font-family: PingFang-SC-Regular;
font-size: 14px;
color: #222222;
letter-spacing: -0.34px;
/* 以下样式为控制 行数超过2行后显示... */
overflow: hidden;
text-overflow: ellipsis;
... ... @@ -128,48 +156,80 @@ page {
width: 100%;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
/* 价格 */
.item-info .item-price {
padding: 0 0 40rpx 30rpx;
padding: 0 0 10rpx 40rpx;
font-family: PingFang-SC-Semibold;
font-weight: bolder;
font-size: 18px;
color: #D0021B;
letter-spacing: -0.43px;
}
/* 发售时间 */
.item-info .item-date {
display: flex;
flex-direction: row;
background-color: #444;
justify-content: center;
align-items: center;
background-color: white;
line-height: 40rpx;
height: 40rpx;
border-radius: 20rpx;
width: 220rpx;
height: 60rpx;
border: 1rpx solid #222222;
margin-right: 30rpx;
margin-bottom: 20rpx;
}
/* 发售时间内文字 */
.item-info .item-date text {
color: #fff;
font-size: 24rpx;
padding: 0 14rpx 0 2rpx;
}
/* 发售时间小图标 */
.item-info .item-date image {
width: 24rpx;
height: 24rpx;
padding: 8rpx;
/* padding: 0 14rpx 0 2rpx; */
font-family: PingFang-SC-Bold;
font-weight: bold;
font-size: 14px;
color: #222222;
letter-spacing: 0;
}
/* END */
.rule-bg {
opacity: 0.6;
background-color: #000000;
border-radius: 50%;
width: 92rpx;
height: 92rpx;
right: 40rpx;
bottom: 170rpx;
float: right;
position: fixed;
z-index: 9999;
display: flex;
justify-content: center;
align-items: center;
}
.rule-text {
width: 60rpx;
font-family: PingFang-SC-Regular;
font-size: 13px;
color: #FFFFFF;
letter-spacing: 0;
text-align: center;
line-height: 16px;
}
.my-code-button {
position: fixed;
bottom: 0;
width: 100%;
height: 88rpx;
text-align: center;
font-size: 30rpx;
line-height: 88rpx;
background-color: #fff;
border-top: 1rpx solid #E0E0E0;
position: fixed;
bottom: 0;
width: 100%;
height: 88rpx;
text-align: center;
font-size: 30rpx;
line-height: 88rpx;
background-color: #fff;
border-top: 1rpx solid #E0E0E0;
}
... ...
let timer;
Component({
properties: {
type: String,
current: {
type: Number,
observer: '_dataChange'
},
begin: Number,
end: Number
},
data: {
label: '',
days: '',
hours: '',
minutes: '',
seconds: '',
diff: '',
fullContent: ''
},
pageLifetimes: {
show() {
console.log('show');
},
hide() {
console.log('hide');
clearInterval(timer);
}
},
methods: {
_dataChange() {
const {current, begin, end} = this.data;
let label = '距开售';
// if (current && begin && end) {
// label = begin - current > 0 ? '距离活动开始' : '距离活动结束';
// }
this.data.diff = Math.abs(begin - current > 0 ? begin - current : end - current);
if (timer) {
clearInterval(timer);
}
this.tick(label);
timer = setInterval(() => {
this.tick(label);
--this.data.diff;
if (this.data.diff < 0) {
clearInterval(timer);
this.triggerEvent('endcountdown', {
isEnd: current - begin > 0
});
}
}, 1000);
},
tick(label) {
let diff = this.data.diff;
let days = Math.floor(diff / (24 * 3600));
days = days > 9 ? days : '0' + days;
let leave1 = diff % (24 * 3600);
let hours = Math.floor(leave1 / (3600));
hours = hours > 9 ? hours : '0' + hours;
let leave2 = leave1 % 3600;
let minutes = Math.floor(leave2 / 60);
minutes = minutes > 9 ? minutes : '0' + minutes;
let seconds = leave2 % 60;
seconds = seconds > 9 ? seconds : '0' + seconds;
// let fullContent = label + ' ' + days + ' 天 ' + hours + ':' + minutes + ':' + seconds;
let fullContent = days + ' :' + hours + ' :' + minutes;
this.setData({
label,
days,
hours,
minutes,
seconds,
fullContent
});
}
}
});
... ...
{
"component": true
}
\ No newline at end of file
... ...
<view wx:if="{{label}}" class="comp-count-dow-by-now">
<text class="tips">{{label}}</text>
<text class="time">{{days}}</text>
<text class="text">天</text>
<text class="time">{{hours}}</text>
<text class="text">时</text>
<text class="time">{{minutes}}</text>
<text class="text">分</text>
<text class="time">{{seconds}}</text>
<text class="text">秒</text>
<!-- <text class="time">{{fullContent}}</text> -->
</view>
... ...
.comp-count-dow-by-now {
width: 100%;
height: 134rpx;
color: #ffffff;
font-size: 32rpx;
text-align: center;
background-color: #ffffff;
font-family: PingFang-SC-Regular, sans-serif;
display: flex;
align-items: center;
justify-content: center;
}
.comp-count-dow-by-now .tips {
font-family: PingFang-SC-Regular;
font-size: 12px;
color: #222222;
letter-spacing: -0.24px;
margin-right: 18rpx;
margin-top: 28rpx;
}
.comp-count-dow-by-now .time {
display: inline-block;
font-size: 60rpx;
font-family: PingFang-SC-Heavy;
font-weight: bold;
color: #222222;
letter-spacing: -0.31px;
}
.comp-count-dow-by-now .text {
font-family: PingFang-SC-Heavy;
font-weight: bold;
font-size: 20rpx;
color: #222222;
letter-spacing: -0.31px;
margin-top: 28rpx;
margin-left: 6rpx;
margin-right: 6rpx;
}
\ No newline at end of file
... ...
... ... @@ -11,6 +11,7 @@ import {
import {
stringify
} from '../../../vendors/query-stringify';
import wx from '../../../utils/wx';
let app = getApp();
let router = global.router;
... ... @@ -163,22 +164,20 @@ Page(Object.assign({
title: '加载中...',
mask: true,
});
},
setTimeout(() => {
app = app || getApp();
if (this.data.scene) {
this.loadDataFromCode().then(() => {
this.init().then(() => {
this._showRepeat();
});
});
} else {
onShow() {
if (this.data.scene) {
this.loadDataFromCode().then(() => {
this.init().then(() => {
this._showRepeat();
});
}
}, 1000);
});
} else {
this.init().then(() => {
this._showRepeat();
});
}
},
loadDataFromCode() {
... ... @@ -231,7 +230,6 @@ Page(Object.assign({
});
},
onShow() {},
onShareAppMessage: function(res) {
let params = {
TITLE: this.data.productName,
... ... @@ -388,7 +386,6 @@ Page(Object.assign({
(this.data.originUid && this.data.originUid !== this.data.uid)) {
productSourceType = PRODUCT_SOURCE_TYPE.SHARE;
}
this.setData({
productSkn: res.data.productSkn ? res.data.productSkn : '',
productName: res.data.productName ? res.data.productName : '',
... ... @@ -402,7 +399,11 @@ Page(Object.assign({
activityId: res.data.activityId ? res.data.activityId : '',
productDesc,
snapData,
productSourceType
productSourceType,
isNew: res.data.isNew ? res.data.isNew : '',
currentTime: res.data.currentTime ? res.data.currentTime : '',
oldSaleTime: res.data.oldSaleTime ? res.data.oldSaleTime : '',
isApp: res.data.isApp=='Y' ? true : false,
});
} else {
return Promise.reject();
... ... @@ -512,6 +513,15 @@ Page(Object.assign({
}
},
assistShare(e) {
if (this.data.isApp) {
wx.showModal({
title: '',
content: '请打开有货APP参与活动',
showCancel: false
})
return;
}
if (!app.getUid()) {
this.goLogin();
return;
... ... @@ -542,6 +552,7 @@ Page(Object.assign({
detailModel.addAssist({
userId: this.data.originUid,
helpUserId: this.getUserWechatId(),
helpUserYohoId: userInfo.uid,
helpUserName: userInfo.wechat.nickName ? userInfo.wechat.nickName : '',
helpUserImgUrl: userInfo.wechat.avatarUrl ? userInfo.wechat.avatarUrl : '',
limitProductCode: this.data.limitProductCode
... ... @@ -561,6 +572,13 @@ Page(Object.assign({
if ((this.data.avatarList.length + 1) === this.data.assistLimit) {
detailModel.getLimitCode(this.data.originUid, this.data.limitProductCode);
}
} else if (result.code === 520) {//此限定商品分享助力只限新客!
wx.hideLoading();
wx.showModal({
title: '提示',
content: result.message,
showCancel: false,
});
} else if (result.code === 9001) {
this.setData({
assistSuccess: ASSIST_SUCCESS.REPEAT
... ... @@ -580,6 +598,7 @@ Page(Object.assign({
}).catch(this.showError.bind(this));
},
//帮ta助力
queueAction() {
let userInfo = app.getUserInfo();
... ... @@ -596,12 +615,23 @@ Page(Object.assign({
detailModel.addAssist({
userId: this.data.originUid,
helpUserId: this.getUserWechatId(),
helpUserYohoId: userInfo.uid,
helpUserName: userInfo.wechat.nickName ? userInfo.wechat.nickName : '',
helpUserImgUrl: userInfo.wechat.avatarUrl ? userInfo.wechat.avatarUrl : '',
limitProductCode: this.data.limitProductCode
}).then(() => {
return detailModel.addQueue(this.data.originUid, this.data.activityId, this.getUserWechatId());
}).then(result => {
if (result.code === 520) {//此限定商品分享助力只限新客!
wx.hideLoading();
wx.showModal({
title: '提示',
content: result.message,
showCancel: false,
});
} else {
return detailModel.addQueue(this.data.originUid, this.data.activityId, this.getUserWechatId());
}
}).then(result => {
// debugger;
if (result.code === 200) {
yas.report(YB_ASSIST_SUCCESS_L, {
... ... @@ -638,9 +668,35 @@ Page(Object.assign({
queueCancel() {
this.reload();
},
saleRemind() {
wx.showModal({
title: '',
content: '绑定微信并关注“YOHOBUY有货”获得以下特权\n\
1、有资格参与限定商品抢购\n\
2、限定商品上架通知\n\
3、限定球鞋每周免费送',
confirmText: '去关注',
showCancel: false,
complete() {
wx.setClipboardData({
data: 'YOHOBUY有货',
complete() {
wx.showToast({
icon: 'none',
title: '公众号“YOHOBUY有货”,已复制成功,打开微信去搜索关注吧!',
duration: 3000
});
}
})
}
})
},
assistCancel() {
this.reload();
},
assistJion() {
this.reload();
},
buyNow() {
router.goUrl(`miniapp.yohobuy.com/pages/goodsDetail/goodsDetail?app=yohobuy&productSkn=${this.data.productSkn}`);
},
... ... @@ -676,6 +732,7 @@ Page(Object.assign({
goQueueList() {
router.go('queueIndex', Object.assign({
actId: this.data.activityId,
isNew: this.data.isNew,
}, this.data.snapData));
},
showError() {
... ... @@ -702,7 +759,6 @@ Page(Object.assign({
if (this.data.originUnionID) {
data.originUnionID = this.data.originUnionID;
}
router.go('userCenter', {
referer: `/pages/product/detail/detail?${decodeURIComponent(stringify(data))}`,
login
... ... @@ -741,6 +797,8 @@ Page(Object.assign({
}).then(() => {
return this.getAssistInfo();
}).then(() => {
return this.getUserWechatRelateInfo();
}).then(() => {
wx.hideLoading();
});
},
... ... @@ -777,6 +835,21 @@ Page(Object.assign({
}
});
},
//用户是否关注过有货服务号
getUserWechatRelateInfo() {
if (!this.data.uid) {
return Promise.resolve();
}
let uid = this.data.uid;
return detailModel.getUserWechatRelateInfo(uid).then(result => {
if (result.code === 200 && result.data.isSubscribe) {
this.setData({
isSubscribe: result.data.isSubscribe,
});
}
});
},
_showRepeat() {
if (this.data.queueStatus === QUEUE_STATUS.QUEUE_HELP) {
this.setData({
... ...
... ... @@ -9,6 +9,7 @@
"quick-navigation": "/components/layout/quick-navigation/quick-navigation",
"yoho-alert": "./components/alert/alert",
"assist-list": "./components/assist-list/assist-list",
"action-bar": "./components/action-bar/action-bar"
"action-bar": "./components/action-bar/action-bar",
"count-down-by-now": "./components/count-down-by-now/index"
}
}
... ...
<import src="../../../vendors/zanui/actionsheet/index.wxml" />
<wxs src="../../../wxs/helper.wxs" module="helper" />
<view >
<image class="detail-banner-image" src="{{helper.image(defaultImage, 750, 470, 1)}}"></image>
</view>
<block wx:if="{{oldSaleTime > currentTime}}">
<count-down-by-now current="{{currentTime}}" begin="{{oldSaleTime}}"></count-down-by-now>
</block>
<image class="detail-banner-image" src="{{helper.image(defaultImage, 750, 470, 1)}}"></image>
<view class="detail-container">
<view class="product-name">
<text class="name">{{productName}}</text>
</view>
<view class="realPrice">{{price}}</view>
<!-- <view class="realPrice">{{price}}</view> -->
<view class="advanceTitleView">
<view class="advanceTime">
<!-- <view class="advanceTime">
<view class="image-time"><image class="image-time" src="../../../static/images/shijian2@3x.png"></image></view>
<block wx:if="{{saleTime}}">
<view class="text-time">{{saleTime}} 发售</view>
... ... @@ -17,7 +21,8 @@
<block wx:else>
<view class="text-time">发售时间待定</view>
</block>
</view>
</view> -->
<view class="realPrice">{{price}}</view>
<view class="advanceTitle">{{reminderNum}}人已关注</view>
</view>
<view class="detail-btn" bindtap="buyNow">查看商品详情</view>
... ... @@ -26,7 +31,7 @@
<image class="banner-image" lazy-load bindtap="goList" src="../../../static/images/banner.png"></image>
<view class="detail-container">
<view class="goodsInfo">
<view wx:for="{{productDesc}}">
<view wx:for="{{productDesc}}" wx:key="index">
<block wx:if="{{item.type === 2}}">
<!--<video class="desc-video" src="{{item.imageUrl}}"></video>-->
</block>
... ... @@ -56,20 +61,20 @@
<assist-list wx:if="{{showAssistList}}" list="{{avatarList}}" num="{{assistLimit}}"></assist-list>
<block wx:if="{{limitProductType === 4}}">
<!-- 没有助力 -->
<block wx:if="{{showStatus === 1}}">
<block wx:if="{{productSourceType === 1}}">
<action-bar wx:if="{{assistStatus === 1 || assistStatus === 3}}">
<form bindsubmit="assistShare" report-submit='true'>
<view class="bottom1-action">
<button class="as-bottom ok" formType="submit">邀请好友助力获取限购码</button>
<button class="as-bottom ok" formType="submit">{{isNew=='Y' ? '邀请新用户助力获取限购码' : '邀请好友助力获取限购码'}}</button>
<view class="help-wrapper" bindtap="goHelp">
<image class="help" src="../../../static/images/XD_q_ic@3x.png"></image>
</view>
</view>
</form>
</action-bar>
<action-bar wx:elif="{{assistStatus === 2}}">
<view class="bottom1-action">
<view class="as-bottom cancel">即将开售</view>
... ... @@ -94,7 +99,7 @@
<view class="top-title" >你的好友邀请你为ta助力</view>
<view class="top-action">
<view class="as-bottom ok width130" bindtap="assistAction">帮ta助力</view>
<view class="as-bottom cancel width130" bindtap="assistCancel">取消</view>
<view class="as-bottom ok width130" bindtap="assistJion">直接参加</view>
</view>
</view>
</action-bar>
... ... @@ -137,19 +142,25 @@
<block wx:elif="{{showStatus === 3}}">
<action-bar>
<view class="top-assist-action">
<view class="top-title" >当前活动已结束</view>
<view class="as-bottom ok" bindtap="goList">查看其他活动</view>
</view>
<view class="bottom1-action" wx:if="{{isSubscribe == 'N'}}" >
<view class="as-bottom confirm" bindtap="saleRemind">关注公众号获得发售提醒</view>
</view>
<view wx:else class="top-assist-action">
<view class="top-title" >当前活动已结束</view>
<view class="as-bottom ok" bindtap="goList">查看其他活动</view>
</view>
</action-bar>
</block>
<block wx:elif="{{showStatus === 4}}">
<block wx:if="{{productSourceType === 1}}">
<action-bar>
<view class="bottom1-action">
<view class="as-bottom ok" bindtap="buyNow">立即购买</view>
</view>
<view class="bottom1-action" wx:if="{{isSubscribe == 'N'}}" >
<view class="as-bottom confirm" bindtap="saleRemind">关注公众号获得发售提醒</view>
</view>
<view wx:else class="bottom1-action">
<view class="as-bottom ok" bindtap="buyNow">立即购买</view>
</view>
</action-bar>
</block>
... ... @@ -195,7 +206,8 @@
<block wx:elif="{{showStatus === 6}}">
<action-bar wx:if="{{productSourceType === 1}}">
<view class="bottom1-action">
<view class="as-bottom cancel">即将开售</view>
<view wx:if="{{isSubscribe == 'N'}}" class="as-bottom confirm" bindtap="saleRemind">关注公众号获得发售提醒</view>
<view wx:else class="as-bottom cancel">即将开售</view>
</view>
</action-bar>
... ... @@ -220,7 +232,10 @@
<block wx:elif="{{showStatus === 7}}">
<block wx:if="{{productSourceType === 1}}">
<action-bar>
<view class="bottom1-action">
<view class="bottom1-action" wx:if="{{isSubscribe == 'N'}}" >
<view class="as-bottom confirm" bindtap="saleRemind">关注公众号获得发售提醒</view>
</view>
<view wx:else class="bottom1-action">
<view class="as-bottom cancel">立即购买</view>
</view>
</action-bar>
... ... @@ -266,7 +281,7 @@
<view class="bottom1-action">
<view class="action-list" style="width: 570rpx;">
<view class="as-bottom confirm width250" style="width: 230rpx;" bindtap="goQueueList">排队中,查看详情</view>
<view class="as-bottom ok width250" style="width: 230rpx;" bindtap="assistShare">邀请好友助力排队</view>
<view class="as-bottom ok" bindtap="assistShare">{{isNew=='Y' ? '邀请新用户助力排队' : '邀请好友助力排队'}}</view>
</view>
<view class="help-wrapper" bindtap="goHelp">
... ... @@ -319,7 +334,7 @@
<view class="top-title" >你的好友邀请你为ta助力排队</view>
<view class="top-action">
<view class="as-bottom ok width130" bindtap="queueAction">帮ta助力</view>
<view class="as-bottom cancel width130" bindtap="queueCancel">取消</view>
<view class="as-bottom cancel width130" bindtap="queueCancel">直接参加</view>
</view>
</view>
</action-bar>
... ...
... ... @@ -5,8 +5,8 @@
}
.detail-banner-image {
width: 750rpx;
height: 470rpx;
width: 100%;
height: 468rpx;
display: block;
}
... ... @@ -17,15 +17,19 @@
line-height: 34rpx;
align-items: center;
justify-content: space-between;
margin-bottom: 30rpx;
margin-bottom: 40rpx;
margin-top: 20rpx;
}
.advanceTitleView .advanceTitle {
font-size: 24rpx;
color: #b0b0b0;
font-size: 24rpx;
color: #b0b0b0;
font-family: PingFang-SC-Medium;
font-weight: bold;
letter-spacing: 0;
}
.advanceTitleView .advanceTime {
/* .advanceTitleView .advanceTime {
font-size: 24rpx;
color: #000;
display: flex;
... ... @@ -42,17 +46,16 @@
.advanceTitleView .text-time {
display: inline-block;
height: 34rpx;
line-height: 34rpx;
}
line-height: 34rpx;
}*/
.realPrice {
.advanceTitleView .realPrice {
font-family: PingFang-SC-Medium;
color: #d0021b;
color: #D0021B;
line-height: 40rpx;
height: 40rpx;
font-size: 30rpx;
font-size: 36rpx;
font-weight: bold;
margin-bottom: 20rpx;
}
.detail-btn {
... ... @@ -82,10 +85,13 @@
}
.product-name {
width: 100%;
font-family: PingFang-SC-Regular;
font-size: 30rpx;
margin-bottom: 10rpx;
width: 100%;
margin-bottom: 10rpx;
font-family: PingFang-SC-Semibold;
font-weight: 500;
font-size: 15px;
color: #444444;
letter-spacing: -0.36px;
}
.bottom1-action {
... ... @@ -156,7 +162,7 @@
}
.width250 {
width: 250rpx;
width: 252rpx;
}
.width130 {
... ...
... ... @@ -147,6 +147,7 @@ Page(Object.assign({
onLoad: function(options) {
console.log(options);
let actId = options.actId;
let isNew = options.isNew || false;
let uid = app.getUid();
if (actId) {
... ... @@ -165,7 +166,8 @@ Page(Object.assign({
}
this.setData({
shareInfo: Object.assign(this.data.shareInfo, options)
shareInfo: Object.assign(this.data.shareInfo, options),
isNew
});
}
... ... @@ -392,7 +394,8 @@ Page(Object.assign({
navigateToMyList: function(e) {
router.go('myList', Object.assign({
actId: this.data.activityInfo.activityId,
isEnd: this.data.activityInfo.isEnd
isEnd: this.data.activityInfo.isEnd,
isNew: this.data.isNew
}, this.data.shareInfo));
},
... ...
... ... @@ -158,7 +158,7 @@
</view>
<form bindsubmit='submitFormId' report-submit='true'>
<button wx:if="{{activityInfo.isBegin === 1 && userInfo.isDrawline && !activityInfo.isEnd}}" class='invite-button' hidden='{{hideInviteButton}}' form-type='submit' bindtap='inviteFriends'>
邀请好友助力排队
{{isNew=='Y' ? '邀请新用户助力排队' : '邀请好友助力排队'}}
</button>
</form>
</view>
... ...
... ... @@ -509,7 +509,7 @@ image {
.invite-button {
position: fixed;
width: 280rpx;
width: 290rpx;
height: 50rpx;
line-height: 50rpx;
color: white;
... ...
... ... @@ -90,13 +90,15 @@ Page(Object.assign({
console.log(options);
let actId = options.actId;
let isEnd = options.isEnd || 0;
let isNew = options.isNew || false;
let uid = app.getUid() || options.uid;
if (actId) {
this.setData({
actId: actId,
isEnd: parseInt(isEnd)
isEnd: parseInt(isEnd),
isNew
});
this.getQueueList(actId);
for (let i in options) {
... ...
... ... @@ -50,7 +50,7 @@
</block>
<form bindsubmit='submitFormId' report-submit='true'>
<button wx:if='{{!isEnd}}' class='invite-button' hidden='{{hideInviteButton}}' form-type='submit' bindtap='inviteFriends'>
邀请好友助力排队
{{isNew=='Y' ? '邀请新用户助力排队' : '邀请好友助力排队'}}
</button>
</form>
</view>
... ...
... ... @@ -386,7 +386,7 @@ image {
.invite-button {
position: fixed;
width: 280rpx;
width: 290rpx;
height: 50rpx;
line-height: 50rpx;
color: white;
... ...
{
"description": "项目配置文件。",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": false,
"es6": true,
"postcss": true,
"minified": true,
"newFeature": true
},
"compileType": "miniprogram",
"libVersion": "1.7.4",
"appid": "wxed31f9e8705fb8d1",
"projectname": "yoho-limit-sell-miniapp",
"isGameTourist": false,
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"plugin": {
"current": -1,
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"miniprogram": {
"current": 5,
"list": [
{
"id": 0,
"name": "首页入口",
"pathName": "pages/index/index",
"query": ""
},
{
"id": -1,
"name": "个人中心首页",
"pathName": "pages/home/index",
"query": ""
},
{
"id": 2,
"name": "情详页-排队助力",
"pathName": "pages/product/detail/detail",
"query": "limitProductCode=2018062116412589"
},
{
"id": 3,
"name": "分享页",
"pathName": "pages/snapshootShare/snapshootShare",
"query": "product_name=0712%E4%BA%A7%E5%93%81%E6%B5%8B%E8%AF%95%E9%99%90%E5%AE%9A%E5%8A%A9%E5%8A%9B-%E5%90%8D%E7%A7%B0%E9%9C%80%E8%A6%81%E5%BE%88%E9%95%BF%E6%89%8D%E8%83%BD%E6%B5%8B%E5%87%BA%E5%90%8D%E7%A7%B0%E8%B6%85%E9%95%BF%E7%9A%84%E6%97%B6%E5%80%99%E5%88%B0%E5%BA%95%E6%98%BE%E7%A4%BA%E6%88%90%E4%BB%80%E4%B9%88%E6%A0%B7%E5%AD%90&default_image=http%3A%2F%2Fimg11.static.yhbimg.com%2Fgoodsimg%2F2018%2F07%2F12%2F15%2F01112d6c9732a0dd29c3790fa6166c208a.jpg%3FimageMogr2%2Fthumbnail%2F460x300%2Fextent%2F460x300%2Fbackground%2Fd2hpdGU%3D%2Fposition%2Fcenter%2Fquality%2F80%2Fquality%2F75&product_qrCode=http%3A%2F%2Fapi-test2.dev.yohocorp.com%2Fwechat%2Fminiapp%2Fimg-check.jpg%3Fparam%3D%7B%22originUid%22%3A500031864%2C%22limitProductCode%22%3A%222018071215181510%22%2C%22originUnionID%22%3A%22oGUyct62W4m92LotgrNcDo0dGXC4%22%7D%26miniapp_type%3D4%26miniQrType%3D11",
"scene": "1037",
"referrerInfo": {
"appId": "wx084ab813d88c594b",
"extraData": "{}"
}
},
{
"id": -1,
"name": "限定商品排队",
"pathName": "pages/queue/index",
"query": "actId=406"
},
{
"id": 5,
"name": "情详页-好友助力",
"pathName": "pages/product/detail/detail",
"query": "limitProductCode=2018062815591248&union_type=10007",
"scene": "1037",
"referrerInfo": {
"appId": "wx084ab813d88c594b",
"extraData": "{}"
}
},
{
"id": 6,
"name": "分享卡片进入小程序-好友助力-发起者进入",
"pathName": "pages/product/detail/detail",
"query": "limitProductCode=2018062815591248&originUid=500031864&originUnionID=oGUyct62W4m92LotgrNcDo0dGXC4",
"scene": "1037",
"referrerInfo": {
"appId": "wx084ab813d88c594b",
"extraData": "{}"
}
},
{
"id": 7,
"name": "分享卡片进入小程序-好友助力-被分享者进入",
"pathName": "pages/product/detail/detail",
"query": "limitProductCode=2018062815591248&originUid=15075136&union_type=108472",
"scene": "1037",
"referrerInfo": {
"appId": "wx084ab813d88c594b",
"extraData": "{}"
}
},
{
"id": 8,
"name": "分享卡片进入小程序-好友排队-发起者进入",
"pathName": "pages/product/detail/detail",
"query": "limitProductCode=2018062910190973&originUid=349709&originUnionID=oGUyct-gABtEJt3aq2TF03NkNPp0",
"scene": "1037",
"referrerInfo": {
"appId": "wx084ab813d88c594b",
"extraData": "{}"
}
},
{
"id": 9,
"name": "分享卡片进入小程序-好友排队-被发起者进入",
"pathName": "pages/product/detail/detail",
"query": "limitProductCode=2018071016342192&originUid=349709&originUnionID=oGUyct-gABtEJt3aq2TF03NkNPp0",
"scene": "1037",
"referrerInfo": {
"appId": "wx084ab813d88c594b",
"extraData": "{}"
}
},
{
"id": -1,
"name": "我的排队列表",
"pathName": "pages/queue/myList",
"query": "actId=362"
},
{
"id": 11,
"name": "情详页-手机分享",
"pathName": "pages/product/detail/detail",
"query": "limitProductCode=2018071721242156&originUid=500031864",
"scene": "1037",
"referrerInfo": {
"appId": "wx084ab813d88c594b",
"extraData": "{}"
}
},
{
"id": 12,
"name": "分享图片进入",
"pathName": "pages/product/detail/detail",
"query": "scene=b26ea376ab62f4c11fdb8c6ce00dc85a",
"scene": "1012"
},
{
"id": 13,
"name": "webview",
"pathName": "pages/webview/webview",
"query": "url=http://ad.yoho.cn/html5/2018/question/index.html",
"scene": "1001"
}
]
}
}
}
\ No newline at end of file