Commit 8204ab2f authored by anxixi's avatar anxixi

Merge remote-tracking branch 'origin/master'

parents 5261b8b1 2f2b8630
NODE_ENV="production"
VUE_APP_URL="prod"
API_ROOT="/"
VUE_APP_UPDATED="2.1.01"
VUE_APP_UPDATED="3.0.02"
VUE_APP_UPLOAD_IMG="/base/upload/uploadPicture"
VUE_APP_UPLOAD_FILE="/base/upload/uploadFile"
VUE_APP_UPLOAD_LOGO="/base/upload/uploadLogo"
NODE_ENV="production"
VUE_APP_URL="dev"
API_ROOT="/"
VUE_APP_UPDATED="2.1.01"
VUE_APP_UPDATED="3.0.02"
VUE_APP_UPLOAD_IMG="/base/upload/uploadPicture"
VUE_APP_UPLOAD_FILE="/base/upload/uploadFile"
VUE_APP_UPLOAD_LOGO="/base/upload/uploadLogo"
......@@ -710,6 +710,7 @@ i, em {
height: 1.54rem;
background-size: cover;
background-repeat: no-repeat;
backgroung-position:50% center;
}
.leftInfo{
width:calc(100% - 2.32rem);
......@@ -755,6 +756,7 @@ i, em {
height: 1.54rem;
background-size: cover;
background-repeat: no-repeat;
backgroung-position:50% center;
}
}
}
......
export default { // 公共的js
install(_this, options) {
_this.prototype.version = process.env.VUE_APP_UPDATED;
}
}
\ No newline at end of file
......@@ -64,6 +64,14 @@
}
});
var version = this.version; //版本号(每次上线前需要更新下版本号)
console.log('当前版本号common.js:',version)
var vvv ='3.0.02'
console.log('当前版本号app.vue:',vvv)
if(vvv!=version){
this.version=vvv;
location.reload();
}
// var bodyTag;
// if(document.documentElement.scrollHeight <= document.documentElement.clientHeight) {
// bodyTag = document.getElementsByTagName('body')[0];
......
This diff is collapsed.
......@@ -417,13 +417,20 @@ export default {
//判断是否在微信
if(ua.match(/MicroMessenger/i)=="micromessenger") {
//判断是否在小程序
wx.miniProgram.getEnv((res)=>{
if (res.miniprogram) {
flag = 'cc276b08';
} else {
flag = 'bbc5d0ee';
}
})
var isMini = /miniProgram/i.test(userAgentInfo);
if(isMini){
flag = 'cc276b08';
}else{
flag = 'bbc5d0ee';
}
// wx.miniProgram.getEnv((res)=>{
// if (res.miniprogram) {
// flag = 'cc276b08';
// } else {
// flag = 'bbc5d0ee';
// }
// })
}else{
flag = 'bbc5d0ee';
}
......
......@@ -41,8 +41,10 @@ import VideoPlayer from 'vue-video-player'
import 'video.js/dist/video-js.css'
import 'vue-video-player/src/custom-theme.css'
import cancelRequest from './api/api'
import versionJs from '../public/js/version';
Vue.use(VideoPlayer)
Vue.use(VueCropper)
Vue.use(versionJs);
promise.polyfill();
Vue.prototype.$md5 = md5
Vue.prototype.wx = wx
......@@ -236,6 +238,15 @@ router.beforeEach((to, from, next) => {
document.body.scrollTop=document.documentElement.scrollTop=0;
});
router.onError((error) => {
const pattern = /Loading chunk (\d)+ failed/g;
const isChunkLoadFailed = error.message.match(pattern);
const targetPath = router.history.pending.fullPath;
if (isChunkLoadFailed) {
router.replace(targetPath);
}
});
// 为了实现Class的私有属性
const showMessage = Symbol('showMessage')
......
......@@ -36,8 +36,27 @@
this.showMessageInfo = false;
}
// else this.$refs["emailForm"].resetFields();
},
isNeedMessage(){
var data = window.sessionStorage.getItem("errorMsg");
if(data){
this.$alert(data, {
confirmButtonText: this.$t("commonTips.confirm"),
center: true,
customClass: 'alertDialog',
callback: action => {
window.localStorage.clear();
window.sessionStorage.clear();
this.publicFun.delCookie();
}
});
}
}
},
created(){
this.isNeedMessage();
}
}
</script>
......
......@@ -26,7 +26,27 @@
activeName: "first",
}
},
methods: {}
methods: {
isNeedMessage(){
var data = window.sessionStorage.getItem("errorMsg");
if(data){
this.$alert(data, {
confirmButtonText: this.$t("commonTips.confirm"),
center: true,
customClass: 'alertDialog',
callback: action => {
window.localStorage.clear();
window.sessionStorage.clear();
this.publicFun.delCookie();
}
});
}
}
},
created(){
this.isNeedMessage();
}
}
</script>
......
......@@ -143,10 +143,10 @@
<div class="commentInput" v-if="articleInfo&&!$route.query.isShow">
<div>
<p @click="handleScore()" v-if="isCanComment">
<i class="iconfont icon-weibiaoti--"></i><span>点评有礼</span>
<i class="iconfont icon-weibiaoti--"></i><span>写评论</span>
</p>
<p @click="handleTips()" v-if="!isCanComment">
<i class="iconfont icon-weibiaoti--"></i><span>点评有礼</span>
<i class="iconfont icon-weibiaoti--"></i><span>写评论</span>
</p>
</div>
......
......@@ -488,6 +488,7 @@
margin: 0 .035rem;
background-repeat: no-repeat;
background-size: cover;
backgroung-position:50% center;
}
}
}
......
......@@ -529,7 +529,7 @@
getArticleInfoData(){
let params ={
count:5
count:6
};
api.getArticleListAxios(params).then((res)=>{
if(res.code==0){
......
......@@ -55,6 +55,16 @@
handleWechatLogin(){
var url = document.location.href.split("#/")[0]+"#/newPage";
window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx725d0e129f703106&redirect_uri="+encodeURIComponent(url)+"&response_type=code&scope=snsapi_userinfo&state=STATE&connect_redirect=1#wechat_redirect";
},
isNeedMessage(){
var data = window.sessionStorage.getItem("errorMsg");
if(data){
Toast(data);
window.localStorage.clear();
window.sessionStorage.clear();
this.publicFun.delCookie();
}
}
},
......@@ -63,6 +73,9 @@
vm.pathfrom =vm.publicFun.getCookie("selected")=="mine"?'/mine':from.fullPath;
})
},
created(){
this.isNeedMessage();
}
}
</script>
......
......@@ -22,6 +22,7 @@
import mbByPwdCmpt from './phonePwdCmpt'
import mbByCodeCmpt from './phoneCodeCmpt';
import breadBottom from '../../../components/mobile/breadBottom';
import {Toast,MessageBox} from 'mint-ui';
export default {
name: "loginByPhone",
components:{
......@@ -45,6 +46,16 @@
handleWechatLogin(){
var url = document.location.href.split("#/")[0]+"#/newPage";
window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx725d0e129f703106&redirect_uri="+encodeURIComponent(url)+"&response_type=code&scope=snsapi_userinfo&state=STATE&connect_redirect=1#wechat_redirect";
},
isNeedMessage(){
var data = window.sessionStorage.getItem("errorMsg");
if(data){
Toast(data);
window.localStorage.clear();
window.sessionStorage.clear();
this.publicFun.delCookie();
}
}
},
beforeRouteEnter(to, from, next) {
......@@ -52,6 +63,9 @@
vm.pathfrom =vm.publicFun.getCookie("selected")=="mine"?'/mine':from.fullPath;
})
},
created(){
this.isNeedMessage();
}
}
</script>
......
......@@ -47,11 +47,11 @@
</div>
</div>
</div>
<div class="searchContentHasDataWrap" v-if="canSearch" :style="{overflow:hasData?'auto':'hidden'}">
<div class="searchContentHasDataWrap" v-if="canSearch" :style="{overflow:hasData?'auto':currentIndex==3&&totalArticleData==0||totalPage==page?'auto':'hidden'}">
<div :class="currentIndex==3?'noPositionList':'newcontentList'" ref="newcontentList"
<div :class="currentIndex==3?'noPositionList':'newcontentList'" ref="newcontentList" :style="{paddingBottom:currentIndex==3&&totalArticleData==0||totalPage==page?'.5rem':'2.2rem'}"
v-if="tableData"
:style="{height:currentIndex==3?(totalPage==1||totalPage==page?'unset':'100vh'):'100%'}">
>
<div class="searchResultCount" v-if="!hasData">
<span v-if="lang==1&&currentIndex==0">共搜到 <span
class="count">{{totalProjectData}}</span> 个项目</span>
......@@ -964,6 +964,7 @@
.newcontentList {
top: 0;
left: 0;
padding-bottom: 2.2rem;
}
}
......@@ -1225,6 +1226,8 @@
.noPositionList {
width: 100%;
height: 100%;
padding-bottom: 2.2rem;
overflow: auto;
-webkit-overflow-scrolling: touch;
margin-top: 1rem;
......
......@@ -64,7 +64,7 @@ module.exports = {
new CompressionWebpackPlugin({
filename: '[path].gz[query]',
algorithm: 'gzip',
deleteOriginalAssets: true, // 删除原文件
deleteOriginalAssets: false, // 删除原文件
test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
threshold: 10240,
minRatio: 0.8
......
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