diff --git a/api/apiRoute.js b/api/apiRoute.js
index 5f0f4a2..06904fa 100644
--- a/api/apiRoute.js
+++ b/api/apiRoute.js
@@ -417,6 +417,13 @@ export default {
return res;
})
},
+ //学生详情-修改
+ xy_memberEdit(data = {}) {
+ let url = '/customerResourcesAuth/edit'
+ return http.post(url, data).then(res => {
+ return res;
+ })
+ },
diff --git a/pages/student/my/personal_data.vue b/pages/student/my/personal_data.vue
index cfe9868..a525d0c 100644
--- a/pages/student/my/personal_data.vue
+++ b/pages/student/my/personal_data.vue
@@ -92,7 +92,7 @@
手机 *
-
+
@@ -294,7 +294,6 @@
if (extraData.input_name == 'headimg') {
console.log('收到的图片地址:', resData.url);
this.editHeadimg = resData.url;
- alert(this.formData.headimg)
}
},
@@ -307,32 +306,26 @@
},
//提交信息
- submit() {
- console.log(this.editHeadimg, '111')
- // if(this.editHeadimg == ''){
- // this.editHeadimg = this.formData.headimg
- // }
- member.member_edit({
- header: this.editHeadimg,
- name: this.formData.name,
- address: this.formData.address,
- gender: this.sex_name,
- birthday: this.formData.birthday,
- email: this.formData.email,
- phone: this.formData.phone,
- }).then(res => {
- if (res.code == 1) {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- }
- })
+ async submit() {
+ if (this.editHeadimg) {
+ this.formData.headimg = this.editHeadimg
+ }
+ let params = {
+ ...this.formData
+ }
+
+ let res = await apiRoute.xy_memberEdit(params)
+ if(res.code != 1){
+ uni.showToast({
+ title: res.msg,
+ icon: 'none'
+ })
+ return
+ }
+ uni.showToast({
+ title: res.msg,
+ icon: 'success'
+ })
},