diff --git a/images/公对公.png b/images/公对公.png
new file mode 100644
index 0000000..c2c1bb5
Binary files /dev/null and b/images/公对公.png differ
diff --git a/pages/address/address.js b/pages/address/address.js
index a89e89f..ec1fbb9 100644
--- a/pages/address/address.js
+++ b/pages/address/address.js
@@ -9,12 +9,20 @@ Page({
region: ['请选择','',''],
value: [0, 0, 0],
cartId: 0,
+ check: false,
},
bindRegionChange: function (e) {
this.setData({
region: e.detail.value
})
},
+ // 设置默认地址
+ switchChange: function (e) {
+ var that = this;
+ that.setData({
+ check: e.detail.value
+ });
+ },
/**
* 生命周期函数--监听页面加载
*/
@@ -69,7 +77,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: this.data.check==true?1:0,
address: e.detail.value.address,
}).then(res => {
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;