12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- // pages/tabber/news/index.js
- const app=getApp()
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- selectInfo: {},
- orderSn:'',
- admin_type:1,
- networker_id:0
-
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- class Select {
- in = 1
- getSelet(){
- console.log(2);
- return 10
- }
- }
- var b = new Select();
- console.log(b.getSelet());
- let admin_type=options.admin_type//1物流员;2代收点
- let networker_id= options.networker_id
- this.setData({
- admin_type,
- networker_id
- })
- },
- bindinput(e){
- this.setData({
- orderSn:e.detail.value,
- })
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
- const query = wx.createSelectorQuery()
- query.select('#nav').boundingClientRect((res) => {
- console.log(res);
- this.setData({
- selectInfo: res
- })
- })
- query.exec()
- },
- onSubmit:function(){
- var that=this
- if(that.data.orderSn=='')
- return wx.showToast({title: '物流号不能为空',icon:'none'})
- app.api.useApi(app.globalData.baseAppUrl + "api/admin/CodeSign", {
- order_no: that.data.orderSn,
- admin_type:that.data.admin_type,//1物流员;2代收点
- networker_id:that.data.networker_id,
- }, "post").then(function (res) {
- wx.hideLoading();
- if (res.code== 200) {
- wx.showToast({title: res.message.msg,icon:'none'})
- }else
- wx.showModal({
- title: '异常',
- content: res.message.msg,
- showCancel:false,
- success (res) {
- if (res.confirm) {
- console.log('用户点击确定')
- } else if (res.cancel) {
- console.log('用户点击取消')
- }
- }
- })
- }).catch(function (err) {
- console.log(222);
- })
-
- },
- })
|