Commit a612a244 authored by wangxuelai's avatar wangxuelai

''

parent bcabebbb
......@@ -110,8 +110,10 @@ Component({
})
wx.hideLoading();
if (res.code == 200) {
console.log(res.data, 'sadsad');
this.triggerEvent('hidecommenteditor', {
comment: res.data
comment: res.data,
integral: res.integral || 1
})
}
}).catch(() => {
......@@ -120,6 +122,7 @@ Component({
submiting: false
})
this.triggerEvent('hidecommenteditor', {
integral: 0
})
})
}else{
......
var app = getApp();
Component({
data: {
imageRoot: app.globalData.imageRoot,
imageVersion: app.globalData.imageVersion,
localimageRoot: '../../images/'
},
properties: {
scoretype: {
type: Number,
value: 1, // 1打卡获得弹窗 2 其他行为获取弹窗
},
integral: {
type: Number,
value: 0
},
scorefeedbackshow: {
type: Boolean,
value: false
},
nowtime: { // 服务器当前时间
type: String,
value: ''
}
},
ready () {
},
methods: {
}
})
\ No newline at end of file
{
"component": true
}
\ No newline at end of file
<view class="score-get-feedback" hover-class="none" hover-stop-propagation="false" wx:if="{{scorefeedbackshow}}">
<view class="score-get-mask" hover-class="none" hover-stop-propagation="false"></view>
<view class="score-get-type-a" hover-class="none" hover-stop-propagation="false" wx:if="{{scoretype == 1}}">
<image class="close" src="{{localimageRoot}}2c/scoregetaction/close.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<image class="getcontent" src="{{localimageRoot}}2c/scoregetaction/getcontent.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<image class="lightbg" src="{{localimageRoot}}2c/scoregetaction/lightbg.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<view class="static" hover-class="none" hover-stop-propagation="false">
<text class="awardtitle" selectable="false" space="false" decode="false">奖励积分</text>
<text class="awardstatic" selectable="false" space="false" decode="false">+{{integral}}</text>
</view>
</view>
<view class="score-get-type-b" hover-class="none" hover-stop-propagation="false" wx:if="{{scoretype == 2}}">
<image class="iconitem" src="{{localimageRoot}}2c/scoregetaction/iconitem.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<image class="starbg" src="{{localimageRoot}}2c/scoregetaction/starbg.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<view class="scoregetstatic" hover-class="none" hover-stop-propagation="false">
<image class="smallicon" src="{{localimageRoot}}2c/scoregetaction/smallicon.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<text class="awardstatic1" selectable="false" space="false" decode="false">X</text>
<text class="awardstatic2" selectable="false" space="false" decode="false">{{integral}}</text>
</view>
<view class="statictext" hover-class="none" hover-stop-propagation="false">恭喜你,点赞成功!获得{{integral}}积分~</view>
</view>
</view>
\ No newline at end of file
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.score-get-feedback {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 600;
display: flex;
align-items: center;
justify-content: center;
}
.score-get-mask {
background-color: rgba(0,0,0,0.5);
position: absolute;
left: 0;
top: 0;
z-index: 1;
width: 100%;
height: 100%;
}
.getcontent {
width: 520rpx;
height: 650rpx;
position: absolute;
left: 50%;
top: 150rpx;
margin-left: -260rpx;
z-index: 4;
}
.lightbg {
width: 750rpx;
position: absolute;
left: 0;
top: 250rpx;
height: 756rpx;
z-index: 2;
}
.close {
position: absolute;
width: 50rpx;
height: 50rpx;
z-index: 5;
right: 94rpx;
top: 200rpx;
}
.static {
position: absolute;
width: 100%;
left: 0;
top: 600rpx;
z-index: 7;
text-align: center;
}
.static .awardtitle {
font-size: 38rpx;
color: #FBB233;
font-weight: 700;
}
.static .awardstatic {
font-size: 61rpx;
color: #FBB233;
font-weight: 700;
padding-left: 30rpx;
}
.iconitem {
position: absolute;
z-index: 4;
width: 482rpx;
height: 482rpx;
left: 50%;
margin-left: -241rpx;
top: 200rpx;
}
.starbg {
width:292rpx;
height:217rpx;
position:absolute;
left:50%;
margin-left:-146rpx;
top:304rpx;
z-index:3;
}
.scoregetstatic {
position: absolute;
z-index: 4;
width: 100%;
text-align: center;
left: 0;
top: 580rpx;
display: flex;
align-items: flex-end;
justify-content: center;
}
.smallicon {
width: 47rpx;
height: 47rpx;
margin-right: 28rpx;
display: block;
}
.awardstatic1 {
color: #FEF6AE;
font-size: 30rpx;
font-weight: 700;
line-height: 1;
}
.awardstatic2 {
color: #FEF6AE;
font-size: 50rpx;
line-height: 1;
font-weight: 700;
}
.statictext {
position: absolute;
z-index: 5;
width: 100%;
text-align: center;
left: 0;
top: 680rpx;
color: #EAEBB5;
font-size: 28rpx;
}
\ No newline at end of file
......@@ -279,7 +279,8 @@ Component({
customerId: visitor && visitor.id,
nickname: visitor && visitor.userInfo && visitor.userInfo.nickName,
remark: visitor && visitor.userInfo && visitor.userInfo.nickName,
type
type,
integral: res.integral || 1
})
}
})
......
......@@ -153,6 +153,11 @@ Page({
isEndClock:false, //是否最后一天打卡
fixdate: '',
activitySid:constants.activity.sid,
scoreFeedBackStatus: {
integral: 0,
show: false,
scoretype: 1,
}
},
onLoad: function (options) { // Do some initialize when page load.
// this.getWeeksDay(new Date());
......@@ -175,10 +180,20 @@ Page({
id,
tid,
d,
pagefrom
pagefrom,
integral
} = options;
// const {id, tid} = options;
// let pagefrom = 'businesstheme';
if (integral !== undefined && Number(integral) > 0) {
this.setData({
scoreFeedBackStatus: {
integral: integral,
show: true,
scoretype: 2,
}
})
}
this.setData({
id,
tid,
......@@ -1112,7 +1127,8 @@ Page({
cid,
customerId,
nickname,
type
type,
integral
} = e.detail;
let clock = this.data.selfClockDetail;
if (type == 2) { // 取消点赞
......@@ -1138,6 +1154,15 @@ Page({
});
clock.likes.total++;
}
if (integral > 0) {
this.setData({
scoreFeedBackStatus: {
integral: integral,
show: true,
scoretype: 2,
}
})
}
}
this.setData({
selfClockDetail: clock
......@@ -1229,7 +1254,8 @@ Page({
cid,
customerId,
nickname,
type
type,
integral
} = e.detail;
let clock = this.data.clockList.find(ele => ele.id == cid);
if (type == 2) { // 取消点赞
......@@ -1255,6 +1281,15 @@ Page({
});
clock.likes.total++;
}
if (integral > 0) {
this.setData({
scoreFeedBackStatus: {
integral: integral,
show: true,
scoretype: 2,
}
})
}
}
this.setData({
clockList: this.data.clockList
......@@ -1543,7 +1578,8 @@ Page({
},
hidecommenteditor(e) {
const _clockList = this.data.clockList
const _selfClockDetail = this.data.selfClockDetail
const _selfClockDetail = this.data.selfClockDetail;
const {integral} = e.detail;
if (e.detail && e.detail.comment) {
const comment = e.detail.comment;
for (let i = 0; i < _clockList.length; i++) {
......@@ -1561,6 +1597,16 @@ Page({
selfClockDetail: _selfClockDetail
})
}
console.log(integral, 'integralintegralintegral')
if (integral > 0) {
this.setData({
scoreFeedBackStatus: {
integral: integral,
show: true,
scoretype: 2,
}
})
}
}
this.setData({
commenteditor: false,
......
......@@ -19,6 +19,7 @@
"w-countdown": "../../../dist/w-countdown/index",
"calender":"../../../components/calendar",
"canvasdrawer": "/components/canvasdrawer/canvasdrawer",
"activity-bar":"../../../components/activitybar"
"activity-bar":"../../../components/activitybar",
"scoregetfeedback": "../../../components/scoregetfeedback"
}
}
\ No newline at end of file
......@@ -394,9 +394,8 @@
<view class="" hover-class="none" hover-stop-propagation="false" wx:if="{{circleInfo.school_id==activitySid}}">
<activity-bar pageName="calendarthemeindex"></activity-bar>
</view>
</view>
<view class="calender-box" hover-class="none" hover-stop-propagation="false" wx:if="{{calenderShow}}"
bindtap="hiddeCalender" data-id="hidde">
</view>
<view class="calender-box" hover-class="none" hover-stop-propagation="false" wx:if="{{calenderShow}}" bindtap="hiddeCalender" data-id="hidde">
<view class="content-box" hover-class="none" hover-stop-propagation="false">
<view class="content" hover-class="none" hover-stop-propagation="false">
<calender calendar="{{calendar}}" gesture="{{gesture}}" chooseColor="{{0}}"></calender>
......@@ -407,4 +406,9 @@
<view class="sure" hover-class="none" hover-stop-propagation="false" bindtap="selectDays">完成</view>
</view>
</view>
</view>
\ No newline at end of file
</view>
<scoregetfeedback
scoretype="{{scoreFeedBackStatus.scoretype}}"
scorefeedbackshow="{{scoreFeedBackStatus.show}}"
integral="{{scoreFeedBackStatus.integral}}"
></scoregetfeedback>
\ No newline at end of file
......@@ -74,7 +74,12 @@ Page({
atvDailogShow: false,
sessionCode: '',
activityIsClock: true,
moreTheme:''
moreTheme:'',
scoreFeedBackStatus: {
integral: 0,
show: false,
scoretype: 1,
}
},
/**
......@@ -420,7 +425,8 @@ Page({
cid,
customerId,
nickname,
type
type,
integral
} = e.detail;
let clock = this.data.clock;
if (type == 2) { // 取消点赞
......@@ -444,6 +450,15 @@ Page({
});
clock.likes.total++;
}
if (integral > 0) {
this.setData({
scoreFeedBackStatus: {
integral: integral,
show: true,
scoretype: 2,
}
})
}
}
this.setData({
clock: this.data.clock
......@@ -754,13 +769,23 @@ Page({
})
},
hidecommenteditor(e) {
const _clockList = this.data.clock
const _clockList = this.data.clock;
const {integral} = e.detail;
if (e.detail && e.detail.comment) {
const comment = e.detail.comment;
_clockList.comments.list.unshift(comment);
_clockList.comments.list = _clockList.comments.list.slice(0, 3);
_clockList.comments.total += 1;
}
if (integral > 0) {
this.setData({
scoreFeedBackStatus: {
integral: integral,
show: true,
scoretype: 2,
}
})
}
this.setData({
commenteditor: false,
clock: _clockList
......
......@@ -5,6 +5,7 @@
"empty-content": "../../../components/emptycontent",
"prize-get": "../../../components/prizeget",
"comment-editor": "../../../components/commenteditor",
"activity-bar":"../../../components/activitybar"
"activity-bar":"../../../components/activitybar",
"scoregetfeedback": "../../../components/scoregetfeedback"
}
}
\ No newline at end of file
......@@ -91,6 +91,11 @@
</view>
</view>
<view class="ad-img-box" hover-class="none" hover-stop-propagation="false" wx:if="{{sid==activitySid}}" bindtap="goActivity">
<image class="" src="{{imageRoot}}activityindex/bottombar.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" ></image>
</view>
<image class="" src="{{imageRoot}}activityindex/bottombar.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" ></image>
</view>
<scoregetfeedback
scoretype="{{scoreFeedBackStatus.scoretype}}"
scorefeedbackshow="{{scoreFeedBackStatus.show}}"
integral="{{scoreFeedBackStatus.integral}}"
></scoregetfeedback>
</view>
\ No newline at end of file
......@@ -547,6 +547,7 @@ Page({
subject_id: this.data.sub?this.data.sub:this.data.tid,
date:this.data.clockdate
}).then((res) => {
const {integral} = res;
wx.hideLoading();
this.setData({
submiting: false
......@@ -555,25 +556,25 @@ Page({
if (res.data.status == 2) {
if (this.data.pagefrom == 'themeindex') {
wx.redirectTo({
url: `/src/pages/themeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor`
url: `/src/pages/themeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor&integral=${integral || 0}`
});
} else if (this.data.pagefrom == 'circleindex') {
wx.redirectTo({
url: `/src/pages/circleindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor`
url: `/src/pages/circleindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor&integral=${integral || 0}`
});
}else if (this.data.pagefrom == 'calendarthemeindex') {
wx.redirectTo({
url: `/src/pages/calendarthemeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor`
url: `/src/pages/calendarthemeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor&integral=${integral || 0}`
});
}else if(this.data.pagefrom == 'morethemeindex'){
wx.redirectTo({
url: `/src/pages/morethemeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor&sub=${this.data.sub}`
url: `/src/pages/morethemeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor&sub=${this.data.sub}&integral=${integral || 0}`
});
}
} else if (res.data.status == 1 && res.data.subject.classes.need_audit == 1) {
this.joinClass().then(res => {
if (res.code == 200) {
this.navigatePage();
this.navigatePage(integral);
}
})
} else if (res.data.status==1 && res.data.subject.classes.need_audit == 2) {
......@@ -614,14 +615,18 @@ Page({
class_id:this.data.id
})
},
navigatePage() {
navigatePage(integral) {
if (this.data.pagefrom == 'themeindex') {
wx.redirectTo({
url: `/src/pages/themeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor`
url: `/src/pages/themeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor&integral=${integral || 0}`
});
}else if(this.data.pagefrom == 'calendarthemeindex'){
} else if(this.data.pagefrom == 'calendarthemeindex'){
wx.redirectTo({
url: `/src/pages/calendarthemeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor`
url: `/src/pages/calendarthemeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor&integral=${integral || 0}`
});
} else if(this.data.pagefrom == 'morethemeindex'){
wx.redirectTo({
url: `/src/pages/morethemeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor&sub=${this.data.sub}&integral=${integral || 0}`
});
}
},
......
......@@ -181,7 +181,12 @@ Page({
activitySid:constants.activity.sid,
activityTid:constants.activity.tid,
activityId:constants.activity.id,
activityIsClock:false
activityIsClock:false,
scoreFeedBackStatus: {
integral: 0,
show: false,
scoretype: 1,
}
},
onLoad: function(options) { // Do some initialize when page load.
this.innerAudioContext = wx.createInnerAudioContext(); // 当前页面唯一的一个音频容器
......@@ -794,7 +799,7 @@ Page({
})
},
fingureUp (e) {
const {cid, customerId, nickname, type} = e.detail;
const {cid, customerId, nickname, type, integral} = e.detail;
let clock = this.data.clockList.find(ele => ele.id == cid);
if (type == 2) { // 取消点赞
clock.had_like = 0;
......@@ -817,6 +822,15 @@ Page({
});
clock.likes.total++;
}
if (integral > 0) {
this.setData({
scoreFeedBackStatus: {
integral: integral,
show: true,
scoretype: 2,
}
})
}
}
this.setData({
clockList: this.data.clockList
......@@ -1130,7 +1144,8 @@ Page({
})
},
hidecommenteditor(e) {
const _clockList = this.data.clockList
const _clockList = this.data.clockList;
const {integral} = e.detail;
if (e.detail && e.detail.comment) {
const comment = e.detail.comment;
for (let i = 0; i < _clockList.length; i++) {
......@@ -1145,6 +1160,15 @@ Page({
}
}
}
if (integral > 0) {
this.setData({
scoreFeedBackStatus: {
integral: integral,
show: true,
scoretype: 2,
}
})
}
this.setData({
commenteditor: false,
clockList: _clockList
......
......@@ -10,6 +10,7 @@
"list-loading": "../../../components/listloading",
"prize-get": "../../../components/prizeget",
"comment-editor": "../../../components/commenteditor",
"activity-bar":"../../../components/activitybar"
"activity-bar":"../../../components/activitybar",
"scoregetfeedback": "../../../components/scoregetfeedback"
}
}
\ No newline at end of file
......@@ -390,4 +390,9 @@
<view class="ad-img-box" hover-class="none" hover-stop-propagation="false" wx:if="{{sid==activitySid}}" bindtap="goActivity">
<image class="" src="{{imageRoot}}activityindex/bottombar.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" ></image>
</view>
<scoregetfeedback
scoretype="{{scoreFeedBackStatus.scoretype}}"
scorefeedbackshow="{{scoreFeedBackStatus.show}}"
integral="{{scoreFeedBackStatus.integral}}"
></scoregetfeedback>
</view>
\ No newline at end of file
......@@ -157,6 +157,11 @@ Page({
animationStatus: 0, // 解锁动画状态
currentSwiper:0,// 当前滑块位置
scrollLeft:0,//滚动条位置
scoreFeedBackStatus: {
integral: 0,
show: false,
scoretype: 1,
}
},
onLoad: function (options) { // Do some initialize when page load.
this.innerAudioContext = wx.createInnerAudioContext(); // 当前页面唯一的一个音频容器
......@@ -183,8 +188,18 @@ Page({
id,
tid,
pagefrom,
sub
sub,
integral
} = options;
if (integral !== undefined && Number(integral) > 0) {
this.setData({
scoreFeedBackStatus: {
integral: integral,
show: true,
scoretype: 2,
}
})
}
if (tid == this.data.activityTid && pagefrom == "clockeditor") {
const that = this
wx.login({
......@@ -961,7 +976,8 @@ Page({
cid,
customerId,
nickname,
type
type,
integral
} = e.detail;
let clock = this.data.selfClockDetail.find(ele => ele.id == cid);
if (type == 2) { // 取消点赞
......@@ -987,6 +1003,15 @@ Page({
});
clock.likes.total++;
}
if (integral > 0) {
this.setData({
scoreFeedBackStatus: {
integral: integral,
show: true,
scoretype: 2,
}
})
}
}
this.setData({
selfClockDetail: this.data.selfClockDetail
......@@ -1078,7 +1103,8 @@ Page({
cid,
customerId,
nickname,
type
type,
integral
} = e.detail;
let clock = this.data.clockList.find(ele => ele.id == cid);
if (type == 2) { // 取消点赞
......@@ -1104,6 +1130,15 @@ Page({
});
clock.likes.total++;
}
if (integral > 0) {
this.setData({
scoreFeedBackStatus: {
integral: integral,
show: true,
scoretype: 2,
}
})
}
}
this.setData({
clockList: this.data.clockList
......@@ -1643,7 +1678,8 @@ Page({
},
hidecommenteditor(e) {
const _clockList = this.data.clockList
const _selfClockDetail = this.data.selfClockDetail
const _selfClockDetail = this.data.selfClockDetail;
const {integral} = e.detail;
if (e.detail && e.detail.comment) {
const comment = e.detail.comment;
for (let i = 0; i < _clockList.length; i++) {
......@@ -1661,6 +1697,15 @@ Page({
}
}
}
if (integral > 0) {
this.setData({
scoreFeedBackStatus: {
integral: integral,
show: true,
scoretype: 2,
}
})
}
this.setData({
commenteditor: false,
selfClockDetail: _selfClockDetail,
......
......@@ -18,6 +18,7 @@
"comment-editor": "../../../components/commenteditor",
"w-countdown": "../../../dist/w-countdown/index",
"canvasdrawer": "/components/canvasdrawer/canvasdrawer",
"activity-bar":"../../../components/activitybar"
"activity-bar":"../../../components/activitybar",
"scoregetfeedback": "../../../components/scoregetfeedback"
}
}
\ No newline at end of file
......@@ -362,4 +362,9 @@
wx:if="{{circleInfo.school_id==activitySid&&!isClock}}">
<activity-bar pageName="themeindex"></activity-bar>
</view>
<scoregetfeedback
scoretype="{{scoreFeedBackStatus.scoretype}}"
scorefeedbackshow="{{scoreFeedBackStatus.show}}"
integral="{{scoreFeedBackStatus.integral}}"
></scoregetfeedback>
</view>
\ No newline at end of file
......@@ -19,7 +19,7 @@ Page({
themeList: [],
themeTotal: 0,
page: 1,
perPage: 2,
perPage: 10,
hasmore: true,
emptyPage: false,
pointsType: 1,
......
......@@ -52,6 +52,11 @@ Page({
commenteditor: false,
queryCustomerId: '',
selfSelected: 1, // 1查看全部 2 查看自己
scoreFeedBackStatus: {
integral: 0,
show: false,
scoretype: 1,
}
},
/**
......@@ -545,7 +550,8 @@ Page({
cid,
customerId,
nickname,
type
type,
integral
} = e.detail;
let clock = this.data.clockList.find(ele => ele.id == cid);
if (type == 2) { // 取消点赞
......@@ -571,6 +577,15 @@ Page({
});
clock.likes.total++;
}
if (integral > 0) {
this.setData({
scoreFeedBackStatus: {
integral: integral,
show: true,
scoretype: 2,
}
})
}
}
this.setData({
clockList: this.data.clockList
......@@ -762,7 +777,8 @@ Page({
},
hidecommenteditor(e) {
const _clockList = this.data.clockList
const _selfClockDetail = this.data.selfClockDetail
const _selfClockDetail = this.data.selfClockDetail;
const {integral} = e.detail;
if (e.detail && e.detail.comment) {
const comment = e.detail.comment;
for (let i = 0; i < _clockList.length; i++) {
......@@ -773,6 +789,15 @@ Page({
}
}
}
if (integral > 0) {
this.setData({
scoreFeedBackStatus: {
integral: integral,
show: true,
scoretype: 2,
}
})
}
this.setData({
commenteditor: false,
clockList: _clockList,
......
......@@ -4,7 +4,8 @@
"clock-item": "../../components/clockitem",
"comment-editor": "../../../components/commenteditor",
"empty-content": "../../../components/emptycontent",
"list-loading": "../../../components/listloading"
"list-loading": "../../../components/listloading",
"scoregetfeedback": "../../../components/scoregetfeedback"
},
"navigationBarTitleText": "任务列表",
"enablePullDownRefresh": true
......
......@@ -108,4 +108,9 @@
<comment-editor wx:if="{{commenteditor}}" prams="{{commentclock}}" bind:hidecommenteditor="hidecommenteditor"
type="2c"></comment-editor>
</view>
<scoregetfeedback
scoretype="{{scoreFeedBackStatus.scoretype}}"
scorefeedbackshow="{{scoreFeedBackStatus.show}}"
integral="{{scoreFeedBackStatus.integral}}"
></scoregetfeedback>
</view>
\ No newline at end of file
......@@ -149,6 +149,11 @@ Page({
activityTid:constants.activity.tid,
sessionCode:"",
activitySid:constants.activity.sid,
scoreFeedBackStatus: {
integral: 0,
show: false,
scoretype: 1,
}
},
onLoad: function (options) { // Do some initialize when page load.
this.innerAudioContext = wx.createInnerAudioContext(); // 当前页面唯一的一个音频容器
......@@ -174,15 +179,20 @@ Page({
const {
id,
tid,
pagefrom
pagefrom,
integral
} = options;
console.log({
id,
tid,
pagefrom
})
if (integral !== undefined && Number(integral) > 0) {
this.setData({
scoreFeedBackStatus: {
integral: integral,
show: true,
scoretype: 2,
}
})
}
if(tid == this.data.activityTid&&pagefrom=="clockeditor"){
const that = this
const that = this;
wx.login({
success(res) {
if (res.code) {
......@@ -1006,7 +1016,8 @@ Page({
cid,
customerId,
nickname,
type
type,
integral
} = e.detail;
let clock = this.data.selfClockDetail;
if (type == 2) { // 取消点赞
......@@ -1032,6 +1043,15 @@ Page({
});
clock.likes.total++;
}
if (integral > 0) {
this.setData({
scoreFeedBackStatus: {
integral: integral,
show: true,
scoretype: 2,
}
})
}
}
this.setData({
selfClockDetail: clock
......@@ -1123,7 +1143,8 @@ Page({
cid,
customerId,
nickname,
type
type,
integral
} = e.detail;
let clock = this.data.clockList.find(ele => ele.id == cid);
if (type == 2) { // 取消点赞
......@@ -1149,6 +1170,15 @@ Page({
});
clock.likes.total++;
}
if (integral > 0) {
this.setData({
scoreFeedBackStatus: {
integral: integral,
show: true,
scoretype: 2,
}
})
}
}
this.setData({
clockList: this.data.clockList
......@@ -1691,7 +1721,8 @@ Page({
},
hidecommenteditor(e) {
const _clockList = this.data.clockList
const _selfClockDetail = this.data.selfClockDetail
const _selfClockDetail = this.data.selfClockDetail;
const {integral} = e.detail;
if (e.detail && e.detail.comment) {
const comment = e.detail.comment;
for (let i = 0; i < _clockList.length; i++) {
......@@ -1716,6 +1747,15 @@ Page({
})
}
}
if (integral > 0) {
this.setData({
scoreFeedBackStatus: {
integral: integral,
show: true,
scoretype: 2,
}
})
}
this.setData({
commenteditor: false,
clockList: _clockList,
......
......@@ -18,6 +18,7 @@
"comment-editor": "../../../components/commenteditor",
"w-countdown": "../../../dist/w-countdown/index",
"canvasdrawer": "/components/canvasdrawer/canvasdrawer",
"activity-bar":"../../../components/activitybar"
"activity-bar":"../../../components/activitybar",
"scoregetfeedback": "../../../components/scoregetfeedback"
}
}
\ No newline at end of file
......@@ -261,5 +261,10 @@
</view>
<view class="" hover-class="none" hover-stop-propagation="false" wx:if="{{circleInfo.school_id==activitySid&&!isClock}}">
<activity-bar pageName="themeindex"></activity-bar>
</view>
</view>
<scoregetfeedback
scoretype="{{scoreFeedBackStatus.scoretype}}"
scorefeedbackshow="{{scoreFeedBackStatus.show}}"
integral="{{scoreFeedBackStatus.integral}}"
></scoregetfeedback>
</view>
\ No newline at end of file
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