Commit 5c8342f3 authored by jiaoyahui's avatar jiaoyahui

router的更改位置,和支付浏览器的测试

parent ee0e2323
......@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<script src="./static/js/mqttws31.js" type="text/javascript"></script>
<title><%= htmlWebpackPlugin.options.title %></title>
<title>斗牛财经</title>
</head>
<body>
<noscript>
......
......@@ -9,6 +9,7 @@ import store from './store/index'
import server from './axios/api'
import VideoPlayer from 'vue-video-player'
import 'vue-video-player/src/custom-theme.css'
import common from '../static/js/common.js' //公共方法
import 'video.js/dist/video-js.css'
//引入 hls,视频直播(m3u8)必须引入的
import 'videojs-contrib-hls'
......@@ -25,6 +26,7 @@ Vue.prototype.qs = Qs;
Vue.prototype.axios = axios;
Vue.prototype.router = router;
Vue.prototype.$md5 = md5;
Vue.prototype.common = common; //引入公共方法
new Vue({
render: h => h(App),
router,
......
......@@ -21,21 +21,31 @@ Vue.use(Router)
const router = new Router({
routes:[
{
path: '/login',
path: '/',
name: 'index',
component: index,
component: password,
meta: {
requireAuth: true
} // 判断是否需要登录
requireAuth: true,
}, // 判断是否需要登录
redirect:'/password'
},
{
path: '/',
name: 'index',
path: '/login',
name: 'login',
component: index,
meta: {
requireAuth: true
} // 判断是否需要登录
},
// {
// path: '/',
// name: 'index',
// component: password,
// meta: {
// requireAuth: true
// } // 判断是否需要登录
// },
{
path: '/password',
name: 'password',
......
......@@ -479,7 +479,7 @@ export default {
applicationType:4,
pmAppVersion: 868,
// applicationType: 3,
// applicationType: 3,
goodsType:3,
goodsId:429,
})
......@@ -497,20 +497,19 @@ export default {
// 订单
payorder(){
let temp=this.qs.stringify({
goodsId:429,
goodsId:429,
goodsType:3,
sxUbId:26,
pmoType:0,
pmoType:0,
subscribeDayType:26,
applicationType:4,
payType:1,
// orderType:2,
subscribeDayType:19,
rechargeFrom:1,
isCheckBuy:1,
paySource:"douniu_h5",
chargeModeKey:this.chargeModeKey
subscribeDayType:19,
rechargeFrom:1,
isCheckBuy:1,
paySource:"douniu_h5",
chargeModeKey:this.chargeModeKey
......@@ -520,7 +519,7 @@ export default {
this.pmoOrder=res.data.data.pmoOrder
if(res.code=200){
console.log(res.data.data.pmoOrder,'===-')
console.log(res.data.data.pmoOrder,'===-')
this.paybuy()
}
......@@ -531,26 +530,19 @@ export default {
},
paybuy(){
let temp=this.qs.stringify({
orderId:this.pmoId,
orderNo:this.pmoOrder,
payType:1,
orderType:3,
pmoType:0,
orderId:this.pmoId,
orderNo:this.pmoOrder,
payType:1,
orderType:3,
pmoType:0,
goodsType:3,
})
this.server.live.buy(temp).then(res=>{
console.log(this.pmoOrder,'===')
this.server.live.buy(temp).then(res=>{
window.location.href=res.data.data.wechatInfo.payUrl
console.log(res.data.data.wechatInfo.payUrl,'===')
})
......@@ -931,7 +923,7 @@ display: block;
}
.conten{
position:fixed;
top:27%;
top:24%;
left:0%;
width:100%;
/* background:red */
......
// 判断是否为微信浏览器
const isWX = () => {
var ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == 'micromessenger') {
return true;
} else {
return false;
}
}
// 判断是否为移动端浏览器
const isMobile = () => {
var ua = navigator.userAgent;
var ipad = ua.match(/(iPad).*OS\s([\d_]+)/),
isIphone = !ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/),
isAndroid = ua.match(/(Android)\s+([\d.]+)/),
isMobile = isIphone || isAndroid || ipad;
//判断
if (isMobile) {
return true;
} else {
return false;
}
}
\ No newline at end of file
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