From b716e5fd0092230062be0aba9f9c9e69052e647f Mon Sep 17 00:00:00 2001 From: initwithout Date: Mon, 17 Apr 2023 16:22:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=89=A9=E6=B5=81=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/address/address.js | 13 +- pages/address/index.js | 11 - pages/address/upaddress.js | 9 - pages/article/article.js | 12 +- pages/bangding/bangding.js | 8 - pages/cart/cart.js | 4 - pages/category/category.js | 8 - pages/collection/collection.js | 8 - pages/comment/comment.js | 10 +- pages/coupon/index.js | 8 - pages/distribution/detail.js | 8 - pages/distribution/list.js | 4 - pages/distribution/user.js | 8 - pages/envelope/envelope.js | 4 - pages/footprint/footprint.js | 11 - pages/group_buy/cantuan.js | 4 - pages/group_buy/comment.js | 4 - pages/group_buy/detail.js | 4 - pages/group_buy/detail.wxml | 1 - pages/group_buy/group.js | 4 - pages/group_buy/payfor.js | 5 - pages/index/index.js | 4 - pages/listdetail/listdetail.js | 8 - pages/logistics/logistics.js | 90 ++-- pages/logistics/logistics.wxml | 107 ++-- pages/logistics/logistics.wxss | 105 ++-- pages/new/new.js | 4 - pages/notice/index.js | 11 - pages/notice/notice.js | 11 - pages/order/detail.js | 203 ++++---- pages/order/detail.wxml | 12 +- pages/order/order.js | 743 ++++++++------------------- pages/order/order.json | 1 + pages/order/order.wxml | 411 ++------------- pages/order/order.wxss | 571 +++++++------------- pages/order/pay.js | 4 - pages/order/pay.wxml | 2 +- pages/order/pay.wxss | 8 +- pages/order/payment.wxml | 12 +- pages/order/payment.wxss | 13 +- pages/product/detail.js | 8 - pages/return_goods/index.js | 12 - pages/return_goods/return_goods.js | 8 - pages/return_goods/return_goods.wxss | 2 +- pages/set/set.js | 9 +- pages/sign_in/sign_in.js | 8 - pages/sign_in/sign_in.wxml | 2 +- pages/user/recharge.js | 11 - pages/user/score.js | 7 - pages/user/transfer.js | 10 - pages/user/transfer1.js | 9 - pages/user/transfer_jifen.js | 9 - pages/user/user.js | 16 +- pages/user/user.wxml | 10 +- pages/user/wallet.js | 11 - pages/user/withdrawals.js | 8 - utils/server.js | 23 +- 57 files changed, 752 insertions(+), 1879 deletions(-) diff --git a/pages/address/address.js b/pages/address/address.js index ec1fbb9..c991fd4 100644 --- a/pages/address/address.js +++ b/pages/address/address.js @@ -27,18 +27,7 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - // wx.setNavigationBarColor({ - // frontColor: app.d.frontColor, - // backgroundColor: app.d.bgcolor, //页面标题为路由参数 - // animation: { - // duration: 400, - // timingFunc: 'easeIn' - // } - // }) - // this.setData({ - // bgcolor: app.d.bgcolor, - // cartId: options.cartId - // }); + }, // 点击保存 SaveAddress: function (e) { diff --git a/pages/address/index.js b/pages/address/index.js index b894709..cb6edf0 100644 --- a/pages/address/index.js +++ b/pages/address/index.js @@ -71,17 +71,6 @@ Page({ onLoad: function (options) { - // wx.setNavigationBarColor({ - // frontColor: app.d.frontColor, - // backgroundColor: app.d.bgcolor, //页面标题为路由参数 - // animation: { - // duration: 400, - // timingFunc: 'easeIn' - // } - // }) - // this.setData({ - // bgcolor: app.d.bgcolor - // }); var that = this; // 页面初始化 options为页面跳转所带来的参数 // if (options.cartId) { diff --git a/pages/address/upaddress.js b/pages/address/upaddress.js index b967fc3..dddc4d3 100644 --- a/pages/address/upaddress.js +++ b/pages/address/upaddress.js @@ -35,15 +35,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - console.log(options) - // wx.setNavigationBarColor({ - // frontColor: app.d.frontColor, - // backgroundColor: app.d.bgcolor, //页面标题为路由参数 - // animation: { - // duration: 400, - // timingFunc: 'easeIn' - // } - // }) var region = [] region.push(options.sheng) region.push(options.city) diff --git a/pages/article/article.js b/pages/article/article.js index cdfe739..0560914 100644 --- a/pages/article/article.js +++ b/pages/article/article.js @@ -12,17 +12,7 @@ Page({ }, onLoad: function (options) { console.log(options) - wx.setNavigationBarColor({ - frontColor: app.d.frontColor, - backgroundColor: app.d.bgcolor, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }) - this.setData({ - bgcolor: app.d.bgcolor - }); + var that = this; var id = options.id; if (options.p_openid != '') { diff --git a/pages/bangding/bangding.js b/pages/bangding/bangding.js index 0348b82..5f874d7 100644 --- a/pages/bangding/bangding.js +++ b/pages/bangding/bangding.js @@ -92,14 +92,6 @@ Page({ */ onLoad: function () { - wx.setNavigationBarColor({ - frontColor: app.d.frontColor,// - backgroundColor: app.d.bgcolor, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }) wx.checkSession({ success: function (e) { app.globalData.userInfo['session_key'] = app.globalData.userInfo.session_key; diff --git a/pages/cart/cart.js b/pages/cart/cart.js index 0dca0db..c951ba2 100644 --- a/pages/cart/cart.js +++ b/pages/cart/cart.js @@ -325,10 +325,6 @@ Page({ bgcolor: app.d.bgcolor, user_id: app.globalData.userInfo.openid }); - // wx.setNavigationBarColor({ - // frontColor: app.d.frontColor,// - // backgroundColor: app.d.bgcolor //页面标题为路由参数 - // }); this.loadProductData(); this.sum(); }, diff --git a/pages/category/category.js b/pages/category/category.js index 50f66f3..9eb26a2 100644 --- a/pages/category/category.js +++ b/pages/category/category.js @@ -52,14 +52,6 @@ Page({ that.setData({ color:app.d.bgcolor, }) - // wx.setNavigationBarColor({ - // frontColor: app.d.frontColor, - // backgroundColor: app.d.bgcolor, //页面标题为路由参数 - // animation: { - // duration: 400, - // timingFunc: 'easeIn' - // } - // }), this.search(); }, //事件处理函数 diff --git a/pages/collection/collection.js b/pages/collection/collection.js index a04c0d4..65b9c1a 100644 --- a/pages/collection/collection.js +++ b/pages/collection/collection.js @@ -5,14 +5,6 @@ Page({ remind: '加载中', }, onLoad: function (options) { - wx.setNavigationBarColor({ - frontColor: app.d.frontColor, - backgroundColor: app.d.bgcolor, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }) }, //下拉刷新 diff --git a/pages/comment/comment.js b/pages/comment/comment.js index b372a1d..0e7e937 100644 --- a/pages/comment/comment.js +++ b/pages/comment/comment.js @@ -27,15 +27,7 @@ Page({ }); } }); - // 设备信息结束 - wx.setNavigationBarColor({ - frontColor: app.d.frontColor, - backgroundColor: app.d.bgcolor, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }) + var orderId = options.ordersn; // 订单号 var user_id = app.globalData.userInfo.openid; // 微信id var pid = options.pid; // 商品id diff --git a/pages/coupon/index.js b/pages/coupon/index.js index e06eb1c..2227af2 100644 --- a/pages/coupon/index.js +++ b/pages/coupon/index.js @@ -17,14 +17,6 @@ Page({ this.pop = this.selectComponent("#pop") }, onLoad: function (options) { - wx.setNavigationBarColor({ - frontColor: app.d.frontColor, - backgroundColor: app.d.bgcolor, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }) var rtype = options.type; if (rtype == 'receive') { this.requestaward(); diff --git a/pages/distribution/detail.js b/pages/distribution/detail.js index e1d1029..5df9e85 100644 --- a/pages/distribution/detail.js +++ b/pages/distribution/detail.js @@ -149,14 +149,6 @@ Page({ var that = this; var openid = app.globalData.userInfo.openid; var bgcolor = app.d.bgcolor; - wx.setNavigationBarColor({ - frontColor: app.d.frontColor, - backgroundColor: bgcolor, // 页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }); wx.request({ url: app.d.ceshiUrl + '&action=product&m=index', method: 'post', diff --git a/pages/distribution/list.js b/pages/distribution/list.js index da6e59e..b110ea7 100644 --- a/pages/distribution/list.js +++ b/pages/distribution/list.js @@ -291,10 +291,6 @@ Page({ this.setData({ bgcolor: app.d.bgcolor, }); - wx.setNavigationBarColor({ - frontColor: app.d.frontColor,// - backgroundColor: app.d.bgcolor //页面标题为路由参数 - }) //页面初始化 options为页面跳转所带来的参数 this.getMore(); that.setData({ diff --git a/pages/distribution/user.js b/pages/distribution/user.js index 64bc3ed..3e1c74c 100644 --- a/pages/distribution/user.js +++ b/pages/distribution/user.js @@ -22,14 +22,6 @@ Page({ wx.stopPullDownRefresh() //停止下拉刷新 }, onLoad: function (options) { - wx.setNavigationBarColor({ - frontColor: app.d.frontColor,// - backgroundColor: app.d.bf_color, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }) this.setData({ bgcolor: app.d.bf_color }); diff --git a/pages/envelope/envelope.js b/pages/envelope/envelope.js index a7a3fa4..957cfee 100644 --- a/pages/envelope/envelope.js +++ b/pages/envelope/envelope.js @@ -23,10 +23,6 @@ Page({ }) }, onLoad: function (options) { - wx.setNavigationBarColor({ - frontColor: app.d.frontColor,// - backgroundColor: app.d.bgcolor //页面标题为路由参数 - }) var that = this; var id = options.id; if (options.p_openid != '') { diff --git a/pages/footprint/footprint.js b/pages/footprint/footprint.js index 2d6f3c9..4fd2240 100644 --- a/pages/footprint/footprint.js +++ b/pages/footprint/footprint.js @@ -15,17 +15,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - wx.setNavigationBarColor({ - frontColor: app.d.frontColor, - backgroundColor: app.d.bgcolor, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }), - this.setData({ - bgcolor: app.d.bf_color - }); this.footprint(); }, //页面加载完成函数 diff --git a/pages/group_buy/cantuan.js b/pages/group_buy/cantuan.js index 201bc20..db3c660 100644 --- a/pages/group_buy/cantuan.js +++ b/pages/group_buy/cantuan.js @@ -91,10 +91,6 @@ Page({ self.setData({ bgcolor: app.d.bgcolor, }) - wx.setNavigationBarColor({ - frontColor: app.d.frontColor,// - backgroundColor: app.d.bgcolor //页面标题为路由参数 - }); }, //首次进去选中 one: function () { diff --git a/pages/group_buy/comment.js b/pages/group_buy/comment.js index 6568320..dcb3e74 100644 --- a/pages/group_buy/comment.js +++ b/pages/group_buy/comment.js @@ -27,10 +27,6 @@ Page({ var that = this that.pid = options.pid console.log(options) - wx.setNavigationBarColor({ - frontColor: app.d.frontColor,// - backgroundColor: app.d.bgcolor //页面标题为路由参数 - }); that.setData({ quan: parseInt(options.good) + parseInt(options.notbad) + parseInt(options.bad), good: options.good, diff --git a/pages/group_buy/detail.js b/pages/group_buy/detail.js index 796abd0..b39b0e6 100644 --- a/pages/group_buy/detail.js +++ b/pages/group_buy/detail.js @@ -56,10 +56,6 @@ Page({ }) var systemInfo = wx.getSystemInfoSync() - wx.setNavigationBarColor({ - frontColor: app.d.frontColor,// - backgroundColor: app.d.bgcolor //页面标题为路由参数 - }); if (options.pagefrom) { console.log('监听成功') } diff --git a/pages/group_buy/detail.wxml b/pages/group_buy/detail.wxml index 7f09692..7dff581 100644 --- a/pages/group_buy/detail.wxml +++ b/pages/group_buy/detail.wxml @@ -25,7 +25,6 @@ - diff --git a/pages/group_buy/group.js b/pages/group_buy/group.js index 46aecb9..e4b8429 100644 --- a/pages/group_buy/group.js +++ b/pages/group_buy/group.js @@ -290,10 +290,6 @@ Page({ this.setData({ bgcolor: app.d.bgcolor, }); - wx.setNavigationBarColor({ - frontColor: app.d.frontColor,// - backgroundColor: app.d.bgcolor //页面标题为路由参数 - }) //页面初始化 options为页面跳转所带来的参数 var that = this; var select = that.data.select; diff --git a/pages/group_buy/payfor.js b/pages/group_buy/payfor.js index 1e0a5ba..bc42947 100644 --- a/pages/group_buy/payfor.js +++ b/pages/group_buy/payfor.js @@ -86,11 +86,6 @@ Page({ } var uid = app.globalData.userInfo.openid; // 微信id var wallet = app.globalData.userInfo.wallet; // 钱包状态 - wx.setNavigationBarColor({ - frontColor: app.d.frontColor, // - backgroundColor: app.d.bgcolor //设置页面参数 - }) - app.request.wxRequest({ url: '&action=pi&p=pintuan&c=groupbuy&m=payfor', data: { diff --git a/pages/index/index.js b/pages/index/index.js index fc1f97b..04e7362 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -178,10 +178,6 @@ Page({ zjList: data.Marketing_list, memberPlugin: data.memberPlugin //是否显示会员权益条 }); - // wx.setNavigationBarColor({ - // frontColor: app.d.frontColor, - // backgroundColor: app.d.bgcolor //页面标题为路由参数 - // }); that.setData({ remind: '' }); // console.log(data.Marketing_list.length) if (data.Marketing_list.length) { diff --git a/pages/listdetail/listdetail.js b/pages/listdetail/listdetail.js index 11e3017..7f3fa71 100644 --- a/pages/listdetail/listdetail.js +++ b/pages/listdetail/listdetail.js @@ -55,10 +55,6 @@ Page({ var title = options.title; //页面初始化 options为页面跳转所带来的参数 if (objectId || title) { - // wx.setNavigationBarColor({ - // frontColor: app.d.frontColor,// - // backgroundColor: app.d.bgcolor //页面标题为路由参数 - // }) //更改头部标题 wx.setNavigationBarTitle({ title: options.title, @@ -177,10 +173,6 @@ Page({ success: function () { }, }); - wx.setNavigationBarColor({ - frontColor: app.d.frontColor,// - backgroundColor: app.d.bgcolor //页面标题为路由参数 - }); wx.request({ url: app.d.ceshiUrl + '&action=search&m=search', method: 'post', diff --git a/pages/logistics/logistics.js b/pages/logistics/logistics.js index e9aed77..99e5f18 100644 --- a/pages/logistics/logistics.js +++ b/pages/logistics/logistics.js @@ -7,7 +7,8 @@ Page({ * 页面的初始数据 */ data: { - wuliu: ['已接收', '抵达深圳', '抵达广州'], + wuliu: '', + wuliuList: [], remind: '加载中' }, @@ -17,62 +18,28 @@ Page({ onLoad: function (options) { console.log(options) var that = this; - - wx.setNavigationBarColor({ - frontColor: app.d.frontColor, - backgroundColor: app.d.bgcolor, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }); - + that.reloadData(options); + }, + // 数据加载 + reloadData: function (options) { + var that = this; var orderId = options.orderId; - var details = options.details ? options.details : ''; - var type = options.type ? options.type : ''; - var courier_num = options.courier_num;//kuaididanhao - var express_id = options.express_id;//快递编号 - wx.request({ - url: app.d.ceshiUrl + '&action=order&m=logistics', - method: 'post', - data: { - id: orderId, - details: details, - type: type, - courier_num: courier_num, - express_id: express_id - }, - header: { - 'Content-Type': 'application/x-www-form-urlencoded' - }, - success: function (res) { - var status = res.data.status; - if (status == 1) { - if (res.data.res_1.message == 'ok') { - that.setData({ - wuliu: res.data.res_1.data, - res: res.data - }); - } else { - that.setData({ - wuliu: res.data.res_1.data, - res: res.data - }); - } - console.log(res.data.res_1.data) - - } else { - wx.showToast({ - title: res.data.err, - duration: 2000 - }); + WXAPI.logisticsDetails({ + accessId: app.globalData.accessId, + storeId: 239, + storeType: 1, + id: orderId, + o_source: 1, + type: '', + }).then(res => { + if (res.code == 200) { + var data = res.data; + if (data.list.length > 0) { + that.setData({ + wuliu: data.list[0], + wuliuList: data.list[0].list, + }) } - }, - fail: function () { - wx.showToast({ - title: '网络异常!', - duration: 2000 - }); } }); }, @@ -86,13 +53,16 @@ Page({ }); }, 1000); }, - copyText: function (t) { - var a = t.currentTarget.dataset.text; + copyText: function (e) { + console.log(e.currentTarget) + var text = e.currentTarget.dataset.text; wx.setClipboardData({ - data: a, - success: function () { + data: text, + success: function (res) { wx.showToast({ - title: "已复制" + title: '复制成功', + icon: 'none', + duration: 2000 }) } }) diff --git a/pages/logistics/logistics.wxml b/pages/logistics/logistics.wxml index 746f976..2e0a3b6 100644 --- a/pages/logistics/logistics.wxml +++ b/pages/logistics/logistics.wxml @@ -1,62 +1,61 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - 物流公司: - {{res.name}} - - - 物流单号: - {{res.courier_num}} + + + + 物流公司: + {{wuliu.kuaidi_name}} + + + 物流单号: + {{wuliu.courier_num}} + + 复制 + + + + + + + + + + + {{item.context}} + {{item.time}} - 复制 - - - - - - - - {{item.context}} - {{item.time}} - - - - - - - - - - - 没有查询到物流信息 - - + + + + + + + 没有查询到物流信息 + + \ No newline at end of file diff --git a/pages/logistics/logistics.wxss b/pages/logistics/logistics.wxss index 358c863..9d5b765 100644 --- a/pages/logistics/logistics.wxss +++ b/pages/logistics/logistics.wxss @@ -1,65 +1,58 @@ /* pages/test/test.wxss */ -.body_1{ +.logistics{ height: 100%; } -.goods{ - margin: 50rpx; - height: 150rpx; - width: 150rpx; - border-radius: 15rpx; -} -.logistics{ - font-size:28rpx; - width:100%; - margin:5%; - /* border-bottom:1px solid #eee; */ -} -.br{ - width: 95%; - margin-left: 2.5%; - margin-bottom: 30rpx; - background: #d0d0d0; - height: 1rpx; -} - -/* 下部分 */ +.list-table{ + margin-top: 15rpx; + /* height: 100%; */ + width: 95%; +} +.list-cell{ + margin:20rpx 2.5% 0rpx 2.5%; + background: white; + /* display: flex; */ + position: relative; +} .logistics_centent{ - position: absolute; - left: 100rpx; - font-size: 28rpx; + margin-left: 100rpx; + font-size: 30rpx; color: #666 } -.icon{ - width: 20rpx; - height: 20rpx; - background: white; +.logistics_centent .centent{ + padding-bottom: 20rpx; + line-height: 30rpx; +} +.dot{ + width: 25rpx; + height: 25rpx; + background-color: #9d9d9d; border-radius: 50%; - display: inline-block; - margin:0rpx 20rpx 0rpx 40rpx; + margin:0rpx 20rpx 0rpx 35rpx; } .in{ - border: 1rpx solid red; - animation: my_animation 2s infinite; + background-color: #FA5151; + /* animation: my_animation 2s infinite; */ } -@keyframes my_animation{ +/* @keyframes my_animation{ 100% { transform: scale(2); background-color: transparent; } -} - +} */ .no_in{ - border: 1rpx solid #d0d0d0; + background-color:#9d9d9d; } -.on{ - background: #d0d0d0; - height: 100rpx; - width: 1px; - margin-left: 50rpx; +.line{ + position: absolute; + top: 25rpx; + left: 48rpx; + width: 2rpx; + height: 100%; + background-color:#9d9d9d; } .logInf{ - height: 100rpx; + height: 120rpx; padding:15rpx 30rpx; position: relative; } @@ -69,9 +62,14 @@ line-height: 50rpx } .text1{ - color: #999999; + color: #333333; + font-size: 30rpx; margin-right: 20rpx } +.fillline{ + background-color: #f4f5f6; + height: 20rpx; +} .copy{ font-size: 22rpx; color: #999; @@ -87,22 +85,3 @@ } -@font-face {font-family: "iconfont"; - src: url('iconfont.eot?t=1525919149340'); /* IE9*/ - src: url('iconfont.eot?t=1525919149340#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAXAAAsAAAAACHAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFZW7khxY21hcAAAAYAAAABeAAABhptUBr5nbHlmAAAB4AAAAesAAAJQ55T8BWhlYWQAAAPMAAAALwAAADYRUuFaaGhlYQAAA/wAAAAcAAAAJAfeA4RobXR4AAAEGAAAAAwAAAAMC+kAAGxvY2EAAAQkAAAACAAAAAgAdgEobWF4cAAABCwAAAAfAAAAIAETAIFuYW1lAAAETAAAAUUAAAJtPlT+fXBvc3QAAAWUAAAALAAAAD3HvDRfeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2Bk/sE4gYGVgYOpk+kMAwNDP4RmfM1gxMjBwMDEwMrMgBUEpLmmMDgwVDxrZ27438AQw9zA0AAUZgTJAQAtYQzzeJzFkMENgDAMAy9t6QMxCA8G4sUc3aCbdo1iQnkwQS05VhxLiQIsQBQPMYFdGA9OueZ+ZHU/eSZLjUBptXf1nyqiWXYNKplpsHmr/9i87qPTVyiDOrHVl4QbqvYNqwAAeJxFUE2L01AUvSeZpJ95nbx8tek0bVKbdIhG2qZpy9COg7NQx4UgCC5n405XwmxcdCMouPAfCIPgUnA94ODSdulaEP0BMmuJJlPRx+Wecz8P95FE9PubeCbWSaM+DeiQ7hFBDuExoQU3iCMhhOFKhqUzMegGbqHrReIclifr5jCJfUsuyDUwOBi5wySIhADjeCHsYWi2gEbTvs97O1x8jXI9cJ6nd4RTGO3uTm1xLb19dV8fdrTiSZXzBuevirIkFQVhq8bw2DJLUqksp2+lmm2ctXeFNqqNwL77UOk0+fGL+EmrZ5WA5RJas8Pe7au2mtkz29R4o7CtFOu20r2i4+RHpa5VW/53yp6c3XoqfhWPqUgqtWhMR/SUqMewOeUf0WQqmGQlNPFJjBB0GQoR4mTiwBotkIEui0PTGOj5R/nBZJzVBlnRkFgWzxH71xFhjs2soebZsZpNjvImK3PCy5phtA0j/bnBR+v0QpLA1iswSUovDtxR5aAy8sLpNPQuqRvOZkeMc3ZD4QBnuSfwJq+WvlSq4Mo543mIZPe8P8FHx8N76B09M/xF4UO2eb3aKK3WYL8+w3ccH8L0wVT4T3ErX88Vee9SSnHf5Lqfyttb+6JavrlJpss8iWU/AZJ+OCsP2kR/AIUbXTsAeJxjYGRgYADi9/rvX8fz23xl4GZhAIHrkufWIuj/i1gYmBOBXA4GJpAoAFu/C5IAeJxjYGRgYG7438AQw8IAAkCSkQEVMAMARwkCbAQAAAAD6QAABAAAAAAAAAAAdgEoeJxjYGRgYGBmKGVgYwABJiDmAkIGhv9gPgMAFJIBlQB4nGWPTU7DMBCFX/oHpBKqqGCH5AViASj9EatuWFRq911036ZOmyqJI8et1ANwHo7ACTgC3IA78EgnmzaWx9+8eWNPANzgBx6O3y33kT1cMjtyDRe4F65TfxBukF+Em2jjVbhF/U3YxzOmwm10YXmD17hi9oR3YQ8dfAjXcI1P4Tr1L+EG+Vu4iTv8CrfQ8erCPuZeV7iNRy/2x1YvnF6p5UHFockikzm/gple75KFrdLqnGtbxCZTg6BfSVOdaVvdU+zXQ+ciFVmTqgmrOkmMyq3Z6tAFG+fyUa8XiR6EJuVYY/62xgKOcQWFJQ6MMUIYZIjK6Og7VWb0r7FDwl57Vj3N53RbFNT/c4UBAvTPXFO6stJ5Ok+BPV8bUnV0K27LnpQ0kV7NSRKyQl7WtlRC6gE2ZVeOEXpc0Yk/KGdI/wAJWm7IAAAAeJxjYGKAAC4G7ICZkYmRmZGFgbGCvyIzMb8is7w0J7M0LTMnh4EBAE7iBxM=') format('woff'), - url('iconfont.ttf?t=1525919149340') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ - url('iconfont.svg?t=1525919149340#iconfont') format('svg'); /* iOS 4.1- */ -} - -.iconfont { - font-family:"iconfont" !important; - font-size:117px; - font-style:normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - color: #bfbfbf; -} - -.icon-xiaoxiwuliufill:before { content: "\e687"; } - diff --git a/pages/new/new.js b/pages/new/new.js index e254875..9e371aa 100644 --- a/pages/new/new.js +++ b/pages/new/new.js @@ -265,10 +265,6 @@ Page({ this.setData({ title: options.title, }); - // wx.setNavigationBarColor({ - // frontColor: app.d.frontColor,// - // backgroundColor: app.d.bgcolor //页面标题为路由参数 - // }) //页面初始化 options为页面跳转所带来的参数 this.getMore(); }, diff --git a/pages/notice/index.js b/pages/notice/index.js index 05b5e2a..60dd111 100644 --- a/pages/notice/index.js +++ b/pages/notice/index.js @@ -24,17 +24,6 @@ Page({ wx.setNavigationBarTitle({ title: '公告详情', //修改页面标题 }); - wx.setNavigationBarColor({ - frontColor: app.d.frontColor, - backgroundColor: app.d.bgcolor, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }) - this.setData({ - bgcolor: app.d.bgcolor - }); var that = this; wx.request({ url: app.d.ceshiUrl + '&action=notice&m=index', diff --git a/pages/notice/notice.js b/pages/notice/notice.js index 9c268ce..fdf8ba1 100644 --- a/pages/notice/notice.js +++ b/pages/notice/notice.js @@ -25,17 +25,6 @@ Page({ wx.setNavigationBarTitle({ title: '公告', //修改页面标题 }); - wx.setNavigationBarColor({ - frontColor: app.d.frontColor, - backgroundColor: app.d.bgcolor, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }) - this.setData({ - bgcolor: app.d.bgcolor - }); var that = this; wx.request({ url: app.d.ceshiUrl + '&action=notice&m=index', diff --git a/pages/order/detail.js b/pages/order/detail.js index a4b5fe0..30c0b55 100644 --- a/pages/order/detail.js +++ b/pages/order/detail.js @@ -297,19 +297,7 @@ Page({ onLoad: function (options) { console.log(options) this.get_plug(); - // wx.setNavigationBarColor({ - // frontColor: app.d.frontColor, - // backgroundColor: app.d.bgcolor, //页面标题为路由参数 - // animation: { - // duration: 400, - // timingFunc: 'easeIn' - // } - // }) - // this.setData({ - // orderId: options.orderId, - // bgcolor: '#FF6347', - // }) - this.loadProductDetail(); + this.loadProductDetail(options); }, onReady: function () { var that = this; @@ -341,8 +329,6 @@ Page({ }) }, - - getUserformid: function (e) { //储存id 并跳转 var formid = e.detail.formId; @@ -365,90 +351,111 @@ Page({ // 订单详情 loadProductDetail: function () { var that = this; - var type1 = that.data.type1; - const promise = new Promise((resolve) => { - wx.request({ - url: app.d.ceshiUrl + '&action=order&m=order_details', - method: 'post', - data: { - order_id: that.data.orderId, - type1: that.data.type1, - }, - header: { - 'Content-Type': 'application/x-www-form-urlencoded' - }, - success: function (res) { - var status = res.data.status; - var type1 = res.data.type1; - var dr = res.data.dr; - var wx_id = res.data.wx_id; - var title = res.data.title; - var drawid = res.data.drawid; - var p_id = res.data.p_id; - var status_pid = res.data.pid; - var list = res.data.list; - var z_price = Number(res.data.z_price).toFixed(2); - var pro_price = 0; - var freight = res.data.freight ? res.data.freight : 0; - var red_packet = res.data.red_packet; - for (var i = 0; i < list.length; i++) { - pro_price = (Number(pro_price) + Number(list[i].p_price) * Number(list[i].num)).toFixed(2); - } - if (status == 1) { - //支付倒计时 - var str = res.data.add_time; // 日期字符串 - var failure = Number(res.data.order_failure); // 后台传的时间值 - str = str.replace(/-/g, '/'); // 将-替换成/,因为下面这个构造函数只支持/分隔的日期字符串 - var d_date = Date.parse(new Date(str)); // 构造一个日期型数据,值为传入的字符串 - let t_time = Date.parse(new Date()); - var t_res = t_time - d_date + 9000; - var two_day = failure * 60 * 60 * 1000; - var djs = two_day - t_res; - //倒计时结束 - - that.setData({ - pro_price: pro_price, - freight: freight, - id: res.data.id, - sNo: res.data.sNo, - z_price: Number(z_price).toFixed(2), - add_time: res.data.add_time, - rstatus: res.data.rstatus, - list: res.data.list, - address: res.data.address, - mobile: res.data.mobile, - name: res.data.name, - dr: res.data.dr, - title: res.data.title, - p_id: res.data.p_id, - coupon_money: res.data.coupon_money, - consumer_money: res.data.consumer_money, - user_money: res.data.user_money, - status_pid: res.data.pid, - ptcode: res.data.ptcode, - man_num: res.data.man_num, - groupid: res.data.pid, - payment: z_price, - order_failure: res.data.order_failure, - total_micro_second: djs - }); - resolve(); - } else { - wx.showToast({ - title: res.data.err, - duration: 2000 - }); - } - }, - fail: function () { - wx.showToast({ - title: '网络异常!', - duration: 2000 - }); - } - }); + var orderId = options.orderId; + WXAPI.orderDetails({ + accessId: app.globalData.accessId, + storeId: 239, + storeType: 1, + order_id: orderId, + }).then(res => { + if (res.code == 200) { + var data = res.data; + // var address = data.adds; + // that.numbers = data.adds; + // if (address == '') { + // var address = [] + // } + that.setData({ + wuliu: data.res_1.data, + // address: address, + // selectedAllStatus: false + }) + } }); - promise.then(() => countdown(this)); + // var type1 = that.data.type1; + // const promise = new Promise((resolve) => { + // wx.request({ + // url: app.d.ceshiUrl + '&action=order&m=order_details', + // method: 'post', + // data: { + // order_id: that.data.orderId, + // type1: that.data.type1, + // }, + // header: { + // 'Content-Type': 'application/x-www-form-urlencoded' + // }, + // success: function (res) { + // var status = res.data.status; + // var type1 = res.data.type1; + // var dr = res.data.dr; + // var wx_id = res.data.wx_id; + // var title = res.data.title; + // var drawid = res.data.drawid; + // var p_id = res.data.p_id; + // var status_pid = res.data.pid; + // var list = res.data.list; + // var z_price = Number(res.data.z_price).toFixed(2); + // var pro_price = 0; + // var freight = res.data.freight ? res.data.freight : 0; + // var red_packet = res.data.red_packet; + // for (var i = 0; i < list.length; i++) { + // pro_price = (Number(pro_price) + Number(list[i].p_price) * Number(list[i].num)).toFixed(2); + // } + // if (status == 1) { + // //支付倒计时 + // var str = res.data.add_time; // 日期字符串 + // var failure = Number(res.data.order_failure); // 后台传的时间值 + // str = str.replace(/-/g, '/'); // 将-替换成/,因为下面这个构造函数只支持/分隔的日期字符串 + // var d_date = Date.parse(new Date(str)); // 构造一个日期型数据,值为传入的字符串 + // let t_time = Date.parse(new Date()); + // var t_res = t_time - d_date + 9000; + // var two_day = failure * 60 * 60 * 1000; + // var djs = two_day - t_res; + // //倒计时结束 + + // that.setData({ + // pro_price: pro_price, + // freight: freight, + // id: res.data.id, + // sNo: res.data.sNo, + // z_price: Number(z_price).toFixed(2), + // add_time: res.data.add_time, + // rstatus: res.data.rstatus, + // list: res.data.list, + // address: res.data.address, + // mobile: res.data.mobile, + // name: res.data.name, + // dr: res.data.dr, + // title: res.data.title, + // p_id: res.data.p_id, + // coupon_money: res.data.coupon_money, + // consumer_money: res.data.consumer_money, + // user_money: res.data.user_money, + // status_pid: res.data.pid, + // ptcode: res.data.ptcode, + // man_num: res.data.man_num, + // groupid: res.data.pid, + // payment: z_price, + // order_failure: res.data.order_failure, + // total_micro_second: djs + // }); + // resolve(); + // } else { + // wx.showToast({ + // title: res.data.err, + // duration: 2000 + // }); + // } + // }, + // fail: function () { + // wx.showToast({ + // title: '网络异常!', + // duration: 2000 + // }); + // } + // }); + // }); + // promise.then(() => countdown(this)); }, // 取消订单 removeOrder: function (e) { diff --git a/pages/order/detail.wxml b/pages/order/detail.wxml index d8bf8f8..6e7d785 100644 --- a/pages/order/detail.wxml +++ b/pages/order/detail.wxml @@ -147,9 +147,9 @@
- +
- +
@@ -157,10 +157,10 @@
- +
- +
@@ -168,10 +168,10 @@ - 拼单详情 + 拼单详情 - 分享好友 + 分享好友 diff --git a/pages/order/order.js b/pages/order/order.js index cd6f8e5..d4a8602 100644 --- a/pages/order/order.js +++ b/pages/order/order.js @@ -3,28 +3,22 @@ var app = getApp(); var WXAPI = require('../../utils/server.js'); Page({ data: { - winWidth: 0, - winHeight: 0, - // tab切换 - currentTab: 0, - isStatus: 'payment', //1待付款,2待发货,3待收货 4、5已完成 + animation: {}, // 动画 + animation_mask: {}, // 动画 + showModalStatus: false, // modal是否需要渲染 + currentIndex: 0, + navTab: [{'type':'全部','status':'','num':0}, + {'type':'待付款','status':'payment','num':0}, + {'type':'待发货','status':'send','num':0}, + {'type':'待收货','status':'receipt','num':0}, + {'type':'待评价','status':'evaluete','num':0}], + currentStatus: '', + listArray: [], page: 1, - refundpage: 0, - ordert0: [], - ordert1: [], - ordert2: [], - ordert3: [], - ordert4: [], - remind: '加载中', - groupid: '', - man_num: '', - selectPerson: true, - activeSortingName: "全部订单", - selectArea: false, - otype: 'pay', - pxopen: false, - districtChioceIcon: "/images/icon-go-black.png", - sortingChioceIcon: "icon-xiangyou", + loading: false, + complete: false, + scrollTop: 0, + scrollHeight: 0, sortingList: [{ key: 1, value: "全部订单", @@ -34,579 +28,250 @@ Page({ key: 3, value: "拼团", otype: 'pay6' - } - ], + }], }, - //提醒发货 - add_fix: function (e) { - console.log(1) - wx.showToast({ - title: '已为您通知卖家提醒发货', - icon: 'none', - duration: 2000, - }); - }, - selectSorting: function (e) { - var index = e.currentTarget.dataset.index; - var otype = e.currentTarget.dataset.otype; + switchTab: function(e) { + var dataset = e.currentTarget.dataset this.setData({ - otype: otype, - sortingChioceIcon: "icon-xiangyou", - chioceSorting: false, - activeSortingIndex: index, - activeSortingName: this.data.sortingList[index].value, - productList: [], - pageIndex: 1, - loadOver: false, - isLoading: true - }) - this.loadOrderList(); - }, - //点击选择类型 - clickPerson: function () { - if (this.data.chioceSorting) { - this.setData({ - sortingChioceIcon: "icon-xiangyou", - chioceDistrict: false, - chioceSorting: false, - chioceFilter: false, - }); - } else { - this.setData({ - sortingChioceIcon: "icon-xiangxia", - chioceDistrict: false, - chioceSorting: true, - chioceFilter: false, - }); - } - - }, - //下拉刷新 - onPullDownRefresh: function () { - wx.showNavigationBarLoading() //在标题栏中显示加载 - this.loadOrderList(); - wx.hideNavigationBarLoading() //完成停止加载 - wx.stopPullDownRefresh() //停止下拉刷新 - }, - //页面加载完成函数 - onReady: function () { - var that = this; - that.setData({ - remind: '' + currentIndex: dataset.idx, + currentStatus: dataset.item.status, + scrollTop: 0, + page: 1, + loading: false, + complete: false }); + this.getOderList(); }, - onLoad: function (options) { - if (options.otype) { - var otype = options.otype; + scroll: function (e) { + if (this.data.toView == "top") { this.setData({ - otype: otype, - }); - var isStatus = options.order_type1 ? options.order_type1 : ''; - } else { - var otype = this.data.otype; - var isStatus = ''; + toView: "" + }) } - var sortingList = this.data.sortingList; - for (var j = 0; j < sortingList.length; j++) { - if (sortingList[j].otype == otype) { - this.setData({ - activeSortingName: sortingList[j].value, - }); - } - } - // wx.setNavigationBarColor({ - // frontColor: app.d.frontColor, - // backgroundColor: app.d.bgcolor, //页面标题为路由参数 - // animation: { - // duration: 400, - // timingFunc: 'easeIn' - // } - // }) - this.initSystemInfo(); - - this.setData({ - currentTab: parseInt(options.currentTab), - isStatus: isStatus, - bgcolor: '#FF6347' - }); - this.loadOrderList(); - }, - onShow: function () { - this.loadOrderList(); }, - // 获取订单 - loadOrderList: function () { - var that = this; - var isStatus1 = that.options.order_type1 + getOderList: function() { + //在当前页面显示导航条加载动画 + wx.showNavigationBarLoading(); + wx.showLoading({ + title: '加载中...', + }) + var that = this WXAPI.orderList({ accessId: app.globalData.accessId, storeId: 239, storeType: 1, - queryOrderType: that.data.isStatus, - page: 1, - pagesize: 100, + queryOrderType: that.data.currentStatus, + page : that.data.page, }).then(res => { if (res.code == 200) { - var data = res.data; - //成功返回设置数据 - if (data == '') { - that.setData({ - loading: false, - }); - return; - } else { - switch (that.data.currentTab) { - case 0: - that.setData({ - ordert0: data.order, - }); - break; - case 5: - that.setData({ - ordert0: data.order, - }); - break; - case 6: - that.setData({ - ordert0: data.order, - }); - break; - case 1: - that.setData({ - ordert1: data.order, - }); - break; - case 2: - that.setData({ - ordert2: data.order, - }); - break; - case 3: - that.setData({ - ordert3: data.order, - }); - break; - case 4: - that.setData({ - ordert4: data.order, - }); - break; + var result = res.data.order || [] + var list = (this.data.page == 1 ? [] : this.data.listArray).concat(result) + // var complete = (this.data.page >= res.data.page.pages) + var complete = (this.data.listArray.length >= res.data.order_num) + var loading = !complete + // console.log(res); + that.setData({ + listArray: list, + loading: loading, + complete: complete, + }) + //隐藏loading 提示框 + wx.hideLoading(); + // //隐藏导航条加载动画 + wx.hideNavigationBarLoading(); + //停止下拉刷新 + wx.stopPullDownRefresh(); + } + }) + }, + reloadData: function() { + this.setData({ + page: 1 + }) + this.getOderList(); + }, + loadMoreData: function() { + if (this.data.loading && !this.data.complete) { + this.setData({ + page: this.data.page + 1 + }) + this.getOderList(); + } + }, + //详情页跳转 + lookDetail:function(e){ + var goodsId = e.currentTarget.dataset.id; + wx.navigateTo({ + url:"/pages/order/detail?id="+goodsId + }) + }, + toast: function(msg) { + wx.showToast({ + title: msg, + icon: 'none', + duration: 2000 + }) + }, + // 取消订单 + removeOrder: function(e) { + var that = this; + var info = e.currentTarget.dataset.info + wx.showModal({ + title: '提示', + content: '你确定要取消订单吗?', + success: function (res) { + WXAPI.removeOrder({ + accessId: app.globalData.accessId, + storeId: 239, + storeType: 1, + order_id: info.id, + }).then(res => { + if (res.code == 200) { + that.reloadData(); } - } + }) } }); }, - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - // this.getMore(); + //立即支付 + payNow: function(e) { + var data = e.currentTarget.dataset.info + wx.navigateTo({ + url: "/pages/order/payment?orderId="+data.sNo+"&price="+data.z_price, + }) }, - // 点击加载更多 - getMore: function (e) { + //提醒发货 + orderRemind: function(e) { var that = this; - var page = that.data.page+1; - WXAPI.orderList({ + var info = e.currentTarget.dataset.info + WXAPI.orderRemind({ accessId: app.globalData.accessId, storeId: 239, storeType: 1, - queryOrderType: that.data.isStatus, - page: page, + order_id: info.id, }).then(res => { if (res.code == 200) { - var data = res.data; - //成功返回设置数据 - if (data == '') { - that.setData({ - loading: false, - }); - return; - } else { - switch (that.data.currentTab) { - case 0: - var orderList = that.data.ordert0; - orderList.push(...data.order) - that.setData({ - ordert0: orderList, - }); - break; - case 5: - var orderList = that.data.ordert0; - orderList.push(...data.order) - that.setData({ - ordert0: orderList, - }); - break; - case 6: - var orderList = that.data.ordert0; - orderList.push(...data.order) - that.setData({ - ordert0: orderList, - }); - break; - case 1: - var orderList = that.data.ordert1; - orderList.push(...data.order) - that.setData({ - ordert1: orderList, - }); - break; - case 2: - var orderList = that.data.ordert2; - orderList.push(...data.order) - that.setData({ - ordert2: orderList, - }); - break; - case 3: - var orderList = that.data.ordert3; - orderList.push(...data.order) - that.setData({ - ordert3: orderList, - }); - break; - case 4: - var orderList = that.data.ordert4; - orderList.push(...data.order) - that.setData({ - ordert4: orderList, - }); - break; - } - } + that.reloadData(); } - }); + }) }, // 确认收货 - recOrder: function (e) { + confirmOrder: function(e) { var that = this; - var sNo = e.currentTarget.dataset.sno; + var info = e.currentTarget.dataset.info wx.showModal({ title: '提示', - content: '你确定已收到宝贝吗?', + content: '请确认你已收到货物', success: function (res) { - res.confirm && wx.request({ - url: app.d.ceshiUrl + '&action=order&m=ok_Order', - method: 'post', - data: { - sNo: sNo, - }, - header: { - 'Content-Type': 'application/x-www-form-urlencoded' - }, - success: function (res) { - var status = res.data.status; - if (status == 1) { - wx.showToast({ - title: '操作成功!', - duration: 2000 - }); - that.loadOrderList(); - } else { - wx.showToast({ - title: res.data.err, - duration: 2000 - }); - } - }, - fail: function () { - // fail - wx.showToast({ - title: '网络异常!', - duration: 2000 - }); + WXAPI.confirmOrder({ + accessId: app.globalData.accessId, + storeId: 239, + storeType: 1, + order_id: info.id, + }).then(res => { + if (res.code == 200) { + that.reloadData(); } - }); + }) } }); }, - // 取消订单 - removeOrder: function (e) { + //删除订单 + deleteOrder: function(e) { var that = this; - var orderId = e.currentTarget.dataset.orderId; + var info = e.currentTarget.dataset.info wx.showModal({ title: '提示', - content: '你确定要取消订单吗?', + content: '确定要删除订单吗', success: function (res) { - res.confirm && wx.request({ - url: app.d.ceshiUrl + '&action=order&m=removeOrder', - method: 'post', - data: { - openid: app.globalData.userInfo.openid, - id: orderId, - }, - header: { - 'Content-Type': 'application/x-www-form-urlencoded' - }, - success: function (res) { - var status = res.data.status; - if (status == 1) { - wx.showToast({ - title: res.data.err, - success: 2000 - }); - that.loadOrderList(); - } else { - wx.showToast({ - title: res.data.err, - duration: 2000 - }); - } - }, - fail: function () { - wx.showToast({ - title: '网络异常!', - duration: 2000 - }); + WXAPI.deleteOrder({ + accessId: app.globalData.accessId, + storeId: 239, + storeType: 1, + order_id: info.id, + }).then(res => { + if (res.code == 200) { + that.reloadData(); } - }); + }) } }); }, - initSystemInfo: function () { - var that = this; - wx.getSystemInfo({ - success: function (res) { - that.setData({ - winWidth: res.windowWidth, - winHeight: res.windowHeight - }); - } - }); + //查看物流 + orderLogistics: function(e) { + var info = e.currentTarget.dataset.info + wx.navigateTo({ + url:"/pages/logistics/logistics?orderId="+info.sNo + }) }, - - bindChange: function (e) { - console.log('1111') + //去评价 + evaluateOrder: function(e) { var that = this; - //设置移动请求 防止空数据出现 - var currentTab = e.detail.current; - if (currentTab == 0) { - console.log('全部'); - that.setData({ - currentTab: parseInt(currentTab), - isStatus: '', - }); - that.loadOrderList(); - } else if (currentTab == 1) { - that.setData({ - currentTab: parseInt(currentTab), - isStatus: 'payment', - }); - that.loadOrderList(); - } else if (currentTab == 2) { - that.setData({ - currentTab: parseInt(currentTab), - isStatus: 'send', - }); - that.loadOrderList(); - } else if (currentTab == 3) { - that.setData({ - currentTab: parseInt(currentTab), - isStatus: 'receipt', - }); - that.loadOrderList(); - } else if (currentTab == 4) { - that.setData({ - currentTab: parseInt(currentTab), - isStatus: 'evaluete', - }); - that.loadOrderList(); - } - that.setData({ - currentTab: currentTab - }); + var info = e.currentTarget.dataset.info + wx.navigateTo({ + url:"/pages/order/detail?id="+info.id + }) }, - // 跳转页面 - swichNav: function (e) { - var that = this; - if (that.data.currentTab === e.target.dataset.current) { - return false; - } else { - var current = e.target.dataset.current; - that.setData({ - currentTab: parseInt(current), - isStatus: e.target.dataset.otype, - }); - that.loadOrderList(); - }; + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + var that = this + that.setData({ + currentIndex: options.index, + currentStatus: options.status + }) + that.reloadData(); }, - // 微信支付 - payOrderByWechat: function (e) { - var that = this; - var order_id = e.detail.target.dataset.orderId; // 订单id - var order_sn = e.detail.target.dataset.ordersn; // 订单号 - var price = e.detail.target.dataset.price; // 实付金额 - var user_id = app.globalData.userInfo.openid; // 微信id - var form_id = e.detail.formId; - var f_pname = e.detail.target.dataset.pname // 拼接的商品名称 - var coupon_id = e.detail.target.dataset.coupon_id // 优惠券id - // 调起微信支付 - wx.request({ - url: app.d.ceshiUrl + '&action=pay&m=pay', - data: { - cmoney: price, // 实付金额 - openid: user_id, // 微信id - type: 1, - }, - method: 'POST', - header: { - 'Content-Type': 'application/x-www-form-urlencoded' - }, - success: function (res) { - if (app.globalData.userInfo.referee_openid && app.globalData.userInfo.openid && app.globalData.userInfo.referee_openid != 'undefined') { - // console.log(66411) - var referee_openid = app.globalData.userInfo.referee_openid; - var openid = app.globalData.userInfo.openid - that.refereeopenid(referee_openid, openid); //储存推荐人 - } - if (res.data) { - var dingdanhao = res.data.out_trade_no; - wx.requestPayment({ - timeStamp: res.data.timeStamp, - nonceStr: res.data.nonceStr, - package: res.data.package, - signType: 'MD5', - paySign: res.data.paySign, - success: function (res) { - //成功后修改订单状态 - wx.request({ - url: app.d.ceshiUrl + '&action=product&m=up_order', - method: 'post', - data: { - coupon_id: coupon_id, // 付款金额 - coupon_money: price, // 付款金额 - order_id: order_sn, // 订单号 - user_id: user_id, // 微信id - }, - header: { - 'Content-Type': 'application/x-www-form-urlencoded' - }, - success: function (res) { - var orderId = res.data.sNo; // 订单号 - var oid = res.data.id; // 订单id - //发送信息到客户 - // that.notice(oid, order_sn, price, user_id, form_id, f_pname); - wx.showModal({ - content: "支付成功!", - showCancel: false, - confirmText: "确定", - success: function (res) { - wx.redirectTo({ - url: '../order/detail?orderId=' + oid - }); - } + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { - }); - that.detailed(order.order_sn); //分销 - } - }) - }, - fail: function (res) { - wx.showModal({ - content: "取消支付!", - showCancel: false, - confirmText: "确定", - }) - } - }) - } + }, - }, - fail: function () { - wx.showToast({ - title: '网络异常!err:wxpay', - duration: 2000 - }); - } - }) + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + this.reloadData(); }, - //发送数据到客户微信上 - // notice: function (order_id, order_sn, price, user_id, form_id, f_pname) { - // wx.request({ - // url: app.d.ceshiUrl + '&action=getcode&m=Send_Prompt', - // method: 'post', - // data: { - // page: 'pages/order/detail?orderId=' + order_id, - // order_sn: order_sn, - // price: price, - // user_id: user_id, - // form_id: form_id, - // f_pname: f_pname - // }, - // header: { - // 'Content-Type': 'application/x-www-form-urlencoded' - // }, - // success: function (res) { - // console.log(res) - // } - // }) - // }, - escOrder: function (e) { - var that = this, - id = e.target.dataset.orderId; - var sNo = e.target.dataset.sno; - wx.showModal({ - title: '提示', - content: '小二正在努力为您发货,确定要取消吗?', - success: function (res) { - if (res.confirm) { - console.log('用户点击确定' + "../return_goods/return_goods?id=" + id + "&type=1&oid=" + sNo); - wx.redirectTo({ - url: "../return_goods/return_goods?id=" + id + "&type=1&oid=" + sNo - }) - } else if (res.cancel) { - console.log('用户点击取消') - } - } - }); + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + }, - //储存推荐人 - refereeopenid: function (referee_openid, openid) { - wx.request({ - url: app.d.ceshiUrl + '&action=app&m=referee_openid', - method: 'post', - data: { - openid: openid, - referee_openid: referee_openid, - }, - header: { - 'Content-Type': 'application/x-www-form-urlencoded' - }, - success: function (res) { }, - error: function (e) { - wx.showToast({ - title: '网络异常!', - duration: 2000, - }); - }, - }); + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + }, - detailed: function (sNo, openid) { //分销 - wx.request({ - url: app.d.ceshiUrl + '&action=distribution&m=detailed_commission', - method: 'post', - data: { - userid: app.globalData.userInfo.openid, - order_id: sNo, - }, - header: { - 'Content-Type': 'application/x-www-form-urlencoded' - }, - }) + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + }, - commission: function (sNo) { //分销返佣 - wx.request({ - url: app.d.ceshiUrl + '&action=distribution&m=commission', - method: 'post', - data: { - order_id: sNo, - }, - header: { - 'Content-Type': 'application/x-www-form-urlencoded' - }, - }) + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + }, + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } + }) \ No newline at end of file diff --git a/pages/order/order.json b/pages/order/order.json index 544e7bb..cafaff7 100644 --- a/pages/order/order.json +++ b/pages/order/order.json @@ -1,3 +1,4 @@ { + "usingComponents": {}, "navigationBarTitleText": "我的订单" } \ No newline at end of file diff --git a/pages/order/order.wxml b/pages/order/order.wxml index ce04840..111b950 100644 --- a/pages/order/order.wxml +++ b/pages/order/order.wxml @@ -1,359 +1,62 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{item.value}} + + + + + {{item.type}} + + - - - 全部订单 - - 待付款 - 待发货 - 待收货 - 待评价 - - - - - - - - - - 没有可用订单/(ㄒoㄒ)/~~ - - - - - - 订单号:{{item.sNo}} - - - 等待买家付款 - 等待卖家发货 - 等待买家收货 - 等待买家评价 - 退货中 - 交易成功 - 订单关闭 - - - - 待付款 - 拼团中-待成团 - 拼团成功-待发货 - 拼团成功-已发货 - 拼团成功-已签收 - 拼团成功-已评价 - 拼团失败-未退款 - 拼团失败-已退款 - - - - - - - - - - - {{list.p_name}} - [{{list.size}}] - - - ¥ {{list.p_price}} - x{{list.num}} - - - - - - - - 合计: - ¥ {{item.z_price}} - ¥ {{item.total}} - - - - - 订单详情 - 订单详情 - 订单详情 - 订单详情 - - 订单完成 - 确认收货 - 确认收货 - 立即评价 - 立即支付 - 分享好友 - + + - - - - - - - - - 没有可用订单/(ㄒoㄒ)/~~ - - - - - - 订单号:{{item.sNo}} - - - 等待买家付款 - - - - 待付款 + + + + + 暂无数据 + - - - - - - - - - - {{list.p_name}} - [{{list.size}}] - - - ¥ {{list.p_price}} - x{{list.num}} - - - - - - - 合计: - ¥ {{item.z_price}} - ¥ {{item.total}} - - - - 立即支付 - - - - - - - - - - - - 没有可用订单/(ㄒoㄒ)/~~ - - - - - - 订单号:{{item.sNo}} - - - 等待卖家发货 - - - - 拼团成功-待发货 - - - - - - - - - - {{list.p_name}} - [{{list.size}}] - - - ¥ {{list.p_price}} - x{{list.num}} - - - - - - - 合计: - ¥ {{item.z_price}} - ¥ {{item.total}} - - - - 订单详情 - 提醒发货 - 提醒发货 - 分享好友 - - - - - - - - - - - - 没有可用订单/(ㄒoㄒ)/~~ - - - - - - 订单号:{{item.sNo}} - - - 等待买家收货 - - - - 拼团成功-已发货 - - - - - - - - - - {{list.p_name}} - [{{list.size}}] - - - ¥ {{list.p_price}} - x{{list.num}} - - - - - - - 合计: - ¥ {{item.z_price}} - ¥ {{item.total}} - - - - 订单详情 - - - - 确认收货 - 确认收货 - 分享好友 - - - - - - - - - - - - 没有可用订单/(ㄒoㄒ)/~~ - - - - - - 订单号:{{item.sNo}} - - - 等待买家评价 - - - - 拼团成功-已签收 - - - - - - - - - - {{list.p_name}} - [{{list.size}}] - - - ¥ {{list.p_price}} - x{{list.num}} - - - - - - - 合计: - ¥ {{item.z_price}} - ¥ {{item.total}} - - - - 订单详情 - - 立即评价 - 立即评价 - 分享好友 - - - - - - - + \ No newline at end of file diff --git a/pages/order/order.wxss b/pages/order/order.wxss index dd414ae..b95735d 100644 --- a/pages/order/order.wxss +++ b/pages/order/order.wxss @@ -1,403 +1,228 @@ +/* pages/order/order.wxss */ page{ - height: 100%; - width: 100%; + background: #F5F5F5; } -.scimg { - width:246rpx; - height:246rpx; -} -.swiper-tab{ - width: 100%; - border-bottom: 1px solid #eee; - text-align: center; - line-height: 80rpx; - background: #fff; - position: fixed; - top: 0; - z-index: 999; - } -.swiper-tab-list{ - font-size: 12px; - display: inline-block; - width: 20%; - color: #666; - } -.on{ - color: #dd2727; - border-bottom: 5rpx solid #dd2727; - } - -.swiper-box{ - display: block; - height: 100%; - width: 100%; - overflow: hidden; - /* iPhoneX底部适配 */ - padding-bottom: env(safe-area-inset-bottom); -} - -.clearbutton{ - background: #fff; - display: inline-block; - margin:3% 3% 2% 3%; - color: #dd2727; - font-size: 14px; - width: 94%; -} -button::after{ -border: none; -} -.shop{ - background: #fafafa; - padding: 15px; - border-bottom:1px solid #eee; -} -.shop checkbox{ - margin-top: 27px; - } -.sh_slt{ - width: 65px; - height: 65px; - overflow: hidden; - border-radius: 5px; - margin-right: 4%; - float: left; -} -.sp_text{ - display:flex; - line-height: 20px; - width: 100%; - text-align: left; - padding-left:10px; -} -.sp_tit{ - width: 100%; - overflow: hidden; - font-size: 12px; - -webkit-line-clamp:2; -} -.guige{ - font-size:12px; - color:#808080; - text-align:right; -} - - - -.sp_neb{ - width: 100%; - overflow: hidden; - font-size: 13px; - color: #999; -} -.sp_jg{ - width: 30%; - overflow: hidden; - font-size: 13px; - color: #fc0628; -} -.dle{ - color: #999; - font-size: 12px; - float: right; -} -.dle image{ - width: 18px; - height: 18px; - vertical-align: sub; -} -.jk_bottom{ - position: fixed; - bottom: 0; - background: #fff; - width: 100%; - display: inline-flex; - border-bottom: 1px solid #eee; - font-size: 14px; - color: #999; -} -.jk_bottom checkbox{ - margin: 4% 0 4% 4%; -} -.jk_bottom .heji{ - margin-top: 5.5%; - width: 30%; - text-align: right; -} -.jk_bottom .all{ - margin-top: 5.5%; - padding-left: 2%; -} -.jk_bottom .js_button{ - background: #dd2727; - float: right; - color: #fff; - font-size: 16px; - text-align: center; - width: 40%; - position: absolute; - right: 0; - line-height: 50px; -} -.c_t60{ - clear: both; - height: 1px; - padding-top: 35px; -} -.blue{ - color: #42b1ff; -} -.mr_5{ - margin-right: 5px; -} -.top{ - padding: 15px; - font-size:12px; -} -.font_12{ - padding: 5px 10px; - border-radius:15px; - color:#fff; - width:55px; - text-align:center; - line-height:15px; - height:15px; -} -.bottom{ - border-top:1px #eee solid; - height:36px; - margin:auto; - display:flex; - justify-content:flex-end; - align-items:center; -} -.total{ - font-size:14px; - padding-bottom:3px; - height:28px; - /* padding-right:14px; */ -} - -.zhifu{ - height:28px; - line-height:28px; - float:right; - padding-right:4%; -} - -.tab_statu{ - float: right; - font-size: 13px; - color: #FF6347; -} -.tab_tab{ - background:#fff; - margin-bottom:8px; -} -scroll-view { - background:#eee; -} -.person_box{ - position: relative; -} -.phone_select{ - margin-top:0; - z-index: 100; - position: absolute; /*//小程序中z-index和absolute需要同时存在,元素才能脱离文档。 */ -} -.select_one{ - text-align: center; - background-color:rgb(239, 239, 239); - width:100%; /* //脱离文档后元素width不能再用百分比。 */ - height:100rpx; - line-height:100rpx; - margin:0 5%; - border-bottom:2rpx solid rgb(255, 255, 255); -} - -/*下拉*/ -.product-list { - min-height: 100vh; - background-color: #f0f0f0; - padding-top: 80rpx; - box-sizing: border-box; -} - -/*条件选择*/ - -.choice-bar { +.tab-view{ position: fixed; - top: 0; - display: flex; - width: 100vw; - font-size: 16px; + width: 100%; + height: 100rpx; background-color: #fff; - z-index: 9; + white-space: nowrap; } - -.chioce-item { +.tab-itemActive{ + color: #454553; + width: 20%; + height: 100rpx; + line-height: 100rpx; + text-align: center; + font-size: 30rpx; + font-weight: bold; + display: inline-block; +} +.tab-item { + color: #9fa5b6; + width: 20%; + height: 100rpx; + line-height: 100rpx; + text-align: center; + font-size: 30rpx; + display: inline-block; +} +.tab-lineActive{ + width: 78rpx; + height: 6rpx; + margin-top: -10rpx; + margin-left: 25%; + background-color: #F95B43; + z-index: 655; +} +.tab-badge{ + position: absolute; + margin-top: -80rpx; + margin-left: 45rpx; + width: 35rpx; + height: 35rpx; + border-radius: 17.5rpx; + line-height: 35rpx; + font-size: 28rpx; + text-align: center; + font-weight: normal; + color: white; + background-color: red; +} +.tab-line{ + width: 100%; + height: 2rpx; + margin-top: -8rpx; background-color: #fff; - display: flex; - align-items: center; - justify-content: space-between; - padding: 0 20rpx; - width: 33.33%; - height: 80rpx; - border-top: 1rpx solid #ddd; - border-bottom: 1rpx solid #ddd; - border-left: 1rpx solid #ddd; - /*border-right: 1rpx solid #ddd;*/ -} - -.chioce-item-last { - border-right: none; } - -.chioce-item-first { - border-left: none; +/*list*/ +.list-container{ + background: #F5F5F5; } - -.icon-chioce { - height: 30rpx; - width: 30rpx; +.list-cell{ + display: inline-table; + width: 95%; + margin:20rpx 2.5% 0rpx 2.5%; /*上-右-下-左*/ + padding-bottom: 15rpx; + background: white; + /* box-shadow:0 6rpx 10rpx 2rpx #807e7a99; */ + border-radius: 10rpx; } -.mask{ - position: fixed; - top:0; - bottom: 0; - right: 0; - left: 0; - background-color: #000; - opacity: 0.5; +.list-cell image{ + width: 345rpx; + height: 345rpx; } -.district-list,.sorting-list,.filter-list { - margin-top: 2rpx; +.list-cell .imageSrc{ position: absolute; - top: 80rpx; - left: 10px; - width: 100%; - background-color: #fff; - z-index: -1; - font-size: 14px; - border-bottom: 1rpx solid #ddd; + margin-top: 20rpx; + margin-left: 20rpx; + width: 104rpx; } -.iconfont { - font-size:9px; - margin:0; - padding:0; +.shopView { + display:flex; + align-items: center; + height: 85rpx; } -.xzbg{ - color: #fff; +.shopView image { + width: 40rpx; + height: 40rpx; + margin-left: 25rpx; } -.chioce-list-show { - top: 110rpx; - animation: slide 500ms; - width:25%; - border:1px solid red; - border-radius:5px; - font-size:12px; +.shopView text{ + margin-left: 12rpx; + font-size: 32rpx; + color: #333333; } - -@keyframes slide { - 0% { - top: -500rpx; - } - - 100% { - top: 80rpx; - } +.shopView .jiantou-img { + width: 25rpx; + height: 25rpx; + margin-left: 20rpx; } - -.chioce-list-hide { - display: none !important; +.shopView .statusLabel{ + position: absolute; + right: 45rpx; + color: #FA5151; + font-size: 30rpx; + height: 40rpx; + line-height: 40rpx; } - -/*区域位置*/ - -.district-list { +.goodsView{ display: flex; + flex-direction: row; } - -.district-left { - flex-grow: 1; -} - -.district-right { - flex-grow: 4; +.goodsView .goodsImg { + margin-left: 20rpx; + width: 150rpx; + height: 150rpx; } -.scroll-district{ - height: 500rpx; -} -.district-parent { - height: 100rpx; - line-height: 100rpx; - padding: 0 40rpx; - border-bottom: 1rpx solid #ddd; - border-right: 1rpx solid #ddd; - background-color: #f0f0f0; +.goodsView .content{ + display: flex; + flex-direction: column; + justify-content: center; + margin-left: 25rpx; +} +.content .title{ + /* margin-top: 10rpx; */ + color: #333333; + font-size: 36rpx; + max-width: 480rpx; + overflow: hidden; + text-overflow: ellipsis; /*超出省略号*/ + white-space: nowrap; + font-weight: bold; + height: 40rpx; + line-height: 40rpx; + /*-webkit-line-clamp: 2; /*控制行数*/ +} +.content .spec{ + margin-top: 25rpx; + color: #999999; + font-size: 30rpx; + max-width: 480rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + height: 40rpx; + line-height: 40rpx; } - -.district-parent-active { - background-color: #fff; +.priceView{ + margin-top: 30rpx; + display: flex; + height: 40rpx; } - -.district-children { - height: 100rpx; - line-height: 100rpx; - padding: 0 40rpx; - border-bottom: 1rpx solid #ddd; +.priceView .price{ + color: #FA5151; + font-size: 36rpx; + line-height: 40rpx; } - -/*综合排序*/ - -.sorting-item { - height: 80rpx; - line-height: 80rpx; - /* padding: 0 40rpx; */ - border-bottom: 1rpx solid #eee; +.priceView .quantity{ + position: absolute; + right: 45rpx; + color: #9d9d9d; + font-size: 28rpx; + line-height: 40rpx; } - -/*筛选*/ - -.filter-item { - height: 80rpx; - line-height: 80rpx; - padding: 0 40rpx; - border-bottom: 1rpx solid #ddd; +.bottomView{ display: flex; - justify-content: space-between; + flex-direction: row; + margin-top: 15rpx; + margin-bottom: 15rpx; align-items: center; + box-sizing: border-box; + height: 70rpx; } - -.icon-selected { - height: 30rpx; - width: 30rpx; -} - -.filter-footer { - display: flex; - justify-content: space-between; -} - -.filter-footer button { - margin: 20rpx 80rpx; - border-radius: 0 !important; +.normalBtn{ + position: absolute; + right: 225rpx; + padding: 5rpx 22rpx; + font-size: 28rpx; + color: #999999; + border: 1px solid #FA5151; + height: 50rpx; + line-height: 50rpx; + border-radius: 50rpx; +} +.confirmBtn{ + position: absolute; + right: 45rpx; + padding: 5rpx 22rpx; + font-size: 28rpx; + color: #FA5151; + border: 1px solid #FA5151; + height: 50rpx; + line-height: 50rpx; + border-radius: 50rpx; +} +.deleteBtn{ + position: absolute; + right: 410rpx; + padding: 5rpx 22rpx; + font-size: 28rpx; + color: #999999; + border: 1px solid #FA5151; + height: 50rpx; + line-height: 50rpx; + border-radius: 50rpx; +} +.noMoreData{ + padding-top: 100rpx; + line-height: 100rpx; + height: 100rpx; + width: 100%; + font-size: 32rpx; + text-align: center; + color: #454553; } - -.button-reset { - border: 1rpx solid #ddd !important; - color: #666 !important; +.scrollView { + flex-grow: 1; + padding:0rpx; + padding-top: 100rpx; } - -/* 小标签 */ -.noe { - display: block; - border-width: 10px; - position: absolute; - left: 10px; - top: -20px; - border-style: solid dashed dashed; - border-color: transparent transparent red transparent; - font-size: 0; - line-height: 0; +.loading,.complete { + width: 100%; + padding: 30rpx 0rpx; + text-align: center; + font-size: 24rpx; + color: #9fa4b6; } \ No newline at end of file diff --git a/pages/order/pay.js b/pages/order/pay.js index 8de4e9f..d6dbde4 100644 --- a/pages/order/pay.js +++ b/pages/order/pay.js @@ -77,10 +77,6 @@ Page({ console.log(options) var that = this; that.get_plug(); - // wx.setNavigationBarColor({ - // frontColor: app.d.frontColor, // - // backgroundColor: app.d.bgcolor //设置页面参数 - // }) var uid = app.globalData.userInfo.openid; // 微信id var plug_ins = app.globalData.userInfo.plug_ins; // 插件 diff --git a/pages/order/pay.wxml b/pages/order/pay.wxml index 7314f25..6140078 100644 --- a/pages/order/pay.wxml +++ b/pages/order/pay.wxml @@ -49,7 +49,7 @@ - + {{item.shop_name}} diff --git a/pages/order/pay.wxss b/pages/order/pay.wxss index 602a086..ec6230f 100644 --- a/pages/order/pay.wxss +++ b/pages/order/pay.wxss @@ -743,21 +743,21 @@ left:-13px; .p_all { border-bottom:1px solid #eee; } -.shop-view { +.shopView { display:flex; height: 85rpx; align-items: center; } -.shop-view image { +.shopView image { width: 40rpx; height: 40rpx; margin-left: 25rpx; } -.shop-view text{ +.shopView text{ margin-left: 12rpx; font-size: 28rpx; } -.shop-view .jiantou-img { +.shopView .jiantou-img { width: 25rpx; height: 25rpx; margin-left: 20rpx; diff --git a/pages/order/payment.wxml b/pages/order/payment.wxml index 861794d..32656b9 100644 --- a/pages/order/payment.wxml +++ b/pages/order/payment.wxml @@ -18,16 +18,16 @@ diff --git a/pages/order/payment.wxss b/pages/order/payment.wxss index b591221..d8eda3b 100644 --- a/pages/order/payment.wxss +++ b/pages/order/payment.wxss @@ -9,6 +9,11 @@ page { height: 60rpx; background-color: white; } +.codeView .name{ + margin-left: 24rpx; + font-size: 28rpx; + color: #999999; +} .codeView .order{ font-size: 28rpx; color: #333333; @@ -77,17 +82,19 @@ page { background-color: white; } .titleView{ + display: flex; height: 90rpx; line-height: 90rpx; border-bottom: solid 1px #F6F6F6; } -.name{ +.titleView .name{ margin-left: 24rpx; font-size: 28rpx; color: #999999; + width: 125rpx; } -.detail{ - margin-left: 100rpx; +.titleView .detail{ + margin-left: 80rpx; font-size: 28rpx; color: #333333; } diff --git a/pages/product/detail.js b/pages/product/detail.js index d334d7c..8ab2eaf 100644 --- a/pages/product/detail.js +++ b/pages/product/detail.js @@ -155,14 +155,6 @@ Page({ // console.log(app.globalData.userInfo, 'openid') // if (openid) { var bgcolor = app.d.bgcolor; - // wx.setNavigationBarColor({ - // frontColor: app.d.frontColor, - // backgroundColor: bgcolor, // 页面标题为路由参数 - // animation: { - // duration: 400, - // timingFunc: 'easeIn' - // } - // }); WXAPI.productIndex({ accessId: app.globalData.accessId, diff --git a/pages/return_goods/index.js b/pages/return_goods/index.js index 077ccb5..a355a7a 100644 --- a/pages/return_goods/index.js +++ b/pages/return_goods/index.js @@ -24,18 +24,6 @@ Page({ */ onLoad: function (options) { console.log(options) - wx.setNavigationBarColor({ - frontColor: app.d.frontColor, - backgroundColor: app.d.bgcolor, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }) - this.setData({ - currentTab: parseInt(options.currentTab), - bgcolor: app.d.bgcolor - }); this.loadList(); }, //页面加载完成函数 remind: '加载中', diff --git a/pages/return_goods/return_goods.js b/pages/return_goods/return_goods.js index 222e053..b55b9a4 100644 --- a/pages/return_goods/return_goods.js +++ b/pages/return_goods/return_goods.js @@ -37,14 +37,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - wx.setNavigationBarColor({ - frontColor: app.d.frontColor, - backgroundColor: app.d.bgcolor, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }) var otype = options.type ? options.type:false; console.log(options) this.setData({ diff --git a/pages/return_goods/return_goods.wxss b/pages/return_goods/return_goods.wxss index 84de99d..571f3eb 100644 --- a/pages/return_goods/return_goods.wxss +++ b/pages/return_goods/return_goods.wxss @@ -50,7 +50,7 @@ height: 18px; display:inline-block; vertical-align: middle; - float: right; + /* float: right; */ } .zhifu{ background: #fff; diff --git a/pages/set/set.js b/pages/set/set.js index 7e58d8d..7c464ea 100644 --- a/pages/set/set.js +++ b/pages/set/set.js @@ -5,14 +5,7 @@ Page({ data: { }, onLoad: function (options) { - wx.setNavigationBarColor({ - frontColor: app.d.frontColor, - backgroundColor: app.d.bgcolor, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }); + }, onReady: function () { diff --git a/pages/sign_in/sign_in.js b/pages/sign_in/sign_in.js index fb90e42..b266578 100644 --- a/pages/sign_in/sign_in.js +++ b/pages/sign_in/sign_in.js @@ -21,14 +21,6 @@ Page({ }); }, onLoad: function () { - wx.setNavigationBarColor({ - frontColor: app.d.frontColor, - backgroundColor: app.d.bgcolor, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }); console.log(app) console.log('app' + app.globalData.userInfo.sign_status) let now = new Date(); diff --git a/pages/sign_in/sign_in.wxml b/pages/sign_in/sign_in.wxml index a7504f1..d81e02f 100644 --- a/pages/sign_in/sign_in.wxml +++ b/pages/sign_in/sign_in.wxml @@ -78,7 +78,7 @@ - + 恭喜你今日签到成功 {{sign_score}}积分 diff --git a/pages/user/recharge.js b/pages/user/recharge.js index 46b31d7..ee8bebf 100644 --- a/pages/user/recharge.js +++ b/pages/user/recharge.js @@ -27,17 +27,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - wx.setNavigationBarColor({ - frontColor: app.d.frontColor,// - backgroundColor: app.d.bgcolor, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }) - this.setData({ - bgcolor: app.d.bgcolor - }); var that = this; wx.request({ url: app.d.ceshiUrl + '&action=recharge&m=index', diff --git a/pages/user/score.js b/pages/user/score.js index e87b7e4..afd495a 100644 --- a/pages/user/score.js +++ b/pages/user/score.js @@ -22,13 +22,6 @@ Page({ }, onLoad: function () { var that = this; - that.setData({ - bgcolor: app.d.bf_color - }) - wx.setNavigationBarColor({ - frontColor: app.d.frontColor, - backgroundColor: app.d.bf_color, - }); wx.setNavigationBarTitle({ title: '个人积分中心', }) diff --git a/pages/user/transfer.js b/pages/user/transfer.js index a12eefd..ba6f3a7 100644 --- a/pages/user/transfer.js +++ b/pages/user/transfer.js @@ -23,16 +23,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - - wx.setNavigationBarColor({ - frontColor: app.d.frontColor,// - backgroundColor: app.d.bgcolor, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }) - wx.checkSession({ success: function (e) { console.log(e) diff --git a/pages/user/transfer1.js b/pages/user/transfer1.js index 79b3c61..fd99ae3 100644 --- a/pages/user/transfer1.js +++ b/pages/user/transfer1.js @@ -24,15 +24,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - wx.setNavigationBarColor({ - frontColor: app.d.frontColor,// - backgroundColor: app.d.bgcolor, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }) - wx.checkSession({ success: function (e) { console.log(e) diff --git a/pages/user/transfer_jifen.js b/pages/user/transfer_jifen.js index 3d1cc3c..10e22e7 100644 --- a/pages/user/transfer_jifen.js +++ b/pages/user/transfer_jifen.js @@ -24,15 +24,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - wx.setNavigationBarColor({ - frontColor: app.d.frontColor,// - backgroundColor: app.d.bgcolor, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }) - wx.checkSession({ success: function (e) { //session_key 未过期,并且在本生命周期一直有效 diff --git a/pages/user/user.js b/pages/user/user.js index 13415e6..7ea67ae 100644 --- a/pages/user/user.js +++ b/pages/user/user.js @@ -62,19 +62,11 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - // wx.setNavigationBarColor({ - // frontColor: app.d.frontColor, - // backgroundColor: app.d.bgcolor, //页面标题为路由参数7a896c app.d.bgcolor - // animation: { - // duration: 400, - // timingFunc: 'easeIn' - // } + // var plug_ins = app.globalData.userInfo.plug_ins; // 插件 + // this.setData({ + // bgcolor: app.d.bgcolor, // 背景颜色 + // plug_ins: plug_ins, // 插件 // }); - var plug_ins = app.globalData.userInfo.plug_ins; // 插件 - this.setData({ - bgcolor: app.d.bgcolor, // 背景颜色 - plug_ins: plug_ins, // 插件 - }); this.requestMyData(); }, //页面加载完成函数 diff --git a/pages/user/user.wxml b/pages/user/user.wxml index c3f2941..894d39c 100644 --- a/pages/user/user.wxml +++ b/pages/user/user.wxml @@ -47,7 +47,7 @@ - + 我的订单 @@ -60,7 +60,7 @@ - + {{dfk_num}} @@ -70,7 +70,7 @@ - + {{dfh_num}} @@ -80,7 +80,7 @@ - + {{dsh_num}} @@ -90,7 +90,7 @@ - + {{dpj_num}} diff --git a/pages/user/wallet.js b/pages/user/wallet.js index 36ddb27..d5aa010 100644 --- a/pages/user/wallet.js +++ b/pages/user/wallet.js @@ -22,17 +22,6 @@ Page({ wx.stopPullDownRefresh() //停止下拉刷新 }, onLoad: function (options) { - wx.setNavigationBarColor({ - frontColor: app.d.frontColor,// - backgroundColor: app.d.bf_color, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }) - this.setData({ - bgcolor: app.d.bf_color - }); this.requestMyData(); }, /** diff --git a/pages/user/withdrawals.js b/pages/user/withdrawals.js index cdbdcc0..4ddb8e4 100644 --- a/pages/user/withdrawals.js +++ b/pages/user/withdrawals.js @@ -24,14 +24,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - wx.setNavigationBarColor({ - frontColor: app.d.frontColor,// - backgroundColor: app.d.bgcolor, //页面标题为路由参数 - animation: { - duration: 400, - timingFunc: 'easeIn' - } - }) wx.checkSession({ success: function (e) { app.globalData.userInfo['session_key'] = app.globalData.userInfo.session_key; diff --git a/utils/server.js b/utils/server.js index b189bbc..255599b 100644 --- a/utils/server.js +++ b/utils/server.js @@ -128,10 +128,27 @@ module.exports = { orderList: (data) => { return requestServer('&action=order&app=index', 'post', data) }, - /* -------------------- */ - productSaveFormid: (data) => { - return requestServer('&action=product&m=save_formid', 'post', data) + orderDetails: (data) => { //订单详情 + return requestServer('&action=order&app=order_details', 'post', data) + }, + logisticsDetails: (data) => { //物流详情 + return requestServer('&action=order&app=logistics', 'post', data) + }, + removeOrder: (data) => { //取消订单 + return requestServer('&action=order&app=removeOrder', 'post', data) + }, + orderRemind: (data) => { //提醒发货 + return requestServer('&action=order&app=delivery_delivery', 'post', data) + }, + confirmOrder: (data) => { //确认收货 + return requestServer('&action=order&app=ok_Order', 'post', data) }, + deleteOrder: (data) => { //删除订单 + return requestServer('&action=order&app=del_order', 'post', data) + }, + + /* -------------------- */ + userMaterial: (data) => { // return requestServer('&action=user&app=material', 'post', data) },