添加pc端代码注释

This commit is contained in:
mabo
2021-07-30 18:17:01 +08:00
parent 93ba1c134f
commit ff92fd8d76
19 changed files with 85 additions and 349 deletions

View File

@@ -254,6 +254,7 @@ export default {
};
},
methods: {
// 下一步
next () {
this.$refs.firstForm.validate((valid) => {
if (valid) {
@@ -274,9 +275,8 @@ export default {
}
});
},
// 地址选择回显
selectedRegion (item) {
console.log(item);
// 地址选择回显
this.$set(this.form, 'storeAddressIdPath', item[0].toString());
this.$set(
this.form,
@@ -284,6 +284,7 @@ export default {
item[1].toString().replace(/\s/g, '')
);
},
// 上传之前
beforeUpload () {
this.uploadLoading = true;
if (this.form.licencePhoto.length >= 3) {
@@ -291,6 +292,7 @@ export default {
return false;
}
},
// 上传之前
beforeUpload1 () {
this.uploadLoading1 = true;
if (this.form.legalPhoto.length >= 3) {
@@ -298,16 +300,24 @@ export default {
return false;
}
},
// 上传成功回调
handleSuccess (res, file) {
this.uploadLoading = false;
this.form.licencePhoto.push(res.result);
},
// 上传成功回调
handleSuccess1 (res, file) {
this.uploadLoading1 = false;
this.form.legalPhoto.push(res.result);
console.log(res);
console.log(file);
},
// 上传失败
uploadErr () {
this.uploadLoading = false;
this.uploadLoading1 = false;
},
// 上传失败回调
handleFormatError (file) {
this.uploadLoading = false;
this.uploadLoading1 = false;
@@ -316,6 +326,7 @@ export default {
desc: '上传文件格式不正确'
});
},
// 上传大小限制
handleMaxSize (file) {
this.uploadLoading = false;
this.uploadLoading1 = false;
@@ -324,21 +335,19 @@ export default {
desc: '文件大小不能超过2M'
});
},
uploadErr () {
this.uploadLoading = false;
this.uploadLoading1 = false;
},
// 图片查看
handleView (item) {
this.previewPicture = item;
this.visible = true;
},
// 删除图片
handleRemove (index, listName) {
this.form[listName].splice(index, 1);
}
},
mounted () {
this.accessToken.accessToken = storage.getItem('accessToken');
if (Object.keys(this.content).length) {
if (Object.keys(this.content).length) { // 处理回显数据
this.form = JSON.parse(JSON.stringify(this.content));
if (this.form.licencePhoto) {
this.form.legalPhoto = this.content.legalPhoto.split(',');

View File

@@ -70,6 +70,7 @@ export default {
};
},
methods: {
// 下一步
next () {
this.$refs.secondForm.validate((valid) => {
if (valid) {

View File

@@ -129,10 +129,10 @@ export default {
this.$forceUpdate();
})
}
console.log(33333333333333);
}
});
},
// 下一步
nextPage (step) {
this.currentIndex = step;
}

View File

@@ -61,12 +61,6 @@
</Select>
</FormItem>
<FormItem prop="storeCenter" label="店铺定位">
<!-- <Input
type="text"
v-model="form.storeCenter"
readonly
placeholder="点击右侧按钮选择店铺位置"
/> -->
<Button
type="info"
v-if="!form.storeCenter"
@@ -140,6 +134,7 @@ export default {
};
},
methods: {
// 下一步
next () {
this.$refs.thirdForm.validate((valid) => {
if (valid) {
@@ -161,6 +156,7 @@ export default {
}
});
},
// 上传之前
beforeUpload () {
this.uploadLoading = true;
if (this.form.storeLogo.length >= 3) {
@@ -168,12 +164,12 @@ export default {
return false;
}
},
// 上传成功回调
handleSuccess (res, file) {
this.uploadLoading = false;
this.form.storeLogo.push(res.result);
},
// 上传格式错误
handleFormatError (file) {
this.uploadLoading = false;
this.$Notice.warning({
@@ -181,6 +177,7 @@ export default {
desc: '上传文件格式不正确'
});
},
// 上传大小限制
handleMaxSize (file) {
this.uploadLoading = false;
this.$Notice.warning({
@@ -188,24 +185,28 @@ export default {
desc: '文件大小不能超过2M'
})
},
// 上传失败
uploadErr () {
this.uploadLoading = false;
},
// 查看图片
handleView (item) {
this.previewPicture = item;
this.visible = true;
},
// 删除图片
handleRemove (index, listName) {
this.form[listName].splice(index, 1);
},
// 选择坐标回调
getAddress (item) {
console.log(item);
this.$set(
this.form,
'storeCenter',
item.position.lng + ',' + item.position.lat
);
},
// 获取商品分类
getCategoryList () {
getCategory(0).then((res) => {
if (res.success) this.categoryList = res.result;