08ba8f32 by simon

版本提交

1 parent 200dd8be
......@@ -3,6 +3,7 @@
* gulpfile 文件
* ------------------------------------------------------------------
*/
var isFirst = false;
var path = require('path');
var gulp = require('gulp');
......@@ -231,7 +232,9 @@ var watchHandler = function (type, file) {
var tmp = file.replace('src/', 'dist/')
del([tmp]);
} else {
// copyWXML();
if (isFirst) {
copyWXML(); // first
}
wxmlImgRewrite();
}
}
......@@ -242,8 +245,13 @@ var watchHandler = function (type, file) {
var tmp = file.replace('src/', 'dist/');
del([tmp]);
} else {
if (isFirst) {
copyBasicFiles(); //first
} else {
copyTargetFiles(); // modify
// copyBasicFiles();
}
// copyWXML();
// wxmlImgRewrite();
}
......
......@@ -26,6 +26,7 @@ App({
questionResult: null, //答题的结果 弹力值 elasticValue
posterWishList: [], //海报用
giftData: null, // 实物奖 userTabel prizeDetail用
coopOptions: null, // 协作页 onload入参
},
onLaunch: function () {
this.share();
......@@ -48,7 +49,10 @@ App({
//分享配置
return {
title: '弹弹弹 看你有多弹',
path: 'pages/index/index'
path: 'pages/index/index',
// imageUrl: './image/share.png',
// imageUrl: 'https://kd.cdn.xyiyang.com/weapp/marubi/wish-list/share.png'
imageUrl: 'https://kdcdn.oss-cn-shenzhen.aliyuncs.com/weapp/marubi/wish-list/share.png'
};
};
}
......@@ -57,13 +61,14 @@ App({
},
// 获取用户基本信息
queryIndex(query = {
auth: true
auth: true,
// loading: true
}) {
return new Promise((resolve, reject) => {
this.post({
url: this.api.index,
data: {},
loading: true,
// loading: loading,
}).then((result) => {
this.globalData.indexInfo = result;
this.globalData.userInfo = result.userInfo;
......
{
"pages": [
"pages/index/index",
"pages/create-wish/create-wish",
"pages/prize-detail/prize-detail",
"pages/user-table/user-table",
"pages/authorize/authorize",
......@@ -8,7 +9,6 @@
"pages/register/register",
"pages/login/login",
"pages/wish/wish",
"pages/create-wish/create-wish",
"pages/question/question",
"pages/new-welfare/new-welfare",
"pages/coupon-detail/coupon-detail",
......@@ -32,6 +32,7 @@
"usingComponents": {
"authorize-comp": "../../component/authorize-comp/authorize-comp",
"empty-tips": "../../component/empty-tips/empty-tips",
"tips-guide-register-comp": "../../component/tips-guide-register-comp/tips-guide-register-comp",
"van-popup": "../../ui/vant-weapp/popup/index"
}
}
......
let app = getApp();
Component({
properties: {
// 这里定义了innerText属性,属性值可以在组件使用时指定
cid: {
type: String,
value: '',
},
innerText: {
type: String,
value: 'default value',
value: '',
},
innerButton: {
type: String,
value: '我知道了',
}
},
data: {
......@@ -20,7 +29,10 @@ Component({
// 隐藏蒙层
hideMask() {
this.triggerEvent('evtcomp', {
name: "_evt_hide_mask"
name: "_evt_hide_mask",
data: {
cid: this.properties.cid,
}
});
}
}
......
......@@ -7,5 +7,5 @@
<text decode="{{true}}">{{innerText}}</text>
</view>
</view>
<view bindtap="hideMask" class="btn">我知道了</view>
<view bindtap="hideMask" class="btn">{{innerButton}}</view>
</view>
......
let app = getApp();
Component({
properties: {
// 这里定义了innerText属性,属性值可以在组件使用时指定
innerText: {
type: String,
value: 'default value',
}
},
data: {
// 这里是一些组件内部数据
someData: {}
},
methods: {
// 这里是一个自定义方法
customMethod() {
this.triggerEvent('evtcomp', {
name: "_evt_custom"
})
},
// 隐藏蒙层
hideMask() {
this.triggerEvent('evtcomp', {
name: "_evt_hide_mask"
});
},
// 前往注册
onRegisterHandler() {
// this.hideMask();
this.triggerEvent('evtcomp', {
name: "_evt_to_register"
});
}
}
})
@import '../../assets/scss/mixins';
@import '../../assets/scss/utils';
.comp-item {
position: relative;
width: 654px;
height: 588px;
// width: 654px;
// height: 732px;
// background-color: wheat;
.bg {
position: absolute;
width: 654px;
height: 588px;
}
.space1 {
height: 108px;
}
.cont {
position: relative;
text-align: center;
}
.tit {
color: #333333;
font-size: 40px;
font-weight: 300;
text-align: center;
margin: 0 auto;
}
.tips {
margin-top: 32px;
color: #999999;
font-size: 28px;
@extend .bb;
padding: 0 100px;
text {
line-height: 32px
}
}
.btn-wrap {
position: absolute;
left: 0;
right: 0;
bottom: 80px;
.btn {
position: relative;
margin: 20px auto 0;
z-index: 1;
}
.btn1 {
@include cb(320px, 60px);
// @include cb(360px, 72px);
font-size: 26px;
}
.btn2 {
@include cb(320px, 60px);
// @include cb(240px, 48px);
background: transparent;
background-color: #d2d2d2;
}
}
}
<view class="comp-item">
<image class="bg" src="../../image/oss/tips/tips-border-small.png" mode="widthFix" />
<!-- <image class="bg" src="../../image/oss/tips/tips-border-big.png" mode="widthFix" /> -->
<view class="space1"></view>
<view class="cont">
<view class="tit">· 温馨提示 ·</view>
<view class="tips">
<text decode="{{true}}">{{innerText}}</text>
</view>
</view>
<view class="btn-wrap">
<view bindtap="onRegisterHandler" class="btn btn1">丸美姐妹,马上注册</view>
<view bindtap="hideMask" class="btn btn2">塑胶姐妹,残忍拒绝</view>
</view>
</view>
......@@ -58,7 +58,7 @@
position: absolute;
max-width: 120px;
max-height: 120px;
bottom: 12px;
bottom: -4px;
left: 0;
right: 0;
margin: 0 auto;
......
......@@ -29,41 +29,42 @@ let mapFix = {
let productMap = {
// 场景1
"P000000000000000000000000000002": {
name: "丸美白色之恋纯白淡黑眼霜20g",
tag: 1,
"P000000000000000000000000000008": {
name: "丸美纯色之恋光透精华液30ml",
tag: 2,
sence: 1,
point: {
left: 111,
top: 258,
left: 210,
top: 300,
},
tips: {
type: "top-right",
point: mapFix["top-right"],
type: "top-left",
point: mapFix["top-left"],
}
},
"P000000000000000000000000000003": {
name: "丸美巧克力青春丝滑眼乳霜25g",
tag: 7,
"P000000000000000000000000000010": {
name: "丸美巧克力青春丝滑毛孔隐形精华露35ml",
tag: 5,
sence: 1,
point: {
left: 337,
top: 350,
left: 460,
top: 180,
},
tips: {
type: "top-right",
point: mapFix["top-right"],
type: "bottom-left",
point: mapFix["bottom-left"],
}
},
"P000000000000000000000000000001": {
name: "丸美弹力蛋白眼精华素10g+10g",
tag: 3,
"P000000000000000000000000000009": {
name: "丸美雪绒花纯净保湿深润霜50g",
tag: 10,
sence: 1,
point: {
left: 558,
top: 437,
left: 450,
top: 520,
},
tips: {
type: "top-left",
......@@ -71,55 +72,30 @@ let productMap = {
}
},
// 场景2
"P000000000000000000000000000008": {
name: "丸美纯色之恋光透精华液30ml",
tag: 2,
sence: 2,
point: {
left: 0,
top: 0,
},
tips: {
type: "top-left",
point: mapFix["top-left"],
}
},
// 场景2
"P000000000000000000000000000007": {
name: "丸美巧克力青春丝滑洁面啫喱120g",
tag: 4,
sence: 2,
point: {
left: 0,
top: 0,
},
tips: {
type: "top-left",
point: mapFix["top-left"],
}
},
"P000000000000000000000000000010": {
name: "丸美巧克力青春丝滑毛孔隐形精华露35ml",
tag: 5,
sence: 2,
point: {
left: 0,
top: 0,
left: 300,
top: 300,
},
tips: {
type: "top-left",
point: mapFix["top-left"],
}
},
"P000000000000000000000000000004": {
name: "丸美巧克力青春丝滑水190ml",
tag: 6,
sence: 2,
point: {
left: 0,
top: 0,
left: 500,
top: 300,
},
tips: {
type: "top-left",
......@@ -127,39 +103,46 @@ let productMap = {
}
},
"P000000000000000000000000000006": {
name: "丸美雪绒花纯净保湿咕嘟咕嘟菁华露80ml",
tag: 8,
// 场景3
"P000000000000000000000000000001": {
name: "丸美弹力蛋白眼精华素10g+10g",
tag: 3,
sence: 3,
point: {
left: 0,
top: 0,
left: 210,
top: 300,
},
tips: {
type: "top-left",
point: mapFix["top-left"],
}
},
"P000000000000000000000000000005": {
name: "丸美雪绒花纯净保湿洁面乳120g",
tag: 9,
"P000000000000000000000000000002": {
name: "丸美白色之恋纯白淡黑眼霜20g",
tag: 1,
sence: 3,
point: {
left: 0,
top: 0,
left: 380,
top: 180,
},
tips: {
type: "top-left",
point: mapFix["top-left"],
type: "bottom-right",
point: mapFix["bottom-right"],
}
},
"P000000000000000000000000000009": {
name: "丸美雪绒花纯净保湿深润霜50g",
tag: 10,
"P000000000000000000000000000003": {
name: "丸美巧克力青春丝滑眼乳霜25g",
tag: 7,
sence: 3,
point: {
left: 0,
top: 0,
left: 540,
top: 440,
},
tips: {
type: "top-left",
......@@ -167,199 +150,41 @@ let productMap = {
}
},
}
/**
* @my-wish
* 点击领取心愿单奖品
*/
let wishbillGiftAccept = {
"status": 1,
"order": {
"acceptType": 0,
"instanceCode": "162951b667a746188c83491bd5601164",
"prizeName": "丸美弹力蛋白眼精华素10g+10g",
"prizePic": "",
"commodityNo": "11059001"
},
"coupon": null
}
// 场景4
/**
* @my-wish
* 点击单个心愿单奖品
*/
let curWish = {
accessStatus: 1,
commodityNo: "11059001",
conditionElasticValue: 5480,
coupon: null,
elasticValue: 10000,
initialElasticValue: 33,
instanceCode: "162951b667a746188c83491bd5601164",
name: "丸美弹力蛋白眼精华素10g+10g",
order: {
acceptType: 0,
instanceCode: "162951b667a746188c83491bd5601164",
prizeName: "丸美弹力蛋白眼精华素10g+10g",
prizePic: "",
commodityNo: "11059001"
},
"P000000000000000000000000000006": {
name: "丸美雪绒花纯净保湿咕嘟咕嘟菁华露80ml",
tag: 8,
sence: 4,
point: {
left: 558,
top: 437
left: 300,
top: 300,
},
price: "548",
prizeDefineCode: "P000000000000000000000000000001",
prizeName: "丸美弹力蛋白眼精华素10g+10g",
prizePic: "",
progress: 100,
progressLeft: 169.00000000000003,
sence: 1,
status: 1,
storeRemain: 99,
tag: 3,
tips: {
type: "top-left",
point: {
fixLeft: -188,
fixTop: -314
}
point: mapFix["top-left"],
}
}
// 读取心愿单奖品
let wishbillGiftQuery = {
"status": 1,
"order": {
"coupon": {
"couponId": "20839",
"couponCode": "RLLW18Q1",
"rule": "RLLW18Q1",
"startDate": 1564912960000,
"endDate": 1567526399000,
"type": 4,
"name": "眼部护理体验券-7月24日",
"state": 0
},
"acceptType": 2,
"instanceCode": "0924988c7fb0437b99c31b97bd1f1d6c",
"storeCode": "",
"storeName": "",
"storeAddress": "",
"latitude": 0.0,
"longitude": 0.0,
"prizeName": "丸美巧克力青春丝滑眼乳霜25g",
"orderSn": "MW20190804180237100003",
"commodityNo": "11039003"
},
"coupon": null
}
/**
* @tips-prize-comp
* 自提数据
*/
let prizeLiftQuery = {
"coupon": {
"couponId": "20839",
"couponCode": "RLLW18Q1",
"rule": "RLLW18Q1",
"startDate": 1564912960000,
"endDate": 1567526399000,
"type": 4,
"name": "眼部护理体验券-7月24日",
"state": 0
},
"acceptType": 2,
"instanceCode": "0924988c7fb0437b99c31b97bd1f1d6c",
"storeCode": "",
"storeName": "",
"storeAddress": "",
"latitude": 0.0,
"longitude": 0.0,
"prizeName": "丸美巧克力青春丝滑眼乳霜25g",
"orderSn": "MW20190804180237100003",
"commodityNo": "11039003"
}
/**
* @tips-prize-comp
* 邮寄提交返回数据
*/
let prizeTableQuery = {
address: "",
associateMobile: "",
associateName: "",
city: "",
commodityNo: "11059001",
district: "",
instanceCode: "162951b667a746188c83491bd5601164",
logisticsCompany: "",
logisticsSn: "",
memberCode: "654b8d70164e4c1e83e1503d44f325db",
orderSn: "MW20190804152353100001",
prizeName: "丸美弹力蛋白眼精华素10g+10g",
prizePic: "",
province: "",
}
/**
* @tips-prize-comp
* 邮寄提交返回数据 合并
*/
let prizeTableQueryAssign = {
accessStatus: 2,
address: "",
associateMobile: "",
associateName: "",
city: "",
commodityNo: "11059001",
conditionElasticValue: 5480,
coupon: null,
district: "",
elasticValue: 10000,
initialElasticValue: 33,
instanceCode: "162951b667a746188c83491bd5601164",
logisticsCompany: "",
logisticsSn: "",
memberCode: "654b8d70164e4c1e83e1503d44f325db",
name: "丸美弹力蛋白眼精华素10g+10g",
order: {
acceptType: 0,
instanceCode: "162951b667a746188c83491bd5601164",
prizeName: "丸美弹力蛋白眼精华素10g+10g",
prizePic: "",
commodityNo: "11059001"
},
orderSn: "MW20190804152353100001",
"P000000000000000000000000000005": {
name: "丸美雪绒花纯净保湿洁面乳120g",
tag: 9,
sence: 4,
point: {
left: 558,
top: 437
left: 500,
top: 300,
},
price: "548",
prizeDefineCode: "P000000000000000000000000000001",
prizeName: "丸美弹力蛋白眼精华素10g+10g",
prizePic: "",
progress: 100,
progressLeft: 169.00000000000003,
province: "",
sence: 1,
status: 1,
storeRemain: 98,
tag: 3,
tips: {
type: "top-left",
point: {
fixLeft: -188,
fixTop: -314
},
point: mapFix["top-left"],
}
},
}
module.exports = {
productMap: productMap,
wishbillGiftQuery: wishbillGiftQuery
productMap: productMap
}
......

344 KB | W: | H:

88.7 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

28.3 KB | W: | H:

15.7 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

27.6 KB | W: | H:

14.7 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

24.8 KB | W: | H:

20.6 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

34.8 KB | W: | H:

26.1 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

42.3 KB | W: | H:

22.6 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

42.5 KB | W: | H:

26.6 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
......@@ -13,6 +13,8 @@ Page({
groupMemberCoopVisible: false,
tipsCommonVisible: false,
authorizeVisible: false,
tipsGuideRegisterVisible: false,
animationPassVisible: false,
tipsInnerText: "",
options: null,
wishInfo: {},
......@@ -21,7 +23,8 @@ Page({
userInfo: {},
canShake: true,
status: 0,
animationShake:{}, // 摇一摇动画
animationShake: {}, // 摇一摇动画
aniTimeoutIndex: 0,
},
onShareAppMessage() {},
showAuth() {
......@@ -33,11 +36,16 @@ Page({
this.setData({
options
})
console.log("onLoad");
},
onHide() {
// 注册回调的入参
if (app.globalData.coopOptions) {
this.setData({
options: app.globalData.coopOptions
})
}
console.log("onLoad");
},
onHide() {},
onShow() {
console.log("onShow");
this.initData();
......@@ -48,15 +56,32 @@ Page({
indexInfo: app.globalData.indexInfo,
userInfo: app.globalData.userInfo,
})
this.queryWishbillDetail();
this.queryWishbillDetail().then((result) => {
let {
wishInfo
} = this.data;
// 如果是本人的话,就跳转到我首页
if (wishInfo.isSelfWishBill == 1) {
this.onPlayTooHandler();
return;
}
// 判断是否需要显示注册蒙层
// 条件 1.不是本人 2.未为她助力
if (wishInfo.isSelfWishBill == 0 && wishInfo.isAssist != 1) {
this.setData({
tipsGuideRegisterVisible: true
})
}
})
this.initShake();
})
},
// 添加摇一摇
initShake() {
let _this = this;
wx.onAccelerometerChange(function (res) {
if (!_this.data.canShake) {
if (!_this.data.canShake || _this.data.tipsCommonVisible) {
return
}
if (res.x > 1) { //偏移量为2时触发,有的使用1
......@@ -73,14 +98,45 @@ Page({
path: "index"
})
},
playShakeSound() {
const innerAudioContext = wx.createInnerAudioContext()
innerAudioContext.autoplay = true;
innerAudioContext.src = "https://kdcdn.oss-cn-shenzhen.aliyuncs.com/weapp/marubi/wish-list/mp3/shake.mp3";
innerAudioContext.onPlay(() => {
console.log('开始播放')
})
innerAudioContext.onError((res) => {
console.log(res.errMsg)
console.log(res.errCode)
})
},
// 助力
queryWishbillAssist() {
if (!this.data.canShake || this.data.tipsCommonVisible) {
let {
wishInfo
} = this.data;
if (!this.data.canShake) {
return;
}
// 在弹窗状态
if (this.data.tipsCommonVisible) {
return;
}
// 自己表单
if (wishInfo.isSelfWishBill == 1) {
return;
}
// 已经助力
if (wishInfo.isAssist == 1) {
return;
}
this.setData({
canShake: false
})
this.playShakeSound();
app.post({
url: app.api.wishbillAssist,
data: {
......@@ -88,16 +144,23 @@ Page({
}
}).then((result) => {
let status = result.status;
if (status != 1) {
this.setData({
status: status
})
}
if (status == 1) {
this.setData({
animationPassVisible: true
})
setTimeout(() => {
// 助力成功
// 合并数据
let wishList = result.elasticValueList;
wishList.forEach(element => {
let product = productMap[element.prizeDefineCode + ""];
console.log("product:", product);
element = Object.assign(element, product);
let progress = element.elasticValue / element.conditionElasticValue * 100;
if (progress > 100) progress = 100;
......@@ -106,11 +169,14 @@ Page({
element.progress = progress;
element.progressLeft = progressLeft;
});
console.log("wishList:", wishList);
this.setData({
coopInfo: result,
wishList: wishList
wishList: wishList,
status: status,
animationPassVisible: false
})
}, 2000);
} else if (status == 2) {
// 助力失败
this.setData({
......@@ -175,6 +241,7 @@ Page({
groupMemberCoopVisible: false,
tipsCommonVisible: false,
authorizeVisible: false,
tipsGuideRegisterVisible: false,
})
},
// 子组件事件
......@@ -187,6 +254,22 @@ Page({
case "_evt_hide_mask":
this.hideMask();
let cid = data && data.cid || "";
if (cid == "play-too") {
this.onPlayTooHandler();
}
break;
// 前往注册页面
case "_evt_to_register":
this.hideMask();
app.globalData.coopOptions = this.data.options;
app.router.push({
path: "register",
query: {
redirect: "coop"
}
})
break;
case "_evt_auth_complete:":
......
......@@ -48,12 +48,14 @@
}
.coop-shake {
width: 306px;
height: 335px;
// width: 306px;
// height: 335px;
width: 290px;
height: 318px;
position: absolute;
left: 0;
right: 0;
top: 170px;
top: 190px;
margin: 0 auto;
}
......@@ -68,8 +70,8 @@
margin: 0 auto;
width: 480px;
color: #333333;
// font-size: 28px;
font-size: 24px;
font-size: 28px;
// font-size: 24px;
line-height: 1.6;
height: 140px;
@include ellipsis(3);
......@@ -349,3 +351,28 @@
}
}
}
.ani {
position: relative;
.mask {
background-color: rgba($color: #000000, $alpha: .8);
width: 100%;
height: 100%;
z-index: 101;
position: fixed;
bottom: 0;
}
.gif {
position: absolute;
left: 80px;
// right: 0;
// margin: 0 auto;
top: 300px;
width: 600px;
height: 332px;
z-index: 9999;
}
}
......
<view class="page">
<view wx:if="{{animationPassVisible}}" class="ani">
<view class="mask"></view>
<image class="gif" mode="widthFix" src="../../image/oss/ani/pass.gif" />
</view>
<view class="app__bgc bgc"></view>
<image class="bg" src="../../image/oss/coop/coop-bg-1.png" mode="scaleToFill" />
<view class="decoration">
......@@ -9,18 +13,19 @@
<view class="content">
<!-- 摇一摇 -->
<!-- bindtap="queryWishbillAssist" -->
<!-- 点自己链接
未助力 -->
<view bindtap="queryWishbillAssist" wx:if="{{options.code == indexInfo.wishBillCode || (status != 1 && wishInfo.isAssist != 1)}}" class="shake">
<!-- 点自己链接未助力 -->
<view bindtap="queryWishbillAssist" wx:if="{{wishInfo.isSelfWishBill == 1 || (status != 1 && wishInfo.isAssist != 1)}}" class="shake">
<image class="ebg" mode="widthFix" src="../../image/oss/coop/coop-c2.png" />
<image class="coop-shake animated tada infinite" mode="widthFix " src="../../image/oss/coop/coop-shake.png" />
<image class="coop-shake animated infinite {{animationPassVisible?'':'tada'}}" mode="widthFix" src="../../image/oss/coop/coop-shake.png" />
<view class="space1"></view>
<view class="cont">
<view class="tips">
<!-- 你的好友
<span class="t1">{{wishInfo.member.nickname}}</span>
的心愿单需要你的帮助哦!拿起手机摇一摇,即可为ta贡献弹力值! -->
亲爱的好友,我的丸美心愿单需要你的帮助,拿起手机摇一摇,为我的心愿注入弹力值~
亲爱的好友,
<span class="t1">{{wishInfo.member.nickname}}</span>
的丸美心愿单需要你的帮助,拿手机摇一摇,为TA的心愿注入弹力值~
</view>
<view class="wish">
<view wx:for="{{wishList}}" wx:key="{{index}}" class="wish-item">
......@@ -31,7 +36,7 @@
</view>
</view>
</view>
<view bindtap="onPlayTooHandler" class="play-too-btn">我也要玩</view>
<!-- <view bindtap="onPlayTooHandler" class="play-too-btn">我也要玩</view> -->
</view>
<!-- 摇后结果 -->
<view wx:else class="result-wrap">
......@@ -82,7 +87,9 @@
</view>
</view>
</view>
<view bindtap="onPlayTooHandler" class="play-too-btn">我也要玩</view>
<view wx:if="{{isSelfWishBill == 1 || (status != 1 && wishInfo.isAssist != 1)}}" bindtap="onPlayTooHandler" class="play-too-btn">
我也要玩
</view>
</view>
</view>
</view>
......@@ -91,7 +98,10 @@
<tips-group-member-coop-comp bind:evtcomp="evtcomp"></tips-group-member-coop-comp>
</van-popup>
<van-popup show="{{ tipsCommonVisible }}">
<tips-common-comp bind:evtcomp="evtcomp" inner-text="{{tipsInnerText}}"></tips-common-comp>
<tips-common-comp bind:evtcomp="evtcomp" inner-text="{{tipsInnerText}}" inner-button="我也要玩" cid="play-too"></tips-common-comp>
</van-popup>
<van-popup show="{{ tipsGuideRegisterVisible }}">
<tips-guide-register-comp bind:evtcomp="evtcomp" inner-text="注册成为丸美新会员,\n可为好友心愿注入更多弹力值噢~"></tips-guide-register-comp>
</van-popup>
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
......
......@@ -72,7 +72,8 @@ Page({
// let targetProductList = productList1;
// let randomIndex = targetProductList[Math.floor(Math.random() * targetProductList.length)];
// this.doShowTipsBorder(randomIndex);
this.doShowTipsBorder("P000000000000000000000000000002");
// this.doShowTipsBorder("P000000000000000000000000000008");
this.doShowTipsBorder("P000000000000000000000000000008");
},
// 添加摇一摇
......@@ -305,8 +306,13 @@ Page({
let curData = productMap[curIndex + ""];
let product = getObjByListKeyValue(curIndex, 'prizeDefineCode', this.data.candidate);
curData = Object.assign(curData, product)
let curWish = curData;
console.log("curWish:", curData);
console.log("top:", curWish.point.top + curWish.tips.point.fixTop);
console.log("left:", curWish.point.left + curWish.tips.point.fixLeft);
this.setData({
curWish: curData,
curWish: curWish,
tipsBorderVisible: true,
});
},
......@@ -382,14 +388,9 @@ Page({
* @param {*} evt
*/
onChangeStatusHandler(evt) {
wx.showToast({
title: "场景修缉中,敬请期待",
icon: "none"
});
return;
let curStatus = this.data.curStatus;
curStatus++;
if (curStatus > 3) {
if (curStatus > 4) {
curStatus = 1;
}
this.setData({
......
......@@ -6,9 +6,22 @@
// 场景1背景
.bgc1 {
background-color: #ffd5da;
background-color: #e5f5f7;
}
.bgc2 {
background-color: #e68892;
}
.bgc3 {
background-color: #f9eae0;
}
.bgc4 {
background-color: #a7e6f1;
}
.bg {}
.sence {
......@@ -38,48 +51,149 @@
}
}
// 场景1
.view1 {
.ebg {
height: 1303px;
}
.point1 {
left: 111px;
top: 258px;
left: 210px;
top: 300px;
}
.point2 {
left: 337px;
top: 350px;
left: 460px;
top: 180px;
}
.point3 {
left: 558px;
top: 437px;
left: 450px;
top: 520px;
}
.rect1 {
width: 150px;
height: 360px;
left: 40px;
width: 180px;
height: 440px;
left: 110px;
top: 160px;
}
.rect2 {
width: 150px;
height: 150px;
left: 234px;
top: 350px;
width: 180px;
height: 380px;
left: 424px;
top: 70px;
}
.rect3 {
width: 150px;
width: 200px;
height: 186px;
left: 414px;
top: 500px;
}
}
// 场景2
.view2 {
.point1 {
left: 300px;
top: 300px;
}
.point2 {
left: 500px;
top: 300px;
}
.rect1 {
width: 120px;
height: 320px;
left: 270px;
top: 170px;
transform: rotate(25deg);
}
.rect2 {
width: 120px;
height: 320px;
left: 445px;
top: 210px;
transform: rotate(30deg);
}
}
// 场景3
.view3 {
.point1 {
left: 210px;
top: 300px;
}
.point2 {
left: 380px;
top: 180px;
}
.point3 {
left: 540px;
top: 440px;
}
.rect1 {
width: 180px;
height: 440px;
left: 130px;
top: 200px;
}
.rect2 {
width: 130px;
height: 380px;
left: 534px;
top: 220px;
left: 320px;
top: 110px;
}
.rect3 {
width: 200px;
height: 186px;
left: 470px;
top: 370px;
}
}
// 场景4
.view4 {
.point1 {
left: 300px;
top: 300px;
}
.point2 {
left: 500px;
top: 300px;
}
.rect1 {
width: 100px;
height: 340px;
left: 290px;
top: 200px;
transform: rotate(18deg);
}
.rect2 {
width: 120px;
height: 320px;
left: 410px;
top: 240px;
transform: rotate(14deg);
}
}
.tips-border {
position: absolute;
width: 208px;
......@@ -144,6 +258,8 @@
// 换一批按钮
.change-btn {
position: relative;
z-index: 9999;
margin-left: 48px;
box-shadow: 0px 6px 30px 0 rgba(126, 40, 40, 0.5);
background-color: #ffffff;
......@@ -326,16 +442,16 @@
}
&-item-1 {
width: 644px;
height: 246px;
top: 158px;
left: 20px;
width: 402px;
height: 451px;
top: 76px;
left: 36px;
}
&-item-2 {
width: 639px;
height: 169px;
top: 496px;
left: 40px;
width: 420px;
height: 475px;
top: 502px;
left: 24px;
}
}
......
......@@ -4,22 +4,47 @@
<image wx:if="{{guideIndex == 1}}" class="guide-item guide-item-1" mode="widthFix" src="../../image/guide/guide-c-wish-1.png" />
<image wx:if="{{guideIndex == 2}}" class="guide-item guide-item-2" mode="widthFix" src="../../image/guide/guide-c-wish-2.png" />
</view>
<view class="app__bgc bgc {{curStatus==1?'bgc1':''}}"></view>
<!-- <view class="app__bgc bgc {{curStatus==1?'bgc1':''}} {{curStatus==2?'bgc2':''}} {{curStatus==3?'bgc3':''}} {{curStatus==4?'bgc4':''}}"></view> -->
<view class="app__bgc bgc {{'bgc'+curStatus}}"></view>
<view class="app__bg bg"></view>
<!-- 场景 -->
<view class="sence">
<!-- 第一幕 -->
<!-- 场景1 -->
<view wx:if="{{curStatus==1}}" class="view view1">
<image class="ebg" src="{{'../../image/oss/create-wish/create-wish-1.png'}}" mode="scaleToFill" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000002" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000003" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000001" class="point point3" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<view class="rect rect1" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000002"></view>
<view class="rect rect2" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000003"></view>
<view class="rect rect3" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000001"></view>
</view>
<view wx:if="{{curStatus==2}}" class="view view2">场景待确认2</view>
<view wx:if="{{curStatus==3}}" class="view view3">场景待确认3</view>
<image class="ebg" src="{{'../../image/oss/create-wish/create-wish-1.png?ver=1'}}" mode="widthFix" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000008" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000010" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000009" class="point point3" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<view class="rect rect1" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000008"></view>
<view class="rect rect2" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000010"></view>
<view class="rect rect3" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000009"></view>
</view>
<!-- 场景2 -->
<view wx:if="{{curStatus==2}}" class="view view2">
<image class="ebg" src="{{'../../image/oss/create-wish/create-wish-2.png?ver=1'}}" mode="widthFix" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000007" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000004" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<view class="rect rect1" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000007"></view>
<view class="rect rect2" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000004"></view>
</view>
<!-- 场景3 -->
<view wx:if="{{curStatus==3}}" class="view view3">
<image class="ebg" src="{{'../../image/oss/create-wish/create-wish-3.png?ver=1'}}" mode="widthFix" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000001" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000002" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000003" class="point point3" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<view class="rect rect1" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000001"></view>
<view class="rect rect2" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000002"></view>
<view class="rect rect3" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000003"></view>
</view>
<!-- 场景4 -->
<view wx:if="{{curStatus==4}}" class="view view4">
<image class="ebg" src="{{'../../image/oss/create-wish/create-wish-4.png?ver=1'}}" mode="widthFix" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000006" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000005" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" />
<view class="rect rect1" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000006"></view>
<view class="rect rect2" bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000005"></view>
</view>
<!-- 详情 -->
<view wx:if="{{tipsBorderVisible}}" class="tips-border" style="top:{{curWish.point.top+curWish.tips.point.fixTop}}rpx;left:{{curWish.point.left+curWish.tips.point.fixLeft}}rpx;">
<view class="rel">
......
......@@ -26,10 +26,13 @@ Page({
// this.setData({
// wishList: wishList
// })
app.queryIndex().then((result) => {
app.queryIndex({
auth: true,
loading: false,
}).then((result) => {
console.log("result:", result);
wx.showLoading({
title: '生成中',
title: '海报生成中',
});
this.initData();
})
......@@ -47,6 +50,7 @@ Page({
// 获取小程序码
app.post({
loading: false,
url: app.api.wxacodeGet,
data: {
path: encodeURIComponent(wxCodePath)
......
......@@ -215,6 +215,20 @@
.last {
border-bottom: none;
}
.empty {
text-align: center;
// padding-top: 80px;
.logo {
width: 140px;
height: 140px;
}
.tips{
color: #333333;
}
}
}
}
}
......
<view class="page">
<view class="app__bgc bgc"></view>
<view class="app__bg bg"></view>
<view class="decoration">
<image class="d1" src="../../image/oss/rank/rank-d1.png" mode="widthFix" />
<image class="d2" src="../../image/oss/rank/rank-d2.png" mode="widthFix" />
......@@ -56,7 +55,7 @@
</view>
</view>
<!-- 下方排行榜 -->
<view class="rank">
<view wx:if="{{downRank.length > 2}}" class="rank">
<view wx:for="{{downRank}}" wx:key="{{index}}" class="rank-item {{downRank.length-1 == index?'last':''}}">
<view class="no">NO.{{item.no}}</view>
<view class="portrait">
......@@ -66,6 +65,14 @@
<view class="val">{{item.elasticValue}}</view>
</view>
</view>
<view wx:else class="rank">
<view class="empty">
<!-- <image class="logo" src="../../image/logo.png" mode="aspectFit" /> -->
<view class="tips">
<text >活动火热进行中\n排名信息正在努力整理·····</text>
</view>
</view>
</view>
</view>
</view>
</view>
......
......@@ -344,30 +344,30 @@
}
&-item-1 {
width: 459px;
height: 281px;
top: 30px;
width: 438px;
height: 426px;
top: 25px;
right: 2px;
}
&-item-2 {
width: 565px;
height: 281px;
top: 296px;
left: 127px;
width: 514px;
height: 419px;
top: 350px;
left: 217px;
}
&-item-3 {
width: 565px;
height: 281px;
top: 899.8px;
left: 159px;
width: 514px;
height: 445px;
top: 860px;
left: -34px;
}
&-item-4 {
width: 410px;
height: 199px;
top: 1588px;
left: 292px;
width: 608px;
height: 426px;
top: 1574px;
left: 95px;
}
}
......