123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- // page/findmore/index.js
- var businessT = require('../../tools/business-tool.js')
- var app = getApp()
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- service: [
- { img: '/icon/ad/qujianbu.png', title: '趣健步', msg: '微信步数领红包', id: '1' },
- { img: '/icon/ad/tuodan.png', title: '脱单请点我', msg: '领取一个优质对象', id: '2' },
- { img: '/icon/ad/nearjob.png', title: '附近的工作', msg: '走路上班回家吃饭', id: '3' },
- { img: '/icon/ad/banruoshangcheng.png', title: '般若商城', msg: '招财 姻缘 风水', id: '4' }
- ],
- },
- //跳转H5
- toweb: function (e) {
- wx: wx.navigateTo({
- url: '/page/home/webView/webView',
- success: function (res) { },
- fail: function (res) { },
- complete: function (res) { },
- })
- },
- //新鲜服务-跳转小程序
- goAdWx(e) {
- let id = e.currentTarget.dataset.id
- switch (id) {
- case "1": {
- wx.navigateToMiniProgram({
- appId: 'wxdb674acb1231c231',
- path: 'pages/index/index?channel=shanpin&ald_media_id=24879&ald_link_key=5024e38cd497a4ed',
- extraData: {
- },
- success(res) {
- // 打开成功
- wx.reportAnalytics('click_service', {
- service_title: '趣健步',
- });
- businessT.debugLog("跳转趣健步小程序成功")
- }
- });
- break
- }
- case "2": {
- wx.navigateToMiniProgram({
- appId: 'wx4882c703815c5602',
- path: '/pages/index/index?promotion=nZW2FKJWji&tl=&nc=',
- extraData: {
- },
- success(res) {
- // 打开成功
- wx.reportAnalytics('click_service', {
- service_title: '比心单身',
- });
- businessT.debugLog("跳转比心单身小程序成功")
- }
- });
- break
- }
- case "3": {
- wx.navigateToMiniProgram({
- appId: 'wx0fdd65237732c014',
- extraData: {
- },
- success(res) {
- // 打开成功
- wx.reportAnalytics('click_service', {
- service_title: '职友集',
- });
- businessT.debugLog("跳转职友集小程序成功")
- }
- });
- break
- }
- case "4": {
- wx.navigateToMiniProgram({
- appId: 'wx7ab08191e61478c5',
- extraData: {
- },
- success(res) {
- // 打开成功
- wx.reportAnalytics('click_service', {
- service_title: '般若商城',
- });
- businessT.debugLog("跳转般若商城小程序成功")
- }
- });
- break
- }
- }
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
- if (typeof this.getTabBar === 'function' &&
- this.getTabBar()) {
- this.getTabBar().setData({
- selected: 1
- })
- }
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
- }
- })
|