diff --git a/api/err.js b/api/err.js index cee8984..e1ba097 100644 --- a/api/err.js +++ b/api/err.js @@ -17,7 +17,7 @@ const errInfo = (obj) =>{ wx.removeStorageSync("token") // 返回首页 wx.redirectTo({ - url: "/pages/index/index", + url: "/pages/login/login", }) } }) diff --git a/api/interfaces/enroll.js b/api/interfaces/enroll.js index a41a7c6..ec3d164 100644 --- a/api/interfaces/enroll.js +++ b/api/interfaces/enroll.js @@ -8,7 +8,7 @@ const record = (code, iv, encryptedData, parent_id) => req({url: "auth/openwx", const bindmobile = (code, iv, mobile) => req({url: "auth/bindmobile", method: "POST", data: {code: code, iv: iv, mobile: mobile}}) //切换手机授权 -const tel = (wechatUser_id, username) => req({url: "auth/loginbymobile", method: "POST", data: {wechatUser_id: wechatUser_id,username: username}}) +const tel = (wechatUser_id, username) => req({url: "auth/loginbymobile", method: "POST", data: {wechatUser_id: wechatUser_id,username: username}}, false) export default({ diff --git a/api/interfaces/index.js b/api/interfaces/index.js index 99d3a64..6d073fb 100644 --- a/api/interfaces/index.js +++ b/api/interfaces/index.js @@ -1,6 +1,9 @@ import {req} from "../request" +// 是否开启沃支付 +const woPayment = () => req({url: "ajax/pays"}) + //首页权益 const index = (area_name, user_lng, user_lat) => req({url: "home", data: {area_name: area_name, user_lng: user_lng, user_lat:user_lat}}) @@ -41,7 +44,7 @@ const ordersInfo = (orderId) => req({url: "activity/orders/" + orderId + '/info' const rightShow = (right_id, address_id, num, is_deliver) => req({url: "orders/create/", data: {right_id: right_id, address_id: address_id || '', num: num || '', is_deliver: is_deliver}}) // 权益购买提交 -const rightStore = (right_id, address_id, is_deliver, qty) => req({url: "orders/store/", method: "POST", data: {right_id: right_id, address_id: address_id || '', is_deliver: is_deliver, qty: qty || ''}}) +const rightStore = (right_id, address_id, is_deliver, qty, share_user_id) => req({url: "orders/store/", method: "POST", data: {right_id: right_id, address_id: address_id || '', is_deliver: is_deliver, qty: qty || '', share_user_id: share_user_id || ''}}) // 微信权益购买信息 const wechat = (trade_no) => req({url: "payments/wechat?",method: "POST", data: {trade_no: trade_no}}) @@ -113,5 +116,6 @@ export default({ washcarCoupon, busineSee, busineForm, - subscribe + subscribe, + woPayment }) diff --git a/api/interfaces/user.js b/api/interfaces/user.js index 289e61a..b4fc34c 100644 --- a/api/interfaces/user.js +++ b/api/interfaces/user.js @@ -11,7 +11,7 @@ const mobiles = (wechatUser_id) => req({url: "user/mobiles", data:{wechatUser_id const coupon = (status) => req({url: "coupons?status=" + status}) //卡券分组 -const couponArr = (activityId, status, page) => req({url: "coupons/list", data:{activityId : activityId, status : status, page : page}}) +const couponArr = (activityId, status, page) => req({url: "coupons/list", data:{activityId : activityId, status : status, page : page || ''}}) //卡券详情 const couponinfo = (coupon_id, user_lng, user_lat) => req({url: "coupons/show", data:{coupon_id : coupon_id, user_lng : user_lng, user_lat : user_lat}}) @@ -23,7 +23,7 @@ const qrcode = (coupon_id) => req({url: "coupons/qrcode", data:{coupon_id : coup const barcode = (coupon_id) => req({url: "coupons/" + coupon_id + '/barcode'}) //门店列表 -const stores = (coupon_id, province_id, city_id, district_id, title, user_lng, user_lat, page) => req({url: "coupons/new_stores", method: "POST", data:{coupon_id : coupon_id, province_id : province_id || '', city_id : city_id || '', district_id : district_id || '', title : title || '', user_lng : user_lng, user_lat : user_lat, page : page}}) +const stores = (coupon_id, province_id, city_id, district_id, title, user_lng, user_lat, page) => req({url: "coupons/new_stores", method: "POST", data:{coupon_id : coupon_id, province_id : province_id || '', city_id : city_id || '', district_id : district_id || '', title : title || '', user_lng : user_lng, user_lat : user_lat, page : page || ''}}) //门店详情 const storesShow = (store_id, user_lng, user_lat) => req({url: "coupons/store/show", data:{store_id : store_id, user_lng : user_lng, user_lat : user_lat}}) @@ -38,7 +38,7 @@ const jssdk = (coupon_id) => req({url: "coupons/jssdk?coupon_id=" + coupon_id}) const cards = (code, pass) => req({url: "user/cards/activate", method: "POST", data:{code : code, pass : pass}}) // 积分账变记录 -const logs = (type, channel, page) => req({url: "account/logs", data:{type : type, channel: channel, page : page}}) +const logs = (type, channel, page) => req({url: "account/logs", data:{type : type, channel: channel, page : page || ''}}) // 冻结列表 const ungrants = (type,) => req({url: "account/newungrants", data:{type : type}}) @@ -62,7 +62,7 @@ const washcarCreate = (welfare_id, right_id, qty, address_id, is_deliver) => req const myshare = (parent_id) => req({url: "user/share",data:{parent_id : parent_id || ''}}) // 我的推荐 -const childs = (page) => req({url: "user/childs",data:{page : page}}) +const childs = (page) => req({url: "user/childs",data:{page : page || ''}}) // 校验转账的手机号码 const ajaxTel = (mobile) => req({url: "ajax/user", data:{mobile : mobile}}) @@ -86,11 +86,38 @@ const resetPassword = (code, password, password_confirmation, mobile, channel) = const withdraws = () => req({url: "withdraws/create"}) // 提现记录列表 -const withdrawsList = (page) => req({url: "user/withdraws", data:{page : page}}) +const withdrawsList = (status, page) => req({url: "user/withdraws", data:{status: status, page : page || ''}}) // 提现表单填写 const withdrawsForm = (amount, channel) => req({url: "withdraws", method: "POST", data:{amount : amount, channel: channel}}) +// 2021-07-28新增 +// 我的收益 +const myProfit = () => req({url: "data/index"}) + +// 我的收益-收益报表 +const myIncome = (month) => req({url: "data/income", data:{month: month}}) + +// 我的收益-收益报表 +const profitOrders = (type, page) => req({url: "data/orders", data:{type: type, page : page || ''}}) + +// 我的收益-我的团队 +const profitTeam = (identity_id, sort, page) => req({url: "data/teams", data:{identity_id: identity_id, sort: sort, page : page || ''}}) + +// 权益详细列表 +const profitLogs = (name, page) => req({url: "data/logs", data:{name: name, page : page || ''}}) + +// 产品分享 +const productList = (page) => req({url: "shares/goods", data:{page : page || ''}}) +const productInfo = (right) => req({url: "shares/goods/" + right}) +const productPoster = (right) => req({url: "shares/goods/" + right + "/poster"}) + +// 储值分享 +const storedList = () => req({url: "shares/recharges"}) + +// 产品分享二维码+储值分享二维码 +const publicCode = (channel, type, url) => req({url: "user/share/goods", data:{channel: channel, type : type, url: url}}) + export default({ index, mobiles, @@ -121,5 +148,15 @@ export default({ resetPassword, withdraws, withdrawsList, - withdrawsForm + withdrawsForm, + myProfit, + myIncome, + profitOrders, + profitTeam, + profitLogs, + productList, + productInfo, + productPoster, + storedList, + publicCode }) diff --git a/api/request.js b/api/request.js index c52622c..5802fbe 100644 --- a/api/request.js +++ b/api/request.js @@ -11,13 +11,20 @@ const api = "https://lifetest.ysd-bs.com/api/" //正式地址 const header = { "Accept" : "application/json" } +let isToken = true /** * 请求 * @property {Object} req */ -const req = (obj) => { +const req = (obj, noToken) => { + + // 检查是否无需要token + if(noToken != undefined){ + isToken = noToken + } + // header if(obj.token){ header.Authorization = obj.token || '' @@ -32,7 +39,11 @@ const req = (obj) => { "Accept" : "application/json", "Authorization" : wx.getStorageSync("token") || "" } - + + if(!isToken){ + obj.header.Authorization = '' + } + wx.request({ url : api + obj.url, header : obj.header || {}, @@ -60,6 +71,9 @@ const req = (obj) => { icon : "none" }) reject(err) + }, + complete(){ + if(!isToken) isToken = true } }) }) diff --git a/app.js b/app.js index b567e1d..6a88e2a 100644 --- a/app.js +++ b/app.js @@ -10,6 +10,12 @@ var qqmapsdk; App({ onLaunch() { + // 沃支付是否开启 + api.index.woPayment().then(res=>{ + this.globalData.unicomPay = res.data.unicom_pay + }) + + // 获取系统信息 this.globalData.statusBarHeight = wx.getSystemInfoSync().statusBarHeight @@ -65,6 +71,7 @@ App({ atcity : "", adcode : '', longitude : '', - latitude : '' + latitude : '', + unicomPay : false } }) \ No newline at end of file diff --git a/app.json b/app.json index 2f9f0c8..23e98bf 100644 --- a/app.json +++ b/app.json @@ -37,7 +37,15 @@ "pages/withdrawal_record/withdrawal_record", "pages/withdrawal_form/withdrawal_form", "pages/password_set/password_set", - "pages/password_forget/password_forget" + "pages/password_forget/password_forget", + "pages/myProfit/myProfit", + "pages/myProfit_list/myProfit_list", + "pages/userStored/userStored", + "pages/userStored/storedCode/storedCode", + "pages/userGoods/userGoods", + "pages/userGoods/goodsCode/goodsCode", + "pages/userGoods/goodsDet/goodsDet", + "pages/cashier/cashier" ], "window": { "backgroundTextStyle": "light", diff --git a/pages/account/account.js b/pages/account/account.js index 891a102..f572464 100644 --- a/pages/account/account.js +++ b/pages/account/account.js @@ -71,7 +71,7 @@ Page({ accounts : newData, page : res.data.page }) - }) + }).catch(err=>{}) }, /** diff --git a/pages/activate/activate.js b/pages/activate/activate.js index c080a14..a5e1287 100644 --- a/pages/activate/activate.js +++ b/pages/activate/activate.js @@ -54,7 +54,7 @@ Page({ url: '/pages/user/user' }) },2000) - }) + }).catch(err => {}); }, /** diff --git a/pages/activity/activity.js b/pages/activity/activity.js index 997570f..fe3f28c 100644 --- a/pages/activity/activity.js +++ b/pages/activity/activity.js @@ -31,7 +31,7 @@ Page({ indexArr : res.data.data, page : res.data.page }) - }) + }).catch(err => {}); }, /** diff --git a/pages/activityData/activityData.js b/pages/activityData/activityData.js index 517cd4c..ea409d6 100644 --- a/pages/activityData/activityData.js +++ b/pages/activityData/activityData.js @@ -33,7 +33,7 @@ Page({ this.setData({ order : res.data }) - }) + }).catch(err => {}); }, /** @@ -56,7 +56,7 @@ Page({ url: '/pages/activityOrder/activityOrder', }) },2000) - }) + }).catch(err => {}); } else if (res.cancel) { wx.showToast({ title : '取消', @@ -103,7 +103,7 @@ Page({ }) } }) - }) + }).catch(err => {}); } }) }, diff --git a/pages/activityInfo/activityInfo.js b/pages/activityInfo/activityInfo.js index 45cfc96..8160c12 100644 --- a/pages/activityInfo/activityInfo.js +++ b/pages/activityInfo/activityInfo.js @@ -59,7 +59,7 @@ Page({ // 获取商品信息 this.redwineInfo(res.data.data[1].id) - }) + }).catch(err => {}); }, /** @@ -73,7 +73,7 @@ Page({ params : res.data.params, paramsIndex : res.data.params.findIndex(val => val.def == 1) }) - }) + }).catch(err => {}); }, /** @@ -142,7 +142,7 @@ Page({ }) } }) - }) + }).catch(err => {}); } }) }, diff --git a/pages/activityOrder/activityOrder.js b/pages/activityOrder/activityOrder.js index 72b9f69..7a1054f 100644 --- a/pages/activityOrder/activityOrder.js +++ b/pages/activityOrder/activityOrder.js @@ -38,7 +38,7 @@ Page({ lodingStats : false }) wx.stopPullDownRefresh() - }) + }).catch(err => {}); }, /** @@ -77,7 +77,7 @@ Page({ title: res.data, icon : 'none' }) - }) + }).catch(err => {}); } else if (res.cancel) { wx.showToast({ title : '取消', @@ -124,7 +124,7 @@ Page({ }) } }) - }) + }).catch(err => {}); } }) }, diff --git a/pages/address/address.js b/pages/address/address.js index 20bc164..ee758e0 100644 --- a/pages/address/address.js +++ b/pages/address/address.js @@ -32,7 +32,7 @@ Page({ this.setData({ addressArr: res.data }) - }) + }).catch(err => {}); }, /** @@ -63,7 +63,7 @@ Page({ }) wx.hideLoading() - }) + }).catch(err => {}); } } }) @@ -81,7 +81,7 @@ Page({ title: res.data, icon : "none" }) - }) + }).catch(err => {}); }, /** diff --git a/pages/address_form/address_form.js b/pages/address_form/address_form.js index 5df69f0..fb8a2de 100644 --- a/pages/address_form/address_form.js +++ b/pages/address_form/address_form.js @@ -117,7 +117,7 @@ Page({ defaultList : res.data.address, isDefault : res.data.address.is_default }) - }) + }).catch(err => {}); }, /** @@ -132,7 +132,7 @@ Page({ areaSn : areaArr[areaIndex].code, areas : areaArr }) - }) + }).catch(err => {}); }, /** @@ -165,7 +165,7 @@ Page({ cityList : cityArr, cityIndex : 0 }) - }) + }).catch(err => {}); }, /** @@ -197,7 +197,7 @@ Page({ regiId : res.data[0].code, regiIndex : 0 }) - }) + }).catch(err => {}); }, /** @@ -219,12 +219,12 @@ Page({ // 编辑地址 wx.$api.address.keep(this.data.addressId, e.detail.value.name, e.detail.value.mobile, this.data.areaSn, this.data.cityId, this.data.regiId, e.detail.value.address).then(res=>{ wx.navigateBack() - }) + }).catch(err => {}); } else { // 创建地址 wx.$api.address.add(e.detail.value.name, e.detail.value.mobile, this.data.areaSn, this.data.cityId, this.data.regiId, e.detail.value.address, this.data.defaultVal).then(res=>{ wx.navigateBack() - }) + }).catch(err => {}); } }, diff --git a/pages/car/index.js b/pages/car/index.js index 1737725..cf6b480 100644 --- a/pages/car/index.js +++ b/pages/car/index.js @@ -28,16 +28,15 @@ Page({ noticeShow : false, //须知显示状态 addressShow : false, //收货地址显示 payWayIndex : 0, - payWay :[ - {value: 0, name: "微信支付"} - // {value: 1, name: "沃钱包支付"} - ] + unicomPay : getApp().globalData.unicomPay //是否有沃支付 }, /** * 生命周期函数--监听页面加载 */ onLoad (options) { + console.log(getApp().globalData.unicomPay) + this.setData({ rightId : options.right_id, welfareId: options.welfare_id @@ -89,22 +88,7 @@ Page({ remark : res.data.detail.remark.replace(/\{ - if(!err.login){ - wx.showModal({ - title : '用户登录已过期', - content : '请重新登录', - showCancel : false, - success : res => { - if (res.confirm) { - wx.redirectTo({ - url: '/pages/login/login' - }) - } - } - }) - } - }) + }).catch(err=>{}) }, /** @@ -215,85 +199,96 @@ Page({ qty = this.data.num wx.$api.user.washcarCreate(welfare_id, right_id, qty, address_id, is_deliver).then(res=>{ - let dataUrl = '', //定义接口来源名称 + // payWayIndex为1的时候为沃支付-直接跳转h5 + if (this.data.payWayIndex == 1) { + const newUrl = "https://card.ysd-bs.com/unicom/payment?trade_no=" + res.data.trade_no + let url= encodeURIComponent(newUrl) + wx.redirectTo({ + // 跳转到webview页面 + url: `/pages/webView/webView?url=${url}` + }); + } + + // payWayIndex为0的时候为微信支付 + if(this.data.payWayIndex == 0) { + let dataUrl = '', //定义接口来源名称 Newtype = res.data.type //订单来源 + // welfare为福利活动购买 + if(Newtype == 'welfare') dataUrl = wx.$api.index.fridayPay(res.data.trade_no) - // welfare为福利活动购买 - if(Newtype == 'welfare') dataUrl = wx.$api.index.fridayPay(res.data.trade_no) + // right为权益购买 + if(Newtype == 'right') dataUrl = wx.$api.index.wechat(res.data.trade_no) - // right为权益购买 - if(Newtype == 'right') dataUrl = wx.$api.index.wechat(res.data.trade_no) - - // 第一步接口调取 - dataUrl.then(payEes=>{ - let payInfo = JSON.parse(payEes.data) - wx.requestPayment({ - timeStamp: payInfo.timeStamp, - nonceStr : payInfo.nonceStr, - package : payInfo.package, - paySign : payInfo.paySign, - signType : payInfo.signType, - success : res=>{ - if(res.errMsg == "requestPayment:ok"){ - wx.showToast({ - title: '支付成功', - icon : 'success' - }) + // 第一步接口调取 + dataUrl.then(payEes=>{ + let payInfo = JSON.parse(payEes.data) + wx.requestPayment({ + timeStamp: payInfo.timeStamp, + nonceStr : payInfo.nonceStr, + package : payInfo.package, + paySign : payInfo.paySign, + signType : payInfo.signType, + success : res=>{ + if(res.errMsg == "requestPayment:ok"){ + wx.showToast({ + title: '支付成功', + icon : 'success' + }) + if(Newtype == 'welfare'){ + setTimeout(()=>{ + if(this.data.isdeliver == 1) { + wx.reLaunch({ + url: '/pages/order/order?orderType=welfareGoods' + }) + } else { + wx.reLaunch({ + url: '/pages/order/order?orderType=welfare' + }) + } + },3000) + } + if(Newtype == 'right'){ + setTimeout(()=>{ + if(this.data.isdeliver == 1) { + wx.reLaunch({ + url: '/pages/order/order?orderType=rightsCoupons' + }) + } else { + wx.reLaunch({ + url: '/pages/order/order?orderType=rights' + }) + } + },3000) + } + } + }, + fail : res=>{ if(Newtype == 'welfare'){ - setTimeout(()=>{ - if(this.data.isdeliver == 1) { - wx.reLaunch({ - url: '/pages/order/order?orderType=welfareGoods' - }) - } else { - wx.reLaunch({ - url: '/pages/order/order?orderType=welfare' - }) - } - },3000) + if(this.data.isdeliver == 1) { + wx.reLaunch({ + url: '/pages/order/order?orderType=welfareGoods&stateType=unpay' + }) + } else { + wx.reLaunch({ + url: '/pages/order/order?orderType=welfare&stateType=unpay' + }) + } } if(Newtype == 'right'){ - setTimeout(()=>{ - if(this.data.isdeliver == 1) { - wx.reLaunch({ - url: '/pages/order/order?orderType=rightsCoupons' - }) - } else { - wx.reLaunch({ - url: '/pages/order/order?orderType=rights' - }) - } - },3000) + if(this.data.isdeliver == 1) { + wx.reLaunch({ + url: '/pages/order/order?orderType=rightsCoupons&stateType=unpay' + }) + } else { + wx.reLaunch({ + url: '/pages/order/order?orderType=rights&stateType=unpay' + }) + } } } - }, - fail : res=>{ - if(Newtype == 'welfare'){ - if(this.data.isdeliver == 1) { - wx.reLaunch({ - url: '/pages/order/order?orderType=welfareGoods&stateType=unpay' - }) - } else { - wx.reLaunch({ - url: '/pages/order/order?orderType=welfare&stateType=unpay' - }) - } - } - if(Newtype == 'right'){ - if(this.data.isdeliver == 1) { - wx.reLaunch({ - url: '/pages/order/order?orderType=rightsCoupons&stateType=unpay' - }) - } else { - wx.reLaunch({ - url: '/pages/order/order?orderType=rights&stateType=unpay' - }) - } - } - } - }) - }) - - }) + }) + }).catch(err => {}); + } + }).catch(err => {}); } }) \ No newline at end of file diff --git a/pages/car/index.wxml b/pages/car/index.wxml index 5dd57a1..1023678 100644 --- a/pages/car/index.wxml +++ b/pages/car/index.wxml @@ -103,21 +103,37 @@ - - 请选择支付方式 - + + 请选择支付方式 + + + + + + 微信支付 + + + + + + + 沃钱包支付 + + + + - + diff --git a/pages/car/index.wxss b/pages/car/index.wxss index 9c37a7d..86ac0a1 100644 --- a/pages/car/index.wxss +++ b/pages/car/index.wxss @@ -449,4 +449,37 @@ background: #dfae2e; transform: scale(.9, .9); font-size: 24rpx; +} + +/* 支付类型选择 */ +.radioList-label { + padding: 20rpx 0 40rpx; + font-size: 28rpx +} + +.payContList-label { + font-size: 28rpx; + display: flex; + margin-bottom: 40rpx; +} + +.payContList-label:last-child { + border:none +} + +.payContList-label-name { + flex: 1; + font-size: 32rpx; + display: flex; + line-height: 46rpx; +} + +.payContList-label-img { + width: 46rpx; + height: 46rpx; + margin-right: 20rpx; +} + +radio { + transform:scale(0.8); } \ No newline at end of file diff --git a/pages/cashier/cashier.js b/pages/cashier/cashier.js new file mode 100644 index 0000000..afaa2af --- /dev/null +++ b/pages/cashier/cashier.js @@ -0,0 +1,169 @@ +// pages/cashier/cashier.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + allAmount: '', //支付金额 + tradeNo : '', //支付订单 + current : 1, //支付方式类型 + paytType : '', //支付来源类型 welfarePay为周五福利支付 rightsPay为权益支付 + isDeliver: '', //提货方式 1为自提 0为快递 + barHeight: getApp().globalData.statusBarHeight, //顶部菜单栏 + unicomPay: getApp().globalData.unicomPay //是否有沃支付 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad (options) { + this.setData({ + allAmount : options.amount, + tradeNo : options.trade_no, + paytType : options.pay_type, + isDeliver : options.is_deliver + }) + + console.log(getApp().globalData.unicomPay) + }, + + /** + * 选择支付方式 + */ + radioChange(e) { + this.setData({ + current : e.detail.value + }) + }, + + /** + * 支付提交 + */ + submitPay() { + // current为1的时候为沃支付-直接跳转h5 + if (this.data.current == 1) { + const newUrl = "https://card.ysd-bs.com/unicom/payment?trade_no=" + this.data.tradeNo + let url= encodeURIComponent(newUrl) + wx.redirectTo({ + // 跳转到webview页面 + url: `/pages/webView/webView?url=${url}` + }); + } + + // current为2的时候为微信支付 + if(this.data.current == 2) { + let newUrl = '' //定义接口来源名称 + + if(this.data.paytType == "welfarePay") newUrl = wx.$api.index.fridayPay + if(this.data.paytType == "rightsPay") newUrl = wx.$api.index.wechat + + newUrl(this.data.tradeNo).then(res=>{ + let payInfo = JSON.parse(res.data) + wx.requestPayment({ + timeStamp: payInfo.timeStamp, + nonceStr : payInfo.nonceStr, + package : payInfo.package, + paySign : payInfo.paySign, + signType : payInfo.signType, + success : res=>{ + if(res.errMsg == "requestPayment:ok"){ + wx.showToast({ + title: '支付成功', + icon : 'success' + }) + setTimeout(()=>{ + if(this.data.isDeliver == 1) { + if( this.data.paytType == "rightsPay" ) { + wx.reLaunch({ + url: '/pages/order/order?orderType=rightsCoupons' + }) + } + if( this.data.paytType == "welfarePay" ) { + wx.reLaunch({ + url: '/pages/order/order?orderType=welfareGoods' + }) + } + } else { + if( this.data.paytType == "rightsPay" ) { + wx.reLaunch({ + url: '/pages/order/order?orderType=rights' + }) + } + if( this.data.paytType == "welfarePay" ) { + wx.reLaunch({ + url: '/pages/order/order?orderType=welfare' + }) + } + + } + },3000) + } + }, + fail : res=>{ + if(this.data.isDeliver == 1) { + if( this.data.paytType == "rightsPay" ) { + wx.reLaunch({ + url: '/pages/order/order?orderType=rightsCoupons&stateType=unpay' + }) + } + if( this.data.paytType == "welfarePay" ) { + wx.reLaunch({ + url: '/pages/order/order?orderType=welfareGoods&stateType=unpay' + }) + } + } else { + if( this.data.paytType == "rightsPay" ) { + wx.reLaunch({ + url: '/pages/order/order?orderType=rights&stateType=unpay' + }) + } + if( this.data.paytType == "welfarePay" ) { + wx.reLaunch({ + url: '/pages/order/order?orderType=welfare&stateType=unpay' + }) + } + } + } + }) + }).catch(err => {}); + } + }, + + /** + * 是否取消支付 + */ + payReturn() { + wx.showModal({ + title : '提示', + content : '是否取消支付', + success : res=> { + if (res.confirm) { + if(this.data.isDeliver == 1) { + if( this.data.paytType == "rightsPay" ) { + wx.reLaunch({ + url: '/pages/order/order?orderType=rightsCoupons&stateType=unpay' + }) + } + if( this.data.paytType == "welfarePay" ) { + wx.reLaunch({ + url: '/pages/order/order?orderType=welfareGoods&stateType=unpay' + }) + } + } else { + if( this.data.paytType == "rightsPay" ) { + wx.reLaunch({ + url: '/pages/order/order?orderType=rights&stateType=unpay' + }) + } + if( this.data.paytType == "welfarePay" ) { + wx.reLaunch({ + url: '/pages/order/order?orderType=welfare&stateType=unpay' + }) + } + } + } + } + }) + } +}) \ No newline at end of file diff --git a/pages/cashier/cashier.json b/pages/cashier/cashier.json new file mode 100644 index 0000000..590f347 --- /dev/null +++ b/pages/cashier/cashier.json @@ -0,0 +1,4 @@ +{ + "usingComponents" : {}, + "navigationStyle" : "custom" +} \ No newline at end of file diff --git a/pages/cashier/cashier.wxml b/pages/cashier/cashier.wxml new file mode 100644 index 0000000..e2e365f --- /dev/null +++ b/pages/cashier/cashier.wxml @@ -0,0 +1,48 @@ + + + + 订单支付 + + + + + 注:推荐使用沃支付,可在享优惠! + + + + 支付类型线上支付 + + + + 付款金额 + + + ¥{{ allAmount }} + + + + + 付款方式* + + + + + + + 沃支付支付 + + + + + + + 微信支付 + + + + + + + + + \ No newline at end of file diff --git a/pages/cashier/cashier.wxss b/pages/cashier/cashier.wxss new file mode 100644 index 0000000..0ea51f1 --- /dev/null +++ b/pages/cashier/cashier.wxss @@ -0,0 +1,140 @@ +/* 头部 */ +.barHeader { + position: fixed; + background: #fff; + color: #000; + top: 0; + left: 0; + z-index: 9; + width: 100%; + height: 100rpx; + display: flex; +} + +.barHeader-tool-icon { + width: 48rpx; + vertical-align: middle; + margin: 32rpx 0 0 20rpx; +} + +.barHeader-title { + position: relative; + width: 100%; + text-align: center; + height: 100rpx; + line-height: 100rpx; +} + +page { + background-color: #bc1d30; + padding: 40rpx; + box-sizing: border-box; +} + +.cashierTips { + background-color: #FFFFFF; + font-weight: 600; + font-size: 30rpx; + border-radius: 10rpx; + margin-bottom: 40rpx; + line-height: 80rpx; + padding: 0 30rpx; + box-sizing: border-box; + color: #e69500; + display: flex; +} + +.cashierTips image { + width: 32rpx; + height: 32rpx; + margin: 24rpx 10rpx 0 0; +} + +.cashierCont { + width: 100%; + background-color: #ffffff; + padding: 30rpx; + box-sizing: border-box; + border-radius: 20rpx; + overflow: hidden; +} +.cashierCont-title text { + color: #7e7d81; + padding-right: 30rpx; +} + +.cashierCont-price { + text-align: center; + margin: 90rpx 0; + color: #bc1d30; +} + +.cashierCont-price-title { + font-size: 34rpx; + margin-bottom: 10rpx; +} + +.cashierCont-price-number { + font-size: 60rpx; +} + +.cashierCont-pay-title { + color: #7e7d81; + margin-bottom: 40rpx; +} + +.cashierCont-pay-title text{ + color: #bc1d30; + padding-left: 10rpx; +} + +.cashierCont-pay-way { + height: 240rpx; +} + +.cashierCont-way-label { + float: left; + border: 2rpx solid #e8e8e8; + box-sizing: border-box; + padding: 30rpx 0; + border-radius: 10rpx; + width: calc(50% - 84rpx); + text-align: center; + margin: 0 40rpx; + font-size: 30rpx; + position: relative; +} + +.cashierCont-way-label.active { + border-color: #bc1d30; + color: #bc1d30; + box-shadow: 0 10rpx 20rpx rgba(188, 29, 48 ,.3); +} + +.cashierCont-way-label radio { + opacity: 0; + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; +} + +.cashierCont-way-label image { + width: 90rpx; + height: 90rpx; + display: block; + margin: 0 auto 20rpx; +} + +.payBtn { + background-color: #bc1d30; + color: #ffffff; + height: 90rpx; + line-height: 90rpx; + width: 100%; + font-size: 32rpx; + padding: 0; + border-radius: 80rpx; + margin: 80rpx 0 40rpx; +} \ No newline at end of file diff --git a/pages/chooseTel/chooseTel.js b/pages/chooseTel/chooseTel.js index 536b210..2cfc53b 100644 --- a/pages/chooseTel/chooseTel.js +++ b/pages/chooseTel/chooseTel.js @@ -114,9 +114,10 @@ Page({ }) } else { // 回到个人中心 - wx.switchTab({ - url: '/pages/user/user' - }) + // wx.switchTab({ + // url: '/pages/user/user' + // }) + wx.navigateBack({delta: 2}) } }) }, @@ -134,20 +135,24 @@ Page({ // 写入缓存 wx.setStorage({ key : 'token', - data : res.data.token + data : res.data.token, + success : ()=> { + if(this.data.way == "activity") { + // 回到活动首页 + wx.reLaunch({ + url: '/pages/activityInfo/activityInfo' + }) + }else if(this.data.way == "shareLogin") { + // 回到上一页面 + wx.navigateBack({delta: 2}) + }else { + // 回到个人中心 + wx.switchTab({ + url: '/pages/user/user' + }) + } + } }) - - if(this.data.way == "activity") { - // 回到活动首页 - wx.reLaunch({ - url: '/pages/activityInfo/activityInfo' - }) - } else { - // 回到个人中心 - wx.switchTab({ - url: '/pages/user/user' - }) - } - }) + }).catch(err => {}); } }) \ No newline at end of file diff --git a/pages/classify/classify.js b/pages/classify/classify.js index 4bf9a64..e5ada44 100644 --- a/pages/classify/classify.js +++ b/pages/classify/classify.js @@ -34,6 +34,10 @@ Page({ this.indexNav(options.id,options.areaname,options.latitude,options.userlng) + this.setData({ + isUser : getApp().globalData.isUser + }) + }, /** * 生命周期函数--监听页面显示 @@ -79,30 +83,27 @@ Page({ userNav(e){ let newid = e.currentTarget.dataset.id, canFrom = e.currentTarget.dataset.from - wx.getStorage({ - key : 'token', - success:res=>{ - if(canFrom == 'washcar') { - wx.$api.index.washcarUrl('', newid).then(res=>{ - const newUrl = res.data - let url= encodeURIComponent(newUrl) - wx.redirectTo({ - // 跳转到webview页面 - url: `/pages/washcar/washcar?url=${url}` - }); - }) - } else { - // 跳转权益详情页 - wx.navigateTo({ - url: '/pages/rights/rights?rightsId=' + newid - }) - } - }, - fail: (err) => { + if(this.data.isUser){ + if(canFrom == 'washcar') { + wx.$api.index.washcarUrl('', newid).then(res=>{ + const newUrl = res.data + let url= encodeURIComponent(newUrl) + wx.redirectTo({ + // 跳转到webview页面 + url: `/pages/washcar/washcar?url=${url}` + }); + }).catch(err => {}); + } else { + // 跳转权益详情页 wx.navigateTo({ - url: "/pages/login/login" + url: '/pages/rights/rights?rightsId=' + newid }) } - }) + }else{ + // 去登录 + wx.navigateTo({ + url: "/pages/login/login" + }) + } } }) \ No newline at end of file diff --git a/pages/code/code.js b/pages/code/code.js index 4bbaac3..6228071 100644 --- a/pages/code/code.js +++ b/pages/code/code.js @@ -8,10 +8,11 @@ * 页面的初始数据 */ data: { - qrcode : '', //二维码 - userInfo: '', //我的信息 - isImgLay: false, //是否显示图片弹出层 - parentId: '' //是否分享进入 + qrcode : '', //二维码 + userInfo : '', //我的信息 + isImgLay : false,//是否显示图片弹出层 + parentId : '', //是否分享进入 + shareState : false //显示分享朋友圈弹出层 }, /** @@ -30,7 +31,7 @@ qrcode : res.data.qrcode, userInfo : res.data.user }) - }) + }).catch(err=>{}) }, /** @@ -43,7 +44,7 @@ let avatarImg = new Promise(success=>{ wx.getImageInfo({ - src : this.data.userInfo.avatar, + src : '', success : res => { success(res.path) } @@ -60,38 +61,44 @@ }) }) - Promise.all([codeImg, avatarImg]).then(res => { + Promise.all([codeImg]).then(res => { // 绘制海报 const ctx = wx.createCanvasContext('qrcodeCard') ctx.save() // 绘制背景 - ctx.setFillStyle('#f7662d') + ctx.setFillStyle('#e2e2e2') ctx.fillRect(0, 0, 375, 603) // 绘制背景 ctx.drawImage('/static/img/user-codeImg-down.png', 0, 0, 375, 650) // 绘制二维码 - ctx.drawImage(res[0], 114, 390, 150, 150) + ctx.drawImage(res[0], 114, 470, 150, 150) // 文字 - ctx.setFontSize(16) - ctx.setFillStyle("#2f3245") - ctx.setTextAlign('center') - ctx.fillText(this.data.userInfo.nickname, 194, 350 , 270) + // ctx.setFontSize(16) + // ctx.setFillStyle("#2f3245") + // ctx.setTextAlign('center') + // ctx.fillText(this.data.userInfo.nickname, 194, 350 , 270) // 文字 - ctx.setFontSize(14) - ctx.setFillStyle("#af7700") + ctx.setFontSize(40) + ctx.setFillStyle("#222222") ctx.setTextAlign('center') - ctx.fillText(this.data.userInfo.nickname + " -- " + "邀请您进入本时生活", 188, 570 , 270) + ctx.fillText("扫码享福利", 188, 400 , 270) + + // 文字 + ctx.setFontSize(18) + ctx.setFillStyle("#222222") + ctx.setTextAlign('center') + ctx.fillText("扫描二维码加入本时生活", 188, 440 , 270) ctx.save(); ctx.beginPath(); //开始绘制 ctx.arc(70 / 2 + 156, 70 / 2 + 250, 70 / 2, 0, Math.PI * 2, false); ctx.clip(); - ctx.drawImage(res[1], 156, 250, 70, 70); + // ctx.drawImage(res[1], 156, 250, 70, 70); // 保存图片 ctx.draw(true, () => { @@ -122,9 +129,7 @@ } }) }, - complete: e => { - console.log(e) - } + complete: e => {} }) } }) @@ -157,6 +162,15 @@ }) }, + /** + * 分享朋友圈弹出层状态 + */ + shareShow() { + this.setData({ + shareState: !this.data.shareState + }) + }, + /** * 分享 */ @@ -164,7 +178,18 @@ return { title : this.data.userInfo.nickname + "邀请您进入本时生活", imageUrl: "", - query : "/pages/code/code?parent_id=" + this.data.userInfo.user_id + "&type=share" + path : "/pages/index/index?parent_id=" + this.data.userInfo.user_id + "&type=share" } + }, + + /** + * 用户点击右上角分享朋友圈 + */ + onShareTimeline () { + return { + title : this.data.userInfo.nickname + "邀请您进入本时生活", + path : "/pages/index/index?parent_id=" + this.data.userInfo.user_id + "&type=share", + imageUrl: '' + } } }) \ No newline at end of file diff --git a/pages/code/code.json b/pages/code/code.json index 41c15a0..5586f8d 100644 --- a/pages/code/code.json +++ b/pages/code/code.json @@ -1,6 +1,6 @@ { "usingComponents": {}, "navigationBarTitleText": "我的邀请码", - "navigationBarBackgroundColor": "#332829", + "navigationBarBackgroundColor": "#000000", "navigationBarTextStyle": "white" } \ No newline at end of file diff --git a/pages/code/code.wxml b/pages/code/code.wxml index 791e45f..7138755 100644 --- a/pages/code/code.wxml +++ b/pages/code/code.wxml @@ -1,48 +1,70 @@ - + + + - - + + 每邀请一位好友注册成功后 + 您将获得30元消费红包奖励 + {{userInfo.nickname}} - - + + + 邀好友享福利 + 邀请好友加入本时生活 + + + + + + 朋友圈 + - 下载海报 + + 生成海报 - - + - - - - {{userInfo.nickname}} - - - - - - 邀请好友扫码,即可绑定关系 - + + 扫码享福利 + 识别二维码加入本时生活 + + + + + + + + 1 + 点击右上角打开菜单 + + + 2 + 选择菜单分享朋友圈 + + + \ No newline at end of file diff --git a/pages/code/code.wxss b/pages/code/code.wxss index fcd91bb..785ba2a 100644 --- a/pages/code/code.wxss +++ b/pages/code/code.wxss @@ -1,124 +1,127 @@ page { - background-color: #f5ecd8; + background-color: #e2e2e2; } -/* 标题 */ .codeTitle { - width: 100vw; - height: 45vh; - text-align: center; - position: absolute; - left: 0; - top: 0; -} - -/* 按钮 */ -.codeShare { width: 100%; - position: fixed; - bottom: 0; - left: 0; - background-color: #333333; - display: flex; - padding: 30rpx 20rpx 40rpx; + background-color: #000000; + border-radius: 0 0 200rpx 200rpx; + padding: 40rpx 20rpx 160rpx; box-sizing: border-box; - z-index: 9; } -.codeShare-label { - width: calc(50% - 20rpx) !important; - margin: 0 10rpx; - font-weight: normal; +.codeTitle { text-align: center; - height: 80rpx; - line-height: 80rpx; - padding: 0; - border-radius: 60rpx; - border: #c1a468 2rpx solid; - font-size: 32rpx; - color: #412f0b; - background: linear-gradient(to bottom, #eee3c8, #c1a468); + width: 100%; } -.codeShare-button { - color: #ffd887; - background: transparent; -} - -/* 二维码 */ .codeCont { - position: relative; - width: 80vw; - left: 10vw; - top: 31.5vh; - background-color: #fff; - box-sizing: border-box; - border-radius: 10rpx; - justify-items: center; + background-color: #ffffff; + margin: -120rpx auto 0; + width: 84%; + border-radius: 20rpx; + box-shadow: 0 0 20rpx rgba(0, 0, 0, .2); + padding: 40rpx 0; +} + +.codeCont-tisp { text-align: center; - z-index: 8; - margin-bottom: 200rpx; + color: #fff; + background-color: #797979; + padding: 10rpx 0; } -.codeCont-code { - width: 340rpx; - height: 340rpx; - margin: 20rpx 0 40rpx; -} - -.codeCont-tips { - border-radius: 10rpx 10rpx 0 0; - width: 100%; -} - -.codeCont-gold { - position: absolute; - width: 100rpx; - height: 100rpx; - right: 40rpx; - top: -40rpx; +.codeCont-tisp text { + display: block; } .codeCont-text { - position: absolute; - width: 100%; text-align: center; - top: 30rpx; - left: 0; - color: #71552d; - font-weight: 600; + margin: 40rpx 0; } .codeCont-avatar { - width: 130rpx; - height: 130rpx; + width: 160rpx; + height: 160rpx; border-radius: 50%; - margin-bottom: 5rpx; - border: 6rpx solid #ebdcb9; + margin-bottom: 20rpx; } -.codeCont-words { - margin-top: 40rpx; - width: 100%; +.codeCont-code { + text-align: center; } +.codeCont-img { + width: 300rpx; + height: 300rpx; +} + +.codeCont-title { + margin-bottom: 20rpx; +} + +.codeCont-title-text { + font-size: 46rpx; + font-weight: 700; + margin-bottom: 10rpx; + letter-spacing: 4rpx; +} + +.codeCont-title-tips { + font-size: 28rpx; +} + +.codeShare { + margin-top: 40rpx; +} + +.codeShare { + display: flex; + padding: 0 50rpx; + box-sizing: border-box; +} + +.codeShare-label { + flex: 3; + text-align: center; + font-size: 28rpx; +} + +.codeShare-label image { + width: 80rpx; + height: 80rpx; + display: block; + margin: 0 auto 20rpx; +} + +.codeShare-button { + width: auto !important; + border: none; + background: transparent; + font-size: 28rpx; + margin: 0; + padding: 0; + font-weight: normal; +} + + /* 弹窗背景图 */ -.user-lay{ - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-box-pack: center; - position: fixed; - background: rgba(0, 0, 0, .6); - height: 100vh; +.user-lay { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-pack: center; + position: fixed; + background: rgba(0, 0, 0, .6); + height: 100vh; width: 100vw; top: 0; left: 0; - z-index: 99; - box-sizing: border-box; + z-index: 99; + box-sizing: border-box; } /* canvas */ -.canvasImg{ +.canvasImg { position: absolute; left: -1000%; height: 650px; @@ -126,82 +129,119 @@ page { background: #fbf6f0; } + /* 图片弹出层 */ -.sign-img-lay{ - text-align: center; +.sign-img-lay { + text-align: center; } -.sign-img-src{ - width: 70vw; - vertical-align: top; +.sign-img-src { + width: 70vw; + vertical-align: top; } -.sign-img-btn[size="mini"]{ - margin-top: 40rpx; +.sign-img-btn[size="mini"] { + margin-top: 40rpx; background: #f5d48f; font-weight: normal; - color: #2f3245; - height: 90rpx; - line-height: 90rpx; - padding: 0; - width: 70vw; + color: #2f3245; + height: 90rpx; + line-height: 90rpx; + padding: 0; + width: 80%; } -.remove-btn[size="mini"]{ - margin-top: 20rpx; - background: #101010; - color: #e5c175; +.remove-btn[size="mini"] { + margin-top: 20rpx; + background: #101010; + color: #e5c175; font-weight: normal; } /* 背景 */ -.user-back { - position: relative; +.user-back-img { width: 100%; - height:600rpx; - text-align: center; - margin-top: 100rpx; + display: block; } -.user-back-img { - position: absolute; - width: 70vw; - left: 15vw; - top: 0; - height: 100%; +.user-back { + position: relative; + width: 80%; + text-align: center; margin: 0 auto; - border-radius: 10rpx; } .user-back-cont { - position: absolute; + text-align: center; + background-color: #e2e2e2; + padding: 40rpx 0; +} + +.user-back-cont image { + width: 300rpx; + height: 300rpx; +} + +.codeBack-yard-name { + margin-bottom: 30rpx; +} + +.codeBack-yard-title { + font-size: 50rpx; + font-weight: 600; + letter-spacing: 4rpx; + margin-bottom: 20rpx; +} + +/* 朋友圈弹出层 */ +.sharePop { + position: fixed; left: 0; top: 0; width: 100%; height: 100%; - color: #2f3245; + z-index: 9; + background-color: rgba(0, 0, 0, .6); + text-align: center; } -.user-back-avatar image { +.sharePop-row { width: 140rpx; - height: 140rpx; + position: fixed; + right: 110rpx; + top: 0; +} + +.shareList { + color: #ffffff; + line-height: 60rpx; + font-weight: 700; + font-size: 36rpx; + width: 100%; + height: 100%; + position: absolute; + z-index: 10; + top: 30%; +} + +.shareLabel { + margin-bottom: 40rpx; +} + +.shareLabel image { + width: 60rpx; + height: 60rpx; + margin: 0 20rpx; + vertical-align: middle; +} + +.shareLabel text { + display: inline-block; + background: #0696ca; + width: 40rpx; + height: 40rpx; + line-height: 40rpx; + font-size: 26rpx; border-radius: 50%; - margin-top: -60rpx; - margin-bottom: 20rpx; - border: 6rpx solid #fff1d1; -} - -.user-back-yard { - margin-top: 40rpx; -} - -.codeBack-yard-name { - font-size: 28rpx; - color: #af7700; -} - -.user-back-yard image { - width: 240rpx; - height: 240rpx; - margin-bottom: 20rpx; + margin: 8rpx 10rpx 0 0; } \ No newline at end of file diff --git a/pages/coupon/coupon.js b/pages/coupon/coupon.js index f906b50..af81a20 100644 --- a/pages/coupon/coupon.js +++ b/pages/coupon/coupon.js @@ -58,7 +58,7 @@ Page({ count : res.data.count, coupons : res.data.list }) - }) + }).catch(err => {}); }, /** diff --git a/pages/couponArr/couponArr.js b/pages/couponArr/couponArr.js index d952bdf..70c069d 100644 --- a/pages/couponArr/couponArr.js +++ b/pages/couponArr/couponArr.js @@ -41,7 +41,7 @@ Page({ lodingStats : false }) wx.stopPullDownRefresh() - }) + }).catch(err => {}); }, /** diff --git a/pages/couponDetails/couponDetails.js b/pages/couponDetails/couponDetails.js index e75b43c..2e3d6ce 100644 --- a/pages/couponDetails/couponDetails.js +++ b/pages/couponDetails/couponDetails.js @@ -170,7 +170,7 @@ Page({ },fail : res=> { } }) - }) + }).catch(err => {}); }, /** @@ -182,7 +182,7 @@ Page({ this.setData({ merchantcardinfo : res.data }) - }) + }).catch(err => {}); }, /** diff --git a/pages/favour/favour.js b/pages/favour/favour.js index 89f9efe..798dd95 100644 --- a/pages/favour/favour.js +++ b/pages/favour/favour.js @@ -32,7 +32,7 @@ Page({ account: res.data.account, typeArr: res.data.accounts }) - }) + }).catch(err=>{}) }, /** diff --git a/pages/favour/favour.wxml b/pages/favour/favour.wxml index 73665de..045e1ca 100644 --- a/pages/favour/favour.wxml +++ b/pages/favour/favour.wxml @@ -1,43 +1,56 @@ + + + + + 我的{{typeArr[typeIndex].value}} - 本时生活 -- 积分赠与 {{typeArr[typeIndex].value}} - {{typeArr[typeIndex].key == 'silver' ? account.silver : account.drill}} + + {{typeArr[typeIndex].key == 'silver' ? account.silver : account.drill}}元 + + + + + + 赠好友消费红包 +
+ + 账户类型 + + + {{typeArr[typeIndex].value}} + + + + + + 好友手机号 + + + 校验号码 + + + + 转账金额 + + + + 支付密码 + + + +
+
+ 赠予记录 +
- - 赠好友积分 -
- - 积分账户 - - - {{typeArr[typeIndex].value}} - - - - - - 手机号 - - - 校验号码 - - - - 转账金额 - - - - 支付密码 - - - - 赠与记录 -
-
+ + diff --git a/pages/favour/favour.wxss b/pages/favour/favour.wxss index 42cd0a3..f45ebc6 100644 --- a/pages/favour/favour.wxss +++ b/pages/favour/favour.wxss @@ -1,9 +1,15 @@ page { - background: #fcdece; + background-color: #000000; } -.favourBack { +.favourTitle { + text-align: center; + margin: 40rpx 0; +} + +.favourBack{ position: relative; + width: 100vw; } .favourBack-img { @@ -13,128 +19,129 @@ page { .favourBack-cont { position: absolute; - top: 0; - width: 100%; - padding: 140rpx 40rpx; - box-sizing: border-box; + top: 100rpx; left: 0; - color: #ca3c19; -} - -.favourBack-cont-title { - font-size: 32rpx; - font-weight: 600; - margin-bottom: 30rpx; -} - -.favourBack-cont-name { - font-size: 46rpx; - font-weight: 600; + padding-left: 14%; + z-index: 1; + color: #606060; + width: 100%; + box-sizing: border-box; } .favourBack-cont-number { - background-color: #ff5e5d; - color: #fff; - border-radius: 50rpx; - display: inline-block; - padding: 4rpx 20rpx; - margin-top: 15rpx; + color: #000000; + width: 100%; + margin-top: 20rpx; } -/* 表单 */ -.favourCont { - background-color: #fff; - margin: 0 30rpx; - padding: 0 40rpx 60rpx; - box-sizing: border-box; - border-radius: 30rpx; -} - -.favourCont-title { - text-align: center; - color: #d57449; - font-size: 38rpx; +.favourBack-cont-number text { + font-size: 50rpx; font-weight: 600; - width: 100%; - padding: 30rpx 0 50rpx; + padding-right: 10rpx; + display: inline-block; } -.favourCont-label { - position: relative; - line-height: 80rpx; - background-color: #f4f4f4; - margin-bottom: 40rpx; - font-size: 28rpx; -} - -.favourCont-name { - background-color: #ffffff; - width: 130rpx; -} - -.favourCont-label>input, -.favourCont-picker, -.favourCont-check { +.favourBack-cont-title { position: absolute; - left: 0; - font-size: 28rpx; top: 0; - display: block; - height: 80rpx; - padding: 0 30rpx 0 160rpx; + left: 0; + width: 100%; + text-align: center; + font-size: 26rpx; + line-height: 50rpx; +} + +.favourCont { + background-color: #ffffff; + padding: 40rpx 50rpx; width: 100%; box-sizing: border-box; + border-radius: 5rpx 5rpx 0 0; } -.favourCont-picker image { - width: 50rpx; - height: 50rpx; - position: absolute; - right: 10rpx; - top: 14rpx; -} - -.favourCont-btn { - background: linear-gradient(to right, #ff8e65, #ff5f5d); - color: #fff; - margin-top: 80rpx; - width: 100% !important; - font-size: 32rpx; - line-height: 54rpx; +.favourBlack { + background-color: #e9e9e9; + padding: 40rpx; + box-sizing: border-box; + border-radius: 45rpx; } .favourCont-record { + line-height: 90rpx; text-align: center; - color: #ff5f5d; - font-size: 30rpx; - font-weight: 600; + font-size: 34rpx; +} + +.favourCont-title { + font-size: 45rpx; + text-align: center; +} + +.favourCont-label { + display: flex; margin-top: 40rpx; - text-align: center; - width: 100%; + font-size: 28rpx; } -.favourCont-record text { - border-bottom: #ff5f5d solid 4rpx; - display: inline-block; -} - -.favourCont-check { +.favourCont-check, +.favourCont-picker, +.favourCont-label>input { + background-color: #c9c9c9; + display: flex; + width: calc(100% - 160rpx); + padding: 0 20rpx; + box-sizing: border-box; + height: 80rpx; line-height: 80rpx; } -.favourCont-check>input { +.favourCont-picker { + position: relative; +} + +.favourCont-picker image { + width: 40rpx; + height: 40rpx; + position: absolute; + right: 0; + top: 20rpx; + z-index: 2; +} + +.favourCont-label input { height: 80rpx; + line-height: 80rpx; +} + +.favourCont-name { + width: 160rpx; + line-height: 80rpx; } .favourCont-check-btn { - font-size: 28rpx; + width: 150rpx; + text-align: center; + background-color: #a1a1a1; + line-height: 60rpx; + height: 60rpx; + margin-top: 10rpx; + font-size: 24rpx; +} + +.favourCont-btn { + width: 100% !important; + background-color: #dbc190; + margin-top: 40rpx; + border-radius: 60rpx; +} + +.tabs-text { + width: 100%; position: absolute; - right: 0; + left: 0; top: 0; - background: #ff8e65; - padding: 0 20rpx; - color: #fff; - z-index: 9; + padding-left: 20rpx; + box-sizing: border-box; } /* 校验弹出层 */ diff --git a/pages/frozen/frozen.js b/pages/frozen/frozen.js index adad58a..8b33459 100644 --- a/pages/frozen/frozen.js +++ b/pages/frozen/frozen.js @@ -36,7 +36,7 @@ Page({ this.setData({ frozenData: res.data }) - }) + }).catch(err => {}); }, // 轮播滑动 diff --git a/pages/index/index.js b/pages/index/index.js index 3ff8879..5d982cd 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -159,7 +159,7 @@ Page({ }, /** - * 处理未登录时的转跳 + * 处理权益未登录时的转跳 */ userNav(e){ let user_lng = this.data.longitude, //经度 @@ -181,6 +181,23 @@ Page({ }) }, + /** + * 处理未登录时的转跳 + */ + userUrl(e){ + let pageUrl = e.currentTarget.dataset.url + if(this.data.isUser){ + wx.navigateTo({ + url: pageUrl + }) + }else{ + // 去登录 + wx.navigateTo({ + url: "/pages/login/login" + }) + } + }, + /** * 点击轮播图片 */ @@ -364,7 +381,7 @@ Page({ wx.hideLoading(); }, 1000) - }) + }).catch(err => {}); } }, fail: err => { diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 5dab53f..3abbeff 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -38,7 +38,6 @@ -
@@ -147,4 +146,14 @@
- \ No newline at end of file + + + + + + + + + + + \ No newline at end of file diff --git a/pages/index/index.wxss b/pages/index/index.wxss index bfc21d8..055c1b0 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -686,3 +686,36 @@ page { 25% {opacity: 0;transform: translateX(-3px);} 75% {opacity: 1;transform: translateX(3px);} } + + +/* 漂浮弹出层 */ +.indexFloat { + position: fixed; + right: 20rpx; + bottom: 30rpx; + z-index: 99; +} + +.indexFloat-img image { + width: 130rpx; + height: 130rpx; + margin-bottom: 20rpx; +} + +.indexFloat-animation { + animation: shake 3s linear infinite; +} + +@keyframes shake { + 70%, 80% { + transform: rotate(7deg); + } + 75% { + transform: rotate(-7deg); + } + + 65%, + 85% { + transform: rotate(0); + } +} \ No newline at end of file diff --git a/pages/login/login.js b/pages/login/login.js index 6cd0ee3..2e4ca42 100644 --- a/pages/login/login.js +++ b/pages/login/login.js @@ -133,7 +133,7 @@ Page({ // 清除扫码进入获取parent_id的缓存 wx.removeStorageSync('parentId') - }) + }).catch(err => {}); } }) \ No newline at end of file diff --git a/pages/makeForm/makeForm.js b/pages/makeForm/makeForm.js index 362be67..ba2a133 100644 --- a/pages/makeForm/makeForm.js +++ b/pages/makeForm/makeForm.js @@ -47,17 +47,10 @@ Page({ }) }).catch(err=>{ if(!err.login){ - wx.showModal({ - title : '用户登录已过期', - content : '请重新登录', - showCancel : false, - success : res => { - if (res.confirm) { - wx.redirectTo({ - url: '/pages/login/login' - }) - } - } + // 写入缓存 + wx.setStorage({ + key : 'token', + data : '' }) } }) @@ -105,7 +98,11 @@ Page({ }, 2000) }).catch(err=>{ if(!err.login){ - + // 写入缓存 + wx.setStorage({ + key : 'token', + data : '' + }) } }) }, diff --git a/pages/myBalance/myBalance.js b/pages/myBalance/myBalance.js index 1fdd811..889a615 100644 --- a/pages/myBalance/myBalance.js +++ b/pages/myBalance/myBalance.js @@ -56,7 +56,7 @@ Page({ accounts : newData, page : res.data.page }) - }) + }).catch(err => {}); }, /** diff --git a/pages/myBalance/myBalance.wxml b/pages/myBalance/myBalance.wxml index 7720c6e..6438532 100644 --- a/pages/myBalance/myBalance.wxml +++ b/pages/myBalance/myBalance.wxml @@ -6,6 +6,7 @@ {{number}} + 我的收益 @@ -16,7 +17,7 @@ - + 提现记录 diff --git a/pages/myBalance/myBalance.wxss b/pages/myBalance/myBalance.wxss index d7c50f7..5cf2088 100644 --- a/pages/myBalance/myBalance.wxss +++ b/pages/myBalance/myBalance.wxss @@ -26,7 +26,7 @@ } .balanceCont-number { - color: #ffba33; + color: #ffd890; font-size: 80rpx; font-weight: 600; } @@ -36,6 +36,26 @@ padding-right: 10rpx; } +.balanceUrl { + position: absolute; + right: 0; + top: 30rpx; + background-color: #37332d; + font-size: 28rpx; + border-radius: 40rpx 0 0 40rpx; + line-height: 68rpx; + border: 2rpx solid #887351; + padding-left: 30rpx; + color: #ead2a5; + display: flex; +} + +.balanceUrl image { + width: 54rpx; + height: 54rpx; + margin-top: 9rpx; +} + /* 提现 */ .label { background-color: white; @@ -176,4 +196,4 @@ .recommend-hint image { width: 200rpx; height: 200rpx; -} \ No newline at end of file +} diff --git a/pages/myProfit/myProfit.js b/pages/myProfit/myProfit.js new file mode 100644 index 0000000..9d5c8b8 --- /dev/null +++ b/pages/myProfit/myProfit.js @@ -0,0 +1,194 @@ +// pages/myProfit/myProfit.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + profitCount : '', //收益数据-人数 + profitFinance : '', //收益数据-收益信息 + profitUser : '', //收益数据-用户信息 + incometCount : '', //收益统计-团队 + incometFfinance : '', //收益统计-收益 + incometOrder : '', //收益统计-订单 + incometMonths : '', //收益数据-月份列表 + monthsIndex : 1, //账变记录筛选index + monthsValue : '', //账变记录筛选value + changeStyle : 'report', //tab默认选择类型 + //收益订单筛选列表 + ordersWay : [ + {value: '0', name: "充值", type: 'recharge'}, + {value: '1', name: "产品", type: 'product'} + ], + ordersIndex : 0, //收益订单筛选列表index + ordersValue : 'recharge', //收益订单筛选列表value + publicData : [], //订单与团队 公共数据列表 + //我的团队筛选列表 + teamWay : [ + {value: 0, name: "用户"}, + {value: 1, name: "达人"} + ], + teamIndex : 0, //我的团队筛选列表index + teamValue : 0, //我的团队筛选列表value + teamSort : 'asc', //我的团队排序 + page : {}, //下一页 + lodingStats : false, //加载状态 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad (options) { // }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow () { + // 获取我的收益数据 + this.profitInfo(); + + // 获取本月收益统计 + this.incomeInfo(); + }, + + /** + * tab栏选择 + */ + changeTabbar(e) { + this.setData({ + changeStyle: e.currentTarget.dataset.style + }) + + if(e.currentTarget.dataset.style == 'report'){ + // 获取收益统计 + this.incomeInfo(); + return + } + + // 获取收益订单列表 + 我的团队列表 + this.publicInfo(); + }, + + /** + * 我的收益数据 + */ + profitInfo() { + wx.$api.user.myProfit().then(res=>{ + this.setData({ + profitCount : res.data.count, + profitFinance: res.data.finance, + profitUser : res.data.user + }) + }).catch(err=>{}) + }, + + /** + * 收益统计 + */ + incomeInfo() { + wx.$api.user.myIncome(this.data.monthsValue).then(res=>{ + this.setData({ + incometCount : res.data.count, + incometFfinance: res.data.finance, + incometOrder : res.data.order, + incometMonths : res.data.months, + monthsIndex : parseInt(res.data.this_month) - 1 + }) + }).catch(err=>{}) + }, + + /** + * 收益订单列表 + 我的团队列表 + */ + publicInfo(page) { + let newStyle = this.data.changeStyle + let url = '' + if(newStyle == 'order') url = wx.$api.user.profitOrders(this.data.ordersValue, page) + if(newStyle == 'team') url = wx.$api.user.profitTeam(this.data.teamValue, this.data.teamSort, page) + + url.then(res=>{ + let listArr = this.data.publicData, + newData = [] + if(page == 1 || page == undefined) listArr = [] + newData = listArr.concat(res.data.data) + + this.setData({ + publicData : newData, + page : res.data.page, + lodingStats : false + }) + wx.stopPullDownRefresh() + }).catch(err=>{}) + }, + + /** + * 月份选择 + */ + screenBind(val) { + let newValue = parseInt(val.detail.value) + this.setData({ + monthsValue : newValue + 1, + monthsIndex : val.detail.value + }) + + // 获取收益统计 + this.incomeInfo(); + }, + + /** + * 订单类型选择 + */ + screenOrders(val) { + this.setData({ + ordersIndex: val.detail.value, + ordersValue: this.data.ordersWay[val.detail.value].type + }) + // 获取收益订单列表 + 我的团队列表 + this.publicInfo(); + }, + + /** + * 团队类型选择 + */ + screenTeam(val) { + this.setData({ + teamIndex: val.detail.value, + teamValue: this.data.ordersWay[val.detail.value].value + }) + // 获取收益订单列表 + 我的团队列表 + this.publicInfo(); + }, + + /** + * 销量排序 + */ + teamTap () { + if (this.data.teamSort == 'asc') { + this.setData({ + teamSort : 'desc', + }) + } else { + this.setData({ + teamSort : 'asc', + }) + } + + // 获取收益订单列表 + 我的团队列表 + this.publicInfo(); + }, + + /** + * 上拉加载 + */ + onReachBottom(){ + this.setData({ + lodingStats: true + }) + let pageNumber = this.data.page.current + if(this.data.page.has_more){ + pageNumber++ + this.publicInfo(pageNumber) + } + } +}) \ No newline at end of file diff --git a/pages/myProfit/myProfit.json b/pages/myProfit/myProfit.json new file mode 100644 index 0000000..3257542 --- /dev/null +++ b/pages/myProfit/myProfit.json @@ -0,0 +1,6 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "我的收益", + "navigationBarBackgroundColor": "#d0a76c", + "navigationBarTextStyle": "white" +} \ No newline at end of file diff --git a/pages/myProfit/myProfit.wxml b/pages/myProfit/myProfit.wxml new file mode 100644 index 0000000..80f8bd2 --- /dev/null +++ b/pages/myProfit/myProfit.wxml @@ -0,0 +1,355 @@ + + + {{profitUser.nickname}}的收益 + + + + + + + + 我在本时生活总收益! + + + + 余额 + {{profitUser.account.balance}} + + 提现 + + + + + 分享产品收益 + + + {{profitFinance.share_product}} + + + + + 团队产品消费收益 + + + {{profitFinance.team_product}} + + + + + 分享储值收益 + + + {{profitFinance.share_Recharge}} + + + + + 团队储值收益 + + + {{profitFinance.team_recharge}} + + + + + 达人总数 + + + {{profitCount.leader}} + + + + + 用户总数 + + + {{profitCount.users}} + + + + + + + 总收益 + + + {{profitFinance.all_profit}} + + + + + 已提现 + + + {{profitFinance.withdrawed}} + + + + + 提现中 + + + {{profitFinance.withdrawing}} + + + + + + + + 收益报表 + 收益订单 + 我的团队 + + + + + + + + 本月收益统计 + + + + {{incometMonths[monthsIndex].name}} + + + + + + + + 分享产品收益 + + + {{incometFfinance.share_product.this_month}} + + + + {{incometFfinance.share_product.text}} + + + + + 团队产品消费收益 + + + {{incometFfinance.team_product.this_month}} + + + + {{incometFfinance.team_product.text}} + + + + + 分享储值收益 + + + {{incometFfinance.share_recharge.this_month}} + + + + {{incometFfinance.share_recharge.text}} + + + + + 团队储值收益 + + + {{incometFfinance.team_recharge.this_month}} + + + + {{incometFfinance.team_recharge.text}} + + + + + + + 新增团队统计 + + + + + 新增达人数 + + + {{incometCount.leader}} + + + + + 新增用户数 + + + {{incometCount.users}} + + + + + + + 消费订单统计 + + + + + 产品消费 + + + {{incometOrder.product}} + + + + + 储值消费 + + + {{incometOrder.recharge}} + + + + + + + + + + + 共{{publicData.length}}条订单 + + + + {{ordersWay[ordersIndex].name}} + + + + + + + + + {{item.type + == + 'recharge' ? '储值' : '产品'}}订单号:{{item.order.orderid}} + + + + {{item.name}} + + + + + 姓名:{{item.user.nickname}} + + + 联系电话:{{item.user.username}} + + + 佣金:¥{{item.bonus}} + + + 当前状态:{{item.order.status}} + + + + + + + + 加载中... + + + 没有更多了~ + + + + + + + 抱歉,目前暂无数据~ + + + + + + + + + 共{{publicData.length}}人 + + + + {{teamWay[teamIndex].name}} + + + + + + 创收排行 + + + + + + 达人姓名 + 联系电话 + 身份 + 创收额 + + + + + + {{item.user.nickname}} + + + {{item.user.username}} + + + {{item.user.identity.identity_name}} + + + {{item.balance}} + + + + + + + 加载中... + + + 没有更多了~ + + + + + + + + + 抱歉,目前暂无数据~ + + + + + \ No newline at end of file diff --git a/pages/myProfit/myProfit.wxss b/pages/myProfit/myProfit.wxss new file mode 100644 index 0000000..1569099 --- /dev/null +++ b/pages/myProfit/myProfit.wxss @@ -0,0 +1,541 @@ +page { + background-color: #ececec; +} + +/* 头部 */ +.profigHead { + background: linear-gradient(to bottom, #d0a76c 50%, #ffffff); + padding: 30rpx; + height: 300rpx; + width: 100%; + box-sizing: border-box; + overflow: hidden; +} + +.profigHead-user { + line-height: 90rpx; + display: flex; +} + +.profigHead-user image { + width: 90rpx; + height: 90rpx; + margin-right: 20rpx; + border-radius: 50%; + border: 2rpx solid #ffffff; +} + +.profigHead-img { + opacity: .1; + width: 300rpx; + height: 300rpx; + position: absolute; + top: -50rpx; + right: -40rpx; +} + +/* 内容 */ +.profigCont { + position: absolute; + top: 140rpx; + padding: 30rpx; + box-sizing: border-box; + width: 100%; +} + +.profigLabel { + background-color: #2f2e2c; + border-radius: 20rpx; + overflow: hidden; +} + +.profigLabel-top { + background: linear-gradient(-250deg, #feecd4, #d5b687 90%); + padding: 0 30rpx; + height: 90rpx; + line-height: 90rpx; +} + +.profigLabel-balance { + color: #efd8b8; + padding: 30rpx 40rpx; + box-sizing: border-box; + display: flex; +} + +.profigLabel-balance-left { + flex: 1; +} + +.profigLabel-balance-name { + font-size: 28rpx; +} + +.profigLabel-balance-left text { + font-size: 56rpx; + font-weight: 600; +} + +.profigLabel-balance-withdrawal { + background-color: #fdebd3; + color: #000000; + display: inline-block; + height: 64rpx; + line-height: 64rpx; + padding: 0 40rpx; + border-radius: 60rpx; + margin-top: 40rpx; +} + + +.profigLabel-list-name { + margin-bottom: 10rpx; + display: flex; +} + +.profigLabel-list-name image { + width: 20rpx; + height: 20rpx; + margin: 10rpx; +} + +.profigLabel-list { + padding: 30rpx 40rpx 0; + box-sizing: border-box; +} + +.profigLabel-list, +.profigLabel-cash { + color: #ffffff; + position: relative; + overflow: hidden; + font-size: 28rpx; +} + +.profigLabel-list::after, +.profigLabel-list::before { + position: absolute; + content: ''; + left: 0; + width: 100%; + height: 0; + border-top: 2rpx dotted #665f54; +} + +.profigLabel-list::after { + top: 0; +} + +.profigLabel-list::before { + bottom: 0; +} + +.profigLabel-list-label { + width: 50%; + float: left; + margin-bottom: 40rpx; +} + +.profigLabel-cash { + text-align: center; + padding: 30rpx 0; +} + +.profigLabel-cash-label { + width: 33.33%; + float: left; +} + + +.profigLabel-cash-name { + margin-bottom: 10rpx; + display: inline-block; + position: relative; +} + +.profigLabel-cash-active::after { + position: absolute; + content: ''; + left: 0; + bottom: 4rpx; + width: 100%; + height: 2rpx; + background-color: #ffffff; +} + +/* tab选项卡 */ +.profigTab-nav { + display: flex; + line-height: 120rpx; +} + +.profigTab-nav-name { + width: 33.33%; + flex: 3; + text-align: center; + position: relative; +} + +.profigTab-nav-name.active { + color: #ffa30a; +} + +.profigTab-nav-name.active::after { + position: absolute; + content: ''; + left: calc(50% - 30rpx); + bottom: 15rpx; + width: 60rpx; + height: 8rpx; + background-color: #ffa30a; +} + + +/* tab收益报表内容 */ +.profigReport, +.profigOrder, +.profigTeam { + border-radius: 20rpx; + margin-top: 20rpx; + display: none; +} + +.profigReport.show, +.profigOrder.show, +.profigTeam.show { + display: block; +} + +.profigReport { + background-color: #ffffff; +} + +.profigReport-module { + padding: 30rpx 30rpx 40rpx; + box-sizing: border-box; +} + +.profigReport-module-title { + display: flex; +} + +.profigReport-module-name { + flex: 1; + font-weight: 700; +} + +.profigReport-module-picker { + display: flex; + color: #797979; + font-size: 28rpx; + padding-top: 4rpx; +} + +.profigReport-module-icon { + width: 28rpx; + height: 28rpx; + margin: 6rpx 0 0 10rpx; +} + +.profigLabel-label-billie { + background-color: #fcf6ea; + border: 2rpx solid #f7e5db; + color: #f2863b; + padding-right: 20rpx; + height: 48rpx; + line-height: 48rpx; + font-size: 22rpx; + display: inline-flex; + border-radius: 10rpx; +} + +.profigLabel-label-billie image { + width: 22rpx; + height: 22rpx; + margin: 12rpx 10rpx; +} + +.profigLabel-label-billie.active { + color: #00a915; + background-color: #efffec; + border: 2rpx solid #c9fbbf; +} + +.profigReport-list { + padding: 0 -20rpx; + width: 100%; + box-sizing: border-box; + overflow: hidden; +} + +.profigReport-list-label { + width: calc(50% - 40rpx); + float: left; + margin: 40rpx 20rpx 0; + font-size: 28rpx; +} + +.profigReport-label-name { + color: #999999; +} + +.profigLabel-label-price { + margin: 10rpx 0; + font-size: 34rpx; +} + +.profigReport-module-subset { + position: relative; + text-align: center; +} + +.profigReport-module-subset::after { + position: absolute; + content: ''; + left: 0; + top: 0; + width: 100%; + height: 0; + border-top: 2rpx solid #e4e4e4; +} + +.profigReport-subset-name { + text-align: center; + margin: 0 auto 40rpx; + font-size: 28rpx; + background-color: #f1f1f1; + padding: 0 30rpx; + line-height: 64rpx; + display: inline-block; + border-radius: 10rpx; +} + +.profigReport-subset-label { + text-align: center; + width: 50%; + float: left; + font-size: 28rpx; +} + +/* tab收益订单内容 */ +.profigOrder-list { + background-color: white; + padding: 30rpx; + box-sizing: border-box; + border-radius: 10rpx; + font-size: 28rpx; + margin-bottom: 30rpx; +} + +.profigOrder-no { + position: relative; + padding-bottom: 20rpx; + margin-bottom: 20rpx; +} + +.profigOrder-no::after { + position: absolute; + content: ''; + left: 0; + width: 100%; + height: 0; + border-top: 2rpx dotted #e7e7e7; + bottom: 0; +} + +.profigOrder-no-name { + display: flex; + line-height: 44rpx; +} + +.profigOrder-no-name image { + width: 32rpx; + height: 32rpx; + margin-left: 20rpx; + margin-top: 6rpx; +} + +.profigOrder-no-text { + color: #515151; + margin: 20rpx 0; +} + +.profigOrder-label { + line-height: 60rpx; +} + +.profigOrder-label-color { + color: #ffa30a; +} + +.profigOrder-no-tips { + background-color: green; + font-size: 22rpx; + color: #ffffff; + height: 36rpx; + line-height: 36rpx; + padding: 0 10rpx; + border-radius: 30rpx; + margin: 5rpx 10rpx 0 0; +} + +.profigOrder-no-tips.active { + background-color: #ffa30a; +} + +.profigOrder-module-title { + background-color: #ffffff; + border-radius: 10rpx; + display: flex; + box-sizing: border-box; + line-height: 80rpx; + margin-bottom: 30rpx; + padding: 0 30rpx; + box-sizing: border-box; + font-size: 28rpx; +} + +.profigOrder-module-name { + flex: 1; +} + +.profigOrder-module-name text { + color: #ffa30a; + padding: 0 5rpx; +} + +.profigOrder-module-title .profigReport-module-picker { + padding: 0; +} + +.profigOrder-module-title .profigReport-module-icon { + margin-top: 30rpx; +} + +/* tab我的团队内容 */ +.profigTeam-module-title { + display: flex; + margin-bottom: 30rpx; +} + +.profigTeam .profigOrder-module-title { + flex: 1; + margin: 0 30rpx 0 0; +} + +.profigTeam-ranking { + width: 180rpx; + height: 80rpx; + line-height: 80rpx; + position: relative; + background-color: #ffffff; + padding: 0 20rpx; + box-sizing: border-box; + border-radius: 10rpx; + color: green; + font-size: 28rpx; +} + +.profigTeam-ranking::after, +.profigTeam-ranking::before { + position: absolute; + right: 20rpx; + content: ''; + width: 0; + height: 0; + border-left: 8rpx solid transparent; + border-right: 8rpx solid transparent; +} + +.profigTeam-ranking::after { + bottom: 28rpx; + border-top: 8rpx solid grey; +} + +.profigTeam-ranking::before { + top: 28rpx; + border-bottom: 8rpx solid grey; +} + +.profigTeam-ranking.ascactive::after { + border-top: 8rpx solid green; +} + +.profigTeam-ranking.descactive::before { + border-bottom: 8rpx solid green; +} + +.profigTeam-list { + margin-top: 30rpx; +} + +.profigTeam-nav { + background-color: #ffffff; + border-radius: 10rpx; + display: flex; + line-height: 80rpx; + margin-bottom: 20rpx; +} + +.profigTeam-name { + flex: 4; + text-align: center; + width: 25%; + font-size: 28rpx; +} + +.profigTeam-label { + background-color: #ffffff; + border-radius: 10rpx; + font-size: 26rpx; +} + +.profigTeam-label-list { + display: flex; + border-bottom: 2rpx solid #e8e8e8; +} + +.profigTeam-label-list:last-child { + border: none; +} + +.profigTeam-label-cont { + line-height: 110rpx; + flex: 4; + width: 25%; + text-align: center; +} + +.profigTeam-label-head { + display: flex; +} + +.profigTeam-label-head image { + width: 50rpx; + height: 50rpx; + border-radius: 50%; + margin: 30rpx 20rpx; +} + +.profigTeam-label-name { + width: calc(100% - 90rpx); +} + +.profigTeam-label-color { + color: #ffa30a; +} + +.public-hint { + background-color: #ffffff; + border-radius: 10rpx; + text-align: center; + padding: 60rpx 0; + color: #999; + font-size: 28rpx; +} + +.public-hint image { + width: 160rpx; + height: 160rpx; + margin: 0 auto 20rpx; +} \ No newline at end of file diff --git a/pages/myProfit_list/myProfit_list.js b/pages/myProfit_list/myProfit_list.js new file mode 100644 index 0000000..732906b --- /dev/null +++ b/pages/myProfit_list/myProfit_list.js @@ -0,0 +1,61 @@ +/* + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ +*/ + +Page({ + + /** + * 页面的初始数据 + */ + data: { + name : '', //权益名 + profitData : [], //权益列表 + page : {}, //下一页 + lodingStats : false, //加载状态 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad (options) { + this.setData({ + name: options.name + }) + + // 获取收益列表 + this.profitInfo(); + }, + + /** + * 收益列表 + */ + profitInfo(page) { + wx.$api.user.profitLogs(this.data.name, page).then(res=>{ + let listArr = this.data.publicData, + newData = [] + if(page == 1 || page == undefined) listArr = [] + newData = listArr.concat(res.data.data) + this.setData({ + publicData : newData, + page : res.data.page, + lodingStats : false + }) + wx.stopPullDownRefresh() + }).catch(err=>{}) + }, + + /** + * 上拉加载 + */ + onReachBottom(){ + this.setData({ + lodingStats: true + }) + let pageNumber = this.data.page.current + if(this.data.page.has_more){ + pageNumber++ + this.profitInfo(pageNumber) + } + } +}) \ No newline at end of file diff --git a/pages/myProfit_list/myProfit_list.json b/pages/myProfit_list/myProfit_list.json new file mode 100644 index 0000000..2c9678a --- /dev/null +++ b/pages/myProfit_list/myProfit_list.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "权益列表" +} \ No newline at end of file diff --git a/pages/myProfit_list/myProfit_list.wxml b/pages/myProfit_list/myProfit_list.wxml new file mode 100644 index 0000000..467e169 --- /dev/null +++ b/pages/myProfit_list/myProfit_list.wxml @@ -0,0 +1,41 @@ + + + + {{item.name}} + ¥{{item.bonus}} + + + + 时间 + {{item.created_at}} + + + 状态 + {{item.order.status}} + + + + 收益来源 + + + + {{item.source.nickname}} + {{item.source.username}} + + + + + + + 加载中... + + + 没有更多了~ + + + + + + + 抱歉,目前暂无记录~ + \ No newline at end of file diff --git a/pages/myProfit_list/myProfit_list.wxss b/pages/myProfit_list/myProfit_list.wxss new file mode 100644 index 0000000..6403513 --- /dev/null +++ b/pages/myProfit_list/myProfit_list.wxss @@ -0,0 +1,82 @@ +/* 记录列表 */ +.record-list { + background-color: #fff; + border-radius: 10rpx; + margin: 30rpx; +} + +.record-top { + display: flex; + padding: 30rpx; + box-sizing: border-box; +} + +.record-way { + flex: 1; +} + +.record-take { + font-weight: 600; +} + +.record-cont { + padding: 0 30rpx; + box-sizing: border-box; + color: #999; + font-size: 28rpx; +} + +.record-label { + display: flex; + line-height: 70rpx; +} + +.record-label-name { + flex: 1; +} + +.record-label-status { + color: red; +} + +.record-source { + border-top: 10rpx solid #f7f7f7; + margin-top: 20rpx; +} + +.record-source-name { + background: #f7f7f7; + color: #000; + width: 140rpx; + text-align: center; + line-height: 60rpx; + margin: 0 auto; + font-size: 28rpx; +} + +.record-source-cont { + position: relative; + padding: 40rpx 30rpx 20rpx; + box-sizing: border-box; +} + +.record-source-img { + width: 70rpx; + height: 70rpx; + border-radius: 50%; +} + +.record-source-info { + position: absolute; + left: 0; + top: 0; + width: 100%; + padding: 40rpx 30rpx 20rpx 120rpx; + box-sizing: border-box; + line-height: 70rpx; + display: flex; +} + +.record-source-nickname { + flex: 1; +} \ No newline at end of file diff --git a/pages/order/order.js b/pages/order/order.js index dbfaf24..2508661 100644 --- a/pages/order/order.js +++ b/pages/order/order.js @@ -55,7 +55,7 @@ Page({ lodingStats : false }) wx.stopPullDownRefresh() - }) + }).catch(err => {}); }, /** @@ -98,7 +98,7 @@ Page({ title: res.data, icon : 'none' }) - }) + }) .catch(err => {}); } else if (res.cancel) { wx.showToast({ title : '取消', @@ -148,7 +148,7 @@ Page({ this.orderInfo(); } }) - }) + }).catch(err => {}); } // payTips为2的时候为沃钱包支付 if(this.data.pay.payTips == 2) { @@ -163,7 +163,7 @@ Page({ this.setData({ ['pay.payState']: false }) - }) + }).catch(err => {}); }, diff --git a/pages/order/order.wxml b/pages/order/order.wxml index e72905d..3eba6ab 100644 --- a/pages/order/order.wxml +++ b/pages/order/order.wxml @@ -95,13 +95,13 @@ - + \ No newline at end of file diff --git a/pages/orderData/orderData.js b/pages/orderData/orderData.js index 858d7fe..dbd912e 100644 --- a/pages/orderData/orderData.js +++ b/pages/orderData/orderData.js @@ -41,7 +41,7 @@ Page({ this.setData({ order : res.data }) - }) + }).catch(err => {}); }, /** @@ -81,7 +81,7 @@ Page({ title: res.data, icon : 'none' }) - }) + }).catch(err => {}); } else if (res.cancel) { wx.showToast({ title : '取消', @@ -132,7 +132,7 @@ Page({ this.orderInfo(); } }) - }) + }).catch(err => {}); } // payTips为2的时候为沃钱包支付 if(this.data.pay.payTips == 2) { diff --git a/pages/packet/packet.js b/pages/packet/packet.js index 528c03e..2d9d21c 100644 --- a/pages/packet/packet.js +++ b/pages/packet/packet.js @@ -86,7 +86,7 @@ Page({ }) } }, 1000) - }) + }).catch(err => {}); } }, @@ -123,7 +123,7 @@ Page({ }) } }, 1000) - }) + }).catch(err => {}); }, /** diff --git a/pages/password/password.js b/pages/password/password.js index f21690a..e630ba2 100644 --- a/pages/password/password.js +++ b/pages/password/password.js @@ -67,6 +67,6 @@ Page({ url: '/pages/user/user' }) },2000) - }) + }).catch(err => {}); } }) \ No newline at end of file diff --git a/pages/password_forget/password_forget.wxml b/pages/password_forget/password_forget.wxml index c9cc889..36e406e 100644 --- a/pages/password_forget/password_forget.wxml +++ b/pages/password_forget/password_forget.wxml @@ -2,7 +2,7 @@
手机号: - + diff --git a/pages/recommend/recommend.js b/pages/recommend/recommend.js index 90a5c98..c9b4eef 100644 --- a/pages/recommend/recommend.js +++ b/pages/recommend/recommend.js @@ -37,7 +37,7 @@ Page({ lodingStats : false }) wx.stopPullDownRefresh() - }) + }).catch(err => {}); }, /** diff --git a/pages/rights/rights.js b/pages/rights/rights.js index 2e4f31c..532a372 100644 --- a/pages/rights/rights.js +++ b/pages/rights/rights.js @@ -4,6 +4,7 @@ Page({ * 页面的初始数据 */ data: { + parentId : '', //分享者ID address : '', //默认收货地址 allAddress : '', //收货地址列表 groupId : '', //权益id @@ -16,7 +17,7 @@ Page({ content : '', //内容介绍 notification: '', //重要提示 remark : '', //使用须知 - noticeShow : false, //须知显示状态 + noticeShow : true, //须知显示状态 addressShow : false, //收货地址显示 getType : '', //是否显示自提 platIndex : 0, //选择提交方式下标 @@ -32,8 +33,8 @@ Page({ disabled : false, payWayIndex : 0, payWay :[ - {value: 0, name: "微信支付"} - // {value: 1, name: "沃钱包支付"} + {value: 0, name: "微信支付"}, + {value: 1, name: "沃钱包支付"} ] }, @@ -45,17 +46,18 @@ Page({ groupId : options.rightsId || options.id, typeWeb : options.type, getType : options.getType, - openid : options.openid || '' + openid : options.openid || '', + parentId : options.parentid || '' }) + + // 获取详情 + this.rightsInfo(); }, /** * 生命周期函数--监听页面显示 */ - onShow() { - // 获取详情 - this.rightsInfo(); - }, + onShow() {}, /** * 详情 @@ -107,25 +109,10 @@ Page({ this.setData({ uniUrl : encodeURIComponent(res.data) }) - }) + }).catch(err => {}); } } - }).catch(err=>{ - if(!err.login){ - wx.showModal({ - title : '用户登录已过期', - content : '请重新登录', - showCancel : false, - success : res => { - if (res.confirm) { - wx.redirectTo({ - url: '/pages/login/login' - }) - } - } - }) - } - }) + }).catch(err=>{}) }, /** @@ -275,9 +262,10 @@ Page({ let right_id = this.data.detail.right_id, address_id = this.data.address.id, is_deliver = this.data.isdeliver, - qty = this.data.num + qty = this.data.num, + parent_id = this.data.parentId - wx.$api.index.rightStore(right_id, address_id, is_deliver, qty).then(res=>{ + wx.$api.index.rightStore(right_id, address_id, is_deliver, qty, parent_id).then(res=>{ if(res.data.canPay == false) { wx.showToast({ title : '支付成功', @@ -299,66 +287,12 @@ Page({ rightsTap: true }) }else { - // payWayIndex为0的时候为微信支付 - if(this.data.payWayIndex == 0) { - wx.$api.index.wechat(res.data.trade_no).then(res=>{ - let payInfo = JSON.parse(res.data) - wx.requestPayment({ - timeStamp: payInfo.timeStamp, - nonceStr : payInfo.nonceStr, - package : payInfo.package, - paySign : payInfo.paySign, - signType : payInfo.signType, - success : res=>{ - if(res.errMsg == "requestPayment:ok"){ - wx.showToast({ - title: '支付成功', - icon : 'success' - }) - setTimeout(()=>{ - if(this.data.isdeliver == 1) { - wx.reLaunch({ - url: '/pages/order/order?orderType=rightsCoupons' - }) - } else { - wx.reLaunch({ - url: '/pages/order/order?orderType=rights' - }) - } - // wx.reLaunch({ - // url: '/pages/coupon/coupon?type=couponPublic' - // }) - },3000) - } - }, - fail : res=>{ - if(this.data.isdeliver == 1) { - wx.reLaunch({ - url: '/pages/order/order?orderType=rightsCoupons&stateType=unpay' - }) - } else { - wx.reLaunch({ - url: '/pages/order/order?orderType=rights&stateType=unpay' - }) - } - // wx.reLaunch({ - // url: '/pages/order/order?stateType=unpay' - // }) - } - }) - }) - } - // payWayIndex为1的时候为沃钱包支付 - if(this.data.payWayIndex == 1) { - const newUrl = "https://lifetest.ysd-bs.com/unicom/payment?trade_no=" + res.data.trade_no - let url= encodeURIComponent(newUrl) - wx.redirectTo({ - // 跳转到webview页面 - url: `/pages/webView/webView?url=${url}` - }); - } + // 跳转收银台 + wx.navigateTo({ + url: "/pages/cashier/cashier?trade_no=" + res.data.trade_no + "&amount=" + this.data.amount + "&is_deliver=" + is_deliver + "&pay_type=rightsPay" + }) } - }) + }).catch(err => {}); }, diff --git a/pages/rights/rights.wxml b/pages/rights/rights.wxml index 4eb0dd6..0b990f3 100644 --- a/pages/rights/rights.wxml +++ b/pages/rights/rights.wxml @@ -9,7 +9,11 @@ 立即购买 - + + + 共:{{num}}件商品 + 实付:¥{{amount}} + @@ -35,12 +39,9 @@ - + - - {{detail.four_title}} - @@ -54,21 +55,41 @@ - 数量 - - - - - + + + + + {{detail.title}} + + + {{detail.price}} + + - + + + + + - - + + + {{detail.attribute.form_type}} + -¥{{score}} + + + + + + + 电子券 {{detail.qty}}张 @@ -87,7 +108,7 @@ --> - 请选择提交方式 + 提交方式 @@ -98,10 +119,13 @@ - 收货地址 + - {{address.all_address}} + + {{address.name}}{{address.mobile}} + {{address.all_address}} + @@ -114,24 +138,13 @@ 快递运费 - ¥{{freight}} + ¥{{freight}} - - - {{detail.attribute.form_type}} - ¥{{score}} - - - {{detail.attribute.form_pay}} - ¥{{amount}} - - - - + - - + + + 可用余额:{{account.silver}} + + + + 可用余额:{{account.drill}} + + + + 可用余额:{{account.balance}} + @@ -171,26 +182,26 @@ - + 我的工具 - + - 我的邀请码 + 储值分享 - + - 我的推荐 + 产品分享 - 积分赠与 + 红包赠予 diff --git a/pages/user/user.wxss b/pages/user/user.wxss index bde8b6e..c8e261e 100644 --- a/pages/user/user.wxss +++ b/pages/user/user.wxss @@ -7,18 +7,18 @@ } .userHead-img { - width: 135rpx; - height: 135rpx; + width: 140rpx; + height: 140rpx; border-radius: 50%; position: relative; } -.userHead-img image { +.userHead-img>image { position: absolute; - left: 22rpx; + left: 10rpx; top: 0; - width: 110rpx; - height: 110rpx; + width: 120rpx; + height: 120rpx; border-radius: 50%; } @@ -27,27 +27,53 @@ height: 120rpx; } -.userHead-img view { - display: inline-block; +.userHead-img .userHead-tips { position: absolute; - bottom: 0; - left: 10rpx; - background: #c6c6c6; - border-radius: 30rpx; - color: #fff; - font-size: 24rpx; - padding: 4rpx 0; + width: 140rpx; text-align: center; - width: 130rpx; + bottom: 0; + left: 0; + background: #c6c6c6; + color: #fff; + border-radius: 30rpx; + height: 42rpx; + line-height: 40rpx; display: inline-block; z-index: 99; } -.userHead-img view.active { - width: 120rpx; - left: 18rpx; + +.userHead-img .userHead-tips.super, +.userHead-img .userHead-tips.sage { background: #000; - color: #fff; +} + +.userHead-img .userHead-tips.default { + font-size: 24rpx; + text-align: center; +} + +.userHead-img text { + font-size: 22rpx; + color: transparent; + font-weight: 700; +} + +.userHead-img view.super text { + background-image: linear-gradient(135deg,#bcbcbc,#f1f1f1, #bcbcbc); + -webkit-background-clip:text; +} + +.userHead-img view.sage text { + background-image: linear-gradient(135deg,#d4ac02,#fffa9a, #e0b500); + -webkit-background-clip:text; +} + +.userHead-tips image { + width: 24rpx; + height: 24rpx; + margin-right: 5rpx; + vertical-align: -2rpx; } .userHead-text { @@ -74,7 +100,7 @@ .userHead-name { margin: 10rpx 0 20rpx; - font-size: 32rpx; + font-size: 36rpx; font-weight: 600; } @@ -89,7 +115,7 @@ } .userHead-tel { - font-size: 28rpx; + font-size: 32rpx; } /* 轮播图 */ diff --git a/pages/userGoods/goodsCode/goodsCode.js b/pages/userGoods/goodsCode/goodsCode.js new file mode 100644 index 0000000..0e5a43e --- /dev/null +++ b/pages/userGoods/goodsCode/goodsCode.js @@ -0,0 +1,221 @@ +// pages/userGoods/goodsCode/goodsCode.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + qrcode : '', //二维码 + Picture : 'https://lifetest.ysd-bs.com/storage/materials/2021/08/06/shareImg.jpg', //海报图片 + rightId : '', //产品id + userInfo : '', //我的信息 + isImgLay : false, //是否显示图片弹出层 + parentId : '', //是否分享进入 + shareState : false, //显示分享朋友圈弹出层 + pageDown : '', //下载海报和展示海报 + pageShare : '', //分享好友朋友圈海报 + profitText : '', //奖励文字 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad (options) { + this.setData({ + rightId: options.rightid, + parentId: options.parent_id + }) + + // 判断是否由分享进入 + // if(options.type == "share"){} + + // 获取二维码 + wx.$api.user.publicCode('mini', 'goods', 'pages/userGoods/goodsDet/goodsDet?rightid=' + options.rightid + '&type=share').then(res=>{ + this.setData({ + qrcode : res.data.qrcode, + userInfo : res.data.user + }) + }).catch(err=>{ + if(!err.login){ + // 写入缓存 + wx.setStorage({ + key : 'token', + data : '' + }) + } + }) + + // 获取分享海报图 + this.posterShow(); + }, + + /** + * 分享海报图 + */ + posterShow(){ + wx.$api.user.productPoster(this.data.rightId).then(res=>{ + this.setData({ + pageDown : res.data.cover, + pageShare : res.data.wechat_cover, + profitText: res.data.profit_text + }) + }).catch(err=>{ + if(!err.login){ + // 写入缓存 + wx.setStorage({ + key : 'token', + data : '' + }) + } + }) + }, + + /** + * 预览图片 + */ + bigPicture(e) { + wx.previewImage({ + current : e.currentTarget.dataset.src, + urls : [e.currentTarget.dataset.src] + }) + }, + + /** + * 分享朋友圈弹出层状态 + */ + shareShow() { + this.setData({ + shareState: !this.data.shareState + }) + }, + + /** + * 绘图 + */ + dowImg(){ + wx.showLoading({ + title: '加载中', + }) + + let downImg = new Promise(success=>{ + wx.getImageInfo({ + src : this.data.pageDown, + success : res => { + success(res.path) + } + }) + }) + + // 下载素材 + let codeImg = new Promise(success => { + wx.getImageInfo({ + src : this.data.qrcode, + success : res => { + success(res.path) + } + }) + }) + + Promise.all([codeImg, downImg]).then(res => { + // 绘制海报 + const ctx = wx.createCanvasContext('qrcodeCard') + ctx.save() + + // 绘制背景 + ctx.drawImage(res[1], 0, 0, 375, 650) + + // 绘制白色背景 + ctx.drawImage('/static/img/goodsCode_white.png', 30, 460, 120, 120) + + // 绘制二维码 + ctx.drawImage(res[0], 40, 470, 100, 100) + + ctx.save(); + ctx.beginPath(); //开始绘制 + ctx.arc(70 / 2 + 156, 70 / 2 + 250, 70 / 2, 0, Math.PI * 2, false); + ctx.clip(); + + // 保存图片 + ctx.draw(true, () => { + wx.hideLoading() + wx.canvasToTempFilePath({ + canvasId: 'qrcodeCard', + x: 0, + y: 0, + success: res => { + wx.saveImageToPhotosAlbum({ + filePath: res.tempFilePath, + success : res=>{ + wx.showToast({ + title: '分享海报已保存至相册', + icon : 'none' + }) + }, + fail : err=>{ + wx.showModal({ + title : '提示', + content : '暂未授权小程序写入您的相册,无法存储二维码海报', + confirmColor: '#d82526', + confirmText : '去设置', + success : info=>{ + if (info.confirm){ + wx.openSetting() + } + } + }) + }, + complete: e => {} + }) + } + }) + }) + + }).catch(err=>{ + wx.showToast({ + title: '海报下载,请检查网络', + icon : 'none' + }) + }) + }, + + /** + * 图片弹出层 + */ + removeSaveImg(){ + this.setData({ + isImgLay: !this.data.isImgLay + }) + }, + + /** + * 保存图片到本地 + */ + saveImg(){ + this.dowImg(); + this.setData({ + isImgLay: !this.data.isImgLay + }) + }, + + /** + * 分享 + */ + onShareAppMessage(){ + return { + title : this.data.userInfo.nickname + "邀请您进入本时生活", + imageUrl: this.data.pageShare, + path : "/pages/userGoods/goodsDet/goodsDet?parent_id=" + this.data.userInfo.user_id + "&rightid=" + this.data.rightId + "&type=share", + } + }, + + /** + * 用户点击右上角分享朋友圈 + */ + onShareTimeline: function () { + return { + title : this.data.userInfo.nickname + "邀请您进入本时生活", + path : "/pages/userGoods/goodsDet/goodsDet?parent_id=" + this.data.userInfo.user_id + "&rightid=" + this.data.rightId + "&type=share", + imageUrl: this.data.pageShare + } + } +}) diff --git a/pages/userGoods/goodsCode/goodsCode.json b/pages/userGoods/goodsCode/goodsCode.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/userGoods/goodsCode/goodsCode.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/userGoods/goodsCode/goodsCode.wxml b/pages/userGoods/goodsCode/goodsCode.wxml new file mode 100644 index 0000000..9b88c60 --- /dev/null +++ b/pages/userGoods/goodsCode/goodsCode.wxml @@ -0,0 +1,69 @@ + + + + + + + + + 产品海报 + + + + + {{profitText}} + + + + + 29.9元享39元【清雅水境养生沐浴】门票一张!静心,浴享,保健。尊享洗浴,尽在清雅水境! + + + + + + 朋友圈 + + + + 生成海报 + + + + + + + + + + + 1 + 点击右上角打开菜单 + + + 2 + 选择菜单分享朋友圈 + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/userGoods/goodsCode/goodsCode.wxss b/pages/userGoods/goodsCode/goodsCode.wxss new file mode 100644 index 0000000..3adb14e --- /dev/null +++ b/pages/userGoods/goodsCode/goodsCode.wxss @@ -0,0 +1,278 @@ +.codeTitle { + width: 100%; + background-color: #222222; + border-radius: 0 0 300rpx 300rpx; + box-sizing: border-box; + padding: 30rpx 20rpx 0; +} + +.codeTitle image { + text-align: center; + width: 100%; + border-radius: 20rpx; + display: block; +} + + +.goodsBack { + position: fixed; + width: 100%; + height: 100%; + left: 0; + top: 0; + background: rgba(0, 0, 0, .5); +} + +.goodsPop { + height: 84vh; + width: 100%; + background-color: #ffffff; + border-radius: 50rpx 50rpx 0 0; + left: 0; + bottom: 0; + position: fixed; +} + +.goodsTab { + display: flex; +} + +.goodsTab-label { + background-color: #dadada; + flex: 2; + text-align: center; + width: 50%; + line-height: 90rpx; + border-radius: 40rpx 40rpx 0 0; + /* border-radius: 0 40rpx 0 30rpx; */ +} + +.goodsTab-label.active { + background-color: #ffffff; + border-radius: 40rpx 30rpx 0 0; + margin-top: -20rpx; + font-weight: 600; +} + +.goodsTitle { + background-color: #1f1f1f; + color: #eed4ae; + border-radius: 25rpx; + height: 90rpx; + line-height: 90rpx; + padding: 0 30rpx; + box-sizing: border-box; + display: flex; + margin: 30rpx; + position: relative; +} + +.goodsTitle image { + width: 46rpx; + height: 46rpx; + margin: 22rpx 20rpx 0 0; +} + +.goodsTitle::after { + position: absolute; + bottom: -10rpx; + left: calc(50% - 20rpx); + content: ''; + width: 0; + height: 0; + border-left: 20rpx solid transparent; + border-right: 20rpx solid transparent; + border-top: 16rpx solid #1f1f1f; +} + +.goodsPoster { + text-align: center; + width: 100%; + height: 50vh; + overflow-y: scroll; +} + +.goodsPoster image { + width: 55%; + margin: 20rpx 0; +} + +.goodsScroll-text { + background-color: #ffffff; + position: absolute; + bottom: 160rpx; + left: 0; + width: 100%; + padding: 20rpx 40rpx; + box-sizing: border-box; + text-align: left; + font-size: 28rpx; +} + +.goodsTool { + display: flex; + position: absolute; + background-color: #ffffff; + width: 100%; + left: 0; + bottom: 0; + height: 160rpx; +} + +.codeShare-label { + flex: 3; + text-align: center; + font-size: 28rpx; + margin-top: 20rpx; + padding: 0 !important; + width: 33.33%; +} + +.codeShare-label image { + width: 70rpx; + height: 70rpx; + display: block; + margin: 0 auto 10rpx; +} + + + +/* 朋友圈弹出层 */ +.sharePop { + position: fixed; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 9; + background-color: rgba(0, 0, 0, .6); + text-align: center; +} + +.sharePop-row { + width: 140rpx; + position: fixed; + right: 110rpx; + top: 0; +} + +.shareList { + color: #ffffff; + line-height: 60rpx; + font-weight: 700; + font-size: 36rpx; + width: 100%; + height: 100%; + position: absolute; + z-index: 10; + top: 30%; +} + +.shareLabel { + margin-bottom: 40rpx; +} + +.shareLabel image { + width: 60rpx; + height: 60rpx; + margin: 0 20rpx; + vertical-align: middle; +} + +.shareLabel text { + display: inline-block; + background: #0696ca; + width: 40rpx; + height: 40rpx; + line-height: 40rpx; + font-size: 26rpx; + border-radius: 50%; + margin: 8rpx 10rpx 0 0; +} + +/* canvas */ +.canvasImg { + position: absolute; + left: -1000%; + height: 650px; + width: 375px; + background: #e3e2e2; +} + + +/* 弹窗背景图 */ +.user-lay { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-pack: center; + position: fixed; + background: rgba(0, 0, 0, .6); + height: 100vh; + width: 100vw; + top: 0; + left: 0; + z-index: 99; + box-sizing: border-box; +} + +/* 图片弹出层 */ +.sign-img-lay { + text-align: center; +} + +.sign-img-src { + width: 70vw; + vertical-align: top; +} + +.sign-img-btn[size="mini"] { + margin-top: 40rpx; + background: #f5d48f; + font-weight: normal; + color: #2f3245; + height: 90rpx; + line-height: 90rpx; + padding: 0; + width: 80%; +} + +.remove-btn[size="mini"] { + margin-top: 20rpx; + background: #101010; + color: #e5c175; + font-weight: normal; +} + +/* 背景 */ +.user-back-img { + width: 100%; + display: block; +} + +.user-back { + position: relative; + width: 80%; + text-align: center; + margin: 0 auto; +} + +.user-back-cont { + background: #ffffff; + padding: 20rpx; + border-radius: 10rpx; + box-sizing: border-box; + position: absolute; + bottom: 120rpx; + left: 40rpx; +} + +.user-back-cont image { + width: 160rpx; + height: 160rpx; +} + +.codeBack-yard-name { + width: 100%; + font-size: 26rpx; + text-align: center; +} diff --git a/pages/userGoods/goodsDet/goodsDet.js b/pages/userGoods/goodsDet/goodsDet.js new file mode 100644 index 0000000..3a259d9 --- /dev/null +++ b/pages/userGoods/goodsDet/goodsDet.js @@ -0,0 +1,93 @@ +// pages/userGoods/goodsDet/goodsDet.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + isUser : false, //用户登录状态 + qrcode : '', //二维码 + userInfo : '', //我的信息 + current : 0, //产品轮播index + rightId : '', //产品id + parentId : '', //分享人id + productData : '', //详情数据 + productStores : [], //门店列表 + productContent : '', //图文详情 + canShare : '' //分享按钮状态 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad (options) { + // 判断是否由分享进入 + if(options.type == "share"){ + this.setData({ + parentId: options.parent_id + }) + + // 写入缓存 + wx.setStorage({ + key : 'parentId', + data : options.parent_id + }) + + this.setData({ + rightId : options.rightid + }) + } + + this.setData({ + rightId : options.rightid + }) + }, + + onShow(){ + // 获取产品详情 + this.goodsShow(); + + this.setData({ + isUser : getApp().globalData.isUser + }) + }, + + /** + * 产品详情 + */ + goodsShow(){ + wx.$api.user.productInfo(this.data.rightId).then(res=>{ + this.setData({ + canShare : res.data.canShare, + productData : res.data.info, + productStores : res.data.stores, + productContent: res.data.info.share.content.replace(/\{ + if(!err.login){ + // 写入缓存 + wx.setStorage({ + key : 'token', + data : '' + }) + } + }) + }, + + /** + * 处理未登录时的转跳 + */ + userNav(e){ + let pageUrl = e.currentTarget.dataset.url + if(this.data.isUser){ + wx.navigateTo({ + url: pageUrl + }) + }else{ + // 去登录 + wx.navigateTo({ + url: "/pages/login/login?way=shareLogin" + }) + } + } +}) \ No newline at end of file diff --git a/pages/userGoods/goodsDet/goodsDet.json b/pages/userGoods/goodsDet/goodsDet.json new file mode 100644 index 0000000..5cd8a82 --- /dev/null +++ b/pages/userGoods/goodsDet/goodsDet.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "产品详情" +} \ No newline at end of file diff --git a/pages/userGoods/goodsDet/goodsDet.wxml b/pages/userGoods/goodsDet/goodsDet.wxml new file mode 100644 index 0000000..fd1e082 --- /dev/null +++ b/pages/userGoods/goodsDet/goodsDet.wxml @@ -0,0 +1,60 @@ + + + + + + + {{productData.title}} + {{productData.share.description}} + + {{productData.price}} + 门市价¥{{productData.share.cost}} + + + 立即购买 + + + + + + 规格 + {{productData.share.type_name}} + + + 门店 + + + {{item.title}} + {{item.address}} + + + + + + + + + 图文详情 + + + + + + END + + + + + + + + + + \ No newline at end of file diff --git a/pages/userGoods/goodsDet/goodsDet.wxss b/pages/userGoods/goodsDet/goodsDet.wxss new file mode 100644 index 0000000..440a69c --- /dev/null +++ b/pages/userGoods/goodsDet/goodsDet.wxss @@ -0,0 +1,203 @@ +page { + background-color: #f0f0f0; +} + +/* 轮播图 */ +.banner { + width: 100%; + position: relative; + padding-top: 60%; +} + +.swiperCont, .swiperImg { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.swiperDot { + position: absolute; + background: rgba(0, 0, 0, .5); + border-radius: 80rpx; + padding: 0 25rpx; + line-height: 46rpx; + z-index: 2; + bottom: 20rpx; + right: 50rpx; + color: #ffffff; +} + +/* 权益介绍 */ +.content { + width: 100%; + padding: 25rpx; + box-sizing: border-box; + display: flex; +} + +.contentText { + width: calc(100% - 240rpx); + margin-right: 40rpx; +} + +.contentText-title { + font-weight: 600; + font-size: 36rpx; +} + +.contentText-text { + font-size: 26rpx; + padding: 20rpx; + box-sizing: border-box; + color: #646464; +} + +.contentText-price { + padding: 0 20rpx; + box-sizing: border-box; + display: flex; +} + +.contentText-price-primary { + color: #f57400; + font-size: 48rpx; + font-weight: 600; +} + +.contentText-price-primary text { + font-size: 28rpx; +} + +.contentText-price-close { + font-size: 24rpx; + color: #646464; + margin: 20rpx 0 0 10rpx; + text-decoration: line-through; +} + +.contentBuy { + background: linear-gradient(to left, #fe6d52, #fe8750); + border-radius: 20rpx; + width: 200rpx; + text-align: center; + height: 70rpx; + line-height: 70rpx; + color: #ffffff; + margin-top: 70rpx; +} + +/* 规格 */ +.specs { + background-color: #ffffff; + padding: 25rpx; + box-sizing: border-box; + margin: 0 20rpx; + border-radius: 20rpx; +} + +.specs-label { + display: flex; + margin-bottom: 30rpx; +} + +.specs-label:last-child { + margin-bottom: 0; +} + +.specs-label text { + font-size: 30rpx; + display: block; + width: 100rpx; + color: #808080; + line-height: 44rpx; +} + +.specs-site { + box-sizing: border-box; + font-size: 30rpx; + width: calc(100% - 120rpx); +} + +.specs-site-list { + margin-bottom: 20rpx; + font-size: 28rpx; +} + +.specs-site-list:last-child { + margin-bottom: 0; +} + +.specs-site-name { + font-size: 32rpx; + margin-bottom: 10rpx; +} + +/* 详情 */ +.imageText { + width: 100%; + padding: 40rpx; + box-sizing: border-box; +} + +.imageText-title { + width: 200rpx; + margin: 0 auto 30rpx; + text-align: center; + position: relative; +} + +.imageText-title::after, +.imageText-title::before { + position: absolute; + content: ''; + top: 49%; + background-color: #000000; + width: 100rpx; + height: 2rpx; +} + +.imageText-title::after { + left: -100rpx; +} + +.imageText-title::before { + right: -100rpx; +} + +.imageText-end { + width: 80rpx; + height: 80rpx; + margin: 30rpx auto; + line-height: 80rpx; + text-align: center; + border-radius: 50%; + border: 2rpx solid #000000; + position: relative; +} + +.imageText-end::after { + position: absolute; + content: ''; + width: 10rpx; + height: 10rpx; + border-radius: 50%; + top: 0rpx; + right: 16rpx; + background-color: #000000; +} + +/* 漂浮弹出层 */ +.indexFloat { + position: fixed; + right: 20rpx; + bottom: 30rpx; + z-index: 99; +} + +.indexFloat-img image { + width: 130rpx; + height: 130rpx; + margin-bottom: 20rpx; +} \ No newline at end of file diff --git a/pages/userGoods/userGoods.js b/pages/userGoods/userGoods.js new file mode 100644 index 0000000..494560a --- /dev/null +++ b/pages/userGoods/userGoods.js @@ -0,0 +1,47 @@ +// pages/userGoods/userGoods.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + noticeText : '', //公告 + goodsArr : [], //产品列表 + page : {}, //分页信息 + lodingStats : false, //加载状态 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad (options) { + // 获取产品列表 + this.goodsGain(); + }, + + /** + * 产品列表 + */ + goodsGain(page){ + wx.$api.user.productList(page).then(res=>{ + let listArr = this.data.goodsArr, + newData = [] + if(page == 1 || page == undefined) listArr = [] + newData = listArr.concat(res.data.list.data) + + this.setData({ + goodsArr : newData, + page : res.data.list.page, + noticeText : res.data.notice + }) + }).catch(err=>{ + if(!err.login){ + // 写入缓存 + wx.setStorage({ + key : 'token', + data : '' + }) + } + }) + } +}) \ No newline at end of file diff --git a/pages/userGoods/userGoods.json b/pages/userGoods/userGoods.json new file mode 100644 index 0000000..5be714b --- /dev/null +++ b/pages/userGoods/userGoods.json @@ -0,0 +1,6 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "产品分享", + "navigationBarBackgroundColor": "#222222", + "navigationBarTextStyle": "white" +} \ No newline at end of file diff --git a/pages/userGoods/userGoods.wxml b/pages/userGoods/userGoods.wxml new file mode 100644 index 0000000..1dee288 --- /dev/null +++ b/pages/userGoods/userGoods.wxml @@ -0,0 +1,72 @@ + + + + + + + + + + {{noticeText}} + + + + + + + + + + + + [ {{item.title}} ]{{item.share.type_name}} + {{item.share.sub_title}} + {{items}} + 追加激励¥{{item.profit.stimulate}} + + ¥{{item.price}}¥{{item.share.cost}} + + 返¥{{item.profit.value}} + + + + + + + + + + + + [ {{item.title}} ]{{item.share.type_name}} + {{item.share.sub_title}} + {{items}} + 追加激励¥{{item.profit.stimulate}} + + ¥{{item.price}}¥{{item.share.cost}} + + 返¥{{item.profit.value}} + + + + + + + + 加载中... + + + 没有更多了~ + + + + + + + 暂无订单 + + \ No newline at end of file diff --git a/pages/userGoods/userGoods.wxss b/pages/userGoods/userGoods.wxss new file mode 100644 index 0000000..78f6f1d --- /dev/null +++ b/pages/userGoods/userGoods.wxss @@ -0,0 +1,193 @@ +page { + background-color: #e4e4e4; +} + +.codeTitle { + width: 100%; + background-color: #222222; + border-radius: 0 0 300rpx 300rpx; + box-sizing: border-box; + padding: 30rpx 20rpx 0; +} + +.codeTitle image { + text-align: center; + width: 100%; + border-radius: 20rpx; + display: block; +} + +.shareCont { + padding: 0 20rpx; + box-sizing: border-box; + width: 100%; +} + +.indexNews { + background: #c4c4c4; + display: flex; + font-weight: 600; + line-height: 46rpx; + border-radius: 50rpx; + padding: 20rpx 30rpx; + box-sizing: border-box; + margin: 30rpx 0; +} + +.indexNews image { + width: 42rpx; + height: 42rpx; + margin: 4rpx 20rpx 0 0; +} + +.goods { + display: flex; + flex-direction: row; + margin: 0 -10rpx; +} + +.goodsList-half { + width: 50%; +} + +.goodsList { + margin: 0 10rpx 20rpx; + background-color: #ffffff; + border-radius: 20rpx; + overflow: hidden; +} + +.goodsList-img { + width: 100%; + position: relative; + padding-top: 80%; +} + +.goodsList-img image { + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; +} + +.goodsList-cont { + padding: 20rpx; + box-sizing: border-box; +} + +.goodsList-name { + font-weight: 600; +} + +.goodsList-text { + margin: 10rpx 0; + color: #6c6c6c; + font-size: 26rpx; + font-weight: 600; +} + +.goodsList-label text { + display: inline-block; + font-size: 20rpx; + background-color: #dedede; + border-radius: 4rpx; + padding: 6rpx 10rpx; + margin: 0 10rpx 5rpx 0; +} + +.goodsList-tips { + text-align: right; + margin: 30rpx 0 10rpx; +} + +.goodsList-tips text { + background-color: #ff5c36; + transform: scale(.8); + color: #ffffff; + border-radius: 60rpx; + font-size: 22rpx; + padding: 2rpx 10rpx; +} + +.goodsList-price { + display: flex; +} + +.goodsList-price-number { + flex: 1; + line-height: 50rpx; +} + +.goodsList-price-btn { + background-color: #ff5c36; + height: 48rpx; + line-height: 48rpx; + border-radius: 10rpx; + color: #ffffff; + padding: 0 10rpx; + font-size: 26rpx; + font-weight: 600; +} + +.goodsList-price-btn text { + font-size: 22rpx; +} + +.goodsList-price-btn image { + width: 20rpx; + height: 20rpx; + margin: 0 10rpx 0 0; + vertical-align: -2rpx; +} + +.goodsList-price-number { + color: #ff5c36; + font-size: 32rpx; + font-weight: 600; +} + +.goodsList-price-number text { + font-size: 22rpx; + color: #8f8f8f; + font-weight: normal; + text-decoration:line-through; + padding-right: 10rpx; +} + +/* 滚动 */ +/*首页跑马灯效果*/ +@keyframes around { + from { + margin-left: 60rpx; + } + + to { + /* var接受传入的变量 */ + margin-left: var(--marqueeWidth--); + } +} + +.marquee_container { + width: calc(100% - 40rpx); + overflow: hidden; +} + +.marquee_container:hover { + /* 不起作用 */ + animation-play-state: paused; +} + +.marquee_text { + font-size: 30rpx; + display: inline-block; + white-space: nowrap; +} + +.marquee_text.active { + animation-name: around; + animation-duration: 20s; + /*过渡时间*/ + animation-iteration-count: infinite; + animation-timing-function: linear; +} diff --git a/pages/userStored/storedCode/storedCode.js b/pages/userStored/storedCode/storedCode.js new file mode 100644 index 0000000..4425b01 --- /dev/null +++ b/pages/userStored/storedCode/storedCode.js @@ -0,0 +1,191 @@ +/* + * 本时生活 + */ + +Page({ + + /** + * 页面的初始数据 + */ + data: { + qrcode : '', //二维码 + userInfo : '', //我的信息 + isImgLay : false,//是否显示图片弹出层 + parentId : '', //是否分享进入 + shareState : false //显示分享朋友圈弹出层 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad (options) { + // 判断是否由分享进入 + // if(options.type == "share"){ + // // 写入缓存 + // this.setData({ + // parentId: options.parent_id + // }) + // } + + // 获取二维码 + wx.$api.user.publicCode('mini', 'recharge', 'pages/userStored/userStored?type=share').then(res=>{ + this.setData({ + qrcode : res.data.qrcode, + userInfo : res.data.user + }) + }).catch(err=>{}) + }, + + /** + * 绘图 + */ + dowImg(){ + wx.showLoading({ + title: '加载中', + }) + + let avatarImg = new Promise(success=>{ + wx.getImageInfo({ + src : '', + success : res => { + success(res.path) + } + }) + }) + + // 下载素材 + let codeImg = new Promise(success => { + wx.getImageInfo({ + src : this.data.qrcode, + success : res => { + success(res.path) + } + }) + }) + + Promise.all([codeImg]).then(res => { + // 绘制海报 + const ctx = wx.createCanvasContext('qrcodeCard') + ctx.save() + + // 绘制背景 + ctx.setFillStyle('#e2e2e2') + ctx.fillRect(0, 0, 375, 603) + + // 绘制背景 + ctx.drawImage('/static/img/user-storedCode-down.png', 0, 0, 375, 650) + + // 绘制二维码 + ctx.drawImage(res[0], 114, 400, 150, 150) + + // 文字 + // ctx.setFontSize(16) + // ctx.setFillStyle("#2f3245") + // ctx.setTextAlign('center') + // ctx.fillText(this.data.userInfo.nickname, 194, 350 , 270) + + // 文字 + ctx.setFontSize(26) + ctx.setFillStyle("#222222") + ctx.setTextAlign('center') + ctx.fillText("向重要的人分享生活的惊喜", 194, 350 , 350) + + ctx.save(); + ctx.beginPath(); //开始绘制 + ctx.arc(70 / 2 + 156, 70 / 2 + 250, 70 / 2, 0, Math.PI * 2, false); + ctx.clip(); + // ctx.drawImage(res[1], 156, 250, 70, 70); + + // 保存图片 + ctx.draw(true, () => { + wx.hideLoading() + wx.canvasToTempFilePath({ + canvasId: 'qrcodeCard', + x: 0, + y: 0, + success: res => { + wx.saveImageToPhotosAlbum({ + filePath: res.tempFilePath, + success : res=>{ + wx.showToast({ + title: '分享海报已保存至相册', + icon : 'none' + }) + }, + fail : err=>{ + wx.showModal({ + title : '提示', + content : '暂未授权小程序写入您的相册,无法存储二维码海报', + confirmColor: '#d82526', + confirmText : '去设置', + success : info=>{ + if (info.confirm){ + wx.openSetting() + } + } + }) + }, + complete: e => {} + }) + } + }) + }) + + }).catch(err=>{ + wx.showToast({ + title: '海报下载,请检查网络', + icon : 'none' + }) + }) + }, + + /** + * 图片弹出层 + */ + removeSaveImg(){ + this.setData({ + isImgLay: !this.data.isImgLay + }) + }, + + /** + * 保存图片到本地 + */ + saveImg(){ + this.dowImg(); + this.setData({ + isImgLay: !this.data.isImgLay + }) + }, + + /** + * 分享朋友圈弹出层状态 + */ + shareShow() { + this.setData({ + shareState: !this.data.shareState + }) + }, + + /** + * 分享 + */ + onShareAppMessage(){ + return { + title : this.data.userInfo.nickname + "邀请您进入本时生活", + imageUrl: "", + path : "/pages/userStored/userStored?parent_id=" + this.data.userInfo.user_id + "&type=share", + } + }, + + /** + * 用户点击右上角分享朋友圈 + */ + onShareTimeline: function () { + return { + title : this.data.userInfo.nickname + "邀请您进入本时生活", + path : "/pages/userStored/userStored?parent_id=" + this.data.userInfo.user_id + "&type=share", + imageUrl: '' + } + } +}) \ No newline at end of file diff --git a/pages/userStored/storedCode/storedCode.json b/pages/userStored/storedCode/storedCode.json new file mode 100644 index 0000000..0edd120 --- /dev/null +++ b/pages/userStored/storedCode/storedCode.json @@ -0,0 +1,6 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "储值分享", + "navigationBarBackgroundColor": "#222222", + "navigationBarTextStyle": "white" +} \ No newline at end of file diff --git a/pages/userStored/storedCode/storedCode.wxml b/pages/userStored/storedCode/storedCode.wxml new file mode 100644 index 0000000..67234a8 --- /dev/null +++ b/pages/userStored/storedCode/storedCode.wxml @@ -0,0 +1,55 @@ + + + + + 向重要的人分享生活的惊喜 + + + + + + + + 朋友圈 + + + + 生成海报 + + + + + + + + + + + + + 向重要的人分享生活的惊喜 + + + + + + + + + + + + + + 1 + 点击右上角打开菜单 + + + 2 + 选择菜单分享朋友圈 + + + \ No newline at end of file diff --git a/pages/userStored/storedCode/storedCode.wxss b/pages/userStored/storedCode/storedCode.wxss new file mode 100644 index 0000000..7f3b4cb --- /dev/null +++ b/pages/userStored/storedCode/storedCode.wxss @@ -0,0 +1,202 @@ +page { + background-color: #e2e2e2; +} + +.codeTitle { + width: 100%; +} + +.codeTitle { + text-align: center; + width: 100%; +} + +.codeCont { + margin: 0 auto; + width: 90%; + padding: 40rpx 0; +} + + +.codeCont-code { + text-align: center; + margin-bottom: 80rpx; +} + +.codeCont-img { + width: 380rpx; + height: 380rpx; +} + +.codeCont-title { + margin: 40rpx 0; + font-size: 46rpx; + font-weight: 600; +} + +.codeShare { + display: flex; + padding: 20rpx 50rpx; + box-sizing: border-box; +} + +.codeShare-label { + flex: 3; + text-align: center; + font-size: 28rpx; +} + +.codeShare-label image { + width: 80rpx; + height: 80rpx; + display: block; + margin: 0 auto 20rpx; +} + +.codeShare-button { + width: auto !important; + border: none; + background: transparent; + font-size: 28rpx; + margin: 0; + padding: 0; + font-weight: normal; +} + + +/* 弹窗背景图 */ +.user-lay { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-pack: center; + position: fixed; + background: rgba(0, 0, 0, .6); + height: 100vh; + width: 100vw; + top: 0; + left: 0; + z-index: 99; + box-sizing: border-box; +} + +/* canvas */ +.canvasImg { + position: absolute; + left: -1000%; + height: 650px; + width: 375px; + background: #fbf6f0; +} + + +/* 图片弹出层 */ +.sign-img-lay { + text-align: center; +} + +.sign-img-src { + width: 70vw; + vertical-align: top; +} + +.sign-img-btn[size="mini"] { + margin-top: 40rpx; + background: #f5d48f; + font-weight: normal; + color: #2f3245; + height: 90rpx; + line-height: 90rpx; + padding: 0; + width: 80%; +} + +.remove-btn[size="mini"] { + margin-top: 20rpx; + background: #101010; + color: #e5c175; + font-weight: normal; +} + +/* 背景 */ +.user-back-img { + width: 100%; + display: block; +} + +.user-back { + position: relative; + width: 80%; + text-align: center; + margin: 0 auto; +} + +.user-back-cont { + text-align: center; + background-color: #e2e2e2; + padding: 40rpx 0; +} + +.user-back-cont image { + width: 300rpx; + height: 300rpx; +} + +.codeBack-yard-name { + margin-bottom: 30rpx; + font-size: 36rpx; + font-weight: 600; +} + + +/* 朋友圈弹出层 */ +.sharePop { + position: fixed; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 9; + background-color: rgba(0, 0, 0, .6); + text-align: center; +} + +.sharePop-row { + width: 140rpx; + position: fixed; + right: 110rpx; + top: 0; +} + +.shareList { + color: #ffffff; + line-height: 60rpx; + font-weight: 700; + font-size: 36rpx; + width: 100%; + height: 100%; + position: absolute; + z-index: 10; + top: 30%; +} + +.shareLabel { + margin-bottom: 40rpx; +} + +.shareLabel image { + width: 60rpx; + height: 60rpx; + margin: 0 20rpx; + vertical-align: middle; +} + +.shareLabel text { + display: inline-block; + background: #0696ca; + width: 40rpx; + height: 40rpx; + line-height: 40rpx; + font-size: 26rpx; + border-radius: 50%; + margin: 8rpx 10rpx 0 0; +} \ No newline at end of file diff --git a/pages/userStored/userStored.js b/pages/userStored/userStored.js new file mode 100644 index 0000000..36b0814 --- /dev/null +++ b/pages/userStored/userStored.js @@ -0,0 +1,69 @@ +// pages/userStored/userStored.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + isUser : false, //用户登录状态 + canShare : '', //分享按钮状态 + storedArr : [], //储值权益列表, + parentId : '', //分享者id + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad (options) { + // 判断是否由分享进入 + if(options.type == "share"){ + this.setData({ + parentId: options.parent_id + }) + + // 写入缓存 + wx.setStorage({ + key : 'parentId', + data : options.parent_id + }) + } + }, + + onShow(){ + this.setData({ + isUser : getApp().globalData.isUser + }) + + // 获取产品详情 + this.storedShow(); + }, + + /** + * 产品详情 + */ + storedShow(){ + wx.$api.user.storedList().then(res=>{ + this.setData({ + canShare : res.data.canShare, + storedArr : res.data.list + }) + }).catch(err=>{}) + }, + + /** + * 处理未登录时的转跳 + */ + userNav(e){ + let pageUrl = e.currentTarget.dataset.url + if(this.data.isUser){ + wx.navigateTo({ + url: pageUrl + }) + }else{ + // 去登录 + wx.navigateTo({ + url: "/pages/login/login?way=shareLogin" + }) + } + } +}) \ No newline at end of file diff --git a/pages/userStored/userStored.json b/pages/userStored/userStored.json new file mode 100644 index 0000000..53ca877 --- /dev/null +++ b/pages/userStored/userStored.json @@ -0,0 +1,6 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "储值分享", + "navigationBarBackgroundColor": "#222222", + "navigationBarTextStyle": "white" +} \ No newline at end of file diff --git a/pages/userStored/userStored.wxml b/pages/userStored/userStored.wxml new file mode 100644 index 0000000..1bb5373 --- /dev/null +++ b/pages/userStored/userStored.wxml @@ -0,0 +1,45 @@ + + + + + + + + + + {{item.title}} + 消费红包 + + + {{item.text}}({{item.qty}}张50元) + + + + + + + + {{item.coupon_name}} + + + ¥{{item.worth}}(满{{item.full}}减{{item.worth}}) + + + 立即儲值 + + + + + + + + 储值分享 + + + + + 暂无订单 + \ No newline at end of file diff --git a/pages/userStored/userStored.wxss b/pages/userStored/userStored.wxss new file mode 100644 index 0000000..680be00 --- /dev/null +++ b/pages/userStored/userStored.wxss @@ -0,0 +1,200 @@ +.userStoredBack { + width: 100%; +} + +.userStored { + padding: 0 30rpx; + box-sizing: border-box; +} + +.userStoredCont { + background: linear-gradient(to bottom, #e3d6c4, #bca585); + border-radius: 20rpx; + position: relative; + margin-top: -220rpx; + height: 1020rpx; + padding: 20rpx 0; + box-sizing: border-box; +} + +.userStoredCont-back, +.userStoredCont-text { + position: absolute; +} + +.userStoredCont-back { + width: 70%; + right: 0; + top: 0; +} + +.userStoredCont-text { + width: 420rpx; + height: 192rpx; + left: 20rpx; + top: 40rpx; + z-index: 1; +} + +.userStoredCont-list { + background-color: #fefbf4; + border-radius: 20rpx; + position: absolute; + top: 260rpx; + left: 30rpx; + right: 30rpx; + width: calc(100% - 60rpx); + padding: 30rpx 30rpx 0; + box-sizing: border-box; +} + +.userStoredCont-label { + margin-bottom: 30rpx; + padding-bottom: 40rpx; + height: 300rpx; + border-bottom: #e8bd94 solid 2rpx; +} + +.userStoredCont-label:last-child { + border: none; +} + +.userStoredCont-title { + display: flex; +} + +.userStoredCont-title text { + font-size: 48rpx; + color: #806136; +} + +.userStoredCont-title-tips { + background-color: #fb5734; + color: #ffffff; + border-radius: 80rpx; + font-size: 28rpx; + height: 42rpx; + line-height: 42rpx; + margin: 17rpx 0 0 20rpx; + padding: 0 15rpx; +} + +.userStoredCont-brief { + margin: 30rpx 0; + color: #ca9c5a; +} + +.userStoredCont-brief text { + font-size: 22rpx; +} + +.userStoredCont-rights { + display: flex; +} + +.userStoredCont-rights-left { + background: linear-gradient(to top, #f6e4ca, #e4c6a3); + width: calc(100% - 230rpx); + margin-right: 30rpx; + height: 140rpx; + border-radius: 10rpx; + position: relative; +} + +.userStoredCont-price { + color: #806136; +} + +.userStoredCont-tips { + width: 100%; + height: 44rpx; + top: 10rpx; + right: 0; + position: absolute; + text-align: center; + color: #ffffff; +} + +.userStoredCont-tips image, +.userStoredCont-tips text { + position: absolute; + height: 100%; + top: 0; +} + +.userStoredCont-tips image { + width: 70%; + right: -10rpx; +} + +.userStoredCont-tips text { + width: 58%; + z-index: 2; + font-size: 25rpx; + right: 0rpx; + line-height: 44rpx; + text-align: center; + box-sizing: border-box; +} + +.userStoredCont-price { + position: absolute; + bottom: 15rpx; + left: 20rpx; + z-index: 3; +} + +.userStoredCont-price { + font-size: 24rpx; +} + +.userStoredCont-price text { + font-size: 46rpx; + padding-right: 10rpx; +} + +.userStoredCont-fireworks { + position: absolute; + width: 84rpx; + height: 84rpx; + left: 10rpx; + bottom: 15rpx; + z-index: 1; +} + +.userStoredCont-rights-btn { + background-color: #222222; + color: #ffffff; + width: 200rpx; + text-align: center; + height: 70rpx; + line-height: 70rpx; + margin-top: 35rpx; +} + +/* 分享按钮 */ +.userStoredBtn { + background: #bca585; + border-radius: 80rpx; + margin: 40rpx 30rpx; + width: calc(100% - 60rpx); + line-height: 80rpx; + text-align: center; + color: #ffffff; + font-weight: 600; +} + + +/* 漂浮弹出层 */ +/* .indexFloat { + position: fixed; + right: 20rpx; + bottom: 60rpx; + z-index: 99; +} + +.indexFloat-img image { + width: 130rpx; + height: 130rpx; + margin-bottom: 20rpx; +} */ \ No newline at end of file diff --git a/pages/welfare/welfare.js b/pages/welfare/welfare.js index 9f3818d..9136190 100644 --- a/pages/welfare/welfare.js +++ b/pages/welfare/welfare.js @@ -81,17 +81,10 @@ Page({ }) }).catch(err=>{ if(!err.login){ - wx.showModal({ - title : '用户登录已过期', - content : '请重新登录', - showCancel : false, - success : res => { - if (res.confirm) { - wx.redirectTo({ - url: '/pages/login/login' - }) - } - } + // 写入缓存 + wx.setStorage({ + key : 'token', + data : '' }) } }) @@ -218,60 +211,12 @@ Page({ rightsTap: true }) }else { - // payWayIndex为0的时候为微信支付 - if(this.data.payWayIndex == 0) { - wx.$api.index.fridayPay(res.data.trade_no).then(res=>{ - let payInfo = JSON.parse(res.data) - wx.requestPayment({ - timeStamp: payInfo.timeStamp, - nonceStr : payInfo.nonceStr, - package : payInfo.package, - paySign : payInfo.paySign, - signType : payInfo.signType, - success : res=>{ - if(res.errMsg == "requestPayment:ok"){ - wx.showToast({ - title: '支付成功', - icon : 'success' - }) - setTimeout(()=>{ - if(this.data.isdeliver == 1) { - wx.reLaunch({ - url: '/pages/order/order?orderType=welfareGoods' - }) - } else { - wx.reLaunch({ - url: '/pages/order/order?orderType=welfare' - }) - } - },3000) - } - }, - fail : res=>{ - if(this.data.isdeliver == 1) { - wx.reLaunch({ - url: '/pages/order/order?orderType=welfareGoods&stateType=unpay' - }) - } else { - wx.reLaunch({ - url: '/pages/order/order?orderType=welfare&stateType=unpay' - }) - } - } - }) - }) - } - // payWayIndex为1的时候为沃钱包支付 - if(this.data.payWayIndex == 1) { - const newUrl = "https://lifetest.ysd-bs.com/unicom/payment?trade_no=" + res.data.trade_no - let url= encodeURIComponent(newUrl) - wx.redirectTo({ - // 跳转到webview页面 - url: `/pages/webView/webView?url=${url}` - }); - } + // 跳转收银台 + wx.navigateTo({ + url: "/pages/cashier/cashier?trade_no=" + res.data.trade_no + "&amount=" + this.data.amount + "&is_deliver=" + is_deliver + "&pay_type=welfarePay" + }) } - }) + }).catch(err => {}); }, /** diff --git a/pages/withdrawal_form/withdrawal_form.wxml b/pages/withdrawal_form/withdrawal_form.wxml index a33425f..0a7b93e 100644 --- a/pages/withdrawal_form/withdrawal_form.wxml +++ b/pages/withdrawal_form/withdrawal_form.wxml @@ -18,5 +18,6 @@ 提现费用收取,手续费{{tax}}% + 提现记录 \ No newline at end of file diff --git a/pages/withdrawal_form/withdrawal_form.wxss b/pages/withdrawal_form/withdrawal_form.wxss index 46f2a7d..2a9f1ba 100644 --- a/pages/withdrawal_form/withdrawal_form.wxss +++ b/pages/withdrawal_form/withdrawal_form.wxss @@ -51,4 +51,22 @@ padding: 0; margin-top: 40rpx; font-size: 32rpx; +} + +.withdrawalForm-url { + text-align: center; + width: 100%; + margin-top: 20rpx; + position: relative; + color: #ff6d6d; +} + +.withdrawalForm-url::after { + position: absolute; + content: ''; + left: calc(50% - 60rpx); + bottom: 0rpx; + width: 120rpx; + height: 4rpx; + background-color: #ff6d6d; } \ No newline at end of file diff --git a/pages/withdrawal_record/withdrawal_record.js b/pages/withdrawal_record/withdrawal_record.js index 56b57fd..77d8d4d 100644 --- a/pages/withdrawal_record/withdrawal_record.js +++ b/pages/withdrawal_record/withdrawal_record.js @@ -9,13 +9,23 @@ Page({ accounts : [], //列表 page : {}, //分页信息 lodingStats : false, //加载状态 + WithdrawalWay : [ + {value: '', name: "全部", status: ''}, + {value: 0, name: "提现中", status: 'init'}, + {value: 1, name: "已提现", status: 'end'} + ], + WithdrawalIndex : 0, //收益订单筛选列表index + WithdrawalValue : 'init', //收益订单筛选列表value }, /** * 生命周期函数--监听页面加载 */ onLoad (options) { - + this.setData({ + WithdrawalValue: options.status, + WithdrawalIndex: parseInt(options.idx) + }) }, /** @@ -30,7 +40,7 @@ Page({ * 提现列表 */ recordInfo(page) { - wx.$api.user.withdrawsList(page).then(res=>{ + wx.$api.user.withdrawsList(this.data.WithdrawalValue, page).then(res=>{ let listArr = this.data.accounts, newData = [] if(page == 1 || page == undefined) listArr = [] @@ -40,7 +50,19 @@ Page({ accounts : newData, page : res.data.page }) - }) + }).catch(err => {}); + }, + + /** + * 团队类型选择 + */ + screenWithdrawal(val) { + this.setData({ + WithdrawalIndex: val.detail.value, + WithdrawalValue: this.data.WithdrawalWay[val.detail.value].status + }) + // 获取提现列表 + this.recordInfo(); }, /** diff --git a/pages/withdrawal_record/withdrawal_record.wxml b/pages/withdrawal_record/withdrawal_record.wxml index 9f84dfc..eacfa42 100644 --- a/pages/withdrawal_record/withdrawal_record.wxml +++ b/pages/withdrawal_record/withdrawal_record.wxml @@ -1,4 +1,16 @@ - + + + 提现列表 + + + + {{WithdrawalWay[WithdrawalIndex].name}} + + + + + + {{item.way}} @@ -11,8 +23,8 @@ 提现状态 - {{item.status.status_text}} - {{item.status.status_text}} + + {{item.status.status_text}} @@ -24,7 +36,7 @@ 没有更多了~ - + diff --git a/pages/withdrawal_record/withdrawal_record.wxss b/pages/withdrawal_record/withdrawal_record.wxss index cfc834a..88a64a2 100644 --- a/pages/withdrawal_record/withdrawal_record.wxss +++ b/pages/withdrawal_record/withdrawal_record.wxss @@ -1,3 +1,4 @@ + /* 记录列表 */ .record-list { background-color: #fff; @@ -38,6 +39,44 @@ color: red; } -.record-label-green { +.record-label-status.record-label-green { color: green; +} + +.profigOrder-module-title { + position: fixed; + width: 100%; + left: 0; + top: 0; + z-index: 9; + background-color: #ffffff; + display: flex; + box-sizing: border-box; + height: 80rpx; + line-height: 80rpx; + margin-bottom: 30rpx; + padding: 0 30rpx; + box-sizing: border-box; +} + +.profigOrder-module-name { + font-weight: 600; + flex: 1; +} + +.profigReport-module-picker { + display: flex; + color: #797979; + font-size: 28rpx; + padding-top: 4rpx; +} + +.profigReport-module-icon { + width: 28rpx; + height: 28rpx; + margin: 26rpx 0 0 10rpx; +} + +.recordCont { + margin-top: 110rpx; } \ No newline at end of file diff --git a/project.config.json b/project.config.json index cebbe7c..50426b9 100644 --- a/project.config.json +++ b/project.config.json @@ -31,15 +31,14 @@ }, "enableEngineNative": false, "useIsolateContext": true, - "useCompilerModule": true, - "userConfirmedUseCompilerModuleSwitch": false, "userConfirmedBundleSwitch": false, "packNpmManually": false, "packNpmRelationList": [], - "minifyWXSS": true + "minifyWXSS": true, + "showES6CompileOption": false }, "compileType": "miniprogram", - "libVersion": "2.12.1", + "libVersion": "2.18.1", "appid": "wx8e424dbdc443381f", "projectname": "%E4%BA%BF%E6%97%B6%E4%BB%A3%EF%BC%88%E6%B5%8B%E8%AF%95%EF%BC%89", "debugOptions": { diff --git a/project.private.config.json b/project.private.config.json index 2582961..d6ecb76 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -55,6 +55,18 @@ "pathName": "pages/password_forget/password_forget", "query": "", "scene": null + }, + { + "name": "pages/userStored/userStored", + "pathName": "pages/userStored/userStored", + "query": "", + "scene": null + }, + { + "name": "pages/userGoods/userGoods", + "pathName": "pages/userGoods/userGoods", + "query": "", + "scene": null } ] } diff --git a/static/img/Account_icon.png b/static/img/Account_icon.png index a639f74..010c79b 100644 Binary files a/static/img/Account_icon.png and b/static/img/Account_icon.png differ diff --git a/static/img/Account_icon_tips.png b/static/img/Account_icon_tips.png index 72d15e1..8ca83a1 100644 Binary files a/static/img/Account_icon_tips.png and b/static/img/Account_icon_tips.png differ diff --git a/static/img/activity_coupon.png b/static/img/activity_coupon.png index b90a681..f820809 100644 Binary files a/static/img/activity_coupon.png and b/static/img/activity_coupon.png differ diff --git a/static/img/balance-back.png b/static/img/balance-back.png index 896a198..90d474e 100644 Binary files a/static/img/balance-back.png and b/static/img/balance-back.png differ diff --git a/static/img/balance-icon-00.png b/static/img/balance-icon-00.png index 527e590..8fa7345 100644 Binary files a/static/img/balance-icon-00.png and b/static/img/balance-icon-00.png differ diff --git a/static/img/balance-icon-01.png b/static/img/balance-icon-01.png index b9b69e0..daa157d 100644 Binary files a/static/img/balance-icon-01.png and b/static/img/balance-icon-01.png differ diff --git a/static/img/balance-icon-row.png b/static/img/balance-icon-row.png new file mode 100644 index 0000000..b03691e Binary files /dev/null and b/static/img/balance-icon-row.png differ diff --git a/static/img/car_site.png b/static/img/car_site.png index b89756b..ae6292f 100644 Binary files a/static/img/car_site.png and b/static/img/car_site.png differ diff --git a/static/img/card_img.png b/static/img/card_img.png index d47c28c..81c7289 100644 Binary files a/static/img/card_img.png and b/static/img/card_img.png differ diff --git a/static/img/card_top.png b/static/img/card_top.png index fa0fd23..2c2fee8 100644 Binary files a/static/img/card_top.png and b/static/img/card_top.png differ diff --git a/static/img/cashierTips_icon.png b/static/img/cashierTips_icon.png new file mode 100644 index 0000000..2431c93 Binary files /dev/null and b/static/img/cashierTips_icon.png differ diff --git a/static/img/class_back_01.png b/static/img/class_back_01.png index 683823d..c2b492b 100644 Binary files a/static/img/class_back_01.png and b/static/img/class_back_01.png differ diff --git a/static/img/code_icon_00-2.png b/static/img/code_icon_00-2.png new file mode 100644 index 0000000..294cba1 Binary files /dev/null and b/static/img/code_icon_00-2.png differ diff --git a/static/img/code_icon_00.png b/static/img/code_icon_00.png new file mode 100644 index 0000000..294cba1 Binary files /dev/null and b/static/img/code_icon_00.png differ diff --git a/static/img/code_icon_01-2.png b/static/img/code_icon_01-2.png new file mode 100644 index 0000000..977f954 Binary files /dev/null and b/static/img/code_icon_01-2.png differ diff --git a/static/img/code_icon_01.png b/static/img/code_icon_01.png new file mode 100644 index 0000000..977f954 Binary files /dev/null and b/static/img/code_icon_01.png differ diff --git a/static/img/code_icon_02.png b/static/img/code_icon_02.png new file mode 100644 index 0000000..72f2c89 Binary files /dev/null and b/static/img/code_icon_02.png differ diff --git a/static/img/code_share.png b/static/img/code_share.png new file mode 100644 index 0000000..180ec8e Binary files /dev/null and b/static/img/code_share.png differ diff --git a/static/img/code_share_00.png b/static/img/code_share_00.png new file mode 100644 index 0000000..7dab80c Binary files /dev/null and b/static/img/code_share_00.png differ diff --git a/static/img/code_share_01.png b/static/img/code_share_01.png new file mode 100644 index 0000000..d6c061e Binary files /dev/null and b/static/img/code_share_01.png differ diff --git a/static/img/code_share_02.png b/static/img/code_share_02.png new file mode 100644 index 0000000..a23aa3b Binary files /dev/null and b/static/img/code_share_02.png differ diff --git a/static/img/code_title.png b/static/img/code_title.png new file mode 100644 index 0000000..caebdac Binary files /dev/null and b/static/img/code_title.png differ diff --git a/static/img/coupon_tips_00.png b/static/img/coupon_tips_00.png index 96fc51e..cb24711 100644 Binary files a/static/img/coupon_tips_00.png and b/static/img/coupon_tips_00.png differ diff --git a/static/img/coupon_tips_01.png b/static/img/coupon_tips_01.png index f526638..1b64f78 100644 Binary files a/static/img/coupon_tips_01.png and b/static/img/coupon_tips_01.png differ diff --git a/static/img/favour_back.png b/static/img/favour_back.png index 49a4f29..f96925e 100644 Binary files a/static/img/favour_back.png and b/static/img/favour_back.png differ diff --git a/static/img/favour_title.png b/static/img/favour_title.png new file mode 100644 index 0000000..dce8c5d Binary files /dev/null and b/static/img/favour_title.png differ diff --git a/static/img/finger_00.png b/static/img/finger_00.png index 7108375..7c07c42 100644 Binary files a/static/img/finger_00.png and b/static/img/finger_00.png differ diff --git a/static/img/finger_01.png b/static/img/finger_01.png index 798ca43..887831a 100644 Binary files a/static/img/finger_01.png and b/static/img/finger_01.png differ diff --git a/static/img/frozen_back.png b/static/img/frozen_back.png index b37ae0d..0f5c62f 100644 Binary files a/static/img/frozen_back.png and b/static/img/frozen_back.png differ diff --git a/static/img/frozen_btn.png b/static/img/frozen_btn.png index 4d4503a..3c04f59 100644 Binary files a/static/img/frozen_btn.png and b/static/img/frozen_btn.png differ diff --git a/static/img/frozen_identity_00.png b/static/img/frozen_identity_00.png index 2a908d2..835eaef 100644 Binary files a/static/img/frozen_identity_00.png and b/static/img/frozen_identity_00.png differ diff --git a/static/img/frozen_identity_01.png b/static/img/frozen_identity_01.png index e4e49cd..e315603 100644 Binary files a/static/img/frozen_identity_01.png and b/static/img/frozen_identity_01.png differ diff --git a/static/img/goodsCode_white.png b/static/img/goodsCode_white.png new file mode 100644 index 0000000..68ffd6b Binary files /dev/null and b/static/img/goodsCode_white.png differ diff --git a/static/img/index_float_00.png b/static/img/index_float_00.png new file mode 100644 index 0000000..9831c4a Binary files /dev/null and b/static/img/index_float_00.png differ diff --git a/static/img/index_float_01.png b/static/img/index_float_01.png new file mode 100644 index 0000000..86baf53 Binary files /dev/null and b/static/img/index_float_01.png differ diff --git a/static/img/new_rightsAddress.png b/static/img/new_rightsAddress.png new file mode 100644 index 0000000..c077e98 Binary files /dev/null and b/static/img/new_rightsAddress.png differ diff --git a/static/img/profigLabel_back.png b/static/img/profigLabel_back.png new file mode 100644 index 0000000..1c2a2cd Binary files /dev/null and b/static/img/profigLabel_back.png differ diff --git a/static/img/profigLabel_row.png b/static/img/profigLabel_row.png new file mode 100644 index 0000000..190c650 Binary files /dev/null and b/static/img/profigLabel_row.png differ diff --git a/static/img/profig_billie_icon.png b/static/img/profig_billie_icon.png new file mode 100644 index 0000000..1cb3ec0 Binary files /dev/null and b/static/img/profig_billie_icon.png differ diff --git a/static/img/profig_billie_icon_active.png b/static/img/profig_billie_icon_active.png new file mode 100644 index 0000000..20f040a Binary files /dev/null and b/static/img/profig_billie_icon_active.png differ diff --git a/static/img/recommend_img.png b/static/img/recommend_img.png deleted file mode 100644 index 635cf1d..0000000 Binary files a/static/img/recommend_img.png and /dev/null differ diff --git a/static/img/shareTitle.png b/static/img/shareTitle.png new file mode 100644 index 0000000..5c1488f Binary files /dev/null and b/static/img/shareTitle.png differ diff --git a/static/img/storedCode.png b/static/img/storedCode.png new file mode 100644 index 0000000..6906bb6 Binary files /dev/null and b/static/img/storedCode.png differ diff --git a/static/img/subscribe.png b/static/img/subscribe.png deleted file mode 100644 index dc66abb..0000000 Binary files a/static/img/subscribe.png and /dev/null differ diff --git a/static/img/user-codeGold.png b/static/img/user-codeGold.png deleted file mode 100644 index a3a7fbc..0000000 Binary files a/static/img/user-codeGold.png and /dev/null differ diff --git a/static/img/user-codeImg-active.png b/static/img/user-codeImg-active.png deleted file mode 100644 index 2dbb15e..0000000 Binary files a/static/img/user-codeImg-active.png and /dev/null differ diff --git a/static/img/user-codeImg-down.png b/static/img/user-codeImg-down.png index e95cc90..f522e14 100644 Binary files a/static/img/user-codeImg-down.png and b/static/img/user-codeImg-down.png differ diff --git a/static/img/user-codeTips-01.png b/static/img/user-codeTips-01.png deleted file mode 100644 index c7a8940..0000000 Binary files a/static/img/user-codeTips-01.png and /dev/null differ diff --git a/static/img/user-codeTips-02.png b/static/img/user-codeTips-02.png deleted file mode 100644 index 70da9eb..0000000 Binary files a/static/img/user-codeTips-02.png and /dev/null differ diff --git a/static/img/user-codeTitle.png b/static/img/user-codeTitle.png deleted file mode 100644 index 79a51fa..0000000 Binary files a/static/img/user-codeTitle.png and /dev/null differ diff --git a/static/img/user-storedCode-down.png b/static/img/user-storedCode-down.png new file mode 100644 index 0000000..36d535b Binary files /dev/null and b/static/img/user-storedCode-down.png differ diff --git a/static/img/userGoods_icon.png b/static/img/userGoods_icon.png new file mode 100644 index 0000000..2fe8d86 Binary files /dev/null and b/static/img/userGoods_icon.png differ diff --git a/static/img/userGoods_title.png b/static/img/userGoods_title.png new file mode 100644 index 0000000..968f6dc Binary files /dev/null and b/static/img/userGoods_title.png differ diff --git a/static/img/userOrder_07.png b/static/img/userOrder_07.png index 8204299..7617dd2 100644 Binary files a/static/img/userOrder_07.png and b/static/img/userOrder_07.png differ diff --git a/static/img/userOrder_08.png b/static/img/userOrder_08.png index 7b6e6ab..23ff6b0 100644 Binary files a/static/img/userOrder_08.png and b/static/img/userOrder_08.png differ diff --git a/static/img/userStored_back.png b/static/img/userStored_back.png new file mode 100644 index 0000000..13a79ba Binary files /dev/null and b/static/img/userStored_back.png differ diff --git a/static/img/userStored_icon.png b/static/img/userStored_icon.png new file mode 100644 index 0000000..2c2cb0b Binary files /dev/null and b/static/img/userStored_icon.png differ diff --git a/static/img/userStored_img_00.png b/static/img/userStored_img_00.png new file mode 100644 index 0000000..bc653e6 Binary files /dev/null and b/static/img/userStored_img_00.png differ diff --git a/static/img/userStored_img_01.png b/static/img/userStored_img_01.png new file mode 100644 index 0000000..527fe32 Binary files /dev/null and b/static/img/userStored_img_01.png differ diff --git a/static/img/userStored_text.png b/static/img/userStored_text.png new file mode 100644 index 0000000..44052aa Binary files /dev/null and b/static/img/userStored_text.png differ diff --git a/static/img/user_card_00.png b/static/img/user_card_00.png index 79f41d3..b73636d 100644 Binary files a/static/img/user_card_00.png and b/static/img/user_card_00.png differ diff --git a/static/img/user_card_01.png b/static/img/user_card_01.png index 002fc48..9b84536 100644 Binary files a/static/img/user_card_01.png and b/static/img/user_card_01.png differ diff --git a/static/img/user_card_02.png b/static/img/user_card_02.png index 9873bdb..216f94b 100644 Binary files a/static/img/user_card_02.png and b/static/img/user_card_02.png differ diff --git a/static/img/user_identity_00.png b/static/img/user_identity_00.png new file mode 100644 index 0000000..e9e0876 Binary files /dev/null and b/static/img/user_identity_00.png differ diff --git a/static/img/user_identity_01.png b/static/img/user_identity_01.png new file mode 100644 index 0000000..35260a2 Binary files /dev/null and b/static/img/user_identity_01.png differ