123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- const $ = global;
- const WxParse = require('../../wxParse/wxParse.js');
- new $.Page({
- data: {
- imgUrls: [
- '/img/demo/banner.jpg',
- '/img/demo/banner.jpg',
- '/img/demo/banner.jpg'
- ]
- },
- onLoad() {
- $.request('server_infos', 'GET', {}).then((res) => {
- const {
- bottom,
- top,
- introduce
- } = res;
- WxParse.wxParse('article', 'html', introduce, this);
- this.setData({
- bottom,
- top,
- introduce
- });
- });
-
- },
- handleJump(e) {
- const {
- route,
- type,
- target
- } = e.currentTarget.dataset;
- if (route) {
- $.router.goto({
- path: `/pages/${route}/index`,
- type: type && parseInt(type),
- params: {
- type: target || ''
- }
- });
- }
- },
- toDetail(e) {
- const {
- id,
- name
- } = e.target.dataset;
- if (id) {
- // $.router.goto({
- // path: `/pages/detail/index`,
- // query: {
- // id
- // }
- // });
- $.router.goto({
- path: `/pages/introduce/index`,
- query: {
- id,
- name
- }
- });
- }
- },
- toConsult() {
- // $.wx.showToast({
- // title: '持续开发中'
- // });
- }
- });
|