# BWRM移动版 **Repository Path**: HuanRi/bwrm_mobile ## Basic Information - **Project Name**: BWRM移动版 - **Description**: BWRM移动端,包含首页和我的页面。首页提供信息浏览,信息详情等;‘我的’页面包含个人信息,充值等功能性 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-11-23 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # BWRM移动版 #### 介绍 BWRM移动端,包含首页和我的页面。首页提供信息浏览,信息详情等;‘我的’页面包含个人信息,充值等功能性 # vue-cli ## Project setup ``` npm install ``` ### Compiles and hot-reloads for development ``` npm run serve ``` ### Compiles and minifies for production ``` npm run build ``` ### Run your tests ``` npm run test ``` ### Lints and fixes files ``` npm run lint ``` ### use JSBridgeNative options ``` returnNative: H5页面返回Native ``` this.$bridge.callHandler('returnNative',{},(res)=>{ console.log(res) }); ``` switchRoler: 切换身份(流量主-->广告主) ``` let parmas={ platformRole:2, uniqueId: uniqueId } this.$bridge.callHandler('switchRoler',parmas,(res)=>{ console.log(res) }); ``` chooseImages:调用相机相册 ``` let parmas = { maxCount: 1, //选择相册的最大数,若是相机拍照则只能为1 sourceType: ['album', 'camera','video'], //相册&&拍照,可选其一,video单选(method:articleContentVideo) method:"articleContentImg" }; this.$bridge.callHandler('chooseImages',parmas,(res)=>{ let imagesArr = res.split("@X@"); }) ; ``` downloadImage:下载图片 ``` let parmas = { imgUrl:["https://xxxx"] }; this.$bridge.callHandler('downloadImage',parmas,(res)=>{ console.log(res) }) ; ``` shareApp:调用分享 朋友 ``` 未实现 let parmas = { title: '', // 分享标题 desc: '', // 分享描述 link: '', // 分享链接 imgUrl: '', // 分享图标 }; this.$bridge.callHandler('shareAppMessage',parmas,(res)=>{ console.log(res) }); ``` shareTimeline:调用分享 朋友圈 ``` 未实现 let parmas = { title: '', // 分享标题 link: '', // 分享链接 imgUrl: '', // 分享图标 }; this.$bridge.callHandler('shareTimeline',parmas,(res)=>{ console.log(res) }); ``` switchWechat:唤起微信 ``` 未实现 this.$bridge.callHandler('switchWechat',{},(res)=>{ console.log(res) }); ``` intoWap: H5页面返回Native ``` 未实现 this.$bridge.registerHandler('intoWap',(data, responseCallback) => { console.log('app主动调用js方法,传入数据:'+ data) responseCallback(data) });