12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- // pages/tabber/news/index.js
- const app=getApp();
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- selectdetail: {},
- img:{
- 大衣外套:'/image/icon/dayiwaitao.png',
- 家纺:'/image/icon/jiafang',
- 库类:'/image/icon/kulei.png',
- 配件:'/image/icon/peijian.png',
- 皮衣:'/image/icon/piyi.png',
- 裙类:'/image/icon/qunlei.png',
- 上衣:'/image/icon/shangyi.png',
- 箱包:'/image/icon/xiangbao.png',
- 鞋类:'/image/icon/xixie.png',
- }
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- class Select {
- in = 1
- getSelet(){
- console.log(2);
- return 10
- }
- }
- var b = new Select();
- console.log(b.getSelet());
- this.serchdetail(options.id)
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
- const query = wx.createSelectorQuery()
- query.select('#nav').boundingClientRect((res) => {
- console.log(res);
- this.setData({
- selectInfo: res
- })
- })
- query.exec()
- },
- serchdetail(id){
- var that=this;
- app.api.useApi(app.globalData.baseAppUrl + "api/admin/WaybillDetails", {
- id: id,
- }, "get").then(function (res) {
- console.log(res);
- if (res.code != 200) {
- wx.showLoading({
- title: res.message.msg,
- })
- setTimeout(function () {
- wx.hideLoading();
- }, 1000);
-
- } else {
- wx.hideLoading();
-
- that.setData({
- selectdetail:res.message.data
- })
-
- }
- }).catch(function (err) {
-
- console.log(222);
- })
- },
- tel(e){
- wx.makePhoneCall({
- phoneNumber: e.currentTarget.dataset.phone //仅为示例,并非真实的电话号码
- })
- }
- })
|