Fix:4332 【旅居商城小程序】入驻资料填写页面无数据时会提示“undefined”(期望:无需显示任何提示信息)
This commit is contained in:
@@ -426,7 +426,6 @@ export default {
|
|||||||
* @returns {array} 数组
|
* @returns {array} 数组
|
||||||
*/
|
*/
|
||||||
stringToMapArr(str, split = ',') {
|
stringToMapArr(str, split = ',') {
|
||||||
console.log(str.split(split).map(item => ({url: item})));
|
|
||||||
return str.split(split).map(item => ({url: item}))
|
return str.split(split).map(item => ({url: item}))
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@@ -458,7 +457,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
initInfo() {
|
initInfo() {
|
||||||
getTravelInfo().then(res => {
|
getTravelInfo().then(res => {
|
||||||
const {travelInfo} = res.data
|
const {travelInfo} = res.data || {}
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
this.form = {...this.form, ...travelInfo}
|
this.form = {...this.form, ...travelInfo}
|
||||||
this.coverImg = travelInfo.cover ? this.stringToMapArr(travelInfo.cover) : []
|
this.coverImg = travelInfo.cover ? this.stringToMapArr(travelInfo.cover) : []
|
||||||
|
|||||||
Reference in New Issue
Block a user