| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- // pages/express-orderid/express-orderid.js
- var api = require('../../api.js');
- var app = getApp();
- Page({
- /**
- * 页面的初始数据
- */
- data: {
-
- },
- goto: function (e) {
- wx.redirectTo({
- url: "/pages/express-company/express-company?order_id=" + this.data.order_id
- });
- },
- getExpress: function(e){
- this.setData({
- express_num: e.detail.value
- })
- },
- submit: function(){
- var that = this;
- if (that.data.express_name == undefined) {
- wx.showToast({
- title: '快递公司必填',
- icon: 'none'
- })
- return;
- }
- if (that.data.express_num == undefined) {
- wx.showToast({
- title: '运单号必填',
- icon: 'none'
- })
- return;
- }
- app.request({
- url: api.order.express_num,
- data:{
- order_id: that.data.order_id,
- express_name: that.data.express_name,
- express_num: that.data.express_num
- },
- success: function(res){
- if (res.code == 0) {
- // wx.navigateBack({
- // delta: 2,
- // });
- wx.redirectTo({
- url: '/pages/order-refund-detail/order-refund-detail?id=' + that.data.order_id,
- })
- }
- }
- })
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- var that = this;
- that.setData({
- order_id: options.order_id
- })
- if (options.express_name){
- that.setData({
- express_name: options.express_name
- })
- }
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
-
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
-
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
-
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
-
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
-
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
-
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
-
- }
- })
|