|
@@ -10,10 +10,11 @@
|
|
|
</van-row>
|
|
|
<div v-if="status===30 || status === 500">
|
|
|
<add-photo @onRead="onRead"/>
|
|
|
- <p>活动仅允许深大学生参与,请上传正面校卡照片审核~</p>
|
|
|
+ <p>{{note}}</p>
|
|
|
<van-button
|
|
|
type="primary"
|
|
|
@click="schoolPresent"
|
|
|
+ style="width: 100%"
|
|
|
:loading="loading"
|
|
|
>保存
|
|
|
</van-button>
|
|
@@ -27,7 +28,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {Row, Col, Toast} from 'vant';
|
|
|
+ import {Row, Col, Toast, Button} from 'vant';
|
|
|
import AddPhoto from "../components/addPhoto";
|
|
|
import {BasicFunction} from "../connector/basic-service";
|
|
|
export default {
|
|
@@ -35,6 +36,7 @@
|
|
|
components: {
|
|
|
AddPhoto,
|
|
|
[Row.name]: Row, [Col.name]: Col,
|
|
|
+ [Button.name]: Button
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -46,8 +48,8 @@
|
|
|
imgage: null,
|
|
|
imgDo:{},
|
|
|
schoolpic:"",
|
|
|
- IMGPREFIX:"http://gift.fogice.com"
|
|
|
-
|
|
|
+ IMGPREFIX: "http://gift.fogice.com",
|
|
|
+ note: ""
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -60,21 +62,40 @@
|
|
|
return;
|
|
|
}
|
|
|
let that=this;
|
|
|
- // console.log('------- photo -------');
|
|
|
- // console.log(this.photo);
|
|
|
+ console.log('------- photo -------');
|
|
|
+ console.log(this.photo);
|
|
|
let formData = new FormData();
|
|
|
formData.append('file', this.photo);
|
|
|
- BasicFunction.get_data("smartIdentity/updateBatch", function (response) {
|
|
|
- // console.log("------ Data Rcvd in uploadphotoChange --------");
|
|
|
- // console.log(response);
|
|
|
- if (response.ret === "10000") {
|
|
|
- Toast.success("上传成功");
|
|
|
- this.$router.push('index');
|
|
|
+ BasicFunction.get_data("http://gift.fogice.com/server/fileserver/upload?sign=abcdefg", function (res) {
|
|
|
+ if (res.model === undefined || res.model.length === 0) {
|
|
|
+ Toast.fail('上传失败,请重试');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.ret === '10000') {
|
|
|
+ let photoURL = res.model;
|
|
|
+ let userid = localStorage.getItem('frontend-userid');
|
|
|
+ BasicFunction.get_data('smartIdentity/list?userId=' + userid, function (res) {
|
|
|
+ // console.log('----- User Identity -----');
|
|
|
+ // console.log(res);
|
|
|
+ if (res.ret === '10000') {
|
|
|
+ let t = res.model.list[0];
|
|
|
+ t.userSchoolCardPic = photoURL;
|
|
|
+ t.userReviewStatus = 100;
|
|
|
+ t.reviewerNote = "未审核";
|
|
|
+ t.reviewerNoteToUser = "未审核";
|
|
|
+ BasicFunction.get_data('smartIdentity/updateBatch', function (res) {
|
|
|
+ if (res.ret === '10000') {
|
|
|
+ Toast.success('上传成功');
|
|
|
+ location.reload();
|
|
|
+ }
|
|
|
+ else Toast.fail('上传失败,请重试');
|
|
|
+ }, [t]);
|
|
|
+ } else Toast.fail('访问失败,请重试');
|
|
|
+ }, {});
|
|
|
} else {
|
|
|
- Toast.fail("上传失败,请检查网络");
|
|
|
+ Toast.fail('上传失败');
|
|
|
}
|
|
|
}, formData);
|
|
|
-
|
|
|
},
|
|
|
onRead: function (e) {
|
|
|
this.photo = e;
|
|
@@ -94,6 +115,7 @@
|
|
|
var t=res.model.list;
|
|
|
that.status=t[0].userReviewStatus;
|
|
|
that.imgDo=t[0];
|
|
|
+ that.note = t[0].reviewerNoteToUser;
|
|
|
// console.log(that);
|
|
|
if (res.model.list.length === 0 || that.status === 30) {
|
|
|
that.statusColor='#c5c5c5';
|