Commit 6d0d2189 authored by IvyXia123's avatar IvyXia123

no message

parent 91addeb1
......@@ -50,6 +50,23 @@ Vue.component('scroll', scroll);
// 支付宝支付完成,订单状态查询
let timer = null;
timer = setInterval(() => {
let vanDialog = document.querySelectorAll('.van-dialog')
Dialog.confirm({title: '标题', message: '支付成功'}).then(() => {
if (res.buy_type == 1) {
router.push({name: "buySuccess", query: outTradEno});
} else {
router.push({name: "success", query: outTradEno});
}
clearInterval(timer);
localStorage.removeItem('out_trade_no')
}).catch(() => {
clearInterval(timer);
localStorage.removeItem('out_trade_no')
});
// }
}, 6000)
if(window.localStorage.out_trade_no) {
timer = setInterval(() => {
let outTradEno = JSON.parse(window.localStorage.out_trade_no);
......
......@@ -119,6 +119,10 @@ export default {
}
return newObj;
},
/**
* 判断是否在那个浏览器里
* @returns {number}
*/
isWeixinBrowser() {
var ui = 0
var ua = navigator.userAgent.toLowerCase();
......@@ -130,9 +134,25 @@ export default {
}
return ui;
},
/**
* 获取链接后的参数
* @param name
* @param url
* @returns {RegExpExecArray | string}
*/
getParamByName(name, url) {
url = url || window.location;
var match = RegExp('[?&]' + name + '=([^&]*)').exec(url);
return match && decodeURIComponent(match[1].replace(/\+/g, ' '))
},
/**
* 动态改变css
* @param obj
* @param css
*/
setStyle(obj, css) {
for(var attr in obj){
obj.style[attr] = css[attr];
}
}
}
......@@ -79,6 +79,10 @@ html{
i{
font-style:normal;
}
.van-dialog {
border-radius: 15px;
}
// video::-internal-media-controls-download-button {
// display:none;
// }
......@@ -86,5 +90,5 @@ i{
// overflow:hidden;
// }
// video::-webkit-media-controls-panel {
// width: calc(100% + 50px);
// }
\ No newline at end of file
// width: calc(100% + 50px);
// }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment