diff --git a/pages/cart/cart.wxss b/pages/cart/cart.wxss index ff5abf4..455d11a 100644 --- a/pages/cart/cart.wxss +++ b/pages/cart/cart.wxss @@ -274,7 +274,6 @@ page{ height: 21px!important; font-size: 28rpx; line-height: 20px; - min-height: 21px!important; color: #666 } @@ -445,7 +444,7 @@ padding-right:16px; /* overflow-y: scroll; */ } .text_center{ - width: 97%; + width: 97%; position: absolute; top: -40px; } @@ -521,14 +520,14 @@ padding-right:16px; height: 100rpx; } .stepper { - text-align: right; + /* text-align: right; */ display: flex; flex-direction: row; justify-content: space-between; align-items: center; - width: 200rpx; + width: 230rpx; overflow: hidden; - margin-left: 250rpx; + margin-left: 210rpx; background-color: #F8F8F8; border-top: 1px solid #DDD; border-bottom: 1px solid #DDD; @@ -544,7 +543,7 @@ padding-right:16px; font-weight: 900; } .stepper input { - width: 30px; + width: 60px; height: 25px; text-align: center; } diff --git a/pages/category/category.wxss b/pages/category/category.wxss index 688caff..c80b857 100644 --- a/pages/category/category.wxss +++ b/pages/category/category.wxss @@ -94,7 +94,7 @@ page{ /*给text设成块级元素*/ display: block; margin-top: 15px; - font-size: 14px; + font-size: 13px; color: black; /*设置文字溢出部分为...*/ overflow: hidden; diff --git a/pages/listdetail/listdetail.js b/pages/listdetail/listdetail.js index 71e3355..ba7ba44 100644 --- a/pages/listdetail/listdetail.js +++ b/pages/listdetail/listdetail.js @@ -23,10 +23,11 @@ Page({ loading: false,//显示加载 period: false,//显示无数据 select: 0,//选中 - sort: 0,// 1 asc 升序 0 desc 降序 + sort: '',// 1 asc 升序 0 desc 降序 types: '刷新', // 点击更多、下拉上啦刷新 bg: '', attrList: [], + sortType: '', }, onPullDownRefresh: function () { console.log(111) @@ -92,7 +93,8 @@ Page({ page: page, pro:'', keyword:'', - sort_criteria: sort, + sort_criteria: that.data.sortType, + sort: sort, query_criteria: '',//'{"brand_id":"","min_price":"","max_price":""}', }).then(res => { if (res.code == 200) { @@ -220,7 +222,8 @@ Page({ var that = this; this.setData({ select: 0, - sort: 1, + sort: '', + sortType: '', imageurl1: "../../images/mo.png", imageurl2: "../../images/mo.png", page: 1, @@ -234,17 +237,18 @@ Page({ if (this.data.daindex1 == 0) { this.setData({ imageurl1: "../../images/xia.png", - daindex1: 1, + daindex1: 'desc', imageurl2: "../../images/mo.png", }) } else { this.setData({ imageurl1: "../../images/shang.png", - daindex1: 0, + daindex1: 'asc', imageurl2: "../../images/mo.png", }) } this.setData({ + sortType: 'volume', select: 1, sort: that.data.daindex1, page: 1, @@ -258,17 +262,18 @@ Page({ if (this.data.daindex2 == 0) { this.setData({ imageurl2: "../../images/shang.png", - daindex2: 1, + daindex2: 'asc', imageurl1: "../../images/mo.png", }) } else { this.setData({ imageurl2: "../../images/xia.png", imageurl1: "../../images/mo.png", - daindex2: 0 + daindex2: 'desc' }) } this.setData({ + sortType: 'price', select: 2, sort: that.data.daindex2, page: 1, diff --git a/pages/listdetail/listdetail.wxml b/pages/listdetail/listdetail.wxml index f4b096b..e609902 100644 --- a/pages/listdetail/listdetail.wxml +++ b/pages/listdetail/listdetail.wxml @@ -38,10 +38,10 @@ 价格 - + diff --git a/pages/listdetail/listdetail.wxss b/pages/listdetail/listdetail.wxss index f5b5654..4d9eaad 100644 --- a/pages/listdetail/listdetail.wxss +++ b/pages/listdetail/listdetail.wxss @@ -2,6 +2,14 @@ page { height: 100%; background: #f5f5f5 } +.sort-btn{ + width:33%; + text-align: center; + height:90rpx; + line-height:90rpx; + font-size: 28rpx; + color:#333; +} .bxs{ display:none; } diff --git a/pages/login/login.js b/pages/login/login.js index c17c77b..2ec4684 100644 --- a/pages/login/login.js +++ b/pages/login/login.js @@ -160,30 +160,36 @@ Page({ }) }, loginAct: function () { - var that = this; - WXAPI.login({ - storeId: 239, - storeType: 1, - phone: that.data.account, - password: that.data.password, - }).then(res => { - if (res.code == 200) { - var data = res.data - app.globalData.accessId = data.access_id; - wx.setStorageSync('accessId', data.access_id) - wx.setStorageSync('isLogin', true); - wx.setStorageSync('userInfo', data.data); - wx.navigateBack() - wx.showToast({ - title: '登录成功!', - success: 2000 + var that = this; + wx.login({ + success: function (res) { + var code = res.code; + WXAPI.login({ + storeId: 239, + storeType: 1, + account: that.data.account, + password: that.data.password, + code: code, + }).then(res => { + if (res.code == 200) { + var data = res.data + app.globalData.accessId = data.access_id; + wx.setStorageSync('accessId', data.access_id) + wx.setStorageSync('isLogin', true); + wx.setStorageSync('userInfo', data.data); + wx.navigateBack() + wx.showToast({ + title: '登录成功!', + success: 2000 + }); + } else { + wx.showToast({ + title: res.message, + icon: 'none', + duration: 1500, + }) + } }); - } else { - wx.showToast({ - title: res.message, - icon: 'none', - duration: 1500, - }) } }); }, diff --git a/pages/order/order.wxml b/pages/order/order.wxml index a61c1bb..bca46f8 100644 --- a/pages/order/order.wxml +++ b/pages/order/order.wxml @@ -28,7 +28,7 @@ {{item.size}} ¥{{item.p_price}} - 共 {{item.num}} {{item.unit}} + 共 {{item.num}} {{item.unit==null?'':item.unit}} diff --git a/pages/order/pay.js b/pages/order/pay.js index e220856..aca6898 100644 --- a/pages/order/pay.js +++ b/pages/order/pay.js @@ -228,14 +228,14 @@ Page({ pays: pays, }); } else { - that.setData({ - remind: true - }); wx.showToast({ title: res.message, icon: 'none', duration: 2000, }); + setTimeout(function () { + wx.navigateBack() + }, 600) } }); }, @@ -560,6 +560,9 @@ Page({ // 确认订单 createProductOrder: function () { var that = this; + var remarkArr = [] + remarkArr.push(that.data.remark) + let remarkStr = JSON.stringify(remarkArr) WXAPI.orderPayment({ accessId: app.globalData.accessId, storeId: 239, @@ -567,7 +570,7 @@ Page({ cart_id: that.data.cartId, address_id: that.data.addrId, coupon_id: 0, - remarks: that.data.remark, + remarks: remarkStr, vipSource: 0, product: that.data.productAry, pay_type: that.data.paytype, diff --git a/pages/product/detail.js b/pages/product/detail.js index cb8a183..451eb6e 100644 --- a/pages/product/detail.js +++ b/pages/product/detail.js @@ -294,6 +294,12 @@ Page({ } }; }, + //数量 + bindManual: function (e) { + this.setData({ + buynum: e.detail.value + }) + }, //首次进去选中 one: function () { var attrListIn = this.data.attrList; diff --git a/pages/product/detail.wxml b/pages/product/detail.wxml index 90a8295..abea099 100644 --- a/pages/product/detail.wxml +++ b/pages/product/detail.wxml @@ -133,7 +133,7 @@ - - {{buynum}} + + diff --git a/pages/product/detail.wxss b/pages/product/detail.wxss index 5dc1d25..4a885fa 100644 --- a/pages/product/detail.wxss +++ b/pages/product/detail.wxss @@ -400,7 +400,7 @@ page{ flex-direction: row; justify-content: space-between; align-items: center; - width: 200rpx; + width: 230rpx; overflow: hidden; margin-left: 250rpx; background-color: #F8F8F8; @@ -418,7 +418,7 @@ page{ font-weight: 900; } .stepper input { - width: 30px; + width: 60px; height: 25px; text-align: center; }