赞
踩
app内嵌h5传参:
这个就要你这边跟app人员沟通,问他那边是传token还是传什么参数到我们这边过来前端过来
- created() {
- this.token = this.GetUrlParam("token");
- },
- // 获取url参数
- GetUrlParam(paraName) {
- // window.localtion.search
- // var url = document.location.toString();
- // var reg = new RegExp("(^|&)" + paraName + "=([^&]*)(&|$)");
- var url = window.location.search;
- var arrObj = url.split("?");
- if (arrObj.length > 1) {
- var arrPara = arrObj[1].split("&");
- var arr;
- for (var i = 0; i < arrPara.length; i++) {
- arr = arrPara[i].split("=");
- if (arr != null && arr[0] == paraName) {
- return arr[1];
- }
- }
- return "";
- } else {
- return
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。