apifm-webapi 25.3.10 → 25.4.16
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 +38 -0
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -89,6 +89,12 @@ module.exports = {
|
|
|
89
89
|
nextMobileSegment: (data) => {
|
|
90
90
|
return request('/common/mobile-segment/next', false, 'post', data)
|
|
91
91
|
},
|
|
92
|
+
queryMobileLocationV2: (mobile = '') => {
|
|
93
|
+
return request('https://common.apifm.com/' + subDomain + '/common/mobile-segment/location', false, 'get', { mobile })
|
|
94
|
+
},
|
|
95
|
+
nextMobileSegmentV2: (data) => {
|
|
96
|
+
return request('https://common.apifm.com/' + subDomain + '/common/mobile-segment/next', false, 'post', data)
|
|
97
|
+
},
|
|
92
98
|
forexRate: (fromCode, toCode) => {
|
|
93
99
|
return request('/forex/rate', true, 'get', { fromCode, toCode })
|
|
94
100
|
},
|
|
@@ -408,6 +414,11 @@ module.exports = {
|
|
|
408
414
|
goodsId
|
|
409
415
|
})
|
|
410
416
|
},
|
|
417
|
+
goodsShopStores: (goodsId) => {
|
|
418
|
+
return request('/shop/goods/goodsShopStores', true, 'get', {
|
|
419
|
+
goodsId
|
|
420
|
+
})
|
|
421
|
+
},
|
|
411
422
|
goodsVideoEpisodesList: (goodsId, token = '') => {
|
|
412
423
|
return request('/goodsVideoEpisodes/list', true, 'get', {
|
|
413
424
|
goodsId, token
|
|
@@ -939,12 +950,39 @@ module.exports = {
|
|
|
939
950
|
})
|
|
940
951
|
})
|
|
941
952
|
},
|
|
953
|
+
uploadFileV22: (token, tempFilePath, expireHours = '') => {
|
|
954
|
+
return new Promise((resolve, reject) => {
|
|
955
|
+
tt.uploadFile({
|
|
956
|
+
url: 'https://dfs.apifm.com/upload2',
|
|
957
|
+
filePath: tempFilePath,
|
|
958
|
+
name: 'upfile',
|
|
959
|
+
formData: {
|
|
960
|
+
token,
|
|
961
|
+
subDomain,
|
|
962
|
+
expireHours
|
|
963
|
+
},
|
|
964
|
+
success(res) {
|
|
965
|
+
resolve(JSON.parse(res.data))
|
|
966
|
+
},
|
|
967
|
+
fail(error) {
|
|
968
|
+
reject(error)
|
|
969
|
+
},
|
|
970
|
+
complete(aaa) {
|
|
971
|
+
// 加载完成
|
|
972
|
+
}
|
|
973
|
+
})
|
|
974
|
+
})
|
|
975
|
+
},
|
|
942
976
|
uploadFileFromUrl: (remoteFileUrl = '', ext = '') => {
|
|
943
977
|
return request('/dfs/upload/url', true, 'post', { remoteFileUrl, ext })
|
|
944
978
|
},
|
|
945
979
|
uploadFileFromUrlV2: data => {
|
|
946
980
|
return request('https://oss.apifm.com/uploadByUrl', false, 'post', { ...data, subDomain })
|
|
947
981
|
},
|
|
982
|
+
uploadFileFromUrlV22: data => {
|
|
983
|
+
const _data = Object.assign(data, { subDomain })
|
|
984
|
+
return request('https://dfs.apifm.com/uploadByUrl', false, 'post', _data)
|
|
985
|
+
},
|
|
948
986
|
uploadFileList: (path = '') => {
|
|
949
987
|
return request('/dfs/upload/list', true, 'post', { path })
|
|
950
988
|
},
|
package/package.json
CHANGED