|
@@ -18,11 +18,13 @@ var upScrollT = getNode("upScroll-t") // 参与人信息 盒子2
|
|
|
|
|
|
var storeId = getQueryString('orgId') || 0 // 门店id
|
|
|
var companyId = ''
|
|
|
-// test, 测试 local:本地 pre :预发布 pro:生产
|
|
|
+// test, 测试 local、dev:本地开发环境 pre :预发布 pro:生产
|
|
|
if(baseType == 'test'){
|
|
|
var reqUrl = 'http://192.168.16.100:9110/saas/clz/'
|
|
|
}else if(baseType == 'local'){
|
|
|
- var reqUrl = 'http://192.168.16.102:9110/saas/clz/'
|
|
|
+ var reqUrl = 'http://192.168.16.104:9110/saas/clz/'
|
|
|
+}else if(baseType == 'dev'){
|
|
|
+ var reqUrl = 'http://192.168.16.104:9110/saas/clz/'
|
|
|
}else if(baseType == 'pre'){
|
|
|
var reqUrl = 'http://md.test.zyucgj.com/saas/clz/'
|
|
|
}else if(baseType == 'pro'){
|
|
@@ -36,11 +38,11 @@ var closeYy = function (){
|
|
|
}
|
|
|
window.onload = function(){
|
|
|
if(staticHtmlPath){ // 发布
|
|
|
+ onLoading() // 加载中
|
|
|
checkActiveValid()
|
|
|
}else{ // 预览
|
|
|
getActivityData() // 获取活动信息
|
|
|
}
|
|
|
-
|
|
|
// 校验活动是否还在进行
|
|
|
function checkActiveValid(){
|
|
|
$.ajax({
|
|
@@ -107,10 +109,49 @@ window.onload = function(){
|
|
|
}else{ // 运营端发布活动无门店id参数
|
|
|
joinerList() // 参与人列表数据
|
|
|
}
|
|
|
+ if(staticHtmlPath){ // 发布
|
|
|
+ // 关闭加载状态
|
|
|
+ document.getElementById('foo').style.display = 'none'
|
|
|
+ modalZz.style.display = 'none'
|
|
|
+ // 不是微信端打开的页面
|
|
|
+ if(!browser.versions.weixin){
|
|
|
+ document.querySelector('.zy-h5-bf-bar').style.display = 'none'
|
|
|
+ document.querySelector('.zy-h5-fx-bar').style.display = 'none'
|
|
|
+ }else{
|
|
|
+ document.querySelector('.zy-h5-bf-bar').style.display = 'flex'
|
|
|
+ document.querySelector('.zy-h5-fx-bar').style.display = 'block'
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
})
|
|
|
}
|
|
|
+ // 加载中
|
|
|
+ function onLoading(){
|
|
|
+ // 隐藏参与和分享按钮
|
|
|
+ document.querySelector('.zy-h5-bf-bar').style.display = 'none'
|
|
|
+ document.querySelector('.zy-h5-fx-bar').style.display = 'none'
|
|
|
+ modalZz.style.display = 'block' // 遮罩层
|
|
|
+ var opts = {
|
|
|
+ lines: 9, // The number of lines to draw
|
|
|
+ length: 0, // The length of each line
|
|
|
+ width: 10, // The line thickness
|
|
|
+ radius: 15, // The radius of the inner circle
|
|
|
+ corners: 1, // Corner roundness (0..1)
|
|
|
+ rotate: 0, // The rotation offset
|
|
|
+ color: '#2979ff', // #rgb or #rrggbb
|
|
|
+ speed: 1, // Rounds per second
|
|
|
+ trail: 60, // Afterglow percentage
|
|
|
+ shadow: false, // Whether to render a shadow
|
|
|
+ hwaccel: false, // Whether to use hardware acceleration
|
|
|
+ className: 'spinner', // The CSS class to assign to the spinner
|
|
|
+ zIndex: 2e9, // The z-index (defaults to 2000000000)
|
|
|
+ top: 'auto', // Top position relative to parent in px
|
|
|
+ left: 'auto' // Left position relative to parent in px
|
|
|
+ };
|
|
|
+ var target = document.getElementById('foo');
|
|
|
+ var spinner = new Spinner(opts).spin(target);
|
|
|
+ }
|
|
|
// 打开预约弹框
|
|
|
yuyue.onclick = function(){
|
|
|
modal.style.display = 'block'
|