更改package.json版本
yarn run build
-
npm publish
注:镜像源需切换回NPM官方源
yarn
yarn start
该组件用于taro、react和jquery版本。
- 项目公共 header 参数配置。
<script src="https://f3-df.veimg.cn/common/lib/dfws-channel.min.js"></script>
<script>
//具体配置:管理后台-最佳东方-系统设置-渠道管理
var channel = { "project": "VE", "origin": "C", "platform": "PC", "device": "ZJDF","version":" 1.0.0" };
var dfws_params = window.getPublicChannel(channel);
console.log(dfws_params, 'dfws_params')
</script>
import getPublicChannel from "dfws-channel"
//具体配置:管理后台-最佳东方-系统设置-渠道管理
const channel = { "project": "VE", "origin": "C", "platform": "PC", "device": "ZJDF","version":" 1.0.0" };
/**
* 东方网升项目公共 header
* @param {object} params
*/
const dfws_params = JSON.stringify(getPublicChannel(channel));
import Taro from '@tarojs/taro'
import getPublicChannel from "dfws-channel/dist/taro"
//具体配置:管理后台-最佳东方-系统设置-渠道管理
const channel = { "project": "VE", "origin": "C", "platform": "XCX", "device": "ZJDF","version":" 1.0.0" };
/**
* 东方网升项目公共 header
* @param {object} dfws_header
*/
const dfws_header = getPublicChannel(channel, Taro)
// 获取网络环境
dfws_header.getNetworkType(network => {
channel.network = network
})
const dfws_params= JSON.stringify(dfws_header.xcxQueryChannels())
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
channel | 公共渠道配置参数 | object | - |
{"project":"VE","origin":"C","device":"ZJDF","network":"4G","device_brand":"unknown","system":"unknown","system_version":"unknown","version":"1.0.0","browser":"chrome","browser_version":"121.0.0.0","screen":"1920*1080","platform":"PC"}
渠道管理