UNPKG

h5-cli

Version:

hello

53 lines (42 loc) 1.65 kB
"use strict"; /** \u6e32\u67d3\u5bb9\u5668ID\u5fc5\u987b\u4e3a J_DownloadBar \u624b\u52a8\u5728\u9875\u9762\u5f15\u5165 mods/download-bar/index.less.css */ define("mods/download-bar/index", function (require, exports, module) { var VModule = require("component/VModule"); var page = VModule.render({ init: function init(wrap) { if (this.util.isInYuantuApp()) { //\u5728\u539f\u56fe App\u4e2d\u4e0d\u663e\u793a $('#J_DownloadBar').remove(); return; } this.state = { loading: false, success: true, display: true }; this.h5Domain = this.config.h5Domain; this.module = this.initModule(this.state, '#J_DownloadBar'); this.regEvent(); }, regEvent: function regEvent() { var _this = this; $('#J_DownloadBar').delegate('.ui-icon-close-page', "click", function () { _this.setState({ display: false }); }); }, render: function render(state) { if (state.display) { return "\n\t\t\t\t\t<div class=\"download-bar\" data-spm=\"download\">\n\t\t\t\t\t\t<a class=\"logo\" href=\"//" + this.h5Domain + "/tms/fb/app-download.html\"></a>\n\t\t\t\t\t\t<a class=\"info\" href=\"//" + this.h5Domain + "/tms/fb/app-download.html\">\n\t\t\t\t\t\t\t<h1>\u6167\u533B</h1>\n\t\t\t\t\t\t\t<p>\u5C45\u6C11\u5065\u5EB7\u4FE1\u606F\u670D\u52A1\u5E73\u53F0</p>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<a class=\"ui-btn-lg ui-btn-primary\" href=\"//" + this.h5Domain + "/tms/fb/app-download.html\" >\u67E5\u770B\u66F4\u591A</a>\n\t\t\t\t\t\t <i class=\"ui-icon-close-page\"></i>\n\t\t\t\t\t</div>\n\t\t\t\t"; } else { return ""; } } }); page.init(); module.exports = page; });