diff --git a/src/app.js b/src/app.js index e44c004..afdef53 100644 --- a/src/app.js +++ b/src/app.js @@ -1,21 +1,20 @@ -import { Component } from 'react' -import SDK from 'sr-sdk-h5' +import { Component } from "react"; +import SDK from "sr-sdk-h5"; -import './app.scss' -import 'taro-ui/dist/style/index.scss' // 全局引入一次即可 +import "./app.scss"; +import "taro-ui/dist/style/index.scss"; // 全局引入一次即可 /** - * 有数埋点SDK 默认配置 - * 使用方法请参考文档 https://mp.zhls.qq.com/youshu-docs/develop/sdk/Taro.html - * 如对有数SDK埋点接入有任何疑问,请联系微信:sr_data_service - */ - - window.srt = new SDK({ - + * 有数埋点SDK 默认配置 + * 使用方法请参考文档 https://mp.zhls.qq.com/youshu-docs/develop/sdk/Taro.html + * 如对有数SDK埋点接入有任何疑问,请联系微信:sr_data_service + */ + +window.srt = new SDK({ /** * 有数 - ka‘接入测试用’ 分配的 app_id,对应的业务 */ - token: 'bi72fccc7184ef45f9', + token: "bi72fccc7184ef45f9", /** * 传入自定义的后台上报接口,若传入则token将无意义 @@ -51,7 +50,7 @@ import 'taro-ui/dist/style/index.scss' // 全局引入一次即可 /** * 小程序appid */ - appid: '' + appid: "", }); // window.srt.setChan({chan_id: 'xxx'}) // 设置渠道,渠道信息将会被设置在props.chan对象中 @@ -59,16 +58,16 @@ import 'taro-ui/dist/style/index.scss' // 全局引入一次即可 // window.srt.setUser({user_id: 'xxx'}) // 设置用户信息,用户信息将会被设置在props.wx_user对象中 class App extends Component { - componentDidMount () {} + componentDidMount() {} - componentDidShow () {} + componentDidShow() {} - componentDidHide () {} + componentDidHide() {} // this.props.children 是将要会渲染的页面 - render () { - return this.props.children + render() { + return this.props.children; } } -export default App +export default App; diff --git a/src/index.html b/src/index.html index 5578766..34b48a5 100644 --- a/src/index.html +++ b/src/index.html @@ -1,18 +1,43 @@ -
- - - - - - - -