From 32f74fd6854c302dc358cf9076835049aa4c78ca Mon Sep 17 00:00:00 2001 From: Sliverber <2622874537@qq.com> Date: Thu, 9 May 2024 17:14:37 +0800 Subject: [PATCH] aa --- api/api.js | 2 +- components/productWindow/index.vue | 15 ++++-- config/app.js | 8 +-- pages/goods_details/index.vue | 38 +++++++------ pages/users/faceBack/index.vue | 14 ++++- pages/users/order_confirm/index.vue | 2 +- static/uni.webview.1.5.5.js | 1 + template.html | 84 ++++++++++++----------------- 8 files changed, 89 insertions(+), 75 deletions(-) create mode 100644 static/uni.webview.1.5.5.js diff --git a/api/api.js b/api/api.js index a6e283d..c515c33 100644 --- a/api/api.js +++ b/api/api.js @@ -345,7 +345,7 @@ export function getInformationSave(data) { // 分期套餐列表 export function getfenqilist(data) { - return request.get('installmentsCombo/list', data, { + return request.get('customInstallments/list', data, { noAuth: true }); } diff --git a/components/productWindow/index.vue b/components/productWindow/index.vue index c6e8703..e8cb40d 100644 --- a/components/productWindow/index.vue +++ b/components/productWindow/index.vue @@ -41,7 +41,7 @@ - + 分期方案
-
-
-
+ -->
- @@ -409,6 +409,7 @@ data() { let that = this; return { + isfenqi:false, showSkeleton: true, //骨架屏显示隐藏 isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取 //属性是否打开 @@ -560,6 +561,7 @@ this.getTokenIsExist(); this.getshiminfo() this.getstause() + this.getfqList() }, onLoad(options) { // console.log(JSON.stringify(options),"options.spread") @@ -718,18 +720,18 @@ // 请求分期列表 - // getfqList: function() { - // let data = { - // limit:15, - // page:1, - // uid:this.$store.getters.uid - // } - // getfenqilist(data).then(res => { - // this.fenqlist = res.data.list + getfqList: function() { + let data = { + limit:15, + page:1, + uid:this.$store.getters.uid + } + getfenqilist(data).then(res => { + this.fenqlist = res.data.list - // // localStorage.setItem('fqlist',JSON.stringify(this.fenqlist)) - // }) - // }, + // localStorage.setItem('fqlist',JSON.stringify(this.fenqlist)) + }) + }, //校验token是否有效,true为有效,false为无效 getTokenIsExist() { this.$LoginAuth.getTokenIsExist().then(data => { @@ -1383,6 +1385,7 @@ * 立即购买 */ goBuy: Debounce(function(e) { + this.isfenqi=true if (this.isLogin === false) { toLogin(); // uni.navigateTo({ @@ -1394,6 +1397,10 @@ this.$util.Tips({ title: '您有正在进行的订单,请还款后再继续' }); + }else if(this.fenqlist.length<1){ + this.$util.Tips({ + title: '系统配置错误,请稍后重试' + }); }else{ this.types=0 this.goCat(0); @@ -1414,6 +1421,7 @@ } }), goBuys(){ + this.isfenqi=false this.types=1 this.goCat(0); }, diff --git a/pages/users/faceBack/index.vue b/pages/users/faceBack/index.vue index 4e65a3a..0be135f 100644 --- a/pages/users/faceBack/index.vue +++ b/pages/users/faceBack/index.vue @@ -51,8 +51,9 @@ }, onLoad(option) { let abb =option - console.log(option); + + // window.postMessage({ action:'someAction',data:'someData'}); if(abb.success=='false'){ this.success=abb.success }else if(abb.success=='true'){ @@ -67,6 +68,15 @@ } this.getfaceinfo() } + setTimeout(()=>{ + let script = document.createElement('script'); + script.src='https://res.wx.qq.com/open/js/jweixin-1.3.2.js' + document.head.appendChild(script); + },100) + setTimeout(()=>{ + wx.miniProgram.navigateBack() + wx.miniProgram.postMessage({ data:{'url':option} }) + },300) }, methods: { @@ -76,6 +86,8 @@ token:this.token } + + getfaceInfo(data).then(res => { diff --git a/pages/users/order_confirm/index.vue b/pages/users/order_confirm/index.vue index 923751a..e764ecc 100644 --- a/pages/users/order_confirm/index.vue +++ b/pages/users/order_confirm/index.vue @@ -226,7 +226,7 @@ 合计: ¥{{orderInfoVo.payFee || 0}} - 立刻申请 + 先享后付
diff --git a/static/uni.webview.1.5.5.js b/static/uni.webview.1.5.5.js new file mode 100644 index 0000000..56ba555 --- /dev/null +++ b/static/uni.webview.1.5.5.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e=e||self).webUni=n()}(this,(function(){"use strict";try{var e={};Object.defineProperty(e,"passive",{get:function(){!0}}),window.addEventListener("test-passive",null,e)}catch(e){}var n=Object.prototype.hasOwnProperty;function i(e,i){return n.call(e,i)}var t=[];function o(){return window.__dcloud_weex_postMessage||window.__dcloud_weex_}function a(){return window.__uniapp_x_postMessage||window.__uniapp_x_}var r=function(e,n){var i={options:{timestamp:+new Date},name:e,arg:n};if(a()){if("postMessage"===e){var r={data:n};return window.__uniapp_x_postMessage?window.__uniapp_x_postMessage(r):window.__uniapp_x_.postMessage(JSON.stringify(r))}var d={type:"WEB_INVOKE_APPSERVICE",args:{data:i,webviewIds:t}};window.__uniapp_x_postMessage?window.__uniapp_x_postMessageToService(d):window.__uniapp_x_.postMessageToService(JSON.stringify(d))}else if(o()){if("postMessage"===e){var s={data:[n]};return window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessage(s):window.__dcloud_weex_.postMessage(JSON.stringify(s))}var w={type:"WEB_INVOKE_APPSERVICE",args:{data:i,webviewIds:t}};window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessageToService(w):window.__dcloud_weex_.postMessageToService(JSON.stringify(w))}else{if(!window.plus)return window.parent.postMessage({type:"WEB_INVOKE_APPSERVICE",data:i,pageId:""},"*");if(0===t.length){var u=plus.webview.currentWebview();if(!u)throw new Error("plus.webview.currentWebview() is undefined");var g=u.parent(),v="";v=g?g.id:u.id,t.push(v)}if(plus.webview.getWebviewById("__uniapp__service"))plus.webview.postMessageToUniNView({type:"WEB_INVOKE_APPSERVICE",args:{data:i,webviewIds:t}},"__uniapp__service");else{var c=JSON.stringify(i);plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat("WEB_INVOKE_APPSERVICE",'",').concat(c,",").concat(JSON.stringify(t),");"))}}},d={navigateTo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;r("navigateTo",{url:encodeURI(n)})},navigateBack:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.delta;r("navigateBack",{delta:parseInt(n)||1})},switchTab:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;r("switchTab",{url:encodeURI(n)})},reLaunch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;r("reLaunch",{url:encodeURI(n)})},redirectTo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;r("redirectTo",{url:encodeURI(n)})},getEnv:function(e){a()?e({uvue:!0}):o()?e({nvue:!0}):window.plus?e({plus:!0}):e({h5:!0})},postMessage:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r("postMessage",e.data||{})}},s=/uni-app/i.test(navigator.userAgent),w=/Html5Plus/i.test(navigator.userAgent),u=/complete|loaded|interactive/;var g=window.my&&navigator.userAgent.indexOf(["t","n","e","i","l","C","y","a","p","i","l","A"].reverse().join(""))>-1;var v=window.swan&&window.swan.webView&&/swan/i.test(navigator.userAgent);var c=window.qq&&window.qq.miniProgram&&/QQ/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var p=window.tt&&window.tt.miniProgram&&/toutiaomicroapp/i.test(navigator.userAgent);var _=window.wx&&window.wx.miniProgram&&/micromessenger/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var m=window.qa&&/quickapp/i.test(navigator.userAgent);var f=window.ks&&window.ks.miniProgram&&/micromessenger/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var l=window.tt&&window.tt.miniProgram&&/Lark|Feishu/i.test(navigator.userAgent);var E=window.jd&&window.jd.miniProgram&&/micromessenger/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var x=window.xhs&&window.xhs.miniProgram&&/xhsminiapp/i.test(navigator.userAgent);for(var S,h=function(){window.UniAppJSBridge=!0,document.dispatchEvent(new CustomEvent("UniAppJSBridgeReady",{bubbles:!0,cancelable:!0}))},y=[function(e){if(s||w)return window.__uniapp_x_postMessage||window.__uniapp_x_||window.__dcloud_weex_postMessage||window.__dcloud_weex_?document.addEventListener("DOMContentLoaded",e):window.plus&&u.test(document.readyState)?setTimeout(e,0):document.addEventListener("plusready",e),d},function(e){if(_)return window.WeixinJSBridge&&window.WeixinJSBridge.invoke?setTimeout(e,0):document.addEventListener("WeixinJSBridgeReady",e),window.wx.miniProgram},function(e){if(c)return window.QQJSBridge&&window.QQJSBridge.invoke?setTimeout(e,0):document.addEventListener("QQJSBridgeReady",e),window.qq.miniProgram},function(e){if(g){document.addEventListener("DOMContentLoaded",e);var n=window.my;return{navigateTo:n.navigateTo,navigateBack:n.navigateBack,switchTab:n.switchTab,reLaunch:n.reLaunch,redirectTo:n.redirectTo,postMessage:n.postMessage,getEnv:n.getEnv}}},function(e){if(v)return document.addEventListener("DOMContentLoaded",e),window.swan.webView},function(e){if(p)return document.addEventListener("DOMContentLoaded",e),window.tt.miniProgram},function(e){if(m){window.QaJSBridge&&window.QaJSBridge.invoke?setTimeout(e,0):document.addEventListener("QaJSBridgeReady",e);var n=window.qa;return{navigateTo:n.navigateTo,navigateBack:n.navigateBack,switchTab:n.switchTab,reLaunch:n.reLaunch,redirectTo:n.redirectTo,postMessage:n.postMessage,getEnv:n.getEnv}}},function(e){if(f)return window.WeixinJSBridge&&window.WeixinJSBridge.invoke?setTimeout(e,0):document.addEventListener("WeixinJSBridgeReady",e),window.ks.miniProgram},function(e){if(l)return document.addEventListener("DOMContentLoaded",e),window.tt.miniProgram},function(e){if(E)return window.JDJSBridgeReady&&window.JDJSBridgeReady.invoke?setTimeout(e,0):document.addEventListener("JDJSBridgeReady",e),window.jd.miniProgram},function(e){if(x)return window.xhs.miniProgram},function(e){return document.addEventListener("DOMContentLoaded",e),d}],M=0;M - - - - - - <%= htmlWebpackPlugin.options.title %> - - - - - - - - - - - -
- - - - - - - - \ No newline at end of file + + + + + + + + + <%= htmlWebpackPlugin.options.title %> + + + + + + +
+ + + + + + \ No newline at end of file