Commit 937b3b9d authored by wangxuelai's avatar wangxuelai

''

parent 9f25c328
......@@ -5,6 +5,9 @@ import {
import {
getwechatmobile
} from '../../service/customer/activity.js';
import {
LocalStorage
} from '../../utilities/index.js';
import regexp from '../../constants/regexp.js';
var app = getApp();
Component({
......@@ -17,7 +20,10 @@ Component({
floatBallShow: false,
name: '',
mobile: '',
sessionCode: ''
sessionCode: '',
transformOrigin: '',
animationData: '',
contentHide: false
},
properties: {
schoolname: {
......@@ -40,6 +46,7 @@ Component({
attached() {
},
detached () {
clearTimeout(this.timeout)
// this.judgeIsClock();
},
ready() {
......@@ -61,21 +68,33 @@ Component({
resize() { },
},
methods: {
retract () {
retract (e) {
if (this.data.retract == true) {
this.triggerEvent('resetretract')
return;
}
const SystemInfo = wx.getSystemInfoSync();
const {windowHeight, windowWidth} = SystemInfo;
let dialogOffSetLeft = Math.floor((windowWidth - 297) / 2);
let dialogOffSetTop = Math.floor((windowHeight - 352) / 2);
this.setData({
diashow: true
diashow: true,
transformOrigin: `${e.currentTarget.offsetLeft - dialogOffSetLeft + 30}px ${e.currentTarget.offsetTop - dialogOffSetTop + 30}px`
})
},
hideDia () {
this.setData({
diashow: false
contentHide: true
})
setTimeout(() => {
this.setData({
contentHide: false,
diashow: false
})
}, 200)
},
judgeJoinAd () {
const that = this;
judgeJoinAd({
source_id: this.data.sid,
school_id: this.data.sid,
......@@ -87,7 +106,28 @@ Component({
} else {
this.setData({
floatBallShow: true
}, () => {
this.createSelectorQuery().select('#floatball').boundingClientRect(function(rect){
const SystemInfo = wx.getSystemInfoSync();
const {windowHeight, windowWidth} = SystemInfo;
let dialogOffSetLeft = Math.floor((windowWidth - 297) / 2);
let dialogOffSetTop = Math.floor((windowHeight - 352) / 2);
that.setData({
transformOrigin: `${rect.left - dialogOffSetLeft + 30}px ${rect.top - dialogOffSetTop + 30}px`
})
}).exec()
})
let advertisementShow = LocalStorage.getItem('advertisementShow') || {};
if (advertisementShow[this.data.sid]) {
return
}
this.timeout = setTimeout(() => {
this.setData({
diashow: true
})
advertisementShow[this.data.sid] = true;
LocalStorage.setItem('advertisementShow', advertisementShow);
}, 5000)
}
})
},
......
<view class="advertisement" hover-class="none" hover-stop-propagation="false">
<view class="floatball {{retract ? 'retract' : 'unretract'}}" hover-class="none" hover-stop-propagation="false" bindtap="retract" wx:if="{{floatBallShow}}">
<view id="floatball" class="floatball {{retract ? 'retract' : 'unretract'}}" hover-class="none" hover-stop-propagation="false" bindtap="retract" wx:if="{{floatBallShow}}">
<image class="manheader" src="{{imageRoot}}advertisement/manheader.png?22" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<image class="jointext" src="{{imageRoot}}advertisement/jointext.png" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<image class="arrowright" src="{{imageRoot}}advertisement/arrowright.png" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
</view>
<view class="advertisedia" hover-class="none" hover-stop-propagation="false" wx:if="{{diashow}}">
<view class="advertisedia" hover-class="none" hover-stop-propagation="false" hidden="{{!diashow}}">
<view class="mask" hover-class="none" hover-stop-propagation="false"></view>
<view class="dia-content" hover-class="none" hover-stop-propagation="false">
<view class="dia-content {{contentHide ? 'dia-content-hide' : 'dia-content-show'}}" hover-class="none" hover-stop-propagation="false" style="transform-origin: {{transformOrigin}}">
<image class="diaheader" src="{{imageRoot}}advertisement/diaheader.png?22" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<image class="close" bindtap="hideDia" src="{{imageRoot}}advertisement/close.png?22" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<view class="diadesc" hover-class="none" hover-stop-propagation="false">您是否也想获得该老师的指导?</view>
......@@ -16,7 +16,7 @@
</view>
<view class="inputitem mobile" hover-class="none" hover-stop-propagation="false">
<input type="number" maxlength="11" class="inputtext" placeholder="请填入您的手机号" value="{{mobile}}" bindinput="mobileInput" placeholder-class="placeholder-class"/>
<button class="getmobile" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">一键获取</button>
<button class="getmobile" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">一键填入</button>
</view>
<view class="warn-text" hover-class="none" hover-stop-propagation="false">*老师会通过您留下的信息联系您</view>
<view class="submitbtn" hover-class="none" hover-stop-propagation="false" bindtap="commit">提交</view>
......
......@@ -23,6 +23,26 @@
opacity: 1;
}
}
@keyframes scaleTo1 {
0% {
transform: scale(0);
opacity: 0;
}
100% {
transform: scale(1);
opacity: 1;
}
}
@keyframes scaleTo0 {
0% {
transform: scale(1);
opacity: 1;
}
100% {
transform: scale(0);
opacity: 0;
}
}
@keyframes jointextbreak {
0% {
transform: scale(1);
......@@ -46,6 +66,10 @@
left: 0;
z-index: 999;
}
.advertisediashow {
display: block;
}
.floatball {
position: fixed;
width: 80px;
......@@ -98,7 +122,10 @@
display: flex;
align-items: center;
justify-content: center;
animation: fadeIn 0.5s linear forwards;
/* animation: fadeIn 0.5s linear forwards; */
}
.advertisediahide {
display: none;
}
.advertisedia .mask {
width: 100%;
......@@ -119,6 +146,12 @@
/* overflow: hidden; */
padding-top: 145rpx;
}
.dia-content-show {
animation: scaleTo1 0.2s linear 1 forwards;
}
.advertisedia .dia-content.dia-content-hide {
animation: scaleTo0 0.2s linear 1 forwards;
}
.dia-content .diaheader {
position: absolute;
width: 100%;
......@@ -136,6 +169,8 @@
font-weight: 700;
margin-top: 77rpx;
line-height: 1;
letter-spacing: 2rpx;
font-family: PingFang-SC-Bold;
}
.giveclass {
color: #949494;
......@@ -143,21 +178,21 @@
line-height: 1;
text-align: center;
margin-bottom: 46rpx;
letter-spacing: 1rpx;
letter-spacing: 2rpx;
}
.inputitem {
width: 450rpx;
height: 70rpx;
margin: 0 auto;
border-radius: 35rpx;
background-color: #F7F7F9;
background-color: #F5F5F5;
overflow: hidden;
display: flex;
align-items: center;
justify-content: space-between;
}
.placeholder-class {
color: #858585;
color: rgba(0,0,0,0.2);
font-size: 26rpx;
}
.inputitem .inputtext {
......
......@@ -537,20 +537,16 @@ Component({
generatelongimg () {
let page = '';
let scene = '';
let themeId;
switch (Number(this.data.clock.subject.subject_type)) {
case 1:
themeId = this.data.clock.subject_id;
page = 'src/pages/themeindex/index';
scene = `i=${this.data.clock.class_id}&t=${this.data.clock.subject_id}`
break;
case 2:
themeId = this.data.clock.subject_id;
page = 'src/pages/calendarthemeindex/index';
scene = `i=${this.data.clock.class_id}&t=${this.data.clock.subject_id}`
break;
case 3:
themeId = this.data.clock.unlock_mode_id;
scene = `i=${this.data.clock.class_id}&t=${this.data.clock.unlock_mode_id}`
page = 'src/pages/morethemeindex/index';
break;
......@@ -566,12 +562,12 @@ Component({
}).then((res) => {
wx.hideLoading();
if (res.code == 200) {
// wxPreviewImage({
// urls: [`data:image/jpeg;base64,${res.data.data}`],
// current: `data:image/jpeg;base64,${res.data.data}`
// })
wxPreviewImage({
urls: [imagify(res.data.data)],
current: imagify(res.data.data)
})
this.triggerEvent('integrallogpost', {
themeId
themeId: this.data.clock.id
})
}
}).catch(() => {
......
......@@ -170,7 +170,8 @@ Page({
},
preScrollerToTop: 0,
nextScrollerToTop: 0,
paintingType: ''
paintingType: '',
advertisementshow: true
},
onLoad: function (options) { // Do some initialize when page load.
// this.getWeeksDay(new Date());
......@@ -195,7 +196,8 @@ Page({
id: i,
tid: t,
d: d || '',
pagefrom: ''
pagefrom: '',
advertisementshow: true
})
} else {
const {
......@@ -220,7 +222,8 @@ Page({
id,
tid,
d: d || '',
pagefrom: pagefrom ? pagefrom : ''
pagefrom: pagefrom ? pagefrom : '',
advertisementshow: true
})
}
this.getmycalendar();
......@@ -248,6 +251,7 @@ Page({
this.setData({
hasmore: true,
clockPage: 1,
advertisementshow: true
})
this.clockListGet('init');
this.selfClockGet();
......@@ -303,10 +307,14 @@ Page({
this.resetAudiosPlayStatus()
clearInterval(this.data.voiceInterval);
this.didAnimation();
this.setData({
advertisementshow: false
})
},
onUnload: function () { // Do something when page close.
this.innerAudioContext.destroy();
this.setData({
advertisementshow: false,
audioStorage: {
}
......@@ -2541,7 +2549,6 @@ Page({
source_type: 1,
source_id: e.detail.themeId
}).then((res) => {
// const {integral} = res;
if (res.integral && Number(res.integral) > 0) {
this.setData({
scoreFeedBackStatus: {
......@@ -2560,18 +2567,20 @@ Page({
})
generatePiiic({
type: 2,
record_id: this.data.tid,
subject_id: this.data.tid,
page: 'src/pages/calendarthemeindex/index',
scene: `i=${this.data.id}&t=${this.data.tid}`
}).then((res) => {
wx.hideLoading();
if (res.code == 200) {
// wxPreviewImage({
// urls: [`data:image/jpeg;base64,${res.data.data}`],
// current: `data:image/jpeg;base64,${res.data.data}`
// })
this.triggerEvent('integrallogpost', {
themeId
wxPreviewImage({
urls: [imagify(res.data.data)],
current: imagify(res.data.data)
})
this.integrallogpost({
detail: {
themeId: res.data.record_id
}
})
}
}).catch(() => {
......@@ -2581,5 +2590,4 @@ Page({
})
})
},
}
})
\ No newline at end of file
......@@ -35,7 +35,7 @@
mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
</view>
<view class="text" hover-class="none" hover-stop-propagation="false">
生成日签
生成海报
</view>
</view>
<view class="nav-item" hover-class="none" hover-stop-propagation="false" bindtap="goRankList">
......@@ -411,7 +411,7 @@
>
</activity-bar>
</view>
<view class="" wx:if="{{circleInfo.school_id != 0}}" hover-class="none" hover-stop-propagation="false">
<view class="" wx:if="{{circleInfo.school_id != 0 && advertisementshow}}" hover-class="none" hover-stop-propagation="false">
<advertisement
sid="{{circleInfo.school_id}}"
bind:resetretract="resetretract"
......
......@@ -196,7 +196,8 @@ Page({
name: ''
},
preScrollerToTop: 0,
nextScrollerToTop: 0
nextScrollerToTop: 0,
advertisementshow: true
},
onLoad: function(options) { // Do some initialize when page load.
this.innerAudioContext = wx.createInnerAudioContext(); // 当前页面唯一的一个音频容器
......@@ -216,7 +217,8 @@ Page({
id: i,
id2: i,
consumerId: ctd,
selfCustomerId
selfCustomerId,
advertisementshow: true
})
} else {
const {id, consumerId} = options;
......@@ -224,7 +226,8 @@ Page({
id,
id2: id,
consumerId,
selfCustomerId
selfCustomerId,
advertisementshow: true
})
}
wx.setNavigationBarTitle({
......@@ -274,6 +277,7 @@ Page({
})
}
that.setData({
advertisementshow: true,
clockList: that.data.clockList
})
})
......@@ -284,10 +288,14 @@ Page({
this.resetAudiosPlayStatus()
clearInterval(this.data.voiceInterval);
this.didAnimation();
this.setData({
advertisementshow: false
})
},
onUnload: function() { // Do something when page close.
this.innerAudioContext.pause();
this.setData({
advertisementshow: false,
audioStorage: {
}
......
......@@ -412,7 +412,7 @@
integral="{{scoreFeedBackStatus.integral}}"
bind:closefeedback="closefeedback"
></scoregetfeedback>
<view class="" wx:if="{{sid != 0}}" hover-class="none" hover-stop-propagation="false">
<view class="" wx:if="{{sid != 0 && advertisementshow}}" hover-class="none" hover-stop-propagation="false">
<advertisement
sid="{{sid}}"
bind:resetretract="resetretract"
......
......@@ -14,7 +14,8 @@ import {
import {
rankrecord,
unlockClockRank,
integralLog
integralLog,
generatePiiic
} from '../../../service/common.js';
import {
userShow,
......@@ -168,7 +169,8 @@ Page({
allentrydialog:false,
preScrollerToTop: 0,
nextScrollerToTop: 0,
paintingType: ''
paintingType: '',
advertisementshow: true
},
onLoad: function (options) { // Do some initialize when page load.
this.innerAudioContext = wx.createInnerAudioContext(); // 当前页面唯一的一个音频容器
......@@ -197,7 +199,8 @@ Page({
this.setData({
id: i,
tid: t,
pagefrom: ''
pagefrom: '',
advertisementshow: true
})
} else {
const {
......@@ -241,11 +244,11 @@ Page({
id,
tid,
pagefrom: pagefrom ? pagefrom : '',
sub:sub || ''
sub:sub || '',
advertisementshow: true
}, () => {
})
console.log(`i=${id}&t=${tid}`);
}
this.getModesDetail();
},
......@@ -270,6 +273,7 @@ Page({
this.setData({
hasmore: true,
clockPage: 1,
advertisementshow: true
})
this.doAnimation();
this.userShow()
......@@ -310,10 +314,14 @@ Page({
clearInterval(this.data.voiceInterval);
this.didAnimation();
clearInterval(this.timer);
this.setData({
advertisementshow: false
})
},
onUnload: function () { // Do something when page close.
this.innerAudioContext.destroy();
this.setData({
advertisementshow: false,
audioStorage: {
}
......@@ -2427,5 +2435,34 @@ Page({
this.autoclosefeedback();
}
})
}
},
generatePiiic () {
wx.showLoading({
title: '打卡详情长图生成中...'
})
generatePiiic({
type: 2,
subject_id: this.data.tid,
page: 'src/pages/morethemeindex/index',
scene: `i=${this.data.id}&t=${this.data.tid}`
}).then((res) => {
wx.hideLoading();
if (res.code == 200) {
wxPreviewImage({
urls: [imagify(res.data.data)],
current: imagify(res.data.data)
})
this.integrallogpost({
detail: {
themeId: res.data.record_id
}
})
}
}).catch(() => {
wx.hideLoading();
wx.showToast({
title: '打卡长图生成失败'
})
})
},
})
\ No newline at end of file
......@@ -25,7 +25,7 @@
邀请好友
</view>
</view>
<view class="nav-item" hover-class="none" hover-stop-propagation="false" bindtap="generateNewPoster">
<!-- <view class="nav-item" hover-class="none" hover-stop-propagation="false" bindtap="generateNewPoster">
<view class="icon" hover-class="none" hover-stop-propagation="false">
<image class="icon2" src="{{imageRoot}}2c/themeindex/img-iocn.png"
mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
......@@ -33,6 +33,15 @@
<view class="text" hover-class="none" hover-stop-propagation="false">
生成日签
</view>
</view> -->
<view class="nav-item" hover-class="none" hover-stop-propagation="false" bindtap="generatePiiic">
<view class="icon" hover-class="none" hover-stop-propagation="false">
<image class="icon2" src="{{imageRoot}}2c/themeindex/img-iocn.png"
mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
</view>
<view class="text" hover-class="none" hover-stop-propagation="false">
生成海报
</view>
</view>
<view class="nav-item" hover-class="none" hover-stop-propagation="false" bindtap="goRankList">
<view class="icon" hover-class="none" hover-stop-propagation="false">
......@@ -365,7 +374,7 @@
<view class="content-footer next-footer" hover-class="none" hover-stop-propagation="false" bindtap="hideallentrydialog">知道了</view>
</view>
</view>
<view class="" wx:if="{{circleInfo.school_id != 0}}" hover-class="none" hover-stop-propagation="false">
<view class="" wx:if="{{circleInfo.school_id != 0 && advertisementshow}}" hover-class="none" hover-stop-propagation="false">
<advertisement
sid="{{circleInfo.school_id}}"
bind:resetretract="resetretract"
......
......@@ -31,7 +31,8 @@ import {
activityLog,
rankrecord,
integralLog,
getActivities
getActivities,
generatePiiic
} from '../../../service/common.js';
import {
getSchoolDetail
......@@ -200,7 +201,8 @@ Page({
this.setData({
id: i,
tid: t,
pagefrom: ''
pagefrom: '',
advertisementshow: true
})
} else {
const {
......@@ -222,6 +224,7 @@ Page({
id,
tid,
pagefrom: pagefrom ? pagefrom : '',
advertisementshow: true
}, () => {
})
......@@ -265,6 +268,7 @@ Page({
this.doAnimation();
this.userShow();
this.setData({
advertisementshow: true,
activitybarloaded: true
})
},
......@@ -305,6 +309,7 @@ Page({
this.didAnimation();
clearInterval(this.timer);
this.setData({
advertisementshow: false,
activitybarloaded: false
})
},
......@@ -319,6 +324,7 @@ Page({
clearInterval(this.timer);
this.didAnimation();
this.setData({
advertisementshow: false,
activitybarloaded: false
})
},
......@@ -2210,5 +2216,34 @@ Page({
this.autoclosefeedback();
}
})
}
},
generatePiiic () {
wx.showLoading({
title: '打卡详情长图生成中...'
})
generatePiiic({
type: 2,
subject_id: this.data.tid,
page: 'src/pages/themeindex/index',
scene: `i=${this.data.id}&t=${this.data.tid}`
}).then((res) => {
wx.hideLoading();
if (res.code == 200) {
wxPreviewImage({
urls: [imagify(res.data.data)],
current: imagify(res.data.data)
})
this.integrallogpost({
detail: {
themeId: res.data.record_id
}
})
}
}).catch(() => {
wx.hideLoading();
wx.showToast({
title: '打卡长图生成失败'
})
})
},
})
\ No newline at end of file
......@@ -20,7 +20,7 @@
邀请好友
</view>
</view>
<view class="nav-item" hover-class="none" hover-stop-propagation="false" bindtap="generateNewPoster">
<!-- <view class="nav-item" hover-class="none" hover-stop-propagation="false" bindtap="generateNewPoster">
<view class="icon" hover-class="none" hover-stop-propagation="false">
<image class="icon2" src="{{imageRoot}}2c/themeindex/img-iocn.png"
mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
......@@ -28,6 +28,15 @@
<view class="text" hover-class="none" hover-stop-propagation="false">
生成日签
</view>
</view> -->
<view class="nav-item" hover-class="none" hover-stop-propagation="false" bindtap="generatePiiic">
<view class="icon" hover-class="none" hover-stop-propagation="false">
<image class="icon2" src="{{imageRoot}}2c/themeindex/img-iocn.png"
mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
</view>
<view class="text" hover-class="none" hover-stop-propagation="false">
生成海报
</view>
</view>
</view>
</view>
......@@ -327,7 +336,7 @@
<view class="floatsubmitbtn-box " hover-class="none" hover-stop-propagation="false" wx:if="{{!isClock && clockFloatBtnShow && circleInfo.school_id == activtySchoolInfo.sid}}">
<view class="floatsubmitbtn" bindtap="goClock" hover-class="none" hover-stop-propagation="false">提交</view>
</view>
<view class="" hover-class="none" hover-stop-propagation="false" wx:if="{{circleInfo.school_id != 0}}">
<view class="" hover-class="none" hover-stop-propagation="false" wx:if="{{circleInfo.school_id != 0 && advertisementshow}}">
<advertisement
sid="{{circleInfo.school_id}}"
retract="{{retract}}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment