|
@@ -177,7 +177,10 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { submitAgentRegister } from "@/api/competition.js";
|
|
|
+import {
|
|
|
+ submitAgentRegister,
|
|
|
+ getAgentRegisterLastInfo,
|
|
|
+} from "@/api/competition.js";
|
|
|
import StepRegister from "./component/step-register.vue";
|
|
|
import StepTabbar from "./component/step-tabbar.vue";
|
|
|
import { areaList } from "@vant/area-data";
|
|
@@ -243,7 +246,12 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
- this.form.competitionChildId = options.competitionId;
|
|
|
+ if (options && options.competitionId) {
|
|
|
+ this.form.competitionChildId = options.competitionId;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async onReady() {
|
|
|
+ await this.getAgentRegisterLastInfo();
|
|
|
},
|
|
|
onShow() {
|
|
|
uni.getStorage({
|
|
@@ -258,6 +266,21 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 查询上一次报名基本信息
|
|
|
+ async getAgentRegisterLastInfo() {
|
|
|
+ const { data, msg, status } = await getAgentRegisterLastInfo();
|
|
|
+ if (status === 200 && data) {
|
|
|
+ // console.log(data, "getAgentRegisterLastInfo");
|
|
|
+ const obj = {
|
|
|
+ district: data.district,
|
|
|
+ unit: data.unit,
|
|
|
+ unitPrincipal: data.unitPrincipal,
|
|
|
+ detailAddress: data.detailAddress,
|
|
|
+ };
|
|
|
+ Object.assign(this.form, obj);
|
|
|
+ // console.log(this.form, "form");
|
|
|
+ }
|
|
|
+ },
|
|
|
changeMaterialNumber(key, value) {
|
|
|
key.number = value;
|
|
|
this.$forceUpdate();
|
|
@@ -327,7 +350,7 @@ export default {
|
|
|
this.show = true;
|
|
|
uni.removeStorage({
|
|
|
key: "formData",
|
|
|
- success: function (res) {
|
|
|
+ success: function(res) {
|
|
|
console.log("已经移除内存中的schoolList");
|
|
|
},
|
|
|
});
|