Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
icarusion committed Jun 4, 2018
1 parent 9733f37 commit 8095860
Show file tree
Hide file tree
Showing 18 changed files with 62 additions and 2,803 deletions.
25 changes: 1 addition & 24 deletions src/components/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,6 @@
<Icon type="load-c" size="18" class="icon-loading"></Icon>
</div>
</transition>
<!--<Modal v-if="lang === 'zh-CN'" v-model="fee" title="第一期前端探索交流会" width="750" :closable="false" :mask-closable="false">-->
<!--<div class="ivu-article">-->
<!--<p>活动介绍:前端探索交流会 FEE(Front End Explore) 是由 TalkingData 可视化团队发起的非盈利性前端开发者交流会,旨在分享、探索和传播具有创新的、有价值的思想、灵感或经验。</p>-->
<!--<p>直播时间:2017-12-09 14:30</p>-->
<!--<p style="font-size: 16px;font-weight: bold;">-->
<!--直播地址:<a href="https://live.bilibili.com/1353202" target="_blank">https://live.bilibili.com/1353202</a>-->
<!--</p>-->
<!--<p>-->
<!--关注 FEE 公众号,获取最新动态:-->
<!--</p>-->
<!--<row>-->
<!--<i-col span="12">-->
<!--<img src="../images/fee-code.jpg" width="200px">-->
<!--</i-col>-->
<!--</row>-->
<!--</div>-->
<!--<div slot="footer">-->
<!--<Button type="text" size="large" @click="feeclose">关闭</Button>-->
<!--<Button type="primary" size="large" style="width: 100px" @click="gotofee">查看直播</Button>-->
<!--</div>-->
<!--</Modal>-->
</div>
</template>
<script>
Expand All @@ -58,7 +37,6 @@
return {
liveVisible: false,
iViewVisible: false,
lang: this.$lang,
fee: true,
ad_index: 1 // 随机广告索引,更好地显示一类广告
}
Expand All @@ -72,7 +50,6 @@
// 随机广告索引
this.ad_index = Math.floor(Math.random () * 6 + 1);
this.lang = this.$lang;
if (window.localStorage.getItem('liveModalTime')) {
const time = parseInt(window.localStorage.getItem('liveModalTime'));
const today = this.getTodayUnix();
Expand Down Expand Up @@ -120,7 +97,7 @@
// 广告统计
window.clickAdBuy = function () {
_hmt.push(['_trackEvent', 'index-ad-buy', 'click'])
}
};
window.clickAdVideo = function () {
_hmt.push(['_trackEvent', 'index-ad-video', 'click'])
Expand Down
Binary file added src/images/bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/code.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/index-title.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/libs/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ util.alert = function(content) {
};

util.title = function (title) {
title = title ? title + ' - iView' : 'iView - A high quality UI Toolkit based on Vue.js';
title = title ? title + ' - iView Weapp' : 'iView Weapp - 一套高质量的微信小程序 UI 组件库';
window.document.title = title;
};
const SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
Expand Down
26 changes: 0 additions & 26 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@
import 'babel-polyfill';
import Vue from 'vue';
import VueRouter from 'vue-router';
import VueI18n from 'vue-i18n';
import Locales from './locale';
import App from './components/app.vue';
import Routers from './router';
import Util from './libs/util';
import iView from 'iview';
import zhLocale from 'iview/dist/locale/zh-CN';
import enLocale from 'iview/dist/locale/en-US';
import Env from './config/env';
import bus from './components/bus';
import 'iview/dist/styles/iview.css';
Expand All @@ -20,35 +16,13 @@ import 'iview/dist/styles/iview.css';
import ad from './components/ad.vue';

Vue.use(VueRouter);
Vue.use(VueI18n);
Vue.use(iView);

Vue.component('ad', ad);

// 开启debug模式
Vue.config.debug = true;

// 设置语言
const navLang = navigator.language;
const localLang = (navLang === 'zh-CN' || navLang === 'en-US') ? navLang : false;
const lang = window.localStorage.getItem('language') || localLang || 'zh-CN';

Vue.config.lang = lang;
bus.lang = lang;
bus.$on('on-change-lang', (lang, path) => {
// Vue.config.lang = lang;
// bus.lang = lang;
window.localStorage.setItem('language', lang);
window.location.href = path;
});

// 多语言配置
const locales = Locales;
const mergeZH = Object.assign(zhLocale, locales['zh-CN']);
const mergeEN = Object.assign(enLocale, locales['en-US']);
Vue.locale('zh-CN', mergeZH);
Vue.locale('en-US', mergeEN);

// 路由配置
const RouterConfig = {
routes: Routers
Expand Down
Loading

0 comments on commit 8095860

Please sign in to comment.