123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- // pages/logistics/index.js
- const util = require('../../utils/util.js');
- var api = require('../../config/api.js');
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- detail: {},
- markers: [{
- iconPath: "../../static/images/zuobiao.png",
- id: 0,
- latitude: 23.099994,
- longitude: 113.324520,
- width: 30,
- height: 30
- }, {
- iconPath: "../../static/images/zuobiao.png",
- id: 1,
- latitude: 23.21229,
- longitude: 113.324520,
- width: 30,
- height: 30
- }],
- polyline: [{
- points: [{
- longitude: 113.324520,
- latitude: 23.099994
- }, {
- longitude: 113.104520,
- latitude: 23.35229
- },
- {
- longitude: 113.324520,
- latitude: 23.21229
- }],
- color: "#0075DC",
- width: 4,
- dottedLine: false,
- arrowLine: true
- }]
- },
- regionchange(e) {
- console.log(e.type)
- },
- markertap(e) {
- console.log(e.markerId)
- },
- controltap(e) {
- console.log(e.controlId)
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- let { no, id } = options
- this.setData({
- imgServer: util.imgServer,
- no,
- id
- })
- this.getDetail()
- },
- getDetail: function () {
- wx.showLoading({
- title: '加载中'
- })
- util.request(api.LogisticsDetail, { no: this.data.no, goodsId: this.data.id }).then((res) => {
- if (res.errno === 0) {
- wx.hideLoading();
- this.setData({
- detail: res.data
- })
- }
- });
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
- getApp().onPullDownRefresh()
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
- }
- })
|