初始化

This commit is contained in:
2024-12-06 16:18:22 +08:00
commit 884dd70d83
751 changed files with 60883 additions and 0 deletions
@@ -0,0 +1,675 @@
const {
etmsPost
} = require("../../com");
const {
getWxml,
getStyle,
getWxml1,
getStyle1,
} = require("../activitySharing/poster-data.js");
const app = getApp();
import Dialog from 'tdesign-miniprogram/dialog/index';
const {
isCreateImageSuccess
} = require('../../utils/util.js')
Page({
data: {
tenantId: "",
activityMainId: "",
activityRouteItemId: "",
userId: "",
isLoadFinish: false,
activityBag: {},
hagglingType: 0,
teamLeaderRoute: {},
haggleLogsView: [],
styleType: 0,
isPageLoad: false,
endTime: "",
isSubJoinLoading: false,
isSubOkLoading: false,
isHagglingAssistLoading: false,
totalCountDownTime: 0,
isShowCountDownTime: true,
// 全部弹幕列表
allDanmuList: [],
// 当前弹幕列表
danmuList: [],
// 弹幕计时器
danmuIntervalId: null,
pageSizeDynamicBullet: 100,
pageCurrentDynamicBullet: 1,
isFinishDynamicBullet: false,
hagglingProgress: 0,
canIUseGetUserProfile: false,
isShowQrcode: false,
distributionRule: {},
activityExInfo: {},
distributionItems: [],
distributionItemsTop5: [],
distributionInfo: {},
recommendUserId: null,
// 分享海报
isShowPoster: false,
poster: null,
qrCode: null,
isShowXiaohebang:false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(query) {
console.log(query)
if (wx.getUserProfile) {
this.setData({
canIUseGetUserProfile: true
})
}
if (query && query.scene) {
var parms = query.scene.split("_");
var tenantId = parms[0];
var userId = "";
if (tenantId.indexOf('.') != -1) {
var myTenantInfo = tenantId.split(".");
tenantId = myTenantInfo[0];
userId = myTenantInfo[1];
}
var activityId = parms[1];
var tempActivityRouteItemId = "";
var recommendUserId = 0;
if (parms.length >= 3 && parseInt(parms[2]) > 0) {
tempActivityRouteItemId = parms[2];
}
if (parms.length === 4) {
recommendUserId = parms[3];
}
this.setData({
tenantId: tenantId,
activityMainId: activityId,
activityRouteItemId: tempActivityRouteItemId,
userId: userId,
recommendUserId: recommendUserId
});
}
if (query && query.tenantId) {
var tenantId = "";
var activityId = "";
var routeitemId = "";
var userId = "";
var recommendUserId = 0;
if (query.tenantId) {
tenantId = query.tenantId;
}
if (query.activityId) {
activityId = query.activityId
}
if (query.routeitemId) {
routeitemId = query.routeitemId;
}
if (query.userId) {
userId = query.userId
}
if (query.recommendUserId) {
recommendUserId = query.recommendUserId
}
this.setData({
tenantId: tenantId,
activityMainId: activityId,
activityRouteItemId: routeitemId,
userId: userId,
recommendUserId: recommendUserId
});
}
this.initActivityData();
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage','shareTimeline']
})
},
initActivityData() {
if (this.data.isLoadFinish) {
return;
}
this.setData({
isLoadFinish: true
})
if (!app.globalData.s) {
setTimeout(() => {
this.setData({
isLoadFinish: false
})
this.initActivityData();
}, 10);
return;
}
if (this.data.activityRouteItemId) {
console.log(888)
etmsPost(
app.globalData,
"openParent2/WxMiniActivityHomeGet2", {
tenantId: this.data.tenantId,
activityRouteItemId: this.data.activityRouteItemId,
},
(data) => {
this.analysisActivityData(data);
}
);
} else {
etmsPost(
app.globalData,
"openParent2/WxMiniActivityHomeGet", {
tenantId: this.data.tenantId,
activityMainId: this.data.activityMainId,
},
(data) => {
this.analysisActivityData(data);
}
);
}
},
goMore() {
var data = this.data.activityBag.bascInfo;
wx.navigateTo({
url: `../hagglingItems/index?tenantId=${data.tenantId}&activityMainId=${data.activityMainId}&activityRouteId=${data.activityRouteId}`,
})
},
// 下载图片
shareFriend() {
wx.showShareImageMenu({
path: this.data.poster,
});
},
shareQr() {
wx.showShareImageMenu({
path: this.data.qrCode,
});
},
async getImg1() {
const obj = {
img: this.data.activityBag.shareQRCode
}
console.log(obj);
const poster = this.selectComponent("#poster");
wx.showLoading({
title: '加载中',
})
setTimeout(() => {
const wxml = getWxml1(obj);
const style = getStyle1();
const p1 = poster.renderToCanvas({
wxml,
style
});
let container = null;
p1.then((res) => {
container = res;
return poster.canvasToTempFilePath();
}).then((res) => {
this.setData({
qrCode: res.tempFilePath,
width: container.layoutBox.width,
height: container.layoutBox.height,
isShowQrcode: true
});
wx.hideLoading()
});
}, 500);
},
async getImg() {
var isPortraitSuccess = false;
if (this.data.distributionInfo.avatarUrl && this.data.distributionInfo.avatarUrl != '') {
try {
isPortraitSuccess = await isCreateImageSuccess(this.data.distributionInfo.avatarUrl, "canvas", this);
} catch (ex) {
console.log(ex)
}
}
var obj = {
title: this.data.activityBag.bascInfo.title,
img: this.data.activityBag.bascInfo.coverImage,
portrait: isPortraitSuccess ? this.data.distributionInfo.avatarUrl : "https://pxboss.xiaohebang.cn/system/material/mini/fx/avatar.png",
name: this.data.distributionInfo.studentName,
qrcode: this.data.activityBag.shareQRCode,
distributionRule: this.data.distributionRule,
};
const poster = this.selectComponent("#poster");
wx.showLoading({
title: '加载中',
})
setTimeout(() => {
const wxml = getWxml(obj);
const style = getStyle();
const p1 = poster.renderToCanvas({
wxml,
style
});
let container = null;
p1.then((res) => {
container = res;
console.log(container);
return poster.canvasToTempFilePath();
}).then((res) => {
this.setData({
poster: res.tempFilePath,
width: container.layoutBox.width,
height: container.layoutBox.height,
isShowPoster: true
});
wx.hideLoading()
});
}, 500);
},
analysisActivityData(data) {
wx.setNavigationBarTitle({
title: data.bascInfo.title
})
var tempHaggleLogsView = [];
if (data.teamLeaderRoute && data.teamLeaderRoute.activityRouteId) {
var tempTeamLeaderRoute = data.teamLeaderRoute;
var temmpTotalCountDownTime = tempTeamLeaderRoute.exTimeCountDown;
if (tempTeamLeaderRoute.exTimeCountDown <= 0) {
this.setData({
isShowCountDownTime: false
});
}
this.setData({
totalCountDownTime: temmpTotalCountDownTime
});
}
this.setData({
activityBag: data,
teamLeaderRoute: data.teamLeaderRoute,
haggleLogsView: tempHaggleLogsView,
styleType: data.bascInfo.styleType,
endTime: data.bascInfo.endTime,
hagglingType: data.bascInfo.hagglingType,
distributionRule: data.distributionRule,
activityExInfo: data.activityExInfo,
distributionItems: data.distributionItems,
distributionInfo: data.distributionInfo,
isShowXiaohebang: data.isHideXiaohebang == false
})
if (data.distributionItems.length > 0) {
this.setData({
distributionItemsTop5: data.distributionItems.slice(0, 5)
});
}
this.initActivityCall();
if (data.bascInfo.globalOpenBullet) {
this.initDynamicBullet();
}
app.globalData.microWebHomeUrl = this.data.activityBag.wxMiniTenantConfig.microWebHomeUrl;
app.globalData.currentActivityBag2 = data;
var status = data.bascInfo.activityStatus;
if (status != 1) {
Dialog.alert({
title: `活动${data.bascInfo.activityStatusDesc}`,
confirmBtn: '我知道了',
}).then(() => {
console.log('success')
});
}
},
initActivityCall() {
if (this.data.isPageLoad) {
return;
}
this.setData({
isPageLoad: true
});
var mydata = this.data.activityBag;
etmsPost(
app.globalData,
"openParent2/WxMiniActivityCall", {
tenantId: mydata.bascInfo.tenantId,
activityMainId: mydata.bascInfo.activityMainId,
},
(data) => {}
);
var openParms = wx.getLaunchOptionsSync();
if (openParms.shareTicket) {
etmsPost(
app.globalData,
"openParent2/WxMiniActivityShare", {
tenantId: mydata.bascInfo.tenantId,
activityMainId: mydata.bascInfo.activityMainId,
},
(data) => {}
);
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
this.initActivityData();
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.initActivityData();
},
initDynamicBullet() {
this.DynamicBulletGetPaging();
},
/** 从后端获取弹幕 */
DynamicBulletGetPaging() {
console.log("加载弹幕")
if (this.data.isFinishDynamicBullet) {
return;
}
etmsPost(
app.globalData,
"openParent2/WxMiniActivityDynamicBulletGetPaging", {
pageSize: this.data.pageSizeDynamicBullet,
pageCurrent: this.data.pageCurrentDynamicBullet,
tenantId: this.data.activityBag.bascInfo.tenantId,
activityMainId: this.data.activityBag.bascInfo.activityMainId,
},
(resData) => {
var tempItem = resData.dataItems;
if (tempItem.length === 0) {
this.setData({
isFinishDynamicBullet: true
});
} else {
this.asayDynamicBullet(tempItem);
this.setData({
pageCurrentDynamicBullet: this.data.pageCurrentDynamicBullet + 1
});
// setTimeout(() => {
// this.DynamicBulletGetPaging();
// }, 5000);
}
}
);
},
asayDynamicBullet(items) {
const allDanmuList = []
var index = 1;
items.forEach(myitem => {
allDanmuList.push({
id: index,
text: `${myitem.studentNameDesc}:${myitem.tagDesc}`,
img: myitem.avatarUrl,
// 出现时间 间隔: 1000ms - 5000ms
time: parseInt(Math.random() * 100 + 10 * index) * 100,
// 出现高度 50px - 150px
top: Math.random() * 100 + 100 + "px",
})
index++;
});
this.setData({
allDanmuList: allDanmuList
})
this.runDanmu(allDanmuList);
},
/** 开始滚动弹幕 */
runDanmu(allDanmuList) {
const danmuList = []
let time = 0
const danmuIntervalId = setInterval(() => {
// 当前时间显示的弹幕
const danmu = allDanmuList.find(dm => dm.time == time * 100)
// 5秒钟后移除
const danmuRemove = danmuList.find(dm => dm.time + 5000 < time * 100)
// 添加弹幕
if (danmu) {
danmuList.push(danmu)
this.setData({
danmuList: danmuList
})
}
// 移除滚动完的弹幕
if (danmuRemove) {
const danmuRemoveIndex = danmuList.findIndex(dm => dm.id == danmuRemove.id)
console.log(danmuRemoveIndex);
if (danmuRemoveIndex != -1) {
danmuList.splice(danmuRemoveIndex, 1)
}
this.setData({
danmuList: danmuList
})
}
time++
}, 100)
this.setData({
danmuIntervalId: danmuIntervalId
})
},
/** 停止滚动弹幕 */
stopDanmu() {
clearInterval(this.data.danmuIntervalId)
},
phoneClick(event) {
wx.makePhoneCall({
phoneNumber: this.data.activityBag.bascInfo.globalPhone,
success() {},
fail() {}
})
},
websiteClick() {
wx.navigateTo({
url: `../mywebsite/index`,
})
},
goRouteMore() {
wx.navigateTo({
url: `../routeItems2/index`,
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
this.setData({
isLoadFinish: false,
isSubJoinLoading: false,
isSubOkLoading: false
})
this.stopDanmu()
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
showQrcode() {
this.getImg1();
// this.setData({
// isShowQrcode: true
// })
},
onVisibleChange(e) {
this.setData({
isShowQrcode: e.detail.visible,
});
},
showPoster() {
this.getImg()
},
onVisibleChange2(e) {
this.setData({
isShowPoster: e.detail.visible,
});
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
var bascInfo = this.data.activityBag.bascInfo;
var teamLeaderRoute = this.data.activityBag.teamLeaderRoute;
var path = `pages/acdetail3/index?tenantId=${bascInfo.tenantId}&activityId=${bascInfo.activityMainId}&s=1&recommendUserId=${app.globalData.u}`
if (bascInfo.activityRouteItemId) {
path += `&routeitemId=${bascInfo.activityRouteItemId}`
}
if (this.data.userId) {
path += `&userId=${this.data.userId}`
}
console.log(path);
return {
title: bascInfo.title,
imageUrl: bascInfo.coverImage,
path: path,
}
},
onShareTimeline() {
var bascInfo = this.data.activityBag.bascInfo;
var teamLeaderRoute = this.data.activityBag.teamLeaderRoute;
var path = `tenantId=${bascInfo.tenantId}&activityId=${bascInfo.activityMainId}&s=1`
if (bascInfo.activityRouteItemId) {
path += `&routeitemId=${bascInfo.activityRouteItemId}`
}
return {
title: bascInfo.title,
imageUrl: bascInfo.coverImage,
query: path,
}
},
handleGetUserProfile() {
wx.getUserProfile({
desc: '用于获取参与活动的学员的头像',
success: (res) => {
console.log(res.userInfo);
this.processGetUserInfo(res.userInfo);
}
})
},
processGetUserInfo(myuser) {
// etmsPost(
// app.globalData,
// "openParent2/WxMiniEditUserInfo", {
// nickName: myuser.nickName,
// avatarUrl: myuser.avatarUrl,
// },
// () => {}
// );
this.goHagglingAssist();
},
//去成团
goJoin(event) {
},
//去开团
goGroupPurchaseStart() {
this.goGroupPurchaseStartProcess();
},
goGroupPurchaseStartProcess() {
this.setData({
isSubOkLoading: true
});
var mydata = this.data.activityBag;
var tenantId = mydata.bascInfo.tenantId;
var activityMainId = mydata.bascInfo.activityMainId;
var recommendUserId = this.data.recommendUserId;
if (!recommendUserId) {
recommendUserId = 0
}
etmsPost(
app.globalData,
"openParent2/WxMiniDistributionStartCheck", {
tenantId: tenantId,
activityMainId: activityMainId,
},
(data) => {
this.setData({
isSubOkLoading: false
});
wx.navigateTo({
url: `../goDistribution/index?type=0&tenantId=${tenantId}&activityMainId=${activityMainId}&recommendUserId=${recommendUserId}&userId=${this.data.userId}`,
})
}, () => {
this.setData({
isSubOkLoading: false
});
}
);
},
async goActivitySharing() {
// 头像能否被正常渲染
var isPortraitSuccess = false;
if (this.data.distributionInfo.avatarUrl && this.data.distributionInfo.avatarUrl != '') {
try {
isPortraitSuccess = await isCreateImageSuccess(this.data.distributionInfo.avatarUrl, "canvas", this);
} catch (ex) {
console.log(ex)
}
}
var obj = {
title: this.data.activityBag.bascInfo.title,
img: this.data.activityBag.bascInfo.coverImage,
portrait: isPortraitSuccess ? this.data.distributionInfo.avatarUrl : "https://pxboss.xiaohebang.cn/system/material/mini/fx/avatar.png",
name: this.data.distributionInfo.studentName,
qrcode: this.data.activityBag.shareQRCode,
distributionRule: this.data.distributionRule,
};
var strObj = JSON.stringify(obj)
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
// const path = `/${currentPage.route}?scene=${currentPage.options.scene}`
var bascInfo = this.data.activityBag.bascInfo;
var teamLeaderRoute = this.data.activityBag.teamLeaderRoute;
var path = `/${currentPage.route}?tenantId=${bascInfo.tenantId}&activityId=${bascInfo.activityMainId}&s=1&recommendUserId=${app.globalData.u}`
if (bascInfo.activityRouteItemId) {
path += `&routeitemId=${bascInfo.activityRouteItemId}`
}
if (this.data.userId) {
path += `&userId=${this.data.userId}`
}
console.log(path);
wx.navigateTo({
url: `../activitySharing/index?obj=${strObj}&path=${encodeURIComponent(path)}`,
})
},
goMyReward() {
var mydata = this.data.activityBag;
var tenantId = mydata.bascInfo.tenantId;
wx.navigateTo({
url: `../myReward/index?tenantId=${tenantId}`,
})
},
goExplain() {
wx.navigateTo({
url: `../distributionDesc/index?distributionType=${this.data.distributionInfo.distributionType}`,
})
},
openSignUpPopup() {
const signUpPopup = this.selectComponent("#sign-up-popup");
signUpPopup.open(this.data.distributionItems, this.data.activityBag.bascInfo.joinCount)
}
})
@@ -0,0 +1,29 @@
{
"usingComponents": {
"musicshow":"../musicshow",
"mp-loading": "../../components/loading/loading",
"sign-up-popup": "/components/sign-up-popup/index",
"t-loading": "tdesign-miniprogram/loading/loading",
"t-swiper": "tdesign-miniprogram/swiper/swiper",
"t-swiper-item": "tdesign-miniprogram/swiper/swiper-item",
"t-swiper-nav": "tdesign-miniprogram/swiper/swiper-nav",
"t-image": "tdesign-miniprogram/image/image",
"t-tag": "tdesign-miniprogram/tag/tag",
"t-check-tag": "tdesign-miniprogram/tag/check-tag",
"t-dialog": "tdesign-miniprogram/dialog/dialog",
"t-toast": "tdesign-miniprogram/toast/toast",
"t-steps": "tdesign-miniprogram/steps/steps",
"t-step": "tdesign-miniprogram/steps/step-item",
"t-button": "tdesign-miniprogram/button/button",
"t-button-group": "tdesign-miniprogram/button-group/button-group",
"t-avatar": "tdesign-miniprogram/avatar/avatar",
"t-avatar-group": "tdesign-miniprogram/avatar/avatar-group",
"t-icon": "tdesign-miniprogram/icon/icon",
"t-badge": "tdesign-miniprogram/badge/badge",
"t-count-down": "tdesign-miniprogram/count-down/count-down",
"t-progress": "tdesign-miniprogram/progress/progress",
"t-popup": "tdesign-miniprogram/popup/popup",
"wxml-to-canvas": "wxml-to-canvas"
},
"navigationBarTitleText": "活动详情"
}
@@ -0,0 +1,230 @@
<view class="ac_body">
<musicshow class="etms_music" wx:if="{{activityBag&&activityBag.bascInfo&&activityBag.bascInfo.musicUrl}}" url="{{activityBag.bascInfo.musicUrl}}" autoplay="{{true}}"></musicshow>
<view class="ac1_content" wx:if="{{activityBag&&activityBag.bascInfo}}">
<view class="ac1_swiper" style="position: relative">
<t-swiper wx:if="{{activityBag.bascInfo.imageMain.length > 0}}" current="{{1}}" autoplay="{{true}}" duration="{{500}}" interval="{{5000}}" height="{{500}}">
<t-swiper-item wx:for="{{activityBag.bascInfo.imageMain}}" wx:key="index">
<view class="ac1_swiper_item">
<image src="{{item}}" mode="widthFix" class="ac1_swiper_img" />
</view>
</t-swiper-item>
<t-swiper-nav slot="nav" type="dots-bar" />
</t-swiper>
<view class="danmu-display" style="position: absolute; top: 0;pointer-events: none;">
<view wx:for="{{danmuList}}" wx:key="id" class="danmu" style="top:{{item.top}}">
<image class="danmu__img" src="{{item.img}}" mode='aspectFill'></image>
<text class="danmu_text">{{item.text}}</text>
</view>
</view>
</view>
<view class="ac1_price content">
<view class="ac1_titlle_price_main">
<view class="ac1_titlle_price_value">
<view wx:if="{{activityBag.bascInfo.isOpenPay}}" class="ac1_titlle_price_value0">
<view class="ac1_titlle_price_value_unit">¥</view>
<view class="ac1_titlle_price_value_mustValue">{{activityBag.bascInfo.payMustValue}}</view>
</view>
<view wx:else class="ac1_titlle_price_value1">
先用后付
</view>
<view class="ac1_titlle_price_value_rule">
<view class="ac1_titlle_price_value_rule1">日常价¥{{activityBag.bascInfo.originalPrice}}</view>
<view class="ac1_titlle_price_value_rule2">{{activityBag.bascInfo.payPriceDesc}}¥{{activityBag.bascInfo.payMustValue}}</view>
</view>
</view>
<view wx:if="{{activityExInfo.exType===0}}" class="ac3_titlle_price_desc ac1_titlle_price_desc_my">
<view class="ac30_extime">活动结束时间</view>
<view class="ac30_extime2">
{{activityExInfo.exDateDesc}}
</view>
</view>
<view wx:if="{{activityExInfo.exType===1}}" class="ac3_titlle_price_desc ac1_titlle_price_desc_my">
<view class="ac3_extime">活动结束倒计时</view>
<view class="ac3_extime2">
<t-count-down content="default" time="{{activityExInfo.exTimeCountDown}}" theme="square" size="small" />
</view>
</view>
<view wx:if="{{activityExInfo.exType===2}}" class="ac3_titlle_price_desc ac1_titlle_price_desc_my ac1_titlle_exover">
<view class="ac32_extime">活动已结束</view>
</view>
</view>
</view>
<view class="ac1_title content">
<view class="ac1_title_main">
<view class="ac1_title_text">
<t-tag theme="success" t-class="ac1_fenxiao_btn" shape="round">分销</t-tag>
{{activityBag.bascInfo.title}}
</view>
<view class="ac1_title_explain">
<image src="https://pxboss.xiaohebang.cn/system/material/mini/com/xianjin.png" mode="aspectFit" bindtap="goExplain" />
<view>赚¥{{distributionInfo.distributionTotalMoney}}</view>
</view>
</view>
</view>
<view class="panic-buying-outter">
<view wx:if="{{distributionItemsTop5&&distributionItemsTop5.length>0}}" class='panic-buying' bindtap="openSignUpPopup">
<view class="panic-buying__portrait-list">
<view class="panic-buying__portrait {{index !== 0 ? 'panic-buying__portrait--pile' : ''}}" wx:for="{{distributionItemsTop5}}" wx:key="index">
<image src='{{item.avatarUrl}}' mode='aspectFill'></image>
</view>
</view>
<view class="panic-buying__right">
<view>已有{{activityBag.bascInfo.joinCount}}人抢购成功</view>
<t-icon name="chevron-right" size="20px" />
</view>
</view>
</view>
<view class=" ac_item ec_relative" wx:if="{{!(teamLeaderRoute&&teamLeaderRoute.activityRouteId)}}">
<view class="ec_item_title">
<view class="ec_item_title_left"></view>
<view class="ec_item_title_text">分销玩法</view>
<view class="ec_item_title_right"></view>
</view>
<view class="ac3_explain_content">
<view class="ac3_explain_content_item">每成功邀请一位好友购课,你可获得<text class="ac1_tp_color">{{distributionRule.distributionVlue1}}</text>元奖励 </view>
<view class="ac3_explain_content_item" wx:if="{{distributionRule.isOpenDistribution2}}">好友成功邀请他人购课,你可再获得<text class="ac1_tp_color">{{distributionRule.distributionVlue2}}</text>元奖励</view>
</view>
<!-- <viw bindtap="goRouteExplain" class="ac1_right_tag ac1_explain_link">
说明
</viw> -->
</view>
<view class="ac_item">
<view class="ec_item_title">
<view class="ec_item_title_left"></view>
<view class="ec_item_title_text">课程描述</view>
<view class="ec_item_title_right"></view>
</view>
<view class="ec_item_text">
{{activityBag.bascInfo.courseName}}
</view>
<view wx:if="{{activityBag.bascInfo.courseDesc}}" class="ec_item_text magin10">
<text> {{activityBag.bascInfo.courseDesc}}</text>
</view>
<view wx:if="{{activityBag.bascInfo.imageCourse&&activityBag.bascInfo.imageCourse.length>0}}" class="magin10">
<view class="ec_item_img" wx:for="{{activityBag.bascInfo.imageCourse}}" wx:key="item">
<image class="ec_item_img_item" mode="widthFix" src="{{item}}"></image>
</view>
</view>
</view>
<view class="ac_item" wx:if="{{activityBag.bascInfo.activityExplan}}">
<view class="ec_item_title">
<view class="ec_item_title_left"></view>
<view class="ec_item_title_text">活动说明</view>
<view class="ec_item_title_right"></view>
</view>
<view class="ec_item_html">
<rich-text nodes="{{activityBag.bascInfo.activityExplan}}"></rich-text>
</view>
</view>
<view class="ac_item">
<view class="ec_item_title">
<view class="ec_item_title_left"></view>
<view class="ec_item_title_text">联系方式</view>
<view class="ec_item_title_right"></view>
</view>
<view class="ec_item_html" wx:if="{{activityBag.bascInfo.tenantLinkInfo}}">
<rich-text nodes="{{activityBag.bascInfo.tenantLinkInfo}}"></rich-text>
</view>
<view wx:if="{{activityBag.bascInfo.tenantLinkQRcode}}" class="ec_item_tenantLinkQRcode magin10">
<image show-menu-by-longpress="{{true}}" src="{{activityBag.bascInfo.tenantLinkQRcode}}" mode="widthFix"></image>
</view>
</view>
<view class="ac_item">
<view class="ec_item_title">
<view class="ec_item_title_left"></view>
<view class="ec_item_title_text">机构介绍</view>
<view class="ec_item_title_right"></view>
</view>
<view class="ec_item_html" wx:if="{{activityBag.bascInfo.tenantIntroduceTxt}}">
<rich-text nodes="{{activityBag.bascInfo.tenantIntroduceTxt}}"></rich-text>
</view>
<view wx:if="{{activityBag.bascInfo.tenantIntroduceImg&&activityBag.bascInfo.tenantIntroduceImg.length>0}}" class="magin10">
<view class="ec_item_img" wx:for="{{activityBag.bascInfo.tenantIntroduceImg}}" wx:key="item">
<image show-menu-by-longpress="{{true}}" class="ec_item_img_item" mode="widthFix" src="{{item}}"></image>
</view>
</view>
</view>
<view wx:if="{{isShowXiaohebang}}" class="ac_item">
<view class="ac_xiaohebang">
<view class="ac_xiaohebang_content">本活动由<label class="ac_xiaohebang_tp">小禾帮</label>提供技术支持</view>
</view>
</view>
<t-popup visible="{{isShowQrcode}}" bind:visible-change="onVisibleChange" close-on-overlay-click="true" placement="center">
<view>
<image style="border-radius: 18px;" show-menu-by-longpress="{{true}}" src="{{activityBag.shareQRCode}}" mode="widthFix"></image>
</view>
<button class="ac-action" bindtap="shareQr">
<image src="https://xiaohebang.oss-cn-beijing.aliyuncs.com/system/material/mini/fx/xz.png" />
<text>分享二维码</text>
</button>
</t-popup>
<view bindtap="showQrcode" wx:if="{{activityBag.bascInfo.activityStatus===1&&activityBag.shareQRCode}}" class="ac_ks_inter my_qrcode">
<image src="https://pxboss.xiaohebang.cn/system/material/mini/com/i-saoma.png" mode="aspectFit" />
</view>
<t-popup visible="{{isShowPoster}}" bind:visible-change="onVisibleChange2" close-on-overlay-click="true" placement="center">
<view>
<image class="ac-poster-preview" src="{{poster}}" style="width: 300px;" mode="widthFix" show-menu-by-longpress />
</view>
<button class="ac-action" bindtap="shareFriend">
<image src="https://xiaohebang.oss-cn-beijing.aliyuncs.com/system/material/mini/fx/xz.png" />
<text>分享海报</text>
</button>
</t-popup>
<wxml-to-canvas id="poster" class="ac-poster-canvas" width="300" height="600"></wxml-to-canvas>
<view class="ac_poster ac_ks_inter" bindtap="showPoster" wx:if="{{activityBag.bascInfo.activityStatus===1}}">
<image src="https://pxboss.xiaohebang.cn/system/material/mini/com/poster1.png" mode="aspectFit" />
</view>
<view>
<view bindtap="websiteClick" class="ac_wi_website ac_ks_inter">
<image src="https://pxboss.xiaohebang.cn/system/material/mini/com/micsite1.png" mode="aspectFit" />
</view>
</view>
<view bindtap="phoneClick" data-phoneNumber="{{activityBag.bascInfo.globalPhone}}" wx:if="{{activityBag.bascInfo.globalPhone}}" class="ac_ks_inter ac_link_phone">
<image src="https://pxboss.xiaohebang.cn/system/material/mini/com/i-phone.png" mode="aspectFit" />
</view>
<view class="ac_statistics" wx:if="{{activityBag.bascInfo.globalOpenStatistics}}">
<view class="ac_statistics_content">
<label class="ac_statistics_value">{{activityBag.bascInfo.uvCount}}</label>人查看
<label class="ac_statistics_value ac_statistics_item2">{{activityBag.bascInfo.joinCount}}</label>人报名
</view>
</view>
<view class="ac_GroupPurchaseStartGo {{distributionInfo.isDistributionCanShowShare?'':'ac_GroupPurchaseStartGo--block'}}" wx:if="{{activityBag.bascInfo.activityStatus===1}}">
<!-- <view class="ac_GroupPurchaseStartGo_view" wx:if="{{distributionInfo.isDistributionCanShowShare}}"> -->
<view wx:if="{{distributionInfo.isDistributionCanShowShare}}" class="my-reward" bindtap="goMyReward">
<image src="https://pxboss.xiaohebang.cn/system/material/mini/com/my-reward.png" mode="aspectFit" />
<text>我的奖励</text>
</view>
<!-- <t-button disabled="{{isSubOkLoading}}" loading="{{isSubOkLoading}}" bindtap="goActivitySharing" shape="round" t-class="ec_Invite" size="large"><text style="color: #fff">邀请赚赏金</text></t-button>
<t-button wx:if="{{!activityBag.isActivitying}}" disabled="{{isSubOkLoading}}" loading="{{isSubOkLoading}}" bindtap="goGroupPurchaseStart" shape="round" t-class="ec_GroupPurchaseStartGo" size="large"><text style="color: #fff">报名活动</text></t-button> -->
<!-- </view> -->
<!-- <view wx:else class="ac_GroupPurchaseStartGo_view2">
<t-button wx:if="{{!activityBag.isActivitying}}" disabled="{{isSubOkLoading}}" loading="{{isSubOkLoading}}" bindtap="goGroupPurchaseStart" shape="round" t-class="ec_GroupPurchaseStartGo2" size="large"><text style="color: #fff">报名活动</text></t-button>
</view> -->
<t-button wx:if="{{distributionInfo.isDistributionCanShowShare}}" disabled="{{isSubOkLoading}}" loading="{{isSubOkLoading}}" bindtap="goActivitySharing" shape="round" t-class="ec_Invite" size="large"><text style="color: #fff">邀请赚赏金</text></t-button>
<t-button wx:if="{{!activityBag.isActivitying}}" disabled="{{isSubOkLoading}}" loading="{{isSubOkLoading}}" bindtap="goGroupPurchaseStart" shape="round" t-class="ec_GroupPurchaseStartGo {{distributionInfo.isDistributionCanShowShare?'':'ec_GroupPurchaseStartGo--wide'}}" size="large"><text style="color: #fff">报名活动</text></t-button>
</view>
<view wx:else class="ac_GroupPurchaseStartGo">
<view wx:if="{{distributionInfo.isDistributionCanShowShare}}" class="my-reward" bindtap="goMyReward">
<image src="https://pxboss.xiaohebang.cn/system/material/mini/com/my-reward.png" mode="aspectFit" />
<text>我的奖励</text>
</view>
</view>
<t-dialog id="t-dialog" />
</view>
<view class="ac1_content_loading" wx:else="">
<view>
<t-loading theme="dots" size="80rpx" loading></t-loading>
</view>
</view>
<sign-up-popup id="sign-up-popup"></sign-up-popup>
</view>
<canvas canvas-id="canvas" id="canvas" type="2d" style="position: fixed; left: -100%" />
@@ -0,0 +1,912 @@
page {
background-color: #f4f6fa;
color: rgba(0, 0, 0, 0.9);
font-family: Microsoft YaHei;
}
.ac_body {
padding-bottom: 64px;
}
.content {
background: #fff;
}
.ac1_titlle_price_value_desc {
font-size: 12px;
margin-top: 18px;
margin-left: 4px;
}
.ac1_titlle_price_value_rule1 {
text-decoration: line-through;
color: #e7e7e7;
}
.ac1_content_loading {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.ac1_swiper_img {
width: 100%;
}
.ac1_titlle_price_main {
background-image: url(https://xiaohebang.oss-cn-beijing.aliyuncs.com/system/material/activity/mini/ac_price.png?2=3);
background-repeat: no-repeat;
background-size: 100% 100%;
width: 100%;
height: 60px;
display: flex;
align-items: center;
}
.ac1_titlle_price_value {
width: 70%;
color: white;
text-align: center;
}
.ac1_not_pay_value {
color: #67C23A;
font-size: 30px;
}
.ac1_titlle_price_desc {
width: 30%;
color: #FA063C;
text-align: center;
font-weight: 800;
}
.ac1_titlle_price_value {
color: white;
display: flex;
align-items: center;
margin-left: 8px;
}
.ac1_titlle_price_value_unit {
margin-top: 28px;
}
.ac1_titlle_price_value_mustValue {
font-size: 40px;
}
.ac1_titlle_price_value_rule {
font-size: 12px;
margin-left: 10px;
text-align: left;
}
.ac1_titlle_price_desc_0 {
color: black;
}
.ac1_titlle_price_desc_1 {
color: #FD2E34;
}
.ac1_titlle_price_desc_2 {
color: black;
}
.ac1_titlle_price_desc_3 {
color: black;
}
.ac1_title_main {
padding: 10px;
font-weight: 900;
display: flex;
}
.ac1_title_text {
flex: auto;
line-height: 24px;
}
.ac1_title_explain {
flex-shrink: 0;
width: 80px;
height: 80px;
position: relative;
}
.ac1_title_explain>image {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.ac1_title_explain>view {
position: absolute;
left: 0;
right: 0;
bottom: 0;
line-height: 2.3;
color: #fff;
font-size: 14px;
font-weight: normal;
text-align: center;
}
.ac1_sta {
display: flex;
align-items: center;
height: 40px;
font-size: 12px;
}
.ac1_sta_item {
text-align: center;
width: 33%;
color: #F98B42;
}
.ac1_explain {
margin-top: 10px;
background-color: white;
position: relative;
}
.ec_relative {
position: relative;
}
.bordet_right {
border-right: #e7e7e7 solid 1px;
}
.ec_item_title {
background-color: white;
padding: 10px;
display: flex;
align-items: center;
justify-content: center;
}
.ec_item_title_text {
margin: 0 1em;
}
.ec_item_title_left,
.ec_item_title_right {
height: 2px;
width: 20px;
background: linear-gradient(to right, #fff, #FF123C);
}
.ec_item_title_right {
transform: rotate(180deg);
}
.ac1_explain_content {
text-align: center;
}
.ac1_explain_content {
padding: 10px;
}
.ac1_explain_cont {
color: red;
}
.steps_color {
color: #FF123C !important;
font-size: 12px !important;
}
.ac1_right_tag {
background-color: #FFC234;
font-size: 14px;
color: #FF123C;
height: 24px;
line-height: 24px;
width: 50px;
text-align: center;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}
.ac1_explain_link {
position: absolute;
top: 10px;
right: 0px;
}
.ac_item {
margin: 10px 0;
background-color: white;
width: 100%;
box-sizing: border-box;
padding-left: 20px;
padding-right: 20px;
padding-bottom: 10px;
}
.ec_course_name {
text-align: center;
font-weight: 900;
}
.ec_rule {
margin-top: 10px;
padding-left: 120rpx;
padding-right: 120rpx;
padding-bottom: 10px;
font-size: 12px;
color: #FF123C;
font-weight: 800;
}
.ec_rule_item {
display: flex;
align-items: center;
}
.ec_rule_one {
display: flex;
align-items: center;
width: 100%;
}
.ec_rule_one_line {
flex: 1 1 auto;
background: -webkit-linear-gradient(top, #FFF174, #FCE861, #FEE54A);
border-radius: 5px;
height: 24px;
line-height: 24px;
padding-left: 10px;
}
.ec_rule_one_money {
margin-left: 5px;
}
.ec_rule_item_line {
flex: 1 1 auto;
background: -webkit-linear-gradient(top, #FFF174, #FCE861, #FEE54A);
border-radius: 5px;
height: 24px;
line-height: 24px;
padding-left: 10px;
margin-bottom: 10px;
overflow: hidden;
min-width: 30px;
}
.ec_rule_item_price {
margin-left: 5px;
align-items: center;
margin-bottom: 8px;
}
.ec_item_text {
font-size: 14px;
word-break: break-all;
}
.magin10 {
margin-top: 10px;
}
.ec_item_img {
width: 100%;
margin-bottom: 2px;
text-align: center;
}
.ec_item_img_item {
width: 100%;
}
.ec_item_html {
font-size: 14px;
}
.ec_item_tenantLinkQRcode {
text-align: center;
}
.ac_xiaohebang {
overflow: hidden
}
.ac_xiaohebang_content {
align-items: center;
text-align: center;
height: 20px;
line-height: 2;
margin: 10px;
padding: 5px;
border-radius: 10px;
font-size: 14px;
}
.ac_xiaohebang_tp {
color: #FF123C;
}
.ec_route_item {
display: flex;
align-items: center;
margin-top: 20px;
}
.ec_route_item_text {
flex: 1 1 auto;
font-size: 14px;
margin-left: 10px;
}
.ec_route_item_sub_btn {
background: -webkit-linear-gradient(left, #FF123C, #FE2A38, #FD5028) !important;
width: 50px !important;
font-size: 12px !important;
height: 34px !important;
width: 80px !important;
font-weight: normal !important;
margin-left: 10px !important;
}
.ec_color {
color: #FF123C;
}
.ec_route_item_text_limit {
color: #FF123C;
}
.ec_route_tag {
position: absolute;
top: 10px;
right: 0px;
background-color: #FFC234;
font-size: 14px;
color: #FF123C;
height: 24px;
line-height: 24px;
width: 50px;
text-align: center;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}
.ac_ks_inter {
background: rgba(0, 0, 0, 0.5);
height: 50px;
width: 50px;
line-height: 50px;
text-align: center;
border-radius: 50px;
color: white;
z-index: 999;
font-size: 12px;
overflow: hidden;
}
.ac_ks_inter image {
width: 100%;
height: 100%;
}
.ac_poster {
position: fixed;
right: 10px;
bottom: 220px;
}
.ac_wi_website {
position: fixed;
right: 10px;
bottom: 100px;
}
.ac_link_phone {
position: fixed;
right: 10px;
bottom: 160px;
}
.ac_ks_inter_img {
line-height: 50px !important;
}
.ec_route_item_img_tp {
color: black !important;
}
.ac_statistics {
position: absolute;
top: 0px;
width: 100%;
background-color: rgba(0, 0, 0, 0.3);
overflow: hidden;
text-align: center;
font-weight: 100;
}
.ac_statistics_content {
color: white;
z-index: 999;
width: auto;
}
.ac_statistics_value {
color: #FFC234;
}
.ac_statistics_item2 {
margin-left: 10px;
}
.ac_statistics_item2 {
margin-left: 10px
}
.ec_teamRoute {
text-align: center;
}
.ec_teamRoute_index {
height: auto;
position: relative;
display: flex;
flex-direction: columnl;
box-sizing: border-box;
margin-left: 10px;
margin-right: 10px;
justify-content: center;
align-items: center;
}
.ec_teamRoute_index .ec_teamRoute_head {
width: 50px;
height: 50px;
border-radius: 50%;
border: #fff solid 1px;
}
.ec_teamRoute_more {
display: inline-block;
width: 30px;
height: 50px;
border-radius: 50%;
border: 0px;
margin-left: 10px;
margin-top: 5px;
}
.ec_teamRoute_desc {
text-align: center;
margin-top: 10px;
}
.ec_teamRoute_more2 {
display: inline-block;
width: 30px;
height: 30px;
border-radius: 50%;
border: 0px;
margin-left: 5px;
}
.ec_teamRoute_submit {
margin-top: 10px;
}
.ec_submit_go {
background: -webkit-linear-gradient(left, #FF123C, #FE2A38, #FD5028) !important;
}
.ec_submit_show {
background: -webkit-linear-gradient(left, #FFEE58, #FFE84B, #FFF05F) !important;
color: #FF123C !important;
border: #FFEE58 !important;
}
.ec_teamRoute_index_item {
position: relative;
}
.ec_teamRoute_index_item.ec_teamRoute_index_item--exhibition {
width: 25px;
}
.ec_teamRoute_index_item.ec_teamRoute_index_item--exhibition.ec_teamRoute_index_item--exhibition-last {
width: 50px;
}
.ec_teamRoute_tuanzhang {
position: absolute;
top: -10px;
left: 10px;
font-size: 12px;
color: white;
background-color: #FF123C;
border-radius: 5px;
padding-left: 2px;
padding-right: 2px;
width: inherit;
}
.ec_GroupPurchaseStartGo {
margin-left: 0.5rem;
width: 37vw !important;
background: -webkit-linear-gradient(left, #FF123C, #FE2A38, #FD5028) !important;
color: #fff;
}
.ec_GroupPurchaseStartGo--wide {
width: 100% !important;
}
.ec_GroupPurchaseStartGo2 {
background: -webkit-linear-gradient(left, #FF123C, #FE2A38, #FD5028) !important;
}
.ec_Invite {
margin-left: 0.5rem;
width: 37vw !important;
background: -webkit-linear-gradient(left, #f7a91a, #ecb143, #f1cd7d) !important;
color: #fff;
}
.ac_Left {
flex: auto;
}
.ac_GroupPurchaseStartGo {
background-color: #fff;
position: fixed;
bottom: 0px;
left: 0;
right: 0;
z-index: 9999;
display: flex;
justify-content: space-between;
padding: 10px;
}
.ac_GroupPurchaseStartGo--block {
display: block;
}
.ac_GroupPurchaseStartGo_view {
align-items: center;
justify-content: space-between;
display: flex;
z-index: 9999;
}
.ac_GroupPurchaseStartGo_view2 {
text-align: center;
z-index: 9999;
align-items: center;
}
.ec_teamRoute_time {
text-align: center;
color: #FD5028;
font-size: 12px;
}
.ec_teamRoute_time2 {
text-align: center;
color: #FD5028;
font-size: 12px;
}
.danmu-display {
width: 100%;
height: 100%;
}
.danmu {
color: #fff;
background-color: rgba(0, 0, 0, 0.5);
position: absolute;
font-size: 32rpx;
line-height: 32rpx;
border-radius: 32rpx;
padding: 8rpx;
width: max-content;
animation: danmuplay 5s linear infinite;
}
.danmu__img {
width: 32rpx;
height: 32rpx;
border-radius: 50%;
margin-right: 32rpx;
}
@keyframes danmuplay {
0% {
right: -100%;
/* transform: translateX(0px); */
}
100% {
right: 100%;
/* transform: translateX(-100%); */
}
}
.danmu_text {
color: #e2dadc;
}
.ec_item_title_full {
margin-bottom: 15px;
display: flex;
flex-direction: row;
justify-content: center
}
.ec_item_title_full_txt {
color: rgba(0, 0, 0, 0.9);
}
.ec_item_title_full_img {
color: #67C23A;
margin-top: 2px;
}
.ac1_titlle_price_value0 {
display: flex;
flex-direction: row;
text-align: center;
}
.ac1_titlle_price_value1 {
color: #FF1D39;
font-size: 20px;
background-color: #fff;
border-radius: 5px;
padding-left: 5px;
padding-right: 5px;
border-color: #fff;
font-weight: 900;
}
.ac1_titlle_price_value_rule2 {
margin-top: 2px;
}
.ac1_titlle_price_value2 {
color: #FF1D39;
font-size: 20px;
background-color: #fff;
border-radius: 5px;
padding-left: 5px;
padding-right: 5px;
border-color: #fff;
font-weight: 900;
}
.ec_teamRoute_process {
margin-left: 40px;
margin-right: 40px;
margin-top: 10px;
margin-bottom: 30px;
}
.ec_teamRoute_process_desc {
font-size: 16px;
}
.ec_teamRoute_Assist {
text-align: center;
margin-bottom: 20px;
}
.ac1_kangjia_btn {
background-color: #FFAB1A !important;
border: #FFAB1A !important;
}
.ac1_fenxiao_btn {
background-color: #FF6A2F !important;
border: #FF6A2F !important;
margin-right: 5px;
}
.showQrcode_img {
line-height: 50px !important;
}
.myQrcodeImage {
padding: 20px;
background-color: #fff;
}
.myQrcodeImage_text {
text-align: center;
margin-top: 5px;
}
.my_qrcode {
position: fixed;
right: 10px;
bottom: 280px;
}
.ec_CountDown_title {
font-size: 12px;
margin-bottom: 5px;
}
.ec_teamRoute_title {
padding-top: 20px;
font-weight: bolder;
margin-bottom: 10px;
}
.my_success_2 {
position: relative;
padding-bottom: 60px;
}
.pintuan_success_view {
margin-bottom: 5px;
}
.pintuan_success_content {
position: absolute;
left: 0;
right: 0;
bottom: 0;
margin-left: auto;
margin-right: auto;
}
.pintuan_success1 {
width: 140px;
}
.ac1_tp_color {
color: #F56C6C;
font-weight: bolder;
}
.ac3_explain_content {
text-align: center;
font-size: 14px;
}
.ac3_explain_content_item {}
.ac1_titlle_price_desc_my {
margin: 0px;
padding: 0px;
}
.ac3_extime {
text-align: center;
font-size: 12px;
line-height: 30px;
color: #FF123C;
font-weight: bolder;
}
.ac30_extime {
text-align: center;
font-size: 12px;
line-height: 30px;
color: #FF123C;
font-weight: bolder;
}
.ac30_extime2 {
font-size: 12px;
color: #FD5028;
font-size: 12px;
text-align: center;
/* background-color: #ff1d39;
color: #fff;
border-radius: 2px;
padding: 0 4px; */
}
.ac32_extime {
text-align: center;
font-weight: bolder;
align-items: center;
}
.ac1_titlle_exover {
margin-left: auto;
margin-right: auto;
}
.panic-buying-outter {
background-color: #fff;
padding: 10px;
}
.panic-buying {
display: flex;
align-items: center;
padding: 8px 10px;
background-color: #fef8f2;
border-radius: 10px;
}
.panic-buying__portrait-list {
flex: auto;
display: flex;
align-items: center;
}
.panic-buying__portrait--pile {
margin-left: -8px;
}
.panic-buying__portrait>image {
display: block;
width: 28px;
height: 28px;
border-radius: 50%;
border: #fff solid 1px;
}
.panic-buying__right {
flex: 0 0 auto;
display: flex;
color: #666;
align-items: center;
}
.my-reward {
font-size: 12px;
color: #676e78;
display: flex;
flex-direction: column;
align-items: center;
}
.my-reward image {
width: 24px;
height: 24px;
}
.ac-action {
margin: initial;
width: initial !important;
background: initial;
padding: initial;
font-weight: initial;
text-align: center;
font-size: 16px;
display: flex;
flex-direction: column;
align-items: center;
}
.ac-action image {
width: 64px;
height: 64px;
margin-bottom: 8px;
}
.ac-action text {
color: #fff;
}
.ac-poster-canvas {
position: absolute;
left: -100%;
}