|
@@ -9,7 +9,7 @@ import {pcBaseUrl} from '../utils/config'
|
|
|
const mapObj=new Map([
|
|
|
['pages/activity/activity','/activity/list'],
|
|
|
['pages-activity/detail','/activity/detail']
|
|
|
-])
|
|
|
+])//map映射小程序页面路径对应h5页面路径
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
@@ -21,7 +21,7 @@ export default {
|
|
|
console.log('pc页面onload数据',options);
|
|
|
let paramsObj={
|
|
|
...options,
|
|
|
- token:this.$store.state.user.token,
|
|
|
+ token:this.$store.state.user.token||uni.getStorageSync("token"),
|
|
|
timestamp:new Date().getTime(),//防止缓存
|
|
|
}
|
|
|
delete paramsObj.xcxPath
|
|
@@ -37,13 +37,6 @@ export default {
|
|
|
console.log('拼接字符串:',paramsObjStr);
|
|
|
this.url=`${pcBaseUrl}${mapObj.get(decodeURIComponent(options.xcxPath))||'/'}?${paramsObjStr}`
|
|
|
},
|
|
|
- onShow() {
|
|
|
- uni.hideHomeButton({
|
|
|
- fail:(e)=>{
|
|
|
- console.log(e);
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
onShareAppMessage({webViewUrl}) {
|
|
|
// console.log(webViewUrl);
|
|
|
let paramsStr=''
|
|
@@ -68,6 +61,14 @@ export default {
|
|
|
console.log('h5传来的数据',data);
|
|
|
this.msgObj=data
|
|
|
}
|
|
|
+ },
|
|
|
+
|
|
|
+ onShow() {
|
|
|
+ uni.hideHomeButton({
|
|
|
+ fail:(e)=>{
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
</script>
|