muba-posting 4.1.3 → 4.1.4
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/Posting.js +11 -9
- package/Publish6.js +2 -2
- package/package.json +1 -1
package/Posting.js
CHANGED
|
@@ -228,24 +228,26 @@ export default class Posting extends React.Component {
|
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
async checkListings() {
|
|
231
|
-
const
|
|
232
|
-
return
|
|
231
|
+
const responseJson = await this.props.request(this, BUSINESS_PRODUCTS, { key: 'LISTING' });
|
|
232
|
+
return responseJson.value > 0;
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
async readBusinessId() {
|
|
236
|
-
const
|
|
237
|
-
if (
|
|
236
|
+
const responseJson = await this.props.request(this, BUSINESS_ID, { userId: this.props.userId });
|
|
237
|
+
if (responseJson.status === 200) {
|
|
238
238
|
this.setState({
|
|
239
|
-
businessId:
|
|
239
|
+
businessId: responseJson.value
|
|
240
240
|
});
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
async getMaxPictures() {
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
245
|
+
const responseJson = await this.props.request(this, MAX_PICTURES);
|
|
246
|
+
if (responseJson.status === 200) {
|
|
247
|
+
this.setState({
|
|
248
|
+
maxPictures: responseJson.value
|
|
249
|
+
})
|
|
250
|
+
}
|
|
249
251
|
}
|
|
250
252
|
|
|
251
253
|
async loadAd() {
|
package/Publish6.js
CHANGED
|
@@ -127,8 +127,8 @@ export default class Publish6 extends React.Component {
|
|
|
127
127
|
|
|
128
128
|
this.setState({ loading: true });
|
|
129
129
|
|
|
130
|
-
const
|
|
131
|
-
validate =
|
|
130
|
+
const responseJson = await this.props.request(this.props.context, PHONE_REGISTERED, body);
|
|
131
|
+
validate = responseJson.value === 'true' && validate;
|
|
132
132
|
this.setState({ existingPhoneError: !phoneFree });
|
|
133
133
|
|
|
134
134
|
this.languageItem.forEach(element => validate = element.validateLanguageItem() && validate);
|