From dc1d5241f1d45c23667eeff5644c212472d4feeb Mon Sep 17 00:00:00 2001 From: initwithout Date: Sat, 15 Apr 2023 10:45:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9D=80=E7=BC=96=E8=BE=91=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20=E6=96=B0=E5=A2=9E=E5=85=AC=E5=AF=B9=E5=85=AC?= =?UTF-8?q?=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- images/公对公.png | Bin 0 -> 3351 bytes pages/address/address.js | 10 +- pages/address/address.wxml | 5 + pages/address/address.wxss | 13 ++- pages/address/index.wxml | 11 +- pages/address/index.wxss | 4 +- pages/address/upaddress.js | 15 ++- pages/address/upaddress.wxml | 4 + pages/address/upaddress.wxss | 12 ++- pages/cart/cart.js | 2 +- pages/index/index.js | 40 ++++---- pages/new/new.js | 1 + pages/order/order.js | 188 +++++++++++++++++++---------------- pages/order/order.wxml | 2 +- pages/order/order.wxss | 5 +- pages/order/pay.js | 4 +- pages/order/payment.js | 9 +- pages/user/user.js | 48 ++++----- pages/user/user.json | 3 +- pages/user/user.wxml | 10 +- pages/user/user.wxss | 23 +++-- 21 files changed, 234 insertions(+), 175 deletions(-) create mode 100644 images/公对公.png diff --git a/images/公对公.png b/images/公对公.png new file mode 100644 index 0000000000000000000000000000000000000000..c2c1bb5b131cc2436abe7f228c0d70f849e8b526 GIT binary patch literal 3351 zcmV+y4e0WTP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91K%fHv1ONa40RR91KmY&$07g+lumAuIfk{L`RCod1TX}R;)fxZpeQ##6 zCjBgk(Q@!_?I}l&)gn|3(2_1%T%ayV z1=Jd>b%BGmk{E~-!WJNenR!cp-M1`nECa7u9K}I zvO)Nbjf=~2NWV!D=4_M9No0yDRS_lJmto=wB!;k2T>}ilf09yI?+x8Ng_z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dw7~)dYgYD|p7CsMRx8yd35AS+2;E6acQsXKi5uk6kSw1V^~W zX}r#CK4Wi>lP+z#X0DvEtnT%6o7);r{v}4hug$`w=^cbf>t}80c9gAptnwV^0|C8} z4@KJ%o_VsR0U;rFJU=(DP%U1K-w`~{Conl-${?K&k;~}Hxd_fPTNxfw+-J;-zF&J+ z)t|RZEF%Cyo$P+GcC4w0CqU#LUTCWT4zh&3iZcMR1rU6woBGa+3T+9M3vVyH^9 hck%BpM$&Wo{{M~R4Y|pnxw!xU002ovPDHLkV1n) { if (res.code == 200) { diff --git a/pages/address/address.wxml b/pages/address/address.wxml index 07a70e3..639cc13 100644 --- a/pages/address/address.wxml +++ b/pages/address/address.wxml @@ -24,6 +24,11 @@ 详细地址: + + 默认地址 + + + diff --git a/pages/address/address.wxss b/pages/address/address.wxss index db4ee6b..e7d1a6a 100644 --- a/pages/address/address.wxss +++ b/pages/address/address.wxss @@ -3,10 +3,12 @@ padding: 10px; border-bottom: 1px solid #dadada; width:95%; + display: flex; + align-items: center; } .section_right{ - float:right; -margin-top:-21px; + position: absolute; + right: 28rpx; } .xzdq{ width: 0; @@ -16,7 +18,11 @@ margin-top:-21px; width: 10px; height: 10px; } - +.section_switch{ + position: absolute; + right: 8rpx; + transform: scale(0.7); +} .section_1{ text-align: center; padding: 10px; @@ -50,7 +56,6 @@ margin-left:16px; .btn-area{ color:#ffffff !important; } - .animation-element-wrapper { display: flex; position: fixed; diff --git a/pages/address/index.wxml b/pages/address/index.wxml index d5a49b9..bb345a6 100644 --- a/pages/address/index.wxml +++ b/pages/address/index.wxml @@ -12,7 +12,7 @@ {{item.tel}} {{item.address_xq}} - + @@ -28,19 +28,14 @@ - - - 设置默认地址 - + 默认地址 - - - + 编辑 删除 diff --git a/pages/address/index.wxss b/pages/address/index.wxss index 41f4d66..5da9861 100644 --- a/pages/address/index.wxss +++ b/pages/address/index.wxss @@ -9,9 +9,7 @@ page { overflow-x: hidden; } .address_text{ - position: absolute; - top: 2px; - left:30px; + margin-left: 0rpx; color: #FF6347; } .add_icon{ diff --git a/pages/address/upaddress.js b/pages/address/upaddress.js index 4b6dc49..b967fc3 100644 --- a/pages/address/upaddress.js +++ b/pages/address/upaddress.js @@ -13,7 +13,15 @@ Page({ data: { region: ['请选择','',''], value: [0, 0, 0], - address: '' + address: '', + check: false, + }, + // 设置默认地址 + switchChange: function (e) { + var that = this; + that.setData({ + check: e.detail.value + }); }, // 下拉刷新 onPullDownRefresh: function () { @@ -42,7 +50,8 @@ Page({ region.push(options.quyu) this.setData({ address: options, - region: region + region: region, + check: options.is_default==0?false:true }); }, /** @@ -82,7 +91,7 @@ Page({ user_name: e.detail.value.user_name, mobile: e.detail.value.mobile, place: region[0]+'-'+region[1]+'-'+region[2], - is_default: 0, + is_default: that.data.check==true?1:0, address: e.detail.value.address, addr_id: that.data.address.addr_id, }).then(res => { diff --git a/pages/address/upaddress.wxml b/pages/address/upaddress.wxml index 556f406..dbfe131 100644 --- a/pages/address/upaddress.wxml +++ b/pages/address/upaddress.wxml @@ -22,6 +22,10 @@ 详细地址: + + + 默认地址 + diff --git a/pages/address/upaddress.wxss b/pages/address/upaddress.wxss index 422b5bc..543ba04 100644 --- a/pages/address/upaddress.wxss +++ b/pages/address/upaddress.wxss @@ -3,10 +3,12 @@ padding: 10px; border-bottom: 1px solid #dadada; width:95%; + display: flex; + align-items: center; } .section_right{ - float:right; - margin-top:-21px; + position: absolute; + right: 28rpx; } .xzdq{ width: 0; @@ -16,7 +18,11 @@ width: 10px; height: 10px; } - +.section_switch{ + position: absolute; + right: 8rpx; + transform: scale(0.7); +} .section_1{ text-align: center; padding: 10px; diff --git a/pages/cart/cart.js b/pages/cart/cart.js index abb950a..0dca0db 100644 --- a/pages/cart/cart.js +++ b/pages/cart/cart.js @@ -388,7 +388,7 @@ Page({ if (res.code == 200) { var data = res.data; that.setData({ - carts: data.list, + carts: data.data, selectedAllStatus: false, total: '¥0.00', remind: '' diff --git a/pages/index/index.js b/pages/index/index.js index 192d2dc..fc1f97b 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -476,26 +476,26 @@ Page({ }); }, onShareAppMessage: function (res) { - var that = this; - var id = that.data.productId; - var type1 = that.data.type1; - var uname = app.globalData.userInfo.nickName ? app.globalData.userInfo.nickName : ''; - var title = uname + '邀请你来' + that.data.mch_name; - var user_id = app.globalData.userInfo.user_id; - if (res.from === 'button') { - // 来自页面内转发按钮 - } - return { - title: title, - imageUrl: that.data.logo, - path: 'pages/index/index?userid=' + user_id, - success: function (_res) { - console.log('转发成功'); - }, - fail: function (_res) { - console.log('转发失败') - } - } + // var that = this; + // var id = that.data.productId; + // var type1 = that.data.type1; + // var uname = app.globalData.userInfo.nickName ? app.globalData.userInfo.nickName : ''; + // var title = uname + '邀请你来' + that.data.mch_name; + // var user_id = app.globalData.userInfo.user_id; + // if (res.from === 'button') { + // // 来自页面内转发按钮 + // } + // return { + // title: title, + // imageUrl: that.data.logo, + // path: 'pages/index/index?userid=' + user_id, + // success: function (_res) { + // console.log('转发成功'); + // }, + // fail: function (_res) { + // console.log('转发失败') + // } + // } }, }); \ No newline at end of file diff --git a/pages/new/new.js b/pages/new/new.js index 9c95654..e254875 100644 --- a/pages/new/new.js +++ b/pages/new/new.js @@ -164,6 +164,7 @@ Page({ accessId: app.globalData.accessId, storeId: 239, storeType: 1, + // page: page, }).then(res => { if (res.code == 200) { var data = res.data; diff --git a/pages/order/order.js b/pages/order/order.js index 570eba2..cd6f8e5 100644 --- a/pages/order/order.js +++ b/pages/order/order.js @@ -8,7 +8,7 @@ Page({ // tab切换 currentTab: 0, isStatus: 'payment', //1待付款,2待发货,3待收货 4、5已完成 - page: 0, + page: 1, refundpage: 0, ordert0: [], ordert1: [], @@ -143,6 +143,8 @@ Page({ storeId: 239, storeType: 1, queryOrderType: that.data.isStatus, + page: 1, + pagesize: 100, }).then(res => { if (res.code == 200) { var data = res.data; @@ -193,67 +195,87 @@ Page({ } } }); - // wx.request({ - // url: app.d.ceshiUrl + '&action=order&m=index', - // method: 'post', - // data: { - // openid: app.globalData.userInfo.openid, - // order_type: that.data.isStatus, - // otype: that.data.otype, - // }, - // header: { - // 'Content-Type': 'application/x-www-form-urlencoded' - // }, - // success: function (res) { - // var status = res.data.status; - // var order = res.data.order; - // switch (that.data.currentTab) { - // case 0: - // that.setData({ - // ordert0: order, - // }); - // break; - // case 5: - // that.setData({ - // ordert0: order, - // }); - // break; - // case 6: - // that.setData({ - // ordert0: order, - // }); - // break; - // case 1: - // that.setData({ - // ordert1: order, - // }); - // break; - // case 2: - // that.setData({ - // ordert2: order, - // }); - // break; - // case 3: - // that.setData({ - // ordert3: order, - // }); - // break; - // case 4: - // that.setData({ - // ordert4: order, - // }); - // break; - // } - // //console.log(that.data.ordert0) - // }, - // fail: function () { - // // fail - // wx.showToast({ - // title: '网络异常!', - // duration: 2000 - // }); - // } - // }); + }, + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + // this.getMore(); + }, + // 点击加载更多 + getMore: function (e) { + var that = this; + var page = that.data.page+1; + WXAPI.orderList({ + accessId: app.globalData.accessId, + storeId: 239, + storeType: 1, + queryOrderType: that.data.isStatus, + page: 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: + 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; + } + } + } + }); }, // 确认收货 recOrder: function (e) { @@ -464,7 +486,7 @@ Page({ var orderId = res.data.sNo; // 订单号 var oid = res.data.id; // 订单id //发送信息到客户 - that.notice(oid, order_sn, price, user_id, form_id, f_pname); + // that.notice(oid, order_sn, price, user_id, form_id, f_pname); wx.showModal({ content: "支付成功!", showCancel: false, @@ -500,26 +522,26 @@ Page({ }) }, //发送数据到客户微信上 - 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) - } - }) - }, + // 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; diff --git a/pages/order/order.wxml b/pages/order/order.wxml index 6ca58ba..ce04840 100644 --- a/pages/order/order.wxml +++ b/pages/order/order.wxml @@ -356,4 +356,4 @@ - \ No newline at end of file + diff --git a/pages/order/order.wxss b/pages/order/order.wxss index 1cca70f..dd414ae 100644 --- a/pages/order/order.wxss +++ b/pages/order/order.wxss @@ -32,8 +32,9 @@ page{ height: 100%; width: 100%; overflow: hidden; - /* margin-top: 20px */ - } + /* iPhoneX底部适配 */ + padding-bottom: env(safe-area-inset-bottom); +} .clearbutton{ background: #fff; diff --git a/pages/order/pay.js b/pages/order/pay.js index 8c47e4e..8de4e9f 100644 --- a/pages/order/pay.js +++ b/pages/order/pay.js @@ -186,7 +186,7 @@ Page({ } var pays = [] if (data.payment.bank_pay == 1) { - pays.push({'name':'银行转账','icon':'/images/order_success.png'}) + pays.push({'name':'公对公支付','icon':'/images/公对公.png'}) } // if (data.payment.wallet_pay == 1) { // pays.push({'name':'余额支付','icon':'/images/wx.png'}) @@ -536,7 +536,7 @@ Page({ remarks: '', vipSource: 0, product: that.data.productAry, - pay_type: '', + pay_type: 'bank_pay', }).then(res => { if (res.code == 200) { var data = res.data diff --git a/pages/order/payment.js b/pages/order/payment.js index 0c8f804..295bc56 100644 --- a/pages/order/payment.js +++ b/pages/order/payment.js @@ -60,7 +60,7 @@ Page({ * 生命周期函数--监听页面显示 */ onShow() { - + // wx.hideHomeButton(); //隐藏返回主页按钮 }, /** @@ -74,7 +74,12 @@ Page({ * 生命周期函数--监听页面卸载 */ onUnload() { - + wx.navigateBack({ + delta: 3 + }) + wx.navigateTo({ + url: '/pages/order/order?currentTab=0&otype=pay', + }) }, /** diff --git a/pages/user/user.js b/pages/user/user.js index bdd353b..13415e6 100644 --- a/pages/user/user.js +++ b/pages/user/user.js @@ -5,35 +5,35 @@ Page({ data: { pop: null, list: [ - { - icon: 'icon-user-bangding.png', - text: '完善资料', - url: 'bangding/bangding' - }, { - icon: 'wdsc.png', - text: '我的收藏', - url: 'collection/collection' - }, - { - icon: 'zj.png', - text: '历史记录', - url: 'footprint/footprint' - }, + // { + // icon: 'icon-user-bangding.png', + // text: '完善资料', + // url: 'bangding/bangding' + // }, { + // icon: 'wdsc.png', + // text: '我的收藏', + // url: 'collection/collection' + // }, + // { + // icon: 'zj.png', + // text: '历史记录', + // url: 'footprint/footprint' + // }, { icon: 'dz.png', text: '地址管理', url: 'address/index' }, - { - icon: 'gg.png', - text: '公告管理', - url: 'notice/notice' - }, - { - icon: 'sz.png', - text: '设置', - url: 'set/set' - } + // { + // icon: 'gg.png', + // text: '公告管理', + // url: 'notice/notice' + // }, + // { + // icon: 'sz.png', + // text: '设置', + // url: 'set/set' + // } ], cont: 1, remind: '加载中', diff --git a/pages/user/user.json b/pages/user/user.json index c7a4de6..386eaf8 100644 --- a/pages/user/user.json +++ b/pages/user/user.json @@ -1,4 +1,5 @@ { "usingComponents": {}, - "navigationBarTitleText": "个人中心" + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#eeeeee" } \ No newline at end of file diff --git a/pages/user/user.wxml b/pages/user/user.wxml index cc29612..c3f2941 100644 --- a/pages/user/user.wxml +++ b/pages/user/user.wxml @@ -27,16 +27,13 @@ - - {{user.user_name}} - - 用户ID:{{user.user_id}} - {{tjr}} - + {{user.user_name}} + 用户ID:{{user.user_id}} + {{tjr}} @@ -112,7 +109,6 @@ - diff --git a/pages/user/user.wxss b/pages/user/user.wxss index ae97f6a..936c75d 100644 --- a/pages/user/user.wxss +++ b/pages/user/user.wxss @@ -12,15 +12,17 @@ page{ text{ font-size: 16px; } -.username_font{ +.userid_font{ font-size: 13px; } .user_mc{ - /* margin-top:-35px; */ - font-size:32px; - margin-left:35px; + /* margin-top:8px; */ + margin-left:20px; color: #333333; } +.user_name{ + font-size:28px; +} .user_top{ height:420rpx; } @@ -29,6 +31,7 @@ text{ display:flex; flex-direction:row; justify-content:flex-start; + align-items: center; padding-left:20px; padding-bottom:20px; padding-top:10px; @@ -53,10 +56,10 @@ margin-bottom:10px; border-radius:5px; } .user_top_image{ - width:80px; - height: 80px; - border-radius:100px; - border:2px solid #fff; + width: 75px; + height: 75px; + border-radius:50%; + border:1px solid #fff; } @@ -127,8 +130,8 @@ border-radius:5px; color:#fff; background:red; border-radius:50%; - right:2px; - top:4px; + right:6px; + top:6px; font-size:12px; width:40rpx; height:40rpx;