|
|
@@ -157,12 +157,12 @@ Page({
|
|
|
"studentstatus/update",
|
|
|
"",
|
|
|
{
|
|
|
- city: this.data.allData.region,
|
|
|
+ city: this.data.allData.region + '',
|
|
|
college: this.data.college,
|
|
|
faculty: this.data.facultyName,
|
|
|
identityNumber: this.data.identityNumber,
|
|
|
proofOfQualifications: this.data.userphoto,
|
|
|
- province: this.data.allData.province,
|
|
|
+ province: this.data.allData.province + '',
|
|
|
realName: this.data.userName,
|
|
|
sex: this.data.sexCode,
|
|
|
specialized: this.data.professionalTitle,
|
|
|
@@ -183,12 +183,12 @@ Page({
|
|
|
"studentstatus/save",
|
|
|
"",
|
|
|
{
|
|
|
- city: this.data.allData.region,
|
|
|
+ city: this.data.allData.region + '',
|
|
|
college: this.data.college,
|
|
|
faculty: this.data.facultyName,
|
|
|
identityNumber: this.data.identityNumber,
|
|
|
proofOfQualifications: this.data.userphoto,
|
|
|
- province: this.data.allData.province,
|
|
|
+ province: this.data.allData.province + '',
|
|
|
realName: this.data.userName,
|
|
|
sex: this.data.sexCode,
|
|
|
specialized: this.data.professionalTitle,
|
|
|
@@ -298,6 +298,9 @@ Page({
|
|
|
_success () {
|
|
|
console.log("查看");
|
|
|
this.popup2.hidePopup();
|
|
|
+ this.setData({
|
|
|
+ load: true,
|
|
|
+ })
|
|
|
this.getInfo();
|
|
|
},
|
|
|
|
|
|
@@ -412,19 +415,19 @@ Page({
|
|
|
let _this = this;
|
|
|
let proId = "";
|
|
|
let prov = "";
|
|
|
- // let prov = this.data.allData.province;
|
|
|
- App._post_form("areainfo/province", "", null, function (res) {
|
|
|
+ // let prov = this.data.allData.province; areainfo/province
|
|
|
+ App._post_form("region/provinceList", "", null, function (res) {
|
|
|
if (res.code === 0) {
|
|
|
- let provice = res.list;
|
|
|
+ let provice = res.data;
|
|
|
_this.data.multiArray[0] = provice;
|
|
|
CityArray0 = provice;
|
|
|
- console.log("数组:", _this.data.u.province);
|
|
|
+ // console.log("数组:", _this.data.u.province);
|
|
|
if (_this.data.u.region) {
|
|
|
prov = _this.data.u.province;
|
|
|
// debugger
|
|
|
if (CityArray0.length) {
|
|
|
for (let i = 0; i < CityArray0.length; i++) {
|
|
|
- if (CityArray0[i].areaid == prov) {
|
|
|
+ if (CityArray0[i].id == prov) {
|
|
|
// _this.data.multiIndex[0] = i;
|
|
|
_this.setData({
|
|
|
["multiIndex[0]"]: i,
|
|
|
@@ -434,12 +437,14 @@ Page({
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ // console.log("prov", prov);
|
|
|
+ // console.log("load", _this.data.load);
|
|
|
if (prov && _this.data.load === true) {
|
|
|
proId = prov;
|
|
|
} else {
|
|
|
//根据默认省,获取默认市
|
|
|
if (_this.data.multiArray[0].length) {
|
|
|
- proId = _this.data.multiArray[0][0].areaid;
|
|
|
+ proId = _this.data.multiArray[0][0].id;
|
|
|
}
|
|
|
}
|
|
|
_this.loadCity(proId);
|
|
|
@@ -448,18 +453,20 @@ Page({
|
|
|
},
|
|
|
|
|
|
//获取市级
|
|
|
- loadCity (cid) {
|
|
|
+ loadCity(cid) {
|
|
|
+ console.log("cid", cid);
|
|
|
let _this = this;
|
|
|
- App._post_form("areainfo/city/" + cid, "", null, function (res) {
|
|
|
+ // areainfo / city /
|
|
|
+ App._post_form("region/childList", "", { id: cid }, function (res) {
|
|
|
if (res.code === 0) {
|
|
|
- let city = res.list;
|
|
|
+ let city = res.data;
|
|
|
_this.data.multiArray[1] = city;
|
|
|
CityArray1 = city;
|
|
|
if (_this.data.u.region) {
|
|
|
let region = _this.data.u.region;
|
|
|
if (CityArray1.length) {
|
|
|
for (let i = 0; i < CityArray1.length; i++) {
|
|
|
- if (CityArray1[i].areaid === region) {
|
|
|
+ if (CityArray1[i].id === region) {
|
|
|
_this.data.multiIndex[1] = i;
|
|
|
break;
|
|
|
}
|
|
|
@@ -470,7 +477,7 @@ Page({
|
|
|
cityId = region;
|
|
|
} else {
|
|
|
if (_this.data.multiArray[1].length) {
|
|
|
- cityId = _this.data.multiArray[1][0].areaid;
|
|
|
+ cityId = _this.data.multiArray[1][0].id;
|
|
|
}
|
|
|
}
|
|
|
// _this.loadSchool(cityId)
|
|
|
@@ -562,14 +569,19 @@ Page({
|
|
|
},
|
|
|
// 地区change
|
|
|
areaChange (e) {
|
|
|
- this.data.load = false;
|
|
|
+ // this.data.load = false;
|
|
|
+ this.setData({
|
|
|
+ load: false,
|
|
|
+ })
|
|
|
let _this = this;
|
|
|
_this.data.multiIndex[0] = e.detail.value[0];
|
|
|
_this.data.multiIndex[1] = e.detail.value[1];
|
|
|
_this.setData({
|
|
|
multiIndex: _this.data.multiIndex,
|
|
|
- ["allData.province"]: CityArray0[_this.data.multiIndex[0]].areaid,
|
|
|
- ["allData.region"]: CityArray1[_this.data.multiIndex[1]].areaid,
|
|
|
+ ["allData.province"]: CityArray0[_this.data.multiIndex[0]].id,
|
|
|
+ ["allData.region"]: CityArray1[_this.data.multiIndex[1]].id,
|
|
|
+ college: '',
|
|
|
+ sname: '',
|
|
|
});
|
|
|
// _this.loadSchool(_this.data.allData.region)
|
|
|
_this.getSchool(_this.data.allData.region);
|
|
|
@@ -579,10 +591,13 @@ Page({
|
|
|
},
|
|
|
//绑定选择器滑动事件 地区
|
|
|
MultiPickerAreaChange: function (e) {
|
|
|
- this.data.load = false;
|
|
|
+ // this.data.load = false;
|
|
|
+ this.setData({
|
|
|
+ load: false,
|
|
|
+ });
|
|
|
let _this = this;
|
|
|
if (e.detail.column === 0) {
|
|
|
- let pid = CityArray0[e.detail.value].areaid;
|
|
|
+ let pid = CityArray0[e.detail.value].id;
|
|
|
_this.data.multiIndex[0] = e.detail.value;
|
|
|
_this.loadCity(pid);
|
|
|
_this.setData({
|
|
|
@@ -597,8 +612,8 @@ Page({
|
|
|
// index1: e.detail.value
|
|
|
// })
|
|
|
}
|
|
|
- console.log(1111111111111);
|
|
|
- console.log(e);
|
|
|
+ // console.log(1111111111111);
|
|
|
+ // console.log(e);
|
|
|
},
|
|
|
schoolName () {
|
|
|
if (this.data.disabled) {
|