diff --git a/api/api.js b/api/api.js index 9207bb4..3b040b8 100644 --- a/api/api.js +++ b/api/api.js @@ -160,6 +160,10 @@ export function modifyPhone(data){ export function modifyPassword(data){ return request.post('user/change/password',data); } +/** 修改支付密码 */ +export function modifyPayPassword(data){ + return request.post('user/change/pay_password',data); +} /** 退出登錄 */ export function logout(){ return request.get('logout'); diff --git a/components/pay/index.vue b/components/pay/index.vue new file mode 100644 index 0000000..971add4 --- /dev/null +++ b/components/pay/index.vue @@ -0,0 +1,308 @@ + + + + + \ No newline at end of file diff --git a/pages.json b/pages.json index 763c747..31d1551 100644 --- a/pages.json +++ b/pages.json @@ -352,6 +352,12 @@ "navigationBarTitleText": "修改密码" } }, + { + "path": "user_pay_pwd/index", + "style": { + "navigationBarTitleText": "修改支付密码" + } + }, { "path": "user_payment/index", "style": { diff --git a/pages/order_pay_status/index.vue b/pages/order_pay_status/index.vue index 06372c8..7f37e20 100644 --- a/pages/order_pay_status/index.vue +++ b/pages/order_pay_status/index.vue @@ -145,7 +145,7 @@ refreshData(){ this.timer = setInterval(()=>{ this.getOrderPayInfo(); - },1000) + },5000) }, // 优惠券展开 bindMore(){ diff --git a/pages/users/order_confirm/index.vue b/pages/users/order_confirm/index.vue index 7bfecff..1694b7c 100644 --- a/pages/users/order_confirm/index.vue +++ b/pages/users/order_confirm/index.vue @@ -450,6 +450,7 @@ + @@ -495,6 +496,7 @@ import dayjs from "@/plugin/dayjs/dayjs.min.js"; import areaWindow from '@/components/areaWindow'; import timeranges from '@/components/timeranges'; + import pay from '@/components/pay/index.vue'; export default { components: { couponListWindow, @@ -505,7 +507,8 @@ discountDetails, "jyf-parser": parser, areaWindow, - timeranges + timeranges, + pay }, filters: { filterDay(val) { @@ -671,6 +674,8 @@ addressInfoArea: [], timeranges: [], isShow:false, + payShow:false, + payInfo:{}, }; }, computed: { @@ -746,6 +751,12 @@ that.invoice.invoice = false }, methods: { + pay(val){ + let data1=this.payInfo; + data1.password=val.password; + console.log('val.password: ',val.password); + this.payment(data1); + }, /*预售协议*/ getPresellAgree: function() { this.showProtocol = true @@ -1245,6 +1256,9 @@ }, payment: function(data) { let that = this; + if(!data.password){ + data.balance_vert=1; + } createOrder(data).then(res => { let status = res.data.status, orderId = res.data.result.order_id, @@ -1252,7 +1266,9 @@ jsConfig = res.data.result.config, goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message; that.orderPay = true; + uni.hideLoading(); + console.log('status: ',status); switch (status) { case 'ORDER_EXIST': case 'EXTEND_ORDER': @@ -1285,6 +1301,19 @@ // #ifndef MP case "wechat": case "weixin": + case "no_pay_password": + uni.showModal({ + title: res.message, + content: res.msg, + confirmText: '绑定', + success(res) { + if (res.confirm) { + uni.navigateTo({ + url:'/pages/users/user_info/index' + }) + } + } + }); case "weixinApp": jsConfig.timeStamp = jsConfig.timestamp; // #ifndef APP-PLUS @@ -1384,6 +1413,7 @@ break; // #endif case "balance": + //余额 return that.$util.Tips({ title: res.message @@ -1641,18 +1671,21 @@ .Tips({ title: '余额不足!' }); - uni.showLoading({ - title: '订单支付中', - mask: true - }); - // #ifdef MP - openPaySubscribe().then(() => { + + + uni.showLoading({ + title: '订单支付中', + mask: true + }); + // #ifdef MP + openPaySubscribe().then(() => { + that.payment(data); + }); + // #endif + // #ifndef MP that.payment(data); - }); - // #endif - // #ifndef MP - that.payment(data); - // #endif + // #endif + }, // 打开配送方式弹窗 openShowBox(item, index) { diff --git a/pages/users/user_info/index.vue b/pages/users/user_info/index.vue index 19da14e..9746b1b 100644 --- a/pages/users/user_info/index.vue +++ b/pages/users/user_info/index.vue @@ -60,6 +60,15 @@ + + 实名认证 + + 点击实名认证 + + + + + ID号 @@ -84,6 +93,13 @@ + + 支付密码 + + 修改支付密码 + + + 地址管理 @@ -321,6 +337,22 @@ }); } }, + /** + *修改支付密码 + */ + changePlayPwd(){ + let that = this; + + if(that.userInfo.phone){ + uni.navigateTo({ + url: `/pages/users/user_pay_pwd/index` + }) + }else{ + that.$util.Tips({ + title: '请先绑定手机号' + }); + } + }, //注销账号 changeCancel(){ uni.navigateTo({ diff --git a/pages/users/user_integral/index.vue b/pages/users/user_integral/index.vue index d264d49..b12d8c1 100644 --- a/pages/users/user_integral/index.vue +++ b/pages/users/user_integral/index.vue @@ -68,13 +68,13 @@ 赚积分 - + diff --git a/pages/users/user_pay_pwd/index.vue b/pages/users/user_pay_pwd/index.vue new file mode 100644 index 0000000..0d94722 --- /dev/null +++ b/pages/users/user_pay_pwd/index.vue @@ -0,0 +1,232 @@ + + + + + diff --git a/static/iconfont/iconfont.css b/static/iconfont/iconfont.css index 5695ab1..498f205 100644 --- a/static/iconfont/iconfont.css +++ b/static/iconfont/iconfont.css @@ -27,6 +27,14 @@ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } +.haiyue-guanbi2:before { + content: "\e908"; +} + +.haiyue-guanbi:before { + content: "\e907"; +} + .haiyue-zhuyi:before { content: "\e904"; } @@ -43,6 +51,7 @@ content: "\e901"; } + .icon-huodong-renshu:before { content: "\e869"; } diff --git a/static/iconfont/iconfont.js b/static/iconfont/iconfont.js index d9d3189..5a3d659 100644 --- a/static/iconfont/iconfont.js +++ b/static/iconfont/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_4480899='',function(a){var t=(t=document.getElementsByTagName("script"))[t.length-1],e=t.getAttribute("data-injectcss"),t=t.getAttribute("data-disable-injectsvg");if(!t){var n,i,o,l,d,s=function(t,e){e.parentNode.insertBefore(t,e)};if(e&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(t){console&&console.log(t)}}n=function(){var t,e=document.createElement("div");e.innerHTML=a._iconfont_svg_string_4480899,(e=e.getElementsByTagName("svg")[0])&&(e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width=0,e.style.height=0,e.style.overflow="hidden",e=e,(t=document.body).firstChild?s(e,t.firstChild):t.appendChild(e))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),n()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=n,l=a.document,d=!1,h(),l.onreadystatechange=function(){"complete"==l.readyState&&(l.onreadystatechange=null,c())})}function c(){d||(d=!0,o())}function h(){try{l.documentElement.doScroll("left")}catch(t){return void setTimeout(h,50)}c()}}(window); \ No newline at end of file +window._iconfont_svg_string_4480899='',function(e){var t=(t=document.getElementsByTagName("script"))[t.length-1],a=t.getAttribute("data-injectcss"),t=t.getAttribute("data-disable-injectsvg");if(!t){var i,n,o,l,d,h=function(t,a){a.parentNode.insertBefore(t,a)};if(a&&!e.__iconfont__svg__cssinject__){e.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(t){console&&console.log(t)}}i=function(){var t,a=document.createElement("div");a.innerHTML=e._iconfont_svg_string_4480899,(a=a.getElementsByTagName("svg")[0])&&(a.setAttribute("aria-hidden","true"),a.style.position="absolute",a.style.width=0,a.style.height=0,a.style.overflow="hidden",a=a,(t=document.body).firstChild?h(a,t.firstChild):t.appendChild(a))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(i,0):(n=function(){document.removeEventListener("DOMContentLoaded",n,!1),i()},document.addEventListener("DOMContentLoaded",n,!1)):document.attachEvent&&(o=i,l=e.document,d=!1,c(),l.onreadystatechange=function(){"complete"==l.readyState&&(l.onreadystatechange=null,s())})}function s(){d||(d=!0,o())}function c(){try{l.documentElement.doScroll("left")}catch(t){return void setTimeout(c,50)}s()}}(window); \ No newline at end of file diff --git a/static/iconfont/iconfont.json b/static/iconfont/iconfont.json index 95d67dc..fb6dd82 100644 --- a/static/iconfont/iconfont.json +++ b/static/iconfont/iconfont.json @@ -5,6 +5,20 @@ "css_prefix_text": "haiyue", "description": "", "glyphs": [ + { + "icon_id": "39835854", + "name": "关闭", + "font_class": "-guanbi2", + "unicode": "e908", + "unicode_decimal": 59656 + }, + { + "icon_id": "39835567", + "name": "关闭", + "font_class": "-guanbi", + "unicode": "e907", + "unicode_decimal": 59655 + }, { "icon_id": "39769738", "name": "注意", diff --git a/static/iconfont/iconfont.ttf b/static/iconfont/iconfont.ttf index 1ad66fe..45f12dc 100644 Binary files a/static/iconfont/iconfont.ttf and b/static/iconfont/iconfont.ttf differ diff --git a/static/iconfont/iconfont.woff b/static/iconfont/iconfont.woff index b4791cf..73c6f07 100644 Binary files a/static/iconfont/iconfont.woff and b/static/iconfont/iconfont.woff differ diff --git a/static/iconfont/iconfont.woff2 b/static/iconfont/iconfont.woff2 index 13a8abb..353dab1 100644 Binary files a/static/iconfont/iconfont.woff2 and b/static/iconfont/iconfont.woff2 differ