header-mall.php 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  1. <?php
  2. $mchId = Yii::$app->user->identity->mch_id;
  3. $currentRoute = Yii::$app->controller->route;
  4. ?>
  5. <style>
  6. .mall-header {
  7. /* margin-left: 30px; */
  8. /*background-color: #24303c;*/
  9. background-color: #313131;
  10. /*background-color: #FFFFFF;*/
  11. }
  12. .mall-header .mall-name {
  13. max-width: 120px;
  14. display: inline-block;
  15. overflow: hidden;
  16. text-overflow: ellipsis;
  17. }
  18. .mall-header .el-menu.el-menu--horizontal {
  19. border-bottom: 0;
  20. }
  21. .mall-header-menu .el-menu--popup {
  22. min-width: 1px;
  23. }
  24. .mall-header-menu .el-menu--popup .is-disabled {
  25. opacity: .65;
  26. cursor: default;
  27. }
  28. .el-menu--horizontal.el-menu {
  29. background-color: #313131;
  30. }
  31. .lianxikefu{
  32. background-color: #313131 !important;
  33. }
  34. .el-menu-item:hover{
  35. background: #FFF !important;
  36. color: #333 !important;
  37. }
  38. /*.el-menu--horizontal>.el-submenu:hover{*/
  39. /* background: #FFF !important;*/
  40. /* color: #333 !important;*/
  41. /*}*/
  42. .el-menu--horizontal>.el-menu-item,
  43. .el-menu--horizontal>.el-submenu .el-submenu__title,
  44. .el-submenu__title i {
  45. color: #FFFFFF !important;
  46. }
  47. .el-menu--horizontal>.el-submenu:hover .el-submenu__title{
  48. color: #303133 !important;
  49. background: #FFF !important;
  50. }
  51. .lianxikefu:hover>.lianxikefu2 {
  52. color: #333 !important;
  53. display: inline-block;
  54. }
  55. .nav-name:hover {
  56. color: #303133 !important;
  57. }
  58. .scan-box {
  59. position: relative;
  60. }
  61. .scan-child {
  62. width: 180px;
  63. height: 190px;
  64. padding: 20px;
  65. background-color: #ffffff;
  66. }
  67. .scan-include {
  68. position: absolute;
  69. top: 75px;
  70. right: 275px;
  71. }
  72. .scan-horn {
  73. position: absolute;
  74. top: -20px;
  75. right: 120px;
  76. width: 0px;
  77. height: 0px;
  78. border: 10px solid transparent;
  79. border-bottom-color: #fff;
  80. }
  81. .scan-close {
  82. position: absolute;
  83. top: 5px;
  84. right: 5px;
  85. cursor: pointer;
  86. }
  87. .scan-text {
  88. display: inline-block;
  89. padding: 0 20px;
  90. }
  91. .scan-box:hover {
  92. background: #FFF !important;
  93. color: #333 !important;
  94. }
  95. .scan-include {
  96. display: none;
  97. z-index: 100000000;
  98. }
  99. .addons-tips {
  100. position: absolute;
  101. top: 8px;
  102. left: -10px;
  103. width: 0px;
  104. height: 0px;
  105. border: 5px solid transparent;
  106. border-right-color: #fff;
  107. }
  108. .mall-header-div {
  109. position: relative;
  110. }
  111. .mall-addons-tips {
  112. position: absolute;
  113. top:520px;
  114. left:5px;
  115. width:155px;
  116. padding: 5px 10px;
  117. border-radius: 5px;
  118. background-color: #fff;
  119. z-index: 100000000;
  120. color: #303133;
  121. display: none;
  122. }
  123. .el-badge__content.is-fixed {
  124. top: 20px;
  125. right: 12px;
  126. }
  127. .top-addons {
  128. height: 60px;
  129. overflow: hidden;
  130. display: flex;
  131. }
  132. .more-nav {
  133. display: flex;
  134. align-items: center;
  135. padding: 0 10px;
  136. }
  137. .top-addons-list {
  138. display: flex;
  139. flex-wrap: wrap;
  140. justify-content: space-evenly;
  141. }
  142. .top-addons-drawer {
  143. width: 100%;
  144. }
  145. .top-addons-drawer .el-drawer {
  146. border-radius: 0 0 20px 20px;
  147. }
  148. </style>
  149. <template id="mall-header">
  150. <div class="mall-header-div">
  151. <header class="mall-header" flex="box:last">
  152. <div class="top-addons">
  153. <el-menu class="el-menu-demo top-addons-list" mode="horizontal" menu-trigger="click">
  154. <el-menu-item class="nav-name" v-for="(nav, index) in navs" :key="index" :index="'' + index" @click="entryPlugin(nav)" >
  155. <el-avatar shape="square" :size="25" fit="fit" :src="nav.cover"></el-avatar>
  156. <span>{{ nav.title }}</span>
  157. </el-menu-item>
  158. </el-menu>
  159. <div class="more-nav" v-if="navs.length > 0">
  160. <el-button type="text" size="medium" icon="el-icon-arrow-down" @click="drawer = !drawer"></el-button>
  161. </div>
  162. </div>
  163. <el-drawer
  164. :visible.sync="drawer"
  165. direction="ttb"
  166. class="top-addons-drawer"
  167. size="aoto"
  168. :show-close="false"
  169. :with-header="false"
  170. >
  171. <el-menu class="el-menu-demo" mode="horizontal" menu-trigger="click">
  172. <el-menu-item class="nav-name" v-for="(nav, index) in navs" :key="index" :index="'' + index" @click="entryPlugin(nav)" >
  173. <el-avatar shape="square" :size="25" fit="fit" :src="nav.cover"></el-avatar>
  174. <span>{{ nav.title }}</span>
  175. </el-menu-item>
  176. </el-menu>
  177. </el-drawer>
  178. <el-menu :default-active="activeIndex" mode="horizontal" class="el-menu-demo" @select="handleSelect" menu-trigger="click" text-color="#fff" background-color="#303133">
  179. <!-- <el-menu-item v-if="mch_id == 0" index="4" class="lianxikefu">
  180. <a :href="services_url" target="_blank" class="lianxikefu2" style="color: #fff;text-decoration: none;height: 56px;line-height: 56px;">联系客服</a>
  181. </el-menu-item> -->
  182. <el-menu-item index="6" @click="navigateClick({r: 'mall/notice/index'})" class="scan-box">
  183. <el-badge :value="unreadCount" :max="99" v-if="unreadCount > 0">
  184. 消息
  185. </el-badge>
  186. <span v-else>
  187. 消息
  188. </span>
  189. </el-menu-item>
  190. <el-menu-item v-if="mch_id == 0" index="3" class="scan-box">
  191. 二维码
  192. </el-menu-item>
  193. <div class="scan-include">
  194. <div class="scan-horn" @click="closeQrcode"></div>
  195. <div class="scan-child" style="text-align: center;" id="scan-child">
  196. <i class="el-icon-close scan-close" @click="closeQrcode"></i>
  197. <el-image style="width: 140px; height: 140px;" :src="h5_url"></el-image>
  198. <div style="color: #333333; line-height: 26px;">扫码浏览h5页面</div>
  199. </div>
  200. </div>
  201. <el-menu-item v-if="mch_id == 0" index="4" class="lianxikefu">
  202. <a :href="course_url ? course_url : 'javascript:void(0)'" class="lianxikefu2" style="color: #fff;text-decoration: none;height: 56px;line-height: 56px;">教程中心</a>
  203. </el-menu-item>
  204. <el-menu-item v-if="mch_id == 0" index="5" class="lianxikefu">
  205. <!-- <a :href="question_url" class="lianxikefu2" style="color: #fff;text-decoration: none;height: 56px;line-height: 56px;">常见问题</a>-->
  206. <a @click="$navigate({r:'mall/optimize/list'})" class="lianxikefu2" style="color: #fff;text-decoration: none;height: 56px;line-height: 56px;">优化建议</a>
  207. </el-menu-item>
  208. <!-- <el-menu-item v-if="mch_id == 0" @click="navigateClick({r: 'admin/cache/clean', '_layout': 'mall'})" index="3">缓存 -->
  209. </el-menu-item>
  210. <el-submenu v-if="mch_id == 0 && courseMenu.children && courseMenu.children.length > 0" index="3" v-if="courseMenu" popper-class="mall-header-menu">
  211. <template slot="title">
  212. <span :title="courseMenu.name" class="mall-name">{{courseMenu.name}}</span>
  213. </template>
  214. <el-menu-item @click="navigateClick({r: item.route})" v-for="(item, index) in courseMenu.children" :key="index" :index="'1-' + index">
  215. {{item.name}}
  216. </el-menu-item>
  217. </el-submenu>
  218. <!-- <el-menu-item index="1">消息中心</el-menu-item>-->
  219. <el-submenu index="2" v-if="mall && user" popper-class="mall-header-menu">
  220. <template slot="title">
  221. <span :title="mall.name" class="mall-name">{{mall.name}}</span>
  222. </template>
  223. <el-menu-item index="1-1" :disabled="true">{{mall.name}}</el-menu-item>
  224. <!-- <el-menu-item index="1-2" :disabled="true">{{user.username}}</el-menu-item> -->
  225. <el-menu-item index="1-2" @click="goBackToEditMobole">修改登录手机号</el-menu-item>
  226. <el-menu-item v-if="(user.admin_type == 1 || user.admin_type == 2) && user.mch_id == 0" index="2-1" @click="goBackToSystem">返回系统
  227. </el-menu-item>
  228. <el-menu-item v-if="(user.admin_type == 2 || user.admin_type == 3) && updatePasswordStatus" index="2-3" @click="updatePassword">修改密码
  229. </el-menu-item>
  230. <el-menu-item v-if="user.admin_type == 3 || user.mch_id" index="2-2" @click="logout">注销
  231. </el-menu-item>
  232. </el-submenu>
  233. </el-menu>
  234. </header>
  235. <el-dialog title="修改密码" :visible.sync="dialogFormVisible" width="30%">
  236. <el-form :model="ruleForm" status-icon :rules="rules" ref="ruleForm" label-width="100px">
  237. <el-form-item label="旧密码" prop="old_pass">
  238. <el-input type="password" v-model="ruleForm.old_pass" placeholder="请输入旧密码" auto-complete="off" required></el-input>
  239. </el-form-item>
  240. <el-form-item label="新密码" prop="new_pass">
  241. <el-input type="password" v-model="ruleForm.new_pass" placeholder="请输入新密码" auto-complete="off" required></el-input>
  242. </el-form-item>
  243. <el-form-item label="确认密码" prop="check_pass">
  244. <el-input type="password" v-model="ruleForm.check_pass" placeholder="请输入确认密码" auto-complete="off" required></el-input>
  245. </el-form-item>
  246. </el-form>
  247. <div slot="footer" class="dialog-footer">
  248. <el-button @click="dialogFormVisible = false">取 消</el-button>
  249. <el-button :loading="btnLoading" type="primary" @click="updatePasswordSubmit('ruleForm')">确 定
  250. </el-button>
  251. </div>
  252. </el-dialog>
  253. <!-- 二维码 -->
  254. <div id="scan-qrcode-info" style="position: fixed;top: 10000000000px;">
  255. <!-- 二维码 -->
  256. <div id="scan-qrcode" style="width:100px; height:100px; margin-top:15px;"></div>
  257. </div>
  258. <div class="mall-addons-tips">
  259. <div class="addons-tips"></div>
  260. 更多应用点击这里!
  261. <i class="el-icon-close" style="cursor: pointer;" @click="closeTips"></i>
  262. </div>
  263. </div>
  264. </template>
  265. <script src="/resources/unpkg/clipboard@1.5.12/dist/clipboard.min.js"></script>
  266. <script>
  267. Vue.component('mall-header', {
  268. template: '#mall-header',
  269. data() {
  270. var validatePass = (rule, value, callback) => {
  271. if (value === '') {
  272. callback(new Error('请再次输入密码'));
  273. } else if (value !== this.ruleForm.new_pass) {
  274. callback(new Error('两次输入密码不一致!'));
  275. } else {
  276. callback();
  277. }
  278. };
  279. return {
  280. drawer: false,
  281. user: null,
  282. navs: [],
  283. mall: null,
  284. dialogFormVisible: false,
  285. ruleForm: {
  286. pass: '',
  287. checkPass: '',
  288. },
  289. loading: false, //默认不在请求中
  290. services_url: '', //默认客服链接为'',question_url
  291. course_url:'',//教程中心链接
  292. question_url:'',//常见链接
  293. is_services_show: false, //默认没有客服链接
  294. btnLoading: false,
  295. rules: {
  296. old_pass: [{
  297. required: true,
  298. message: '请输入旧密码',
  299. trigger: 'blur'
  300. },
  301. ],
  302. new_pass: [{
  303. required: true,
  304. message: '请输入新密码',
  305. trigger: 'blur'
  306. },
  307. ],
  308. check_pass: [{
  309. required: true,
  310. message: '请输入确认密码',
  311. trigger: 'blur'
  312. },
  313. {
  314. validator: validatePass,
  315. trigger: 'blur'
  316. }
  317. ]
  318. },
  319. updatePasswordStatus: 1,
  320. courseMenu: {
  321. children: [],
  322. },
  323. mch_id: <?= $mchId ?>,
  324. activeIndex: "-1",
  325. h5_url: '',
  326. currentRoute: "<?= $currentRoute ?>",
  327. unreadCount: 0,
  328. };
  329. },
  330. created() {
  331. const cacheKey = '_MALL_MENUS';
  332. let data = localStorage.getItem(cacheKey);
  333. if (data) {
  334. try {
  335. data = JSON.parse(data);
  336. this.courseMenu = data.courseMenu;
  337. } catch (e) {
  338. data = false;
  339. }
  340. }
  341. this.loadData();
  342. let headerData = localStorage.getItem('mall_header_data');
  343. // console.log(headerData)
  344. if (headerData) {
  345. try {
  346. headerData = JSON.parse(headerData);
  347. this.user = headerData.user;
  348. this.navs = headerData.navs;
  349. this.mall = headerData.mall;
  350. // this.updatePasswordStatus = headerData.update_password_status;
  351. _aside.mall = headerData.mall;
  352. } catch (e) {
  353. headerData = false;
  354. }
  355. }
  356. setTimeout(() => {
  357. this.getQrcodeUrl();
  358. }, 1000);
  359. this.getUnreadNoticeCount()
  360. },
  361. methods: {
  362. // 0.1 跳转客服
  363. toServices() {
  364. window.location.href = this.services_url;
  365. },
  366. getUnreadNoticeCount() {
  367. request({
  368. params: {
  369. r: 'mall/notice/unread-count'
  370. },
  371. method: 'get',
  372. }).then(e => {
  373. if (e.data.code == 0) {
  374. this.unreadCount = e.data.data.unread_count
  375. }
  376. })
  377. },
  378. showQrcode() {
  379. $(".scan-include").show();
  380. },
  381. closeQrcode() {
  382. $(".scan-include").hide();
  383. let headerData = JSON.parse(localStorage.getItem('mall_header_data'));
  384. let show_addons_tips = localStorage.getItem('show_addons_tips') ?? 0
  385. if (isEmpty(show_addons_tips) || show_addons_tips != headerData.user.id) {
  386. if (this.currentRoute != 'mall/overview/index') return;
  387. $(".mall-addons-tips").show();
  388. localStorage.setItem('show_addons_tips', headerData.user.id)
  389. }
  390. },
  391. closeTips() {
  392. $(".mall-addons-tips").hide();
  393. },
  394. getQrcodeUrl() {
  395. let headerData = JSON.parse(localStorage.getItem('mall_header_data'));
  396. let main = headerData.services.h5_url;
  397. if (isEmpty(main)) return;
  398. let video_admin = localStorage.getItem("is_show_video");
  399. let sign = headerData.mall.sign;
  400. let url = main+'/#/?sign='+sign
  401. let urlObject = new URL(url);
  402. url = encodeURI(urlObject.href);
  403. let show_qrcode = localStorage.getItem('qrcode') ?? ''
  404. setTimeout(() => {
  405. this.createQrcode(url,headerData.user);
  406. if (isEmpty(show_qrcode) || (show_qrcode && show_qrcode != headerData.user.id)) {
  407. if (!isEmpty(video_admin)) this.showQrcode();// 必须是已经观看过视频的才会自动打开
  408. }
  409. }, 1500);
  410. },
  411. async createQrcode(url, user) {
  412. this.h5_url = await this.getQrCode(url)
  413. localStorage.setItem('qrcode', user.id)
  414. },
  415. // 生成二维码
  416. getQrCode(url) {
  417. let qrcodeInfo = document.getElementById("scan-qrcode-info");
  418. document.getElementById("scan-qrcode").remove(); //删除生成的二维码
  419. let addCodeDom = document.createElement("div")
  420. addCodeDom.setAttribute("id", "scan-qrcode");
  421. addCodeDom.setAttribute("style", "width:150px; height:150px;");
  422. qrcodeInfo.appendChild(addCodeDom) //添加标签
  423. let qrCodeDom = document.getElementById("scan-qrcode")
  424. var qrcode = new QRCode(qrCodeDom, {
  425. width: 140,
  426. height: 140
  427. });
  428. qrcode.makeCode(url);
  429. // 获取二维码生成的图片信息
  430. let src = "";
  431. return new Promise((req, rej) => {
  432. setTimeout(() => {
  433. src = qrCodeDom.getElementsByTagName("img")[0].src;
  434. req(src)
  435. }, 200);
  436. })
  437. },
  438. handleOpen() {},
  439. handleClose() {},
  440. getUser() {
  441. let self = this;
  442. self.btnLoading = true;
  443. request({
  444. params: {
  445. r: 'admin/index/user'
  446. },
  447. method: 'get',
  448. data: {}
  449. }).then(e => {
  450. self.btnLoading = false;
  451. self.user = e.data.data.admin_info;
  452. }).catch(e => {
  453. console.log(e);
  454. });
  455. },
  456. getMenus() {
  457. const cacheKey = '_ADMIN_MENUS';
  458. let data = localStorage.getItem(cacheKey);
  459. if (data) {
  460. try {
  461. data = JSON.parse(data);
  462. } catch (e) {
  463. data = false;
  464. }
  465. }
  466. if (data && data.menus) {
  467. this.menus = data.menus;
  468. this.currentRouteInfo = data.currentRouteInfo;
  469. this.setActiveMenu();
  470. }
  471. },
  472. setActiveMenu() {
  473. if (!this.activeMenuId) this.activeMenuId = localStorage.getItem('_ADMIN_LAST_ACTIVE_MENU_ID');
  474. if (!this.activeSubMenuId) this.activeSubMenuId = localStorage.getItem('_ADMIN_LAST_ACTIVE_SUB_MENU_ID');
  475. if (!this.activeMenuId || !this.activeSubMenuId) return;
  476. for (let i in this.menus) {
  477. if (this.menus[i].id == this.activeMenuId) {
  478. this.subMenus = this.menus[i].children;
  479. for (let j in this.subMenus) {
  480. if (this.subMenus[j].id == this.activeSubMenuId) this.subMenus[j].active = true;
  481. }
  482. }
  483. }
  484. },
  485. loadData() {
  486. let data = localStorage.getItem('mall_header_data');
  487. if (data) {
  488. try {
  489. data = JSON.parse(data);
  490. } catch (e) {
  491. data = false;
  492. }
  493. }
  494. if (data && data.user && data.navs && data.mall){
  495. this.user = data.user;
  496. this.navs = data.navs;
  497. this.mall = data.mall;
  498. // this.updatePasswordStatus = data.update_password_status;
  499. _aside.mall = data.mall;
  500. if (data.services.length != 0) {
  501. this.services_url = decodeURIComponent(data.services.web_service_url.value);
  502. this.course_url = data.services.course_url ? decodeURIComponent(data.services.course_url) : '';
  503. this.question_url = decodeURIComponent(data.services.question_url);
  504. this.is_services_show = true;
  505. }
  506. }else{
  507. this.$request({
  508. params: {r: 'mall/overview/mall-header'},
  509. method: 'get',
  510. }).then(e => {
  511. localStorage.setItem('mall_header_data', JSON.stringify(e.data.data));
  512. this.user = e.data.data.user;
  513. this.navs = e.data.data.navs;
  514. this.mall = e.data.data.mall;
  515. // this.updatePasswordStatus = e.data.data.update_password_status;
  516. _aside.mall = e.data.data.mall;
  517. var data = e.data.data;
  518. if (data.services.length != 0) {
  519. //console.log(data.services);
  520. this.services_url = decodeURIComponent(data.services.web_service_url.value);
  521. this.course_url = decodeURIComponent(data.services.course_url);
  522. this.question_url = decodeURIComponent(data.services.question_url);
  523. this.is_services_show = true;
  524. }
  525. }).catch(e => {
  526. console.log(e);
  527. });
  528. }
  529. },
  530. logout() {
  531. let self = this;
  532. this.$request({
  533. params: {
  534. r: 'admin/auth/logout'
  535. },
  536. method: 'get',
  537. data: {}
  538. }).then(e => {
  539. // 在当前页面打开
  540. localStorage.setItem('user_key', '');
  541. localStorage.setItem('admin_menus', '');
  542. localStorage.setItem('mall_header_data', '');
  543. localStorage.setItem('mall_menus', '');
  544. localStorage.setItem('mall_info', '');
  545. window.location.href=e.data.data.url;
  546. }).catch(e => {
  547. console.log(e);
  548. });
  549. },
  550. goBackToSystem() {
  551. if (_isWe7 == true) {
  552. this.$navigate({
  553. r: 'admin/account/info'
  554. });
  555. } else { //返回商城列表
  556. this.$navigate({
  557. r: 'admin/mall/index'
  558. });
  559. }
  560. },
  561. goBackToEditMobole() {
  562. this.$navigate({
  563. r: 'mall/set-mobile/index'
  564. });
  565. },
  566. updatePassword() {
  567. this.dialogFormVisible = true;
  568. },
  569. updatePasswordSubmit(formName) {
  570. this.$refs[formName].validate((valid) => {
  571. if (valid) {
  572. this.btnLoading = true;
  573. this.$request({
  574. params: {
  575. r: 'mall/overview/update-password'
  576. },
  577. method: 'post',
  578. data: {
  579. old_pass: this.ruleForm.old_pass,
  580. new_pass: this.ruleForm.new_pass,
  581. check_pass: this.ruleForm.check_pass,
  582. }
  583. }).then(e => {
  584. this.btnLoading = false;
  585. if (e.data.code == 0) {
  586. this.dialogFormVisible = false;
  587. this.$message.success(e.data.msg);
  588. window.location.reload();
  589. } else {
  590. this.$message.error(e.data.msg);
  591. }
  592. }).catch(e => {
  593. console.log(e);
  594. });
  595. } else {
  596. console.log('error submit!!');
  597. return false;
  598. }
  599. });
  600. },
  601. navigateClick(params) {
  602. this.clearMenuStorage();
  603. this.$navigate(params);
  604. },
  605. clearMenuStorage() {
  606. localStorage.removeItem('open_menu_1_id');
  607. localStorage.removeItem('open_menu_2_id');
  608. localStorage.removeItem('open_menu_3_id');
  609. localStorage.removeItem('unfold_id_1');
  610. localStorage.removeItem('unfold_id_2');
  611. },
  612. handleSelect(index){
  613. console.info(index);
  614. let that = this;
  615. if (index == 3) this.showQrcode();
  616. // setTimeout(() => {
  617. // that.activeIndex = "-1";
  618. // }, 1000);
  619. },
  620. entryPlugin(addon) {
  621. var name = addon.name.replace(/([A-Z])/g,"-$1").toLowerCase();
  622. name = name.substr(1, name.length);
  623. if (addon.url) {
  624. navigateTo({r: addon.url});
  625. } else {
  626. navigateTo({r: name + '/default/index'});
  627. }
  628. },
  629. },
  630. });
  631. </script>