|
@@ -38,65 +38,93 @@ new Vue({
|
|
|
},
|
|
|
loading: '',
|
|
|
pickerOptions: {
|
|
|
- disabledDate:function(time) {
|
|
|
+ disabledDate: function (time) {
|
|
|
return time.getTime() > Date.now();
|
|
|
},
|
|
|
},
|
|
|
radio: '0',
|
|
|
authors: '0',
|
|
|
+ scrollTop: 0
|
|
|
},
|
|
|
created: function () {
|
|
|
this.openFullScreen1();
|
|
|
this.getajax();
|
|
|
},
|
|
|
- methods:{
|
|
|
- beforeLiberation:function() {
|
|
|
+ methods: {
|
|
|
+ beforeLiberation: function () {
|
|
|
this.parent.pictureType = 0;
|
|
|
this.getajax();
|
|
|
+ $('.beforeLiberation').css("height", "1500px");
|
|
|
$('.afterLiberation').hide(2000);
|
|
|
$('.eightyYears').hide(2000);
|
|
|
$('.newCentury').hide(2000);
|
|
|
+ $('.middle_nav').fadeOut();
|
|
|
+ $('.middle_nav1').fadeOut();
|
|
|
+ $('.middle_nav3').fadeOut();
|
|
|
+ $('.middle_nav4').fadeOut();
|
|
|
$('.beforeLiberation').show(2000, function () {
|
|
|
+ $('.middle_nav').fadeIn();
|
|
|
+ $('.beforeLiberation').css("height", "100%");
|
|
|
})
|
|
|
},
|
|
|
- afterLiberation:function() {
|
|
|
+ afterLiberation: function () {
|
|
|
this.parent.pictureType = 1;
|
|
|
this.getajax();
|
|
|
+ $('.afterLiberation').css("height", "1500px");
|
|
|
$('.beforeLiberation').hide(2000);
|
|
|
$('.eightyYears').hide(2000);
|
|
|
$('.newCentury').hide(2000);
|
|
|
+ $('.middle_nav').fadeOut();
|
|
|
+ $('.middle_nav1').fadeOut();
|
|
|
+ $('.middle_nav3').fadeOut();
|
|
|
+ $('.middle_nav4').fadeOut();
|
|
|
$('.afterLiberation').show(2000, function () {
|
|
|
+ $('.middle_nav1').fadeIn();
|
|
|
+ $('.afterLiberation').css("height", "100%");
|
|
|
});
|
|
|
|
|
|
},
|
|
|
- eightyYears:function() {
|
|
|
+ eightyYears: function () {
|
|
|
this.parent.pictureType = 2;
|
|
|
this.getajax();
|
|
|
+ $('.eightyYears').css("height", "1500px");
|
|
|
$('.beforeLiberation').hide(2000);
|
|
|
$('.afterLiberation').hide(2000);
|
|
|
$('.newCentury').hide(2000);
|
|
|
+ $('.middle_nav').fadeOut();
|
|
|
+ $('.middle_nav1').fadeOut();
|
|
|
+ $('.middle_nav3').fadeOut();
|
|
|
+ $('.middle_nav4').fadeOut();
|
|
|
$('.eightyYears').show(2000, function () {
|
|
|
+ $('.middle_nav4').fadeIn();
|
|
|
+ $('.eightyYears').css("height", "100%");
|
|
|
});
|
|
|
|
|
|
},
|
|
|
- newCentury:function() {
|
|
|
+ newCentury: function () {
|
|
|
this.parent.pictureType = 3;
|
|
|
this.getajax();
|
|
|
+ $('.newCentury').css("height", "1500px");
|
|
|
$('.beforeLiberation').hide(2000);
|
|
|
$('.afterLiberation').hide(2000);
|
|
|
$('.eightyYears').hide(2000);
|
|
|
+ $('.middle_nav').fadeOut();
|
|
|
+ $('.middle_nav1').fadeOut();
|
|
|
+ $('.middle_nav3').fadeOut();
|
|
|
+ $('.middle_nav4').fadeOut();
|
|
|
$('.newCentury').show(2000, function () {
|
|
|
-
|
|
|
+ $('.middle_nav3').fadeIn();
|
|
|
+ $('.newCentury').css("height", "100%");
|
|
|
});
|
|
|
|
|
|
},
|
|
|
- contribute:function() {
|
|
|
- this.isshow=true;
|
|
|
- this.isshows=false;
|
|
|
+ contribute: function () {
|
|
|
+ this.isshow = true;
|
|
|
+ this.isshows = false;
|
|
|
$('.contribute').show();
|
|
|
$(".contribute_content").css("margin-top", "-21%")
|
|
|
},
|
|
|
- closeContribute:function() {
|
|
|
+ closeContribute: function () {
|
|
|
$('.contribute').hide();
|
|
|
this.form.tel = '';
|
|
|
this.form.file = '';
|
|
@@ -108,14 +136,14 @@ new Vue({
|
|
|
this.radio = '0';
|
|
|
this.authors = '0';
|
|
|
},
|
|
|
- notarizeUp:function() {
|
|
|
+ notarizeUp: function () {
|
|
|
var _this = this;
|
|
|
var reg = /1[3-9]\d{9}/;
|
|
|
if (!reg.test(_this.form.tel)) {
|
|
|
_this.$message({
|
|
|
message: '请输入正确格式的电话!',
|
|
|
offset: 110,
|
|
|
- duration:1500
|
|
|
+ duration: 1500
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -123,7 +151,7 @@ new Vue({
|
|
|
_this.$message({
|
|
|
message: '请输入正确的作品名称!',
|
|
|
offset: 110,
|
|
|
- duration:1500
|
|
|
+ duration: 1500
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -131,7 +159,7 @@ new Vue({
|
|
|
_this.$message({
|
|
|
message: '作品名称不能大于20个字!',
|
|
|
offset: 110,
|
|
|
- duration:1500
|
|
|
+ duration: 1500
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -139,7 +167,7 @@ new Vue({
|
|
|
_this.$message({
|
|
|
message: '请输入作者名称!',
|
|
|
offset: 110,
|
|
|
- duration:1500
|
|
|
+ duration: 1500
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -147,7 +175,7 @@ new Vue({
|
|
|
_this.$message({
|
|
|
message: '作者名称不能大于10个字!',
|
|
|
offset: 110,
|
|
|
- duration:1500
|
|
|
+ duration: 1500
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -155,7 +183,7 @@ new Vue({
|
|
|
_this.$message({
|
|
|
message: '请选择归属日期!',
|
|
|
offset: 110,
|
|
|
- duration:1500
|
|
|
+ duration: 1500
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -163,7 +191,7 @@ new Vue({
|
|
|
_this.$message({
|
|
|
message: '请选择年代!',
|
|
|
offset: 150,
|
|
|
- duration:1500
|
|
|
+ duration: 1500
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -171,7 +199,7 @@ new Vue({
|
|
|
_this.$message({
|
|
|
message: '请添加文件!',
|
|
|
offset: 150,
|
|
|
- duration:1500
|
|
|
+ duration: 1500
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -179,7 +207,7 @@ new Vue({
|
|
|
_this.$message({
|
|
|
message: '文件过大!',
|
|
|
offset: 150,
|
|
|
- duration:1500
|
|
|
+ duration: 1500
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -187,7 +215,7 @@ new Vue({
|
|
|
_this.$message({
|
|
|
message: '请添加内容!',
|
|
|
offset: 150,
|
|
|
- duration:1500
|
|
|
+ duration: 1500
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -229,25 +257,25 @@ new Vue({
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- beforeRemove:function(file) {
|
|
|
+ beforeRemove: function (file) {
|
|
|
this.form.file = '';
|
|
|
- return this.$confirm('确定移除 '+file.name+'?');
|
|
|
+ return this.$confirm('确定移除 ' + file.name + '?');
|
|
|
},
|
|
|
- onExceed:function() {
|
|
|
+ onExceed: function () {
|
|
|
return this.$message({
|
|
|
message: '只能传一个文件!',
|
|
|
type: 'warning'
|
|
|
});
|
|
|
},
|
|
|
- continueUp:function() {
|
|
|
+ continueUp: function () {
|
|
|
this.isshow = true;
|
|
|
this.isshows = false;
|
|
|
$(".contribute_content").css("margin-top", "-21%");
|
|
|
},
|
|
|
- upRequest:function(file) {
|
|
|
+ upRequest: function (file) {
|
|
|
this.form.file = file.file;
|
|
|
},
|
|
|
- getajax:function() {
|
|
|
+ getajax: function () {
|
|
|
var _this = this;
|
|
|
$.ajax({
|
|
|
type: 'get',
|
|
@@ -288,8 +316,11 @@ new Vue({
|
|
|
id: content[i].id
|
|
|
})
|
|
|
}
|
|
|
- _this.activities = obj;
|
|
|
+ // _this.activities=obj;
|
|
|
+
|
|
|
+
|
|
|
obj.push([]);
|
|
|
+ _this.activities.push.apply(_this.activities,obj)
|
|
|
} else {
|
|
|
_this.activities = [];
|
|
|
}
|
|
@@ -301,7 +332,7 @@ new Vue({
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- openFullScreen1:function() {
|
|
|
+ openFullScreen1: function () {
|
|
|
this.fullscreenLoading = true;
|
|
|
this.loading = this.$loading({
|
|
|
lock: true,
|
|
@@ -309,7 +340,7 @@ new Vue({
|
|
|
background: 'rgba(255, 255, 255, 1)'
|
|
|
});
|
|
|
},
|
|
|
- openDetails:function(index) {
|
|
|
+ openDetails: function (index) {
|
|
|
var _this = this
|
|
|
$.ajax({
|
|
|
type: 'get',
|
|
@@ -322,36 +353,48 @@ new Vue({
|
|
|
// <img src="./img/close.png" alt="" >
|
|
|
// </div>`
|
|
|
_this.$alert('<div class="frame">'
|
|
|
- +'<div class="content">'
|
|
|
- +'<div class="content_img">'
|
|
|
- + '<div>'
|
|
|
- +'<img src="'+ PATH + '/'+json.data.urlAddress+'" alt="">'
|
|
|
- +'</div>'
|
|
|
- +'<div class="author"><P>作者:'+json.data.pictureAuthor+'</P><P>电话:'+json.data.uploaderPhone+'</P></div>'
|
|
|
- +'</div>'
|
|
|
- +'<div class="content_introduce">'
|
|
|
- +'<div style="height: 32px;display:flex;margin-bottom: 10px;">'
|
|
|
- +'<img style="width:54px" src="./img/xiao.png" alt="">'
|
|
|
- +'<p style="font-size: 17px;margin-left: 14px;">'+json.data.pictureTitle+'</p>'
|
|
|
- +'</div>'
|
|
|
- +'<p style="width: 350px;word-wrap: break-word;">'+json.data.pictureDescription+'</p>'
|
|
|
- +'</div>'
|
|
|
- +'</div>'
|
|
|
- +'</div>', {
|
|
|
+ + '<div class="content">'
|
|
|
+ + '<div class="content_img">'
|
|
|
+ + '<div>'
|
|
|
+ + '<img src="' + PATH + '/' + json.data.urlAddress + '" alt="">'
|
|
|
+ + '</div>'
|
|
|
+ + '<div class="author"><P>作者:' + json.data.pictureAuthor + '</P><P>电话:' + json.data.uploaderPhone + '</P></div>'
|
|
|
+ + '</div>'
|
|
|
+ + '<div class="content_introduce">'
|
|
|
+ + '<div style="height: 32px;display:flex;margin-bottom: 10px;">'
|
|
|
+ + '<img style="width:54px" src="./img/xiao.png" alt="">'
|
|
|
+ + '<p style="font-size: 17px;margin-left: 14px;">' + json.data.pictureTitle + '</p>'
|
|
|
+ + '</div>'
|
|
|
+ + '<p style="width: 350px;word-wrap: break-word;">' + json.data.pictureDescription + '</p>'
|
|
|
+ + '</div>'
|
|
|
+ + '</div>'
|
|
|
+ + '</div>', {
|
|
|
dangerouslyUseHTMLString: true,
|
|
|
closeOnClickModal: true,
|
|
|
showConfirmButton: false,
|
|
|
showClose: true,
|
|
|
customClass: 'popup'
|
|
|
- }).then(function() {
|
|
|
-
|
|
|
- }).catch(function() {
|
|
|
+ }).then(function () {
|
|
|
+
|
|
|
+ }).catch(function () {
|
|
|
});
|
|
|
},
|
|
|
error: function (err) {
|
|
|
_this.loading.close();
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ handleScroll() {
|
|
|
+ this.scrollTop = document.documentElement.scrollTop || document.body.scrollTop
|
|
|
+ headHeight=$('.head').innerHeight();
|
|
|
+ navHeight=$('.nav').innerHeight();
|
|
|
+ var windowHeight = document.documentElement.clientHeight || document.body.clientHeight
|
|
|
+ var scrolHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ window.addEventListener('scroll', this.handleScroll)
|
|
|
},
|
|
|
})
|