diff --git a/app.json b/app.json index 26496d9..485ee6b 100644 --- a/app.json +++ b/app.json @@ -36,8 +36,6 @@ "pages/group_buy/payfor", "pages/group_buy/cantuan", "pages/group_buy/comment", - "pages/user/transfer", - "pages/user/transfer1", "pages/login/login", "pages/notice/notice", "pages/notice/index", @@ -52,7 +50,8 @@ "pages/order/payment", "pages/store/myStore", "pages/userinfo/userinfo", - "pages/set/password" + "pages/set/password", + "pages/member/member" ], "window": { "backgroundTextStyle": "light", diff --git a/app.wxss b/app.wxss index a976369..3f24e85 100644 --- a/app.wxss +++ b/app.wxss @@ -450,10 +450,10 @@ button[type="warn"] { background-color:#fff; width: 100%; border-bottom:1px solid #eee; + display: flex; } .sort-btn{ width:25%; - float:left; text-align: center; height:90rpx; line-height:90rpx; diff --git a/images/filter.png b/images/filter.png new file mode 100644 index 0000000..307d405 Binary files /dev/null and b/images/filter.png differ diff --git a/images/member/component_lv_0.png b/images/member/component_lv_0.png new file mode 100644 index 0000000..bbd2d9b Binary files /dev/null and b/images/member/component_lv_0.png differ diff --git a/images/member/component_lv_1.png b/images/member/component_lv_1.png new file mode 100644 index 0000000..f4a16de Binary files /dev/null and b/images/member/component_lv_1.png differ diff --git a/images/member/component_lv_2.png b/images/member/component_lv_2.png new file mode 100644 index 0000000..f4bb7a9 Binary files /dev/null and b/images/member/component_lv_2.png differ diff --git a/images/member/component_lv_3.png b/images/member/component_lv_3.png new file mode 100644 index 0000000..e9d03e4 Binary files /dev/null and b/images/member/component_lv_3.png differ diff --git a/images/member/component_lv_4.png b/images/member/component_lv_4.png new file mode 100644 index 0000000..ae29830 Binary files /dev/null and b/images/member/component_lv_4.png differ diff --git a/images/member/component_lv_5.png b/images/member/component_lv_5.png new file mode 100644 index 0000000..faa2a28 Binary files /dev/null and b/images/member/component_lv_5.png differ diff --git a/images/member/component_lv_6.png b/images/member/component_lv_6.png new file mode 100644 index 0000000..62cbef7 Binary files /dev/null and b/images/member/component_lv_6.png differ diff --git a/images/member/lv_0.png b/images/member/lv_0.png new file mode 100644 index 0000000..31482b7 Binary files /dev/null and b/images/member/lv_0.png differ diff --git a/images/member/lv_1.png b/images/member/lv_1.png new file mode 100644 index 0000000..ef41e37 Binary files /dev/null and b/images/member/lv_1.png differ diff --git a/images/member/lv_2.png b/images/member/lv_2.png new file mode 100644 index 0000000..f06a9e6 Binary files /dev/null and b/images/member/lv_2.png differ diff --git a/images/member/lv_3.png b/images/member/lv_3.png new file mode 100644 index 0000000..ac4d5eb Binary files /dev/null and b/images/member/lv_3.png differ diff --git a/images/member/lv_4.png b/images/member/lv_4.png new file mode 100644 index 0000000..1a2e96d Binary files /dev/null and b/images/member/lv_4.png differ diff --git a/images/member/lv_5.png b/images/member/lv_5.png new file mode 100644 index 0000000..fe09cf1 Binary files /dev/null and b/images/member/lv_5.png differ diff --git a/images/member/lv_6.png b/images/member/lv_6.png new file mode 100644 index 0000000..7570a14 Binary files /dev/null and b/images/member/lv_6.png differ diff --git a/pages/category/category.wxml b/pages/category/category.wxml index 1537c66..4a8ea57 100644 --- a/pages/category/category.wxml +++ b/pages/category/category.wxml @@ -39,12 +39,15 @@ - + + + {{item.cate_name}} + diff --git a/pages/category/category.wxss b/pages/category/category.wxss index 6838dfb..688caff 100644 --- a/pages/category/category.wxss +++ b/pages/category/category.wxss @@ -13,7 +13,7 @@ page{ width: 100%; height: 100%; background-color: #fff; - color: #939393; + color: #888888; padding-top:47px; } /*左侧栏主盒子*/ @@ -31,14 +31,15 @@ page{ } /*左侧栏list的item*/ .nav_left .nav_left_items{ + width: 100%; /*每个高30px*/ height: 40px; /*垂直居中*/ line-height: 40px; /*再设上下padding增加高度,总高42px*/ - padding: 6px 0; + padding: 5px 0; /*只设下边线*/ - border-bottom: 1px solid #dedede; + /* border-bottom: 1px solid #dedede; */ /*文字14px*/ font-size: 14px; overflow:hidden; @@ -47,7 +48,19 @@ page{ .nav_left .nav_left_items.active{ /*背景色变成白色*/ background: #fff; - color: #7a896c; + color: #fa5151; +} +.list_cell{ + display: flex; + align-items: center; +} +.nav_left .line{ + width:6rpx; + height:45rpx; + background-color:white; +} +.nav_left .line.active{ + background-color: #fa5151; } /*右侧栏主盒子*/ .nav_right{ diff --git a/pages/coupon/index.js b/pages/coupon/index.js index 2227af2..689f5bc 100644 --- a/pages/coupon/index.js +++ b/pages/coupon/index.js @@ -31,7 +31,7 @@ Page({ bgcolor: app.d.bgcolor }); this.requestaward(); - this.mycoupon(); + // this.mycoupon(); } }, @@ -63,34 +63,17 @@ Page({ // 请求活动 requestaward: function () { var that = this; - wx.request({ - url: app.d.ceshiUrl + '&action=Coupon&m=index', - method: 'post', - data: { - openid: app.globalData.userInfo.openid, - }, - header: { - 'Content-Type': 'application/x-www-form-urlencoded' - }, - success: function (res) { - if (res.data.status == 2) { - wx.navigateBack({ - delta: 1 - }); - } else { - var list = res.data.list; - that.setData({ - list: list, - remind: '' - }); - } - - }, - error: function (e) { - wx.showToast({ - title: '网络异常!', - duration: 2000 - }); + WXAPI.couponList({ + accessId: app.globalData.accessId, + storeId: 239, + storeType: 1, + }).then(res => { + if (res.code == 200) { + var data = res.data + that.setData({ + list: data.list, + remind: '' + }) } }); }, diff --git a/pages/index/index.js b/pages/index/index.js index 13c1c87..a3389f8 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -17,6 +17,7 @@ Page({ circular: true, // 是否采用衔接滑动 scrollLeft: 0, //tab标题的滚动条位置 current: 0, //当前选中的Tab项 + scrollTop: 0, page: 1, index: 1, cont: 1, @@ -270,7 +271,7 @@ Page({ obm: function () { var that = this; var timestamp = Date.parse(new Date()); - console.log(timestamp, that.data.timestamp) + // console.log(timestamp, that.data.timestamp) if (timestamp - that.data.timestamp > 2000) { that.setData({ timestamp: timestamp, @@ -281,7 +282,6 @@ Page({ remind: '' }); that.getMore(); - }, /** * Tab的点击切换事件 @@ -465,11 +465,13 @@ Page({ url: event.currentTarget.dataset.path, }) }, - zhiding() { - wx.pageScrollTo({ - scrollTop: 0, - duration: 300 - }); + /** + * 点击按钮,滚动条回到页面顶部 + */ + backTop:function(){ + this.setData({ + scrollTop:0 + }) }, onShareAppMessage: function (res) { // var that = this; diff --git a/pages/index/index.wxml b/pages/index/index.wxml index abb6bc2..acbec51 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -79,7 +79,7 @@ - + @@ -150,7 +150,7 @@ - + 优选店铺 @@ -281,7 +281,7 @@ - + diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 5997081..313da0e 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -215,7 +215,12 @@ scroll-view{ padding-top: 190rpx; flex: auto; width: 100%; - height: 100%; + /* height: 100%; */ + /* 1.容器总高度为100vh + 2.上方搜索菜单为90rpx + 3.下方tabBar菜单的高度不用减 + */ + height: calc(100vh - 190rpx); } swiper { diff --git a/pages/listdetail/listdetail.js b/pages/listdetail/listdetail.js index e7a29d7..de58594 100644 --- a/pages/listdetail/listdetail.js +++ b/pages/listdetail/listdetail.js @@ -289,19 +289,19 @@ Page({ } }, tabchage: function () { - if (this.data.heng == 'xs') { - this.setData({ - heng: 'bxs', - shu: 'xs', - xianshi: 'icon-yduipaibanleixingduicheng' - }) - } else { - this.setData({ - heng: 'xs', - shu: 'bxs', - xianshi: 'icon-yduipaibanleixingliebiao' - }) - } + // if (this.data.heng == 'xs') { + // this.setData({ + // heng: 'bxs', + // shu: 'xs', + // xianshi: 'icon-yduipaibanleixingduicheng' + // }) + // } else { + // this.setData({ + // heng: 'xs', + // shu: 'bxs', + // xianshi: 'icon-yduipaibanleixingliebiao' + // }) + // } }, showModal: function () { // 显示遮罩层 diff --git a/pages/listdetail/listdetail.wxml b/pages/listdetail/listdetail.wxml index 96e3bbd..f4b096b 100644 --- a/pages/listdetail/listdetail.wxml +++ b/pages/listdetail/listdetail.wxml @@ -28,7 +28,7 @@ - 最新 + 综合 销量 @@ -38,8 +38,9 @@ 价格 - - + + 筛选 + diff --git a/pages/login/login.wxml b/pages/login/login.wxml index 33d104f..eb533a0 100644 --- a/pages/login/login.wxml +++ b/pages/login/login.wxml @@ -12,12 +12,12 @@ - + - + 忘记密码? diff --git a/pages/member/member.js b/pages/member/member.js new file mode 100644 index 0000000..793b0c9 --- /dev/null +++ b/pages/member/member.js @@ -0,0 +1,66 @@ +// pages/member/member.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/member/member.json b/pages/member/member.json new file mode 100644 index 0000000..9b28fef --- /dev/null +++ b/pages/member/member.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "会员中心" +} \ No newline at end of file diff --git a/pages/member/member.wxml b/pages/member/member.wxml new file mode 100644 index 0000000..c183579 --- /dev/null +++ b/pages/member/member.wxml @@ -0,0 +1,2 @@ + +pages/member/member.wxml diff --git a/pages/member/member.wxss b/pages/member/member.wxss new file mode 100644 index 0000000..f807b71 --- /dev/null +++ b/pages/member/member.wxss @@ -0,0 +1 @@ +/* pages/member/member.wxss */ \ No newline at end of file diff --git a/pages/order/pay.js b/pages/order/pay.js index 45c8a88..fb7c2d9 100644 --- a/pages/order/pay.js +++ b/pages/order/pay.js @@ -36,6 +36,7 @@ Page({ pages_sx: true, dz_stu: false, productAry: '', + remark: '', }, go: function (e) { console.log(e); @@ -134,8 +135,6 @@ Page({ // that.setData({ // remind: true // }); - - // } // }, // error: function (e) { @@ -234,6 +233,11 @@ Page({ } }); }, + remarkInput: function(e) { + this.setData({ + remark: e.detail.value + }) + }, // 点击优惠券 tapMainMenu: function (e) { // 获取当前显示的一级菜单标识 var coupon_id = e.target.id; @@ -557,7 +561,7 @@ Page({ cart_id: that.data.cartId, address_id: that.data.addrId, coupon_id: 0, - remarks: '', + remarks: that.data.remark, vipSource: 0, product: that.data.productAry, pay_type: that.data.paytype, diff --git a/pages/order/pay.wxml b/pages/order/pay.wxml index d6f21e7..d5a856a 100644 --- a/pages/order/pay.wxml +++ b/pages/order/pay.wxml @@ -83,6 +83,14 @@ 包邮 {{freight}}元 + + 订单备注 + + + + + 小计:{{total}} + 优惠券 @@ -103,7 +111,7 @@ - 选择支付方式 + 请选择支付方式 @@ -123,7 +131,7 @@ - 合计: + 付款金额: ¥ {{total}} diff --git a/pages/order/pay.wxss b/pages/order/pay.wxss index ad93656..b5419b9 100644 --- a/pages/order/pay.wxss +++ b/pages/order/pay.wxss @@ -140,6 +140,19 @@ width: 100%; .pay_zf{ border-bottom: 1px solid #eee; } +.pay_qb input{ + /* padding-top: 20rpx; */ + /* margin-right: 45rpx; */ + float: right; + text-align: right; + /* height: 100rpx; */ + width: 480rpx; + font-size: 28rpx; + color: #333333; +} +.input-placeholder{ + color: #b9b8b8; +} .pd{ padding:10px; } diff --git a/pages/set/password.js b/pages/set/password.js index 2d86adc..204bc49 100644 --- a/pages/set/password.js +++ b/pages/set/password.js @@ -7,16 +7,46 @@ Page({ * 页面的初始数据 */ data: { - + password: '', + newPwd: '', + confirmpwd: '', + }, + originalInput: function (e) { + this.setData({ + password: e.detail.value + }) + }, + passwordInput: function (e) { + this.setData({ + newPwd: e.detail.value + }) + }, + confirmInput: function (e) { + this.setData({ + confirmpwd: e.detail.value + }) }, - confirm() { + confirmAct() { + var that = this; + if (!that.data.password) { + app.toast('请输入旧密码') + return; + } + if (!that.data.newpwd) { + app.toast('请输入新密码') + return; + } + if (that.data.newpwd != that.data.confirmpwd) { + app.toast('新密码不一致') + return; + } WXAPI.updatepassword({ accessId: app.globalData.accessId, storeId: 239, storeType: 1, - password: '', - newPwd: '', - confirm: '', + password: that.data.password, + newPwd: that.data.newPwd, + confirm: that.data.confirmpwd, }).then(res => { if (res.code == 200) { wx.showToast({ diff --git a/pages/set/password.wxml b/pages/set/password.wxml index 5850559..69f4afd 100644 --- a/pages/set/password.wxml +++ b/pages/set/password.wxml @@ -1,2 +1,23 @@ -pages/set/password.wxml + + + + + + + + + + + + + + + + + + + + 确认 + + diff --git a/pages/set/password.wxss b/pages/set/password.wxss index a1b327b..60d8bc1 100644 --- a/pages/set/password.wxss +++ b/pages/set/password.wxss @@ -1 +1,79 @@ -/* pages/set/password.wxss */ \ No newline at end of file +/* pages/set/password.wxss */ +page{ + background-color: #F4F5F6; +} +.password{ + display: flex; + flex-direction:column; +} +/* 图片+输入框+下划线的父容器view */ +.userCs{ + margin-top: 50rpx; + margin-left: 30rpx; + display: flex; + width:690rpx ; + height: 110rpx ; + background-color: white; + border-radius: 20rpx; +} +/* 用户名图标 */ +.userCs .user{ + margin-top: 25rpx; + margin-left: 30rpx; + width: 55rpx; + height: 55rpx; +} +/* 用户名输入框 */ +.userCs input{ + width: 500rpx; + font-size: 30rpx ; + margin-top: 35rpx; + margin-left: 30rpx; + line-height: 55rpx; +} +/* 密码图标+输入框+小眼睛图标+下划线父容器view */ +.passwordCs{ + margin-top: 30rpx; + margin-left: 30rpx; + display: flex; + width:690rpx ; + height: 110rpx ; + background-color: white; + border-radius: 20rpx; +} +/* 密码图标 */ +.passwordCs .pass{ + margin-top: 25rpx; + margin-left: 30rpx; + width: 55rpx; + height: 55rpx; +} +/* 眼睛 图标*/ +.passwordCs .eye{ + margin-top: 5rpx; + margin-left: 65rpx; + width: 55rpx; + height: 55rpx; +} +/* 密码输入框 */ +.passwordCs input{ + width: 500rpx; + font-size: 30rpx ; + margin-top: 35rpx; + margin-left: 30rpx; + line-height: 55rpx; +} +.loginView{ + /* margin: 300rpx 90rpx 25rpx; */ + margin-top: 100rpx; + margin-left: 30rpx; + width: 690rpx; + height: 80rpx; + background-color:#F95B43; + border-radius: 20rpx; + font-size: 32rpx; + color: white; + display: flex; + align-items: center; + justify-content: center; +} diff --git a/pages/set/set.wxml b/pages/set/set.wxml index bfe3cf8..121b030 100644 --- a/pages/set/set.wxml +++ b/pages/set/set.wxml @@ -1,23 +1,23 @@ - - - + - - - - 退出登录 + + + + + +退出登录 \ No newline at end of file diff --git a/pages/set/set.wxss b/pages/set/set.wxss index 373024e..273426c 100644 --- a/pages/set/set.wxss +++ b/pages/set/set.wxss @@ -12,15 +12,15 @@ display:flex; justify-content:space-between; background:#fff; - margin:0; + /* margin:0; + padding:0; */ padding:0; color:#666; - border:0; } .function_left{ display: flex; font-size:16px; - margin-left:5px; + margin-left:12px; padding-top: 3px; } .function .iconfont { diff --git a/pages/user/score.json b/pages/user/score.json index 9e26dfe..9490954 100644 --- a/pages/user/score.json +++ b/pages/user/score.json @@ -1 +1,4 @@ -{} \ No newline at end of file +{ + "usingComponents": {}, + "navigationBarTitleText": "我的积分" +} \ No newline at end of file diff --git a/pages/user/score.wxml b/pages/user/score.wxml index 5a86561..08e1d9a 100644 --- a/pages/user/score.wxml +++ b/pages/user/score.wxml @@ -31,9 +31,6 @@ {{score}} - - 转账 - diff --git a/pages/user/transfer.js b/pages/user/transfer.js deleted file mode 100644 index ba6f3a7..0000000 --- a/pages/user/transfer.js +++ /dev/null @@ -1,65 +0,0 @@ -// pages/user/transfer.js -var app = getApp() -Page({ - /** - * 页面的初始数据 - */ - data: { - inp_money: 0, - iv: '', - encryptedData: '', - islogin: false, - remind: '加载中', - bank_name: '' - }, - //页面加载完成函数 - onReady: function () { - var that = this; - that.setData({ - remind: '' - }); - }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - wx.checkSession({ - success: function (e) { - console.log(e) - console.log('session_key 未过期' + app.globalData.userInfo.session_key) - //session_key 未过期,并且在本生命周期一直有效 - app.globalData.userInfo['session_key'] = app.globalData.userInfo.session_key; - - }, - fail: function () { - // session_key 已经失效,需要重新执行登录流程 - wx.login({ - success: function (res) { - var code = res.code; - that.globalData.code = res.code; - //取出本地存储用户信息,解决需要每次进入小程序弹框获取用户信息 - var userinfo = wx.getStorageSync('userInfo'); - that.globalData.userInfo = userinfo; - app.getUserSessionKey(code, cb); - } - }); //重新登录 - } - }); - this.setData({ - bgcolor: app.d.bf_color - }); - }, - //获取好友ID - withdrawals: function (e) { - var that = this; - var user_id = e.detail.value.user_id; - - wx.redirectTo({//跳转 - url: "../user/transfer1?user_id=" + user_id, - }) - - } - - - -}) \ No newline at end of file diff --git a/pages/user/transfer.json b/pages/user/transfer.json deleted file mode 100644 index 84503c6..0000000 --- a/pages/user/transfer.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "navigationBarTitleText": "转账给好友" -} \ No newline at end of file diff --git a/pages/user/transfer.wxml b/pages/user/transfer.wxml deleted file mode 100644 index a7e8b9b..0000000 --- a/pages/user/transfer.wxml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - 对方ID: - - - - - - - - - -
-
- diff --git a/pages/user/transfer.wxss b/pages/user/transfer.wxss deleted file mode 100644 index 9df07f4..0000000 --- a/pages/user/transfer.wxss +++ /dev/null @@ -1,97 +0,0 @@ -/* pages/user/transfer.wxss */ -page{ - background-color: rgb(240, 239, 245); -} -.page{ - width:95%; -margin:20px auto; -background-color:#fff; -border-radius:25rpx; - -} - -.balance{ - text-align: center; - padding:10px 20px; - font-size: 18px; -} -.bb{ - text-align: center; - font-size: 12px; -} -.Withdraw{ - padding: 10px 20px; -} - -.cash{ - border: 1px solid #ddd; - flex: 1; - margin-left: -1px; - font-size: 12px; - padding: 0 10px; - line-height: 30px; - height: 30px; -} - -.tx{ - /* background-color: #836FFF; */ - background-color: #48474c; - color: #fff; - text-align: center; - height: 45px; - line-height: 45px; - bottom: 0; - width: 100%; - position: fixed; -} -.Phone{ - /* border: 1px solid #ddd; - height: 40px; - line-height: 40px; - text-align: center; - border-radius:5px; */ - font-size: 28rpx; - width: 30%; - padding-left:2%; - margin-top:5px; - -} - -.section{ - padding: 12px 0; - width: 100%; - display:flex; - flex-direction:row; - font-size: 16px; - /* justify-content: center; */ -} -.inp{ - display:flex; - align-items:center; - width: 70%; - margin-top:2px; - -} -.t_3{ - margin-left: 15px; - font-size:13px; -} -.text{ - width: 27%; - text-align:center; -} -.xt{ - height:1px; -width:87%; -background:#eee; -margin:auto; - -} -.sj_btn{ - background:#FF6347; -color:#fff; - -font-size:26rpx; -margin-left:250rpx; - -} \ No newline at end of file diff --git a/pages/user/transfer1.js b/pages/user/transfer1.js deleted file mode 100644 index fd99ae3..0000000 --- a/pages/user/transfer1.js +++ /dev/null @@ -1,175 +0,0 @@ -// pages/user/transfer1.js -var app = getApp() -var WXAPI = require('../../utils/server.js'); -Page({ - /** - * 页面的初始数据 - */ - data: { - inp_money: 0, - iv: '', - encryptedData: '', - islogin: false, - remind: '加载中', - bank_name: '' - }, - //页面加载完成函数 - onReady: function () { - var that = this; - that.setData({ - remind: '' - }); - }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - wx.checkSession({ - success: function (e) { - console.log(e) - console.log('session_key 未过期' + app.globalData.userInfo.session_key) - //session_key 未过期,并且在本生命周期一直有效 - app.globalData.userInfo['session_key'] = app.globalData.userInfo.session_key; - - }, - fail: function () { - // session_key 已经失效,需要重新执行登录流程 - wx.login({ - success: function (res) { - var code = res.code; - that.globalData.code = res.code; - //取出本地存储用户信息,解决需要每次进入小程序弹框获取用户信息 - var userinfo = wx.getStorageSync('userInfo'); - that.globalData.userInfo = userinfo; - app.getUserSessionKey(code, cb); - } - }); //重新登录 - } - }); - this.setData({ - bgcolor: app.d.bf_color - }); - var that = this; - var user_id = options.user_id; - var colo = options.user_id; - var num = colo.substring(4) - var cor = num.replace(/\b(0+)/gi, "") - if (num == 0) { - user_id = "user" + 0 - } else { - user_id = "user" + cor - } - - - wx.request({ - url: app.d.ceshiUrl + '&action=user&m=selectuser', - method: 'post', - data: { - user_id: user_id, - openid: app.globalData.userInfo.openid - }, - header: { - 'Content-Type': 'application/x-www-form-urlencoded' - }, - success: function (res) { - var status = res.data.status; - if (status == 1) { - var wx_name = res.data.user.wx_name; - var headimgurl = res.data.user.headimgurl; - var money = res.data.user.money; - that.setData({ - wx_name: wx_name, - headimgurl: headimgurl, - money: money, - transfer_multiple: res.data.user.transfer_multiple, - }); - - } else { - wx.showToast({ - title: res.data.err, - icon: 'loading', - duration: 1500 - }); - wx.redirectTo({ - url: "../user/transfer", - }) - } - }, - error: function (e) { - wx.showToast({ - title: '网络异常!', - duration: 2000 - }); - } - }); - }, - //转账给好友 - withdrawals1: function (e) { - console.log(this); - var that = this; - console.log(6666) - var money = Number(e.detail.value.money); - var user_id = that.options.user_id; - var mon = Number(that.data.money);//账户余额 - console.log(mon); - console.log(money); - if (money > mon) { - wx.showToast({ - title: '余额不足', - duration: 2000 - }); - } - if (money < 0 || money == '') { - wx.showToast({ - title: '正确填写转账金额', - duration: 2000 - }); - } - if (mon >= money && money > 0) { - wx.request({ - url: app.d.ceshiUrl + '&action=user&m=transfer', - method: 'post', - data: { - user_id: user_id, - openid: app.globalData.userInfo.openid, - money: money - }, - 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, - icon: 'loading', - duration: 1500 - }); - - wx.redirectTo({ - url: "../user/wallet", - }); - - } else { - wx.showToast({ - title: res.data.err, - icon: 'none', - duration: 1500 - }); - } - - }, - error: function (e) { - wx.showToast({ - title: '网络异常!', - duration: 2000 - }); - } - }); - } - - } - - - -}) \ No newline at end of file diff --git a/pages/user/transfer1.json b/pages/user/transfer1.json deleted file mode 100644 index 84503c6..0000000 --- a/pages/user/transfer1.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "navigationBarTitleText": "转账给好友" -} \ No newline at end of file diff --git a/pages/user/transfer1.wxml b/pages/user/transfer1.wxml deleted file mode 100644 index 62805c0..0000000 --- a/pages/user/transfer1.wxml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - {{wx_name}} - - - - - 转账金额: - - - - - - - - - - 1. 最多可转金额为{{money}} - - - 2. 转账金额必须为{{transfer_multiple}}的倍数 - - - - - -
-
- - diff --git a/pages/user/transfer1.wxss b/pages/user/transfer1.wxss deleted file mode 100644 index 7688945..0000000 --- a/pages/user/transfer1.wxss +++ /dev/null @@ -1,124 +0,0 @@ -/* pages/user/transfer1.wxss */ -/* pages/user/transfer.wxss */ -page{ - background-color: rgb(240, 239, 245); -} -.page{ - width:95%; -margin:20px auto; -background-color:#fff; -border-radius:25rpx; -margin-bottom:10px; - - -} - -.balance{ - text-align: center; - padding:10px 20px; - font-size: 18px; -} -.bb{ - text-align: center; - font-size: 12px; -} -.Withdraw{ - padding: 10px 20px; -} -.user_mc{ - margin-top:15px; -font-size:32px; -margin-left:35px; -color: #fff; -} -.user_top{ - height:320rpx; -} -.user_top_two{ - display: -webkit-flex; - display: flex; - flex-direction: row; - justify-content: flex-start; - padding-left:40px; - padding-bottom:10px; - padding-top:25px; - -} -.user_top image{ - width:80px; - height: 80px; - border-radius:100px; - border:2px solid #fff; -} -.cash{ - border: 1px solid #ddd; - flex: 1; - margin-left: -1px; - font-size: 12px; - padding: 0 10px; - line-height: 30px; - height: 30px; -} - -.tx{ - /* background-color: #836FFF; */ - background-color: #48474c; - color: #fff; - text-align: center; - height: 45px; - line-height: 45px; - bottom: 0; - width: 100%; - position: fixed; -} -.Phone{ - /* border: 1px solid #ddd; - height: 40px; - line-height: 40px; - text-align: center; - border-radius:5px; */ - font-size: 28rpx; - width: 30%; - padding-left:2%; - margin-top:5px; - -} - -.section{ - padding: 12px 0; - width: 100%; - display:flex; - flex-direction:row; - font-size: 16px; - /* justify-content: center; */ -} -.inp{ - display:flex; - align-items:center; - width: 70%; - margin-top:2px; - -} -.t_3{ - margin-left: 15px; - font-size:13px; -} -.text{ - width: 27%; - text-align:center; -} -.xt{ - height:1px; -width:87%; -background:#eee; -margin:auto; - -} -.sj_btn{ - background:#FF6347; -color:#fff; - -font-size:26rpx; -margin-left:250rpx; - -} \ No newline at end of file diff --git a/pages/user/transfer_jifen.js b/pages/user/transfer_jifen.js deleted file mode 100644 index 10e22e7..0000000 --- a/pages/user/transfer_jifen.js +++ /dev/null @@ -1,61 +0,0 @@ -// pages/user/transfer_jifen.js -var app = getApp() -var WXAPI = require('../../utils/server.js'); -Page({ - /** - * 页面的初始数据 - */ - data: { - inp_money: 0, - iv: '', - encryptedData: '', - islogin: false, - remind: '加载中', - bank_name: '' - }, - //页面加载完成函数 - onReady: function () { - var that = this; - that.setData({ - remind: '' - }); - }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - wx.checkSession({ - success: function (e) { - //session_key 未过期,并且在本生命周期一直有效 - app.globalData.userInfo['session_key'] = app.globalData.userInfo.session_key; - - }, - fail: function () { - // session_key 已经失效,需要重新执行登录流程 - wx.login({ - success: function (res) { - var code = res.code; - that.globalData.code = res.code; - //取出本地存储用户信息,解决需要每次进入小程序弹框获取用户信息 - var userinfo = wx.getStorageSync('userInfo'); - that.globalData.userInfo = userinfo; - app.getUserSessionKey(code, cb); - } - }); //重新登录 - } - }); - this.setData({ - bgcolor: app.d.bf_color - }); - }, - //获取好友ID - withdrawals: function (e) { - var user_id = e.detail.value.user_id; - wx.redirectTo({//跳转 - url: "../user/transfer_jifen1?user_id=" + user_id, - }) - } - - - -}) \ No newline at end of file diff --git a/pages/user/user.js b/pages/user/user.js index 3780171..9fd77a3 100644 --- a/pages/user/user.js +++ b/pages/user/user.js @@ -11,26 +11,26 @@ Page({ navBarHeight: wx.getStorageSync('statusBarHeight') + wx.getStorageSync('navBarHeight') + 'px', pop: null, list: [ - { - icon: 'wdsc.png', - text: '我的收藏', - url: 'collection/collection' - }, // { // icon: 'zj.png', // text: '历史记录', // url: 'footprint/footprint' - // }, + // }, + { + icon: 'grzl.png', + text: '个人资料', + url: 'userinfo/userinfo' + }, { icon: 'dz.png', text: '地址管理', url: 'address/index' - }, - { - icon: 'grzl.png', - text: '个人资料', - url: 'userinfo/userinfo' - } + }, + // { + // icon: 'fp.png', + // text: '发票管理', + // url: 'address/index' + // } ], cont: 1, remind: '加载中', @@ -61,11 +61,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - // var plug_ins = app.globalData.userInfo.plug_ins; // 插件 - // this.setData({ - // bgcolor: app.d.bgcolor, // 背景颜色 - // plug_ins: plug_ins, // 插件 - // }); this.requestMyData(); }, //页面加载完成函数 @@ -75,6 +70,63 @@ Page({ that.setData({ remind: '' }); + }, + //会员中心 + navToMemberCenter() { + var isLogin = wx.getStorageSync('isLogin') + if (!isLogin) { + wx.navigateTo({ + url: '/pages/login/login' + }) + } + wx.navigateTo({ + url: '/pages/member/member' + }) + }, + navToCoupon() { + var isLogin = wx.getStorageSync('isLogin') + if (!isLogin) { + wx.navigateTo({ + url: '/pages/login/login' + }) + } + wx.navigateTo({ + url: '/pages/coupon/index' + }) + }, + navToScore() { + var isLogin = wx.getStorageSync('isLogin') + if (!isLogin) { + wx.navigateTo({ + url: '/pages/login/login' + }) + } + wx.navigateTo({ + url: '/pages/user/score' + }) + }, + navToWallet() { + var isLogin = wx.getStorageSync('isLogin') + if (!isLogin) { + wx.navigateTo({ + url: '/pages/login/login' + }) + } + wx.navigateTo({ + url: '/pages/user/wallet' + }) + }, + //我的收藏 + navToCollection() { + var isLogin = wx.getStorageSync('isLogin') + if (!isLogin) { + wx.navigateTo({ + url: '/pages/login/login' + }) + } + wx.navigateTo({ + url: '/pages/collection/collection' + }) }, onShow: function () { var that = this; @@ -99,6 +151,7 @@ Page({ var data = res.data; if (data.data) { that.setData({ + collection_num: data.data.collection_num, xxnum: data.data.xxnum, user: data.data.user, logo: data.data.logo, diff --git a/pages/user/user.wxml b/pages/user/user.wxml index 6920eb8..bec4ece 100644 --- a/pages/user/user.wxml +++ b/pages/user/user.wxml @@ -24,7 +24,6 @@
- @@ -40,12 +39,17 @@ - + {{user.user_name}} - 用户积分:{{user.score}} - {{tjr}} + + @@ -58,6 +62,28 @@ + + + {{user.coupon_num?user.coupon_num:'—'}} + 优惠券 + + + {{user.score?user.score:'—'}} + 积分 + + + + {{user.money?user.money:'—'}} + + 余额 + + + + {{collection_num?collection_num:'—'}} + + 我的收藏 + + @@ -66,12 +92,11 @@ 我的订单 - 查看全部订单 + 查看全部 - @@ -82,7 +107,6 @@ 待付款 - {{dfh_num}} @@ -92,7 +116,6 @@ 待发货 - {{dsh_num}} @@ -102,7 +125,6 @@ 待收货 - {{dpj_num}} @@ -112,7 +134,6 @@ 待评价 - {{th}} @@ -122,49 +143,22 @@ 退货/售后 - - - - - - - {{item.subtitle_name}} - - - - - - - - - + - + {{item.text}} - + - - - - - {{item.Article_title}} - - {{item.Article_prompt}} - - - - - diff --git a/pages/user/user.wxss b/pages/user/user.wxss index 34474b0..29b5e99 100644 --- a/pages/user/user.wxss +++ b/pages/user/user.wxss @@ -9,6 +9,57 @@ page{ right: 40rpx; margin-top: -100rpx; } +.card_bottom{ + display: flex; + padding: 10rpx 30rpx 30rpx 30rpx; +} + +.card_bottom>view{ + flex: 1; + height: 70rpx; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +.card_bottom>view view{ + font-size: 32rpx; + line-height: 26rpx; + color: #333333; + font-family: 'DIN'; + font-weight: bold; +} + +.card_bottom>view view text{ + color: #999999; +} + +.card_bottom>view text{ + font-size: 24rpx; + line-height: 24rpx; + color: #888888; + margin-top: auto; +} + +.card_bottom>view image{ + width: 38rpx; + height: 38rpx; +} + +.card_bottom>view .xxnum{ + position: absolute; + right: 0; + top: 0; + transform: translate(50%, -50%); + padding: 4rpx 6rpx; + background: black; + border-radius: 12rpx; + font-size: 22rpx; + line-height: 16rpx; + color: #FFFFFF; + font-weight: 300; +} .xxnum { position: absolute; left: 20rpx; @@ -52,6 +103,10 @@ text{ font-size:25px; line-height: 40px; } +.level { + width: 128rpx; + height: 45rpx; +} .user_top{ margin-top: 10rpx; height:420rpx; @@ -249,7 +304,7 @@ border-radius:5px; height:30px; } .function_right{ - margin-right:5px; + margin-right:8px; } .dd_img image{ border-radius:0; diff --git a/pages/user/wallet.json b/pages/user/wallet.json index 322d1fe..c45255b 100644 --- a/pages/user/wallet.json +++ b/pages/user/wallet.json @@ -1,3 +1,4 @@ { + "usingComponents": {}, "navigationBarTitleText": "我的钱包" } \ No newline at end of file diff --git a/pages/user/wallet.wxml b/pages/user/wallet.wxml index 6181f46..5e9c37c 100644 --- a/pages/user/wallet.wxml +++ b/pages/user/wallet.wxml @@ -35,9 +35,9 @@ - 入账记录 - 消费记录 - 提现记录 + 交易明细 + 充值明细 + 提现明细 @@ -156,11 +156,6 @@ | - - - 转账 - - \ No newline at end of file diff --git a/utils/server.js b/utils/server.js index 965a625..bf43fe3 100644 --- a/utils/server.js +++ b/utils/server.js @@ -72,6 +72,9 @@ module.exports = { homeIndex: (data) => { //首页 return requestServer('app.index.index', 'post', data) }, + indexGetMore: (data) => { //查看更多 + return requestServer('app.index.get_more', 'post', data) + }, newArrival: (data) => { //新品上市 return requestServer('app.index.new_arrival', 'post', data) }, @@ -117,6 +120,9 @@ module.exports = { updatepassword: (data) => { //修改密码 return requestServer('app.user.updatepassword', 'post', data) }, + couponList: (data) => { //修改密码 + return requestServer('app.coupon.index', 'post', data) + }, /* 商品 */ mchClass: (data) => { //店铺分类 return requestServer('app.index.mchClass', 'post', data) @@ -198,5 +204,4 @@ module.exports = { }, - } \ No newline at end of file