|
|
@@ -316,12 +316,14 @@ var vm = new Vue({
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- city: function (event) {
|
|
|
- var d = event.target.value;
|
|
|
- console.log(d)
|
|
|
+ city: function (show) {
|
|
|
+ var d = vm.activity.city;
|
|
|
+ // console.log(vm.location.city)
|
|
|
+ if (!show) {
|
|
|
+ vm.activity.area = '';
|
|
|
+ }
|
|
|
vm.location.area = [];
|
|
|
- vm.activity.area = '';
|
|
|
- console.log(vm.location.city)
|
|
|
+ console.log(d)
|
|
|
// vm.location.city
|
|
|
// for (let i=0; i<=vm.location.city.length; i++) {
|
|
|
// if(d == vm.location.city[i].id) {
|
|
|
@@ -444,6 +446,9 @@ var vm = new Vue({
|
|
|
if (vm.activity.province) {
|
|
|
vm.province(2, true)
|
|
|
}
|
|
|
+ if (vm.activity.city) {
|
|
|
+ vm.city(true)
|
|
|
+ }
|
|
|
console.log(vm.activity.city)
|
|
|
if(r.activity.isPublish == 1) {
|
|
|
vm.isDisabled = true
|
|
|
@@ -479,25 +484,26 @@ var vm = new Vue({
|
|
|
$('#demo3').show();
|
|
|
$('#demo3').attr('src',vm.activity.qrCodePicture);
|
|
|
}
|
|
|
+ /*区域选择*/
|
|
|
|
|
|
- $.ajax({
|
|
|
- type: "POST",
|
|
|
- url: baseURL + "/api/region/list",
|
|
|
- contentType: "application/json",
|
|
|
- success: function(r1){
|
|
|
- if(r.code == 0){
|
|
|
- vm.location.city = r1.data;
|
|
|
- for (const elem of r1.data) {
|
|
|
- if(vm.activity.city == elem.id) {
|
|
|
- vm.location.area = elem.childRegionList
|
|
|
- }
|
|
|
- }
|
|
|
- console.log(vm.location.area)
|
|
|
- }else{
|
|
|
- layer.alert("读取省失败");
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ // $.ajax({
|
|
|
+ // type: "POST",
|
|
|
+ // url: baseURL + "/api/region/list",
|
|
|
+ // contentType: "application/json",
|
|
|
+ // success: function(r1){
|
|
|
+ // if(r.code == 0){
|
|
|
+ // vm.location.city = r1.data;
|
|
|
+ // for (const elem of r1.data) {
|
|
|
+ // if(vm.activity.city == elem.id) {
|
|
|
+ // vm.location.area = elem.childRegionList
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // console.log(vm.location.area)
|
|
|
+ // }else{
|
|
|
+ // layer.alert("读取省失败");
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
/*区域选择*/
|
|
|
// $.ajax({
|
|
|
// type: "POST",
|