fmui-base 2.1.21 → 2.1.22
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/README.md +1 -0
- package/lib/upload/upload.js +6 -5
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/upload/upload.js
CHANGED
|
@@ -190,7 +190,7 @@ var PageHome = function (_React$Component) {
|
|
|
190
190
|
var dir = props.dir;
|
|
191
191
|
var businessExt = props.extensions;
|
|
192
192
|
var context = document.getElementById("context").value;
|
|
193
|
-
var token =
|
|
193
|
+
var token = getLoginUserInfo().token;
|
|
194
194
|
_this.state = {
|
|
195
195
|
required: required,
|
|
196
196
|
canAdd: canAdd,
|
|
@@ -206,9 +206,9 @@ var PageHome = function (_React$Component) {
|
|
|
206
206
|
businessExt: businessExt,
|
|
207
207
|
limitNo: limitNo,
|
|
208
208
|
context: context,
|
|
209
|
-
uploadUrl: context + '/api/m/plugin/attachment/mobile/createFile
|
|
209
|
+
uploadUrl: context + '/api/m/plugin/attachment/mobile/createFile',
|
|
210
210
|
urlPrev: context + '/api/m/plugin/attachment/mobile/viewImage?token=' + token + '&fid=',
|
|
211
|
-
queryUrl: context + '/api/m/plugin/attachment/mobile/getAttachmentByIds?
|
|
211
|
+
queryUrl: context + '/api/m/plugin/attachment/mobile/getAttachmentByIds?ids=',
|
|
212
212
|
//queryUrl: context + '/client/approve/getCanBackActivity?ids=',
|
|
213
213
|
token: token,
|
|
214
214
|
isInit: false,
|
|
@@ -546,7 +546,8 @@ var PageHome = function (_React$Component) {
|
|
|
546
546
|
fetch(t.state.queryUrl + initIds, {
|
|
547
547
|
method: "POST",
|
|
548
548
|
headers: {
|
|
549
|
-
'Content-Type': 'application/x-www-form-urlencoded'
|
|
549
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
550
|
+
'Authorization': 'Bearer ' + getLoginUserInfo().token
|
|
550
551
|
// body:'token='+t.state.token,
|
|
551
552
|
// headers: {
|
|
552
553
|
// "Content-Type": "application/x-www-form-urlencoded",
|
|
@@ -644,7 +645,7 @@ var PageHome = function (_React$Component) {
|
|
|
644
645
|
return t.state.uploadType == 'image' ? _react2.default.createElement(
|
|
645
646
|
'div',
|
|
646
647
|
{ className: 'upload-image-item', key: i },
|
|
647
|
-
_react2.default.createElement('img', { width: '100', height: '98', src: t.state.urlPrev + item.id
|
|
648
|
+
_react2.default.createElement('img', { width: '100', height: '98', src: t.state.urlPrev + item.id }),
|
|
648
649
|
_react2.default.createElement('i', { className: t.state.canDel ? 'iconfont icon-minus' : 't-DN', onClick: _this3.del.bind(_this3, i) })
|
|
649
650
|
) :
|
|
650
651
|
// <div className="t-FBH" key={i} >
|