feat: 会员中心 hgcloud 主题初始化 + drone 部署步骤
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
- 解压官方默认主题 default_yfMBA.tar.gz 到 clientarea/hgcloud/ - .gitignore 排除压缩包和临时解压目录 - drone 新增步骤: 同步 hgcloud 到 /clientarea/template/pc/
This commit is contained in:
39
clientarea/hgcloud/js/transfer.js
Normal file
39
clientarea/hgcloud/js/transfer.js
Normal file
@@ -0,0 +1,39 @@
|
||||
(function (window, undefined) {
|
||||
var old_onload = window.onload;
|
||||
window.onload = function () {
|
||||
const template = document.getElementById("content");
|
||||
Vue.prototype.lang = window.lang;
|
||||
new Vue({
|
||||
created() {
|
||||
const url = this.getQuery('target')
|
||||
this.jumpUrl = decodeURIComponent(url);
|
||||
this.init();
|
||||
},
|
||||
computed: {},
|
||||
data() {
|
||||
return {
|
||||
jumpUrl: "",
|
||||
logoUrl: "",
|
||||
website_name: ""
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init () {
|
||||
this.logoUrl = location.origin + '/upload/common/default/' + JSON.parse(localStorage.getItem('common_set'))?.system_logo
|
||||
this.website_name = JSON.parse(localStorage.getItem('common_set'))?.website_name
|
||||
document.title = `${lang.jump_tip}-${this.website_name}`
|
||||
},
|
||||
getQuery(name) {
|
||||
const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
const r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
},
|
||||
jumpLink () {
|
||||
location.href = this.jumpUrl
|
||||
}
|
||||
},
|
||||
}).$mount(template);
|
||||
typeof old_onload == "function" && old_onload();
|
||||
};
|
||||
})(window);
|
||||
Reference in New Issue
Block a user