You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
140 lines
3.4 KiB
140 lines
3.4 KiB
// pages/pbService/index.js
|
|
import commonApi from "../../utils/https/common"
|
|
let app = getApp()
|
|
import util from '../../utils/util'
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
jsj: null
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad: function (options) {
|
|
commonApi._post("pbservice/Other/getClientConfig", {
|
|
unique_key: "wechatxcx"
|
|
}).then(res => {
|
|
let data = JSON.parse(res.data);
|
|
console.log(data)
|
|
this.setData({
|
|
jsj: data.jiesongji
|
|
})
|
|
console.log(data)
|
|
})
|
|
},
|
|
gotoPath: function (e) {
|
|
if (e.currentTarget.dataset.event) {
|
|
util.pagePoint({ event: e.currentTarget.dataset.event }, 1)
|
|
}
|
|
if (e.currentTarget.dataset.title == '12348') {
|
|
wx.navigateToMiniProgram({
|
|
appId: 'wxcdfd45c001466ba3',
|
|
path: 'pages/index/index'
|
|
})
|
|
return;
|
|
}
|
|
wx.navigateTo({
|
|
url: e.currentTarget.dataset.path,
|
|
})
|
|
if (e.currentTarget.dataset.title) {
|
|
commonApi._post("browse/burying_point", {
|
|
uuid: app.globalData.uuid,
|
|
drive: "mini",
|
|
title: e.currentTarget.dataset.title
|
|
}).then(res => {
|
|
|
|
})
|
|
}
|
|
},
|
|
jiesongji: function (e) {
|
|
if (!this.data.jsj) return;
|
|
if (e.currentTarget.dataset.event) {
|
|
util.pagePoint({ event: e.currentTarget.dataset.event }, 1)
|
|
}
|
|
wx.navigateToMiniProgram({
|
|
appId: this.data.jsj, // 之前后台的appid wx336dcaf6a1ecf632
|
|
page: "subpages/product/airport/index"
|
|
})
|
|
// wx.navigateToMiniProgram({
|
|
// appId: this.data.jsj,
|
|
// page: "page/home/webview/webview?hideShare=0&src=https%3A%2F%2Fopen.weixin.qq.com%2Fconnect%2Foauth2%2Fauthorize%3Fappid%3Dwx3827070276e49e30%26redirect_uri%3Dhttps%3A%2F%2Fwx.17u.cn%2Fflight%2Fgetopenid.html%3Furl%3Dhttps%25253A%25252F%25252Fwx.17u.cn%25252Finternalcarrebornwechat%25252Fview%25252Fmain.html%252523%25252FspecialCarIndex%25252FinstantCar%25253Frefid%25253D1563845199%26showwxpaytitle%3D1%26response_type%3Dcode%26scope%3Dsnsapi_base%26state%3D123%26connect_redirect%3D1%23wechat_redirect"
|
|
// })
|
|
},
|
|
gotoUrl: function (e) {
|
|
if (e.currentTarget.dataset.event) {
|
|
util.pagePoint({ event: e.currentTarget.dataset.event }, 1)
|
|
}
|
|
let url = e.currentTarget.dataset.url;
|
|
app.globalData.weburl = url;
|
|
wx.navigateTo({
|
|
url: "/pages/pbService/web/index?weburl=" + encodeURIComponent(url)
|
|
})
|
|
},
|
|
gotoSku: function () {
|
|
commonApi.user_post("pbservice/Ztfw/sukangCode").then(res => {
|
|
app.globalData.weburl = res.data.url;
|
|
wx.navigateTo({
|
|
url: '/pages/pbService/web/index'
|
|
})
|
|
return;
|
|
})
|
|
},
|
|
garbage: function () {
|
|
wx.navigateToMiniProgram({
|
|
appId: 'wx13be821f3b1afed3',
|
|
path: 'pages/home/home'
|
|
})
|
|
},
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
onReady: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
onShow: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面隐藏
|
|
*/
|
|
onHide: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面卸载
|
|
*/
|
|
onUnload: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
*/
|
|
onPullDownRefresh: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面上拉触底事件的处理函数
|
|
*/
|
|
onReachBottom: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 用户点击右上角分享
|
|
*/
|
|
onShareAppMessage: function () {
|
|
|
|
}
|
|
})
|