| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241 |
- import request from '@/utils/request'
- /**
- * 查询销售易账号列表
- */
- export function listXsyAccount(query) {
- return request({
- url: '/xsy/account/list',
- method: 'get',
- params: query
- })
- }
- /**
- * 查询销售易账号详情
- */
- export function getXsyAccount(id) {
- return request({
- url: '/xsy/account/get/' + id,
- method: 'get'
- })
- }
- /**
- * 新增销售易账号
- */
- export function addXsyAccount(data) {
- return request({
- url: '/xsy/account/add',
- method: 'post',
- data: data
- })
- }
- /**
- * 修改销售易账号
- */
- export function updateXsyAccount(data) {
- return request({
- url: '/xsy/account/update',
- method: 'post',
- data: data
- })
- }
- /**
- * 删除销售易账号
- */
- export function delXsyAccount(id) {
- return request({
- url: '/xsy/account/delete/' + id,
- method: 'post'
- })
- }
- /**
- * 启用/禁用销售易账号
- */
- export function updateXsyAccountStatus(id, status) {
- return request({
- url: '/xsy/account/status',
- method: 'post',
- params: {
- id: id,
- status: status
- }
- })
- }
- /**
- * 获取授权地址
- */
- export function getXsyAuthUrl(accountId) {
- return request({
- url: '/xiaoShouYi/auth/url/' + accountId,
- method: 'get'
- })
- }
- /**
- * 绑定销售易账号
- */
- export function bindXsyAccount(data) {
- return request({
- url: '/xsy/companyBind/bind',
- method: 'post',
- data: data
- })
- }
- export function unbindXsyAccount(data) {
- return request({
- url: '/xsy/companyBind/unbind',
- method: 'post',
- data: data
- })
- }
- /**
- * 查询绑定关系
- */
- export function getXsyBind(companyUserId) {
- return request({
- url: '/xsy/bind/get',
- method: 'get',
- params: {
- companyUserId: companyUserId
- }
- })
- }
- /**
- * 获取授权URL(新接口)
- */
- export function getXsyOauthUrl(accountId) {
- return request({
- url: '/xiaoShouYi/New/auth/url/' + accountId,
- method: 'get'
- })
- }
- /**
- * 生成素材追踪链接
- */
- export function generateXsyLink(companyUserId, data) {
- return request({
- url: '/xiaoShouYi/New/generateLink',
- method: 'post',
- params: {
- companyUserId: companyUserId
- },
- data: data
- })
- }
- /**
- * 发送确认
- */
- export function sendXsyConfirm(companyUserId, forwardId, forwardType) {
- return request({
- url: '/xiaoShouYi/New/sendConfirm',
- method: 'post',
- params: {
- companyUserId: companyUserId,
- forwardId: forwardId,
- forwardType: forwardType
- }
- })
- }
- /**
- * 查询素材列表
- */
- export function queryXsyMaterials(companyUserId, data) {
- return request({
- url: '/xiaoShouYi/New/materials/query',
- method: 'post',
- params: {
- companyUserId: companyUserId
- },
- data: data
- })
- }
- /**
- * 上传素材文件
- */
- export function uploadXsyFile(companyUserId, file, isVideo) {
- const formData = new FormData()
- formData.append('file', file)
- formData.append('isVideo', isVideo == null ? false : isVideo)
- return request({
- url: '/xiaoShouYi/New/uploadFile?companyUserId=' + companyUserId,
- method: 'post',
- data: formData,
- headers: {
- 'Content-Type': 'multipart/form-data'
- }
- })
- }
- /**
- * 创建素材
- */
- export function createXsyMaterial(companyUserId, data) {
- return request({
- url: '/xiaoShouYi/New/createMaterial',
- method: 'post',
- params: {
- companyUserId: companyUserId
- },
- data: data
- })
- }
- /**
- * 上传并创建素材
- */
- export function createXsyMaterialWithUpload(params) {
- const formData = new FormData()
- formData.append('companyUserId', params.companyUserId)
- formData.append('file', params.file)
- formData.append('isVideo', params.isVideo == null ? false : params.isVideo)
- formData.append('corpName', params.corpName)
- formData.append('materialType', params.materialType)
- formData.append('categoryName', params.categoryName)
- formData.append('title', params.title)
- return request({
- url: '/xiaoShouYi/New/createMaterialWithUpload',
- method: 'post',
- data: formData,
- headers: {
- 'Content-Type': 'multipart/form-data'
- }
- })
- }
- /**
- * 完整流程:生成链接并发送确认
- */
- export function fullProcessXsy(companyUserId, data) {
- return request({
- url: '/xiaoShouYi/New/fullProcess',
- method: 'post',
- params: {
- companyUserId: companyUserId
- },
- data: data
- })
- }
|