apifm-webapi 25.3.9 → 25.4.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +32 -0
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -408,6 +408,11 @@ module.exports = {
|
|
|
408
408
|
goodsId
|
|
409
409
|
})
|
|
410
410
|
},
|
|
411
|
+
goodsShopStores: (goodsId) => {
|
|
412
|
+
return request('/shop/goods/goodsShopStores', true, 'get', {
|
|
413
|
+
goodsId
|
|
414
|
+
})
|
|
415
|
+
},
|
|
411
416
|
goodsVideoEpisodesList: (goodsId, token = '') => {
|
|
412
417
|
return request('/goodsVideoEpisodes/list', true, 'get', {
|
|
413
418
|
goodsId, token
|
|
@@ -939,12 +944,39 @@ module.exports = {
|
|
|
939
944
|
})
|
|
940
945
|
})
|
|
941
946
|
},
|
|
947
|
+
uploadFileV22: (token, tempFilePath, expireHours = '') => {
|
|
948
|
+
return new Promise((resolve, reject) => {
|
|
949
|
+
tt.uploadFile({
|
|
950
|
+
url: 'https://dfs.apifm.com/upload2',
|
|
951
|
+
filePath: tempFilePath,
|
|
952
|
+
name: 'upfile',
|
|
953
|
+
formData: {
|
|
954
|
+
token,
|
|
955
|
+
subDomain,
|
|
956
|
+
expireHours
|
|
957
|
+
},
|
|
958
|
+
success(res) {
|
|
959
|
+
resolve(JSON.parse(res.data))
|
|
960
|
+
},
|
|
961
|
+
fail(error) {
|
|
962
|
+
reject(error)
|
|
963
|
+
},
|
|
964
|
+
complete(aaa) {
|
|
965
|
+
// 加载完成
|
|
966
|
+
}
|
|
967
|
+
})
|
|
968
|
+
})
|
|
969
|
+
},
|
|
942
970
|
uploadFileFromUrl: (remoteFileUrl = '', ext = '') => {
|
|
943
971
|
return request('/dfs/upload/url', true, 'post', { remoteFileUrl, ext })
|
|
944
972
|
},
|
|
945
973
|
uploadFileFromUrlV2: data => {
|
|
946
974
|
return request('https://oss.apifm.com/uploadByUrl', false, 'post', { ...data, subDomain })
|
|
947
975
|
},
|
|
976
|
+
uploadFileFromUrlV22: data => {
|
|
977
|
+
const _data = Object.assign(data, { subDomain })
|
|
978
|
+
return request('https://dfs.apifm.com/uploadByUrl', false, 'post', _data)
|
|
979
|
+
},
|
|
948
980
|
uploadFileList: (path = '') => {
|
|
949
981
|
return request('/dfs/upload/list', true, 'post', { path })
|
|
950
982
|
},
|