chenyue 7 лет назад
Родитель
Сommit
c7409519c1

+ 7 - 11
api/http-request.js

@ -17,13 +17,13 @@
            server = "http://10.95.22.10:8011/wlyy/"
            imserver = "http://10.95.22.138:3000/api/v2";
            socketUrl = "http://10.95.22.138:3000";
            loginUrl = "../../login/login.html";
            loginUrl = "../../login/html/login.html";
            imgServer = "http://10.95.22.10:8011/";
        }
    } else {// 测试环境配置
    	grant_type = "password";
        client_id = "WYo0l73F8e";
    	server = "http://172.19.103.73:10001/basic/";
    	server = "http://172.19.103.73:10001";
//      server = "http://172.19.103.88:9092/wlyy/"
        imserver = "http://172.19.103.88:3000/api/v2";
        socketUrl = "http://172.19.103.88:3000";
@ -65,12 +65,12 @@
                $.extend({}, {
                    type: 'GET',
                    dataType: 'JSON',
                    beforeSend: function(request) {
                        var agent = userAgent || {
                            imei: localStorage.getItem('WLYY_IMEI'),
                            platform: 4
                    beforeSend: function(request) {                    	
                        var oauthInfo = JSON.parse(sessionStorage.getItem("oauthInfo"));
                        if (oauthInfo) {
                            request.setRequestHeader("accessToken", oauthInfo.accessToken);
                            request.setRequestHeader("token", oauthInfo.accessToken);
                        }
                        request.setRequestHeader("userAgent", JSON.stringify(agent));
                    },
                    error: function(res) {
                        reject(res)
@ -91,10 +91,6 @@
                    type: 'POST',
                    dataType: 'JSON',
                    beforeSend: function(request) {
                        var agent = userAgent || {
                            imei: localStorage.getItem('WLYY_IMEI')
                        }
                        request.setRequestHeader("userAgent", JSON.stringify(agent));
                    },
                    error: function(res) {
                        reject(res)

+ 2 - 2
api/patient/login-api.js

@ -2,11 +2,11 @@
    var loginAPI = {
        //获取accessToken
        accessToken: function(data) {
			return httpRequest.post("/authentication/oauth/accessToken",{data: data})
			return httpRequest.post("/authentication/oauth/login",{data: data})
		},
        //查询用户信息
        getUserInfo: function(data){
        	return httpRequest.get("/basic/api/v1.0/users/"+data.userName,{data: data})
        	return httpRequest.get("/basic/api/v1.0/users/"+data.userName,{data: data.accessToken})
        },
        //获取居民权限接口
		findByUserId:function(data){

+ 54 - 0
api/patient/mine-api.js

@ -0,0 +1,54 @@
(function(exports) {
	var mineAPI = {
		// 修改密码
		passwordReset: function(data) {
			return httpRequest.put("/basic/api/v1.0/users/admin/"+data.userId+"/password_reset",{data: data})
		},
		// 修改个人资料
		userInforUpdate: function(data) {
			return httpRequest.putContent("/basic/api/v1.0/users",{data: JSON.stringify(data)})
		},
		checkPhone:function(data){
			return httpRequest.get("/basic/api/v1.0/user/telephone/existence",{data:{telephone:data} })
		},
		//校验原密码
		checkOldPass:function(data){
			var userInfo = JSON.parse(plus.storage.getItem("userAgent"));
			data['user_name'] = userInfo.loginCode
			return httpRequest.get("/basic/api/v1.0/users/verification",{data:data})
		},
		// 新增意见
		adviceAdd: function(data) {
			setId(data);
			return httpRequest.postContent("/basic/api/v1.0/portalFeedback",{data: JSON.stringify(data)})
		},
		//获取行业列表
		workListGet:function(data){
			return httpRequest.get("/basic/api/v1.0/dictionaries/entries",{data: data})
		},
		// 获取意见列表
		adviceGet: function(data) {
			return httpRequest.get("/basic/api/v1.0/portalFeedback/",{data:data})
		},
		// 根据ID获取反馈意见
		adviceDetailGet: function(data) {
			return httpRequest.get("/basic/api/v1.0/portalFeedback/admin/",{data:data})
		},
		//获取地址列表
		addressGet: function (pid) {
			return httpRequest.get("/basic/api/v1.0/geography_entries/pid/"+pid)
		},
	}
	//给对象设置asstoken
	function setAccessToken(data){   
		var loginInfo = JSON.parse(plus.storage.getItem("oauthInfo"));
		data.accessToken = loginInfo.accessToken;
	}
	//给对象设置userId
	function setId(data){
		var userInfo = JSON.parse(plus.storage.getItem("userAgent"));
		data.userId = userInfo.id;
	}
	exports.mineAPI = mineAPI;
})(window)

+ 10 - 10
component/login-register/login.js

@ -67,9 +67,9 @@
		data: function() {
			return {
				type: 1, //记录选择的登录方式,1-手机号登录,2-验证码登录
				account: '17500000001',
				account: '362321199703137824',
				mobile: '',
				password: '123456',
				password: '11111111',
				imgcaptcha: '',
				captcha: '',
				infoText: '获取验证码',
@ -109,7 +109,6 @@
						console.log("登录密码不能为空!");
						return false;
					}
					console.log(httpRequest)
					var data = {
						grant_type: httpRequest.grant_type,
						client_id: httpRequest.client_id,
@ -118,16 +117,16 @@
					}
					console.log(data)
					loginAPI.accessToken(data).then(function(oauthInfo) {
						storage.setItem("oauthInfo", JSON.stringify(oauthInfo));
						sessionStorage.setItem("oauthInfo", JSON.stringify(oauthInfo));
						var data1 = {
							userName: oauthInfo.user,
							accessToken: oauthInfo.accessToken
							accessToken: "token=" + oauthInfo.accessToken
						}
						loginAPI.getUserInfo(data1).then(function(res) {
								console.log("登录成功");
								loginedList = [res.telephone]
								storage.setItem("loginedList", JSON.stringify(loginedList));
								storage.setItem("userAgent", JSON.stringify(res));
								sessionStorage.setItem("loginedList", JSON.stringify(loginedList));
								sessionStorage.setItem("userAgent", JSON.stringify(res));
								vm.getJueSeData(res);
							}),
							function error(xhr, type, errorThrown) {
@ -159,11 +158,12 @@
				loginAPI.findByUserId({
					userId: userAgent.id
				}).then(function(data) {
					storage.setItem("roleList", JSON.stringify(data.detailModelList)); //缓存角色列表
					//					app.openWebviewExtras("../../home/html/home.html");//跳转到主页面
					sessionStorage.setItem("roleList", JSON.stringify(data.detailModelList)); //缓存角色列表
					//					location.href = "../../../home/html/home.html"//跳转到主页面
					location.href = "../../../page/mine/html/personal-info.html"
				})
			},
			
			toggleRegister: function() {
				location.href = "../../register/html/register.html"
			}

+ 72 - 33
component/mine/personal-info.js

@ -7,51 +7,51 @@
						<div class="bgc-fff c-border ptb30">
							<form class="mainbox" id="form" role="form" onsubmit="return false;">
								<div class="c-t-center mb10">
									<img src="../image/touxiang.jpg" class="img-circle" width="100" height="100" id="personalImg" />
									<img :src="userinfo.imgRemotePath || defaultImg" class="img-circle" width="100" height="100" id="personalImg" />
									<div class="c-f14 c-909090 pt15">
										<input type="file" @change="uploadImg()" class="c-vam c-inline-block type-hide pl105" accept="image/jpg,image/jpeg,image/png"><span class="changeImg">修改头像</span></div>
								</div>
								<div class="w3-row mt50">
									<div class="w3-col c-f16 m5 c-t-right" style="width:80px;">姓&emsp;&emsp;名</div>
									<div class="w3-rest pl15">
										<input type="text" class="form-control">
										<input type="text" class="form-control" v-model="userinfo.realName">
									</div>
								</div>
								<div class="w3-row">
									<div class="w3-col c-f16 m5 c-t-right" style="width:80px;">性&emsp;&emsp;别</div>
									<div class="w3-rest pl15 c-f14">
										<input type="radio" name="sex" id="male" checked="checked" value="male">&emsp;男&emsp;
										<input type="radio" name="sex" id="female" value="female">&emsp;女
										<input type="radio" name="gender"  value="0" v-model="userinfo.gender">&emsp;男&emsp;
										<input type="radio" name="gender"  value="1" v-model="userinfo.gender">&emsp;女
									</div>
								</div>
								<div class="w3-row  mt25">
									<div class="w3-col c-f16 m5 c-t-right" style="width:80px;">手机号码</div>
									<div class="w3-rest pl15">
										<input type="text" class="form-control">
										<input type="text" class="form-control" v-model="userinfo.telephone">
									</div>
								</div>
								<div class="w3-row mt25">
									<div class="w3-col c-f16 m5 c-t-right" style="width:80px;">身份证号</div>
									<div class="w3-rest pl15">
										<input type="text" class="form-control">
										<input type="text" class="form-control" v-model="userinfo.idCardNo">
									</div>
								</div>
								<div class="w3-row mt25">
									<div class="w3-col c-f16 m5 c-t-right" style="width:80px;">社保卡号</div>
									<div class="w3-rest pl15">
										<input type="text" class="form-control">
										<input type="text" class="form-control" v-model="userinfo.ssid">
									</div>
								</div>
								<div class="w3-row mt25">
									<div class="w3-col c-f16 m5 c-t-right" style="width:80px;">医疗保险号</div>
									<div class="w3-rest pl15">
										<input type="text" class="form-control">
										<input type="text" class="form-control" v-model="userinfo.micard">
									</div>
								</div>
								<div class="w3-row mt25">
									<div class="w3-col c-323232 c-f16 m5 c-t-right" style="width:80px;">行&emsp;&emsp;业</div>
									<div class="pl105" data-toggle="modal" data-target="#selindustry">
										<input id="industry" placeholder="请选择行业" type="text" class="form-control" name="industry"><span class="caret selcaret"></span>
										<input id="industry" placeholder="请选择行业" type="text" class="form-control" name="industry"  v-model="userinfo.profession"><span class="caret selcaret"></span>
									</div>
								</div>
								<div class="w3-row mt25">
@ -59,11 +59,11 @@
									<div class="pl105">
										<div class="dropdown">
											<a id="addressLabel" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
												<input id="addrcode" placeholder="请选择家庭住址" type="text" class="form-control" name="addrcode"><span class="caret selcaret"></span>
												<input id="addrcode" placeholder="请选择家庭住址" type="text" class="form-control" name="addrcode" :value="address"><span class="caret selcaret"></span>
											</a>
											<selsect-address></selsect-address>
											<selsect-address :userinfo="userinfo"></selsect-address>
										</div>
										<textarea class="form-control mt10"></textarea>
										<textarea class="form-control mt10"  v-model="userinfo.street"></textarea>
									</div>
								</div>
								<div class="c-t-center ">
@ -78,16 +78,39 @@
		props: [],
		data: function() {
			return {
				gotoAddid: "Province",
				userinfo: {
					areaId: 330902,
					areaName: "定海区",
					cityId: 330900,
					cityName: "舟山市",
					demographicId: "362321199703137824",
					gender: "1",
					id: "0dae00035ab8be56319e6d2e0f183443",
					idCardNo: "362321199703137824",
					imgLocalPath: "",
					imgRemotePath: "http://172.19.103.52:80/group1/M00/1F/68/rBFuWFrPC4WAEdQxAAANa_JH8v8564.jpg",
					micard: "D95398393",
					profession: "网站/APP",
					provinceId: 330000,
					provinceName: "浙江省",
					realName: "柯诗莹",
					ssid: "D111111113",
					street: "33311513街道打  软件园二期望海路55号之一健康之路",
					telephone: "18950186666",
					userType: "GovEmployee",
				},
				code: "info",
				industryid: -1,
				directionid: -1,
				industryname: "",
				directionname: "",
				address: '',
				defaultImg:"../../../images/moren_touxiang_img.png",
			}
		},
		mounted: function() {
			var vm = this
			vm.address=vm.userinfo.provinceName+"/"+vm.userinfo.cityName+"/"+vm.userinfo.areaName
			$('.dropdown-toggle').dropdown()
			$('#selindustry').on('hidden.bs.modal', function(e) {
				vm.getNewIndustry()
@ -111,28 +134,44 @@
				} else {
					$("#industry").val(vm.industryname + ">" + vm.directionname)
				}
			},
			update: function() {
				if(!this.value) {
					mui.toast(this.keyName + "不能为空!");
					return
				} else if(this.userinfo.key == 'idCardNo' && !this.isCardNo(this.value)) {
					mui.toast("请输入有效的身份证!");
					return
				} else if(this.userinfo.key == 'micard' && !this.validSSC(this.value)) {
					mui.toast("请填写有效的医保卡卡号");
					return
				} else if(this.userinfo.key == 'ssid' && !this.validNumWord(this.value)) {
					mui.toast("请填写有效的社保卡号");
					return
				}
				this.userinfo.userinfo[this.userinfo.key] = this.value;
				mineAPI.userinforUpdate(this.userinfo.userinfo).then(function(res) {
					mui.toast("修改成功");
					app.reloadView('user-infor', "./user-infor.html");
				}).catch(function() {
					mui.toast("修改失败!");
				})
			},
			isCardNo: function(card) {
				// 身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X 
				var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
				return reg.test(card)
			}, // 校验医保卡号格式
			validSSC: function(ssc) {
				var sscReg = /^([a-zA-Z]{1}[a-zA-Z0-9]{8}|[0-9]{12})$/;
				return sscReg.test(ssc);
			},
			validNumWord: function(ssc) {
				var sscReg = /^[0-9a-zA-Z]+$/;
				return sscReg.test(ssc);
			}
		},
	})
	var gotoAddid = "Province"
	function initInterfaceTypeSelect(industry) {
		$(".dropdown-menu").on("click", "[data-stopPropagation]", function(e) {
			e.stopPropagation();
		});
		Selectors.createDefinedSelect(industry.el, industry.data)
	}
	function gotoAdd(id) {
		var addid = $(id).attr("id")
		if(addid == undefined) {
			addid = id
		}
		$("#" + gotoAddid).removeClass("active")
		$("#" + addid).addClass("active")
		$("#_" + gotoAddid).addClass("hidden")
		$("#_" + addid).removeClass("hidden")
		gotoAddid = addid
	}
})()

+ 312 - 456
component/mine/select-address.js

@ -17,485 +17,320 @@
								<div class="w3-row mt10">
									<div class="w3-col c-f16 pl10" style="width:50px;">A-G</div>
									<div class="w3-rest c-f14 c-666">
										<span :id="province[0]" v-for="province in province1" @click="selectP(province[0],province[2])">{{province[2]}}</span>
										<span :id="province.id" v-for="province in province1" @click="selectP(province.id,province.name)">{{province.name}}</span>
									</div>
								</div>
								<div class="w3-row mt10">
									<div class="w3-col c-f16 pl10" style="width:50px;">H-J</div>
									<div class="w3-rest c-f140 c-666">
										<span :id="province[0]" v-for="province in province2" @click="selectP(province[0],province[2])">{{province[2]}}</span>
										<span :id="province.id" v-for="province in province2" @click="selectP(province.id,province.name)">{{province.name}}</span>
									</div>
								</div>
								<div class="w3-row mt10">
									<div class="w3-col c-f16 pl10" style="width:50px;">L-S</div>
									<div class="w3-rest c-f14 c-666">
										<span :id="province[0]" v-for="province in province3" @click="selectP(province[0],province[2])">{{province[2]}}</span>
										<span :id="province.id" v-for="province in province3" @click="selectP(province.id,province.name)">{{province.name}}</span>
									</div>
								</div>
								<div class="w3-row mt10">
									<div class="w3-col c-f16 pl10" style="width:50px;">T-Z</div>
									<div class="w3-rest c-f14 c-666">
										<span :id="province[0]" v-for="province in province4" @click="selectP(province[0],province[2])">{{province[2]}}</span>
										<span :id="province.id" v-for="province in province4" @click="selectP(province.id,province.name)">{{province.name}}</span>
									</div>
								</div>
							</div>
							<div role="tabpanel" class="tab-pane w3-row-padding industry" id="city" data-stopPropagation="true">
								<div :id="city[0]" class="w3-third mb20" v-for="city in cities" @click="selectCi(city[0],city[2])">
									<div>{{city[2]}}</div>
								<div :id="city.id" class="w3-third mb20" v-for="city in cities" @click="selectCi(city.id,city.name)">
									<div>{{city.name}}</div>
								</div>
							</div>
							<div role="tabpanel" class="tab-pane w3-row-padding industry" id="county" data-stopPropagation="true">
								<div :id="county[0]" class="w3-third mb20" v-for="county in counties" @click="selectCo(county[0],county[2])">
									<div>{{county[2]}}</div>
								<div :id="county.id" class="w3-third mb20" v-for="county in counties" @click="selectCo(county.id,county.name)">
									<div>{{county.name}}</div>
								</div>
							</div>
						</div>
					</div>`,
		props: [],
		props: ["userinfo"],
		data: function() {
			return {
				"province1": [
					["541", "489", "安徽", "a"],
					["562", "489", "澳门", "a"],
					["530", "489", "北京", "b"],
					["551", "489", "重庆", "c"],
					["542", "489", "福建", "f"],
					["549", "489", "广西", "g"],
					["553", "489", "贵州", "g"],
					["557", "489", "甘肃", "g"],
				"province1": [{
						id: 340000,
						abbreviation:"",
						level: 1,
						name:"安徽",
						pid: 156,
						postCode: null
					},
					{
						id: 820000,
						abbreviation:"",
						level: 1,
						name:"澳门",
						pid: 156,
						postCode: null
					},
					{
						id: 110000,
						abbreviation:"",
						level: 1,
						name:"北京",
						pid: 156,
						postCode: null
					},
					{
						id: 500000,
						abbreviation:"",
						level: 1,
						name:"重庆",
						pid: 156,
						postCode: null
					},
					{
						id: 350000,
						abbreviation:"",
						level: 1,
						name: "福建",
						pid: 156,
						postCode: null
					},
					{
						id: 440000,
						abbreviation:"",
						level: 1,
						name:"广东",
						pid: 156,
						postCode: null
					},
					{
						id: 450000,
						abbreviation:"",
						level: 1,
						name:"广西",
						pid: 156,
						postCode: null
					},
					{
						id: 520000,
						abbreviation:"",
						level: 1,
						name:"贵州",
						pid: 156,
						postCode: null
					},
					{
						id: 620000,
						abbreviation:"",
						level: 1,
						name:"甘肃",
						pid: 156,
						postCode: null
					},
				],
				"province2": [
					["546", "489", "湖北", "h"],
					["537", "489", "黑龙江", "h"],
					["545", "489", "河南", "h"],
					["547", "489", "湖南", "h"],
					["550", "489", "海南", "h"],
					["532", "489", "河北", "h"],
					["536", "489", "吉林", "j"],
					["539", "489", "江苏", "j"],
					["543", "489", "江西", "j"],
				"province2": [{
						id: 420000,
						abbreviation:"",
						level: 1,
						name:"湖北",
						pid: 156,
						postCode: null
					},
					{
						id: 230000,
						abbreviation:"",
						level: 1,
						name:"黑龙江",
						pid: 156,
						postCode: null
					},
					{
						id: 410000,
						abbreviation:"",
						level: 1,
						name: "河南",
						pid: 156,
						postCode: null
					},
					{
						id: 430000,
						abbreviation:"",
						level: 1,
						name:"湖南",
						pid: 156,
						postCode: null
					},
					{
						id: 460000,
						abbreviation:"",
						level: 1,
						name:"海南",
						pid: 156,
						postCode: null
					},
					{
						id: 130000,
						abbreviation:"",
						level: 1,
						name:"河北",
						pid: 156,
						postCode: null
					},
					{
						id: 220000,
						abbreviation:"",
						level: 1,
						name:"吉林",
						pid: 156,
						postCode: null
					},
					{
						id: 320000,
						abbreviation:"",
						level: 1,
						name:"江苏",
						pid: 156,
						postCode: null
					},
					{
						id: 360000,
						abbreviation:"",
						level: 1,
						name:"江西",
						pid: 156,
						postCode: null
					},
				],
				"province3": [
					["535", "489", "辽宁", "l"],
					["534", "489", "内蒙古", "n"],
					["559", "489", "宁夏", "n"],
					["558", "489", "青海", "q"],
					["544", "489", "山东", "s"],
					["538", "489", "上海", "s"],
					["548", "489", "广东", "s"],
					["533", "489", "山西", "s"],
					["552", "489", "四川", "s"],
					["556", "489", "陕西", "s"],
				"province3": [{
						id: 210000,
						abbreviation:"",
						level: 1,
						name:"辽宁",
						pid: 156,
						postCode: null
					},
					{
						id: 140000,
						abbreviation:"",
						level: 1,
						name:"山西",
						pid: 156,
						postCode: null
					},
					{
						id: 640000,
						abbreviation:"",
						level: 1,
						name:"宁夏",
						pid: 156,
						postCode: null
					},
					{
						id: 150000,
						abbreviation:"",
						level: 1,
						name:"内蒙古",
						pid: 156,
						postCode: null
					}, {
						id: 630000,
						abbreviation:"",
						level: 1,
						name:"青海",
						pid: 156,
						postCode: null
					},
					{
						id: 370000,
						abbreviation:"",
						level: 1,
						name:"山东",
						pid: 156,
						postCode: null
					},
					{
						id: 310000,
						abbreviation:"",
						level: 1,
						name:"上海",
						pid: 156,
						postCode: null
					},
					{
						id: 510000,
						abbreviation:"",
						level: 1,
						name:"四川",
						pid: 156,
						postCode: null
					},
					{
						id: 610000,
						abbreviation:"",
						level: 1,
						name:"陕西",
						pid: 156,
						postCode: null
					},
				],
				"province4": [
					["531", "489", "天津", "t"],
					["563", "489", "台湾省", "t"],
					["555", "489", "西藏", "x"],
					["560", "489", "新疆", "x"],
					["561", "489", "香港", "x"],
					["554", "489", "云南", "y"],
					["540", "489", "浙江", "z"],
				"province4": [{
						id: 120000,
						abbreviation:"",
						level: 1,
						name:"天津",
						pid: 156,
						postCode: null
					},
					{
						id: 710000,
						abbreviation:"",
						level: 1,
						name:"台湾",
						pid: 156,
						postCode: null
					},
					{
						id: 540000,
						abbreviation:"",
						level: 1,
						name:"西藏",
						pid: 156,
						postCode: null
					},
					{
						id: 650000,
						abbreviation:"",
						level: 1,
						name:"新疆",
						pid: 156,
						postCode: null
					},
					{
						id: 810000,
						abbreviation:"",
						level: 1,
						name:"香港",
						pid: 156,
						postCode: null
					},
					{
						id: 530000,
						abbreviation:"",
						level: 1,
						name:"云南",
						pid: 156,
						postCode: null
					},
					{
						id: 330000,
						abbreviation:"",
						level: 1,
						name:"浙江",
						pid: 156,
						postCode: null
					},
				],
				"cities": [],
				"counties": [],
				"city": [
					["489", "0", "全国"],
					["763", "548", "广州"],
					["764", "548", "韶关"],
					["765", "548", "深圳"],
					["766", "548", "珠海"],
					["767", "548", "汕头"],
					["768", "548", "佛山"],
					["769", "548", "江门"],
					["770", "548", "湛江"],
					["771", "548", "茂名"],
					["772", "548", "肇庆"],
					["773", "548", "惠州"],
					["774", "548", "梅州"],
					["775", "548", "汕尾"],
					["776", "548", "河源"],
					["777", "548", "阳江"],
					["778", "548", "清远"],
					["779", "548", "东莞"],
					["780", "548", "中山"],
					["781", "548", "潮州"],
					["782", "548", "揭阳"],
					["783", "548", "云浮"],
					["736", "546", "武汉"],
					["737", "546", "黄石"],
					["738", "546", "十堰"],
					["739", "546", "宜昌"],
					["740", "546", "襄阳"],
					["741", "546", "鄂州"],
					["742", "546", "荆门"],
					["743", "546", "孝感"],
					["744", "546", "荆州"],
					["745", "546", "黄冈"],
					["746", "546", "咸宁"],
					["747", "546", "随州"],
					["748", "546", "恩施"],
					["10057", "546", "公安"],
					["10139", "546", "武穴"],
					["10140", "546", "天门"],
					["10168", "546", "仙桃"],
					["10169", "546", "潜江"],
					["10171", "546", "宜城"],
					["10179", "546", "神农架"],
					["854", "556", "西安"],
					["855", "556", "铜川"],
					["856", "556", "宝鸡"],
					["857", "556", "咸阳"],
					["858", "556", "渭南"],
					["859", "556", "延安"],
					["860", "556", "汉中"],
					["861", "556", "榆林"],
					["862", "556", "安康"],
					["863", "556", "商洛"],
					["10058", "556", "兴平"],
					["10470", "556", "杨凌"],
					["933", "556", "西咸新区"],
					["801", "552", "成都"],
					["802", "552", "自贡"],
					["803", "552", "攀枝花"],
					["804", "552", "泸州"],
					["805", "552", "德阳"],
					["806", "552", "绵阳"],
					["807", "552", "广元"],
					["808", "552", "遂宁"],
					["809", "552", "内江"],
					["810", "552", "乐山"],
					["811", "552", "南充"],
					["812", "552", "眉山"],
					["813", "552", "宜宾"],
					["814", "552", "广安"],
					["815", "552", "达州"],
					["816", "552", "雅安"],
					["817", "552", "巴中"],
					["818", "552", "资阳"],
					["819", "552", "阿坝"],
					["820", "552", "甘孜"],
					["821", "552", "凉山"],
					["10065", "552", "峨眉"],
					["10104", "552", "西昌"],
					["10201", "552", "简阳"],
					["600", "535", "大连"],
					["599", "535", "沈阳"],
					["601", "535", "鞍山"],
					["602", "535", "抚顺"],
					["603", "535", "本溪"],
					["604", "535", "丹东"],
					["605", "535", "锦州"],
					["606", "535", "营口"],
					["607", "535", "阜新"],
					["608", "535", "辽阳"],
					["609", "535", "盘锦"],
					["610", "535", "铁岭"],
					["611", "535", "朝阳"],
					["612", "535", "葫芦岛"],
					["10023", "535", "兴城"],
					["10070", "535", "海城"],
					["10080", "535", "昌图"],
					["10144", "535", "开原"],
					["931", "535", "东港"],
					["613", "536", "长春"],
					["10198", "536", "珲春"],
					["614", "536", "吉林市"],
					["615", "536", "四平"],
					["616", "536", "辽源"],
					["617", "536", "通化"],
					["618", "536", "白山"],
					["619", "536", "松原"],
					["620", "536", "白城"],
					["621", "536", "延边"],
					["10122", "536", "公主岭"],
					["635", "539", "南京"],
					["639", "539", "苏州"],
					["640", "539", "昆山"],
					["650", "539", "常熟"],
					["652", "539", "张家港"],
					["636", "539", "无锡"],
					["637", "539", "徐州"],
					["638", "539", "常州"],
					["641", "539", "南通"],
					["642", "539", "连云港"],
					["643", "539", "淮安"],
					["644", "539", "盐城"],
					["645", "539", "扬州"],
					["646", "539", "镇江"],
					["647", "539", "泰州"],
					["648", "539", "宿迁"],
					["911", "539", "太仓市"],
					["702", "544", "济南"],
					["703", "544", "青岛"],
					["704", "544", "淄博"],
					["705", "544", "枣庄"],
					["706", "544", "东营"],
					["707", "544", "烟台"],
					["708", "544", "潍坊"],
					["709", "544", "济宁"],
					["710", "544", "泰安"],
					["711", "544", "威海"],
					["712", "544", "日照"],
					["713", "544", "莱芜"],
					["714", "544", "临沂"],
					["715", "544", "德州"],
					["716", "544", "聊城"],
					["717", "544", "滨州"],
					["718", "544", "菏泽"],
					["653", "540", "杭州"],
					["654", "540", "宁波"],
					["655", "540", "温州"],
					["656", "540", "嘉兴"],
					["657", "540", "湖州"],
					["658", "540", "绍兴"],
					["659", "540", "金华"],
					["660", "540", "衢州"],
					["661", "540", "舟山"],
					["662", "540", "台州"],
					["663", "540", "丽水"],
					["10158", "540", "方家山"],
					["785", "549", "南宁"],
					["786", "549", "柳州"],
					["787", "549", "桂林"],
					["788", "549", "梧州"],
					["789", "549", "北海"],
					["790", "549", "防城港"],
					["791", "549", "钦州"],
					["792", "549", "贵港"],
					["793", "549", "玉林"],
					["794", "549", "百色"],
					["795", "549", "贺州"],
					["796", "549", "河池"],
					["904", "549", "来宾"],
					["905", "549", "崇左"],
					["664", "541", "合肥"],
					["665", "541", "芜湖"],
					["666", "541", "蚌埠"],
					["667", "541", "淮南"],
					["668", "541", "马鞍山"],
					["669", "541", "淮北"],
					["670", "541", "铜陵"],
					["671", "541", "安庆"],
					["672", "541", "黄山"],
					["673", "541", "滁州"],
					["674", "541", "阜阳"],
					["675", "541", "宿州"],
					["677", "541", "六安"],
					["678", "541", "亳州"],
					["679", "541", "池州"],
					["680", "541", "宣城"],
					["10069", "541", "凤阳"],
					["10181", "541", "广德"],
					["10182", "541", "宿松"],
					["565", "532", "石家庄"],
					["566", "532", "唐山"],
					["567", "532", "秦皇岛"],
					["568", "532", "邯郸"],
					["569", "532", "邢台"],
					["570", "532", "保定"],
					["571", "532", "张家口"],
					["572", "532", "承德"],
					["573", "532", "沧州"],
					["574", "532", "廊坊"],
					["575", "532", "衡水"],
					["10143", "532", "遵化"],
					["576", "533", "太原"],
					["577", "533", "大同"],
					["578", "533", "阳泉"],
					["579", "533", "长治"],
					["580", "533", "晋城"],
					["581", "533", "朔州"],
					["582", "533", "晋中"],
					["583", "533", "运城"],
					["584", "533", "忻州"],
					["585", "533", "临汾"],
					["586", "533", "吕梁"],
					["910", "533", "永济市"],
					["587", "534", "呼和浩特"],
					["588", "534", "包头"],
					["589", "534", "乌海"],
					["590", "534", "赤峰"],
					["591", "534", "通辽"],
					["592", "534", "鄂尔多斯"],
					["593", "534", "呼伦贝尔"],
					["594", "534", "兴安盟"],
					["595", "534", "锡林郭勒盟"],
					["596", "534", "乌兰察布"],
					["597", "534", "巴彦淖尔"],
					["598", "534", "阿拉善盟"],
					["10031", "534", "乌审旗"],
					["10157", "534", "满洲里"],
					["622", "537", "哈尔滨"],
					["623", "537", "齐齐哈尔"],
					["624", "537", "鸡西"],
					["625", "537", "鹤岗"],
					["626", "537", "双鸭山"],
					["627", "537", "大庆"],
					["628", "537", "伊春"],
					["629", "537", "佳木斯"],
					["630", "537", "七台河"],
					["631", "537", "牡丹江"],
					["632", "537", "黑河"],
					["633", "537", "绥化"],
					["634", "537", "大兴安岭"],
					["10081", "537", "安达"],
					["10159", "537", "双城"],
					["10160", "537", "尚志"],
					["10161", "537", "绥芬河"],
					["10510", "537", "肇东市"],
					["681", "542", "福州"],
					["682", "542", "厦门"],
					["683", "542", "莆田"],
					["684", "542", "三明"],
					["685", "542", "泉州"],
					["687", "542", "漳州"],
					["688", "542", "南平"],
					["689", "542", "龙岩"],
					["690", "542", "宁德"],
					["691", "543", "南昌"],
					["692", "543", "景德镇"],
					["693", "543", "萍乡"],
					["694", "543", "九江"],
					["695", "543", "新余"],
					["696", "543", "鹰潭"],
					["697", "543", "赣州"],
					["698", "543", "吉安"],
					["699", "543", "宜春"],
					["700", "543", "抚州"],
					["701", "543", "上饶"],
					["719", "545", "郑州"],
					["720", "545", "开封"],
					["721", "545", "洛阳"],
					["722", "545", "平顶山"],
					["723", "545", "安阳"],
					["724", "545", "鹤壁"],
					["725", "545", "新乡"],
					["726", "545", "焦作"],
					["727", "545", "濮阳"],
					["728", "545", "许昌"],
					["729", "545", "漯河"],
					["730", "545", "三门峡"],
					["731", "545", "南阳"],
					["732", "545", "商丘"],
					["733", "545", "信阳"],
					["734", "545", "周口"],
					["735", "545", "驻马店"],
					["10044", "545", "济源"],
					["10059", "545", "西平"],
					["749", "547", "长沙"],
					["750", "547", "株洲"],
					["751", "547", "湘潭"],
					["752", "547", "衡阳"],
					["753", "547", "邵阳"],
					["754", "547", "岳阳"],
					["755", "547", "常德"],
					["756", "547", "张家界"],
					["757", "547", "益阳"],
					["758", "547", "郴州"],
					["759", "547", "永州"],
					["760", "547", "怀化"],
					["761", "547", "娄底"],
					["762", "547", "湘西"],
					["799", "550", "海口"],
					["800", "550", "三亚"],
					["907", "550", "洋浦市/洋浦经济开发区"],
					["10153", "550", "琼海"],
					["10183", "550", "儋州"],
					["10184", "550", "五指山"],
					["10185", "550", "文昌"],
					["10186", "550", "万宁"],
					["10187", "550", "东方"],
					["10188", "550", "定安"],
					["10189", "550", "屯昌"],
					["10190", "550", "澄迈"],
					["10191", "550", "临高"],
					["10192", "550", "琼中"],
					["10193", "550", "保亭"],
					["10194", "550", "白沙"],
					["10195", "550", "昌江"],
					["10196", "550", "乐东"],
					["10197", "550", "陵水"],
					["822", "553", "贵阳"],
					["823", "553", "六盘水"],
					["824", "553", "遵义"],
					["825", "553", "安顺"],
					["826", "553", "铜仁"],
					["827", "553", "黔西南"],
					["828", "553", "毕节"],
					["829", "553", "黔东南"],
					["830", "553", "黔南"],
					["831", "554", "昆明"],
					["832", "554", "曲靖"],
					["833", "554", "玉溪"],
					["834", "554", "保山"],
					["835", "554", "昭通"],
					["836", "554", "楚雄"],
					["837", "554", "红河"],
					["838", "554", "文山"],
					["840", "554", "西双版纳"],
					["841", "554", "大理"],
					["842", "554", "德宏"],
					["843", "554", "丽江"],
					["844", "554", "怒江"],
					["845", "554", "迪庆"],
					["846", "554", "临沧"],
					["10163", "554", "普洱"],
					["847", "555", "拉萨"],
					["848", "555", "昌都"],
					["849", "555", "山南"],
					["850", "555", "日喀则"],
					["851", "555", "那曲"],
					["852", "555", "阿里"],
					["853", "555", "林芝"],
					["864", "557", "兰州"],
					["865", "557", "嘉峪关"],
					["866", "557", "金昌"],
					["867", "557", "白银"],
					["868", "557", "天水"],
					["869", "557", "武威"],
					["870", "557", "张掖"],
					["871", "557", "平凉"],
					["872", "557", "酒泉"],
					["873", "557", "庆阳"],
					["874", "557", "定西"],
					["875", "557", "陇南"],
					["876", "557", "临夏"],
					["877", "557", "甘南"],
					["878", "558", "西宁"],
					["879", "558", "海东"],
					["880", "558", "海北"],
					["881", "558", "黄南"],
					["882", "558", "海南州"],
					["883", "558", "果洛"],
					["884", "558", "玉树"],
					["885", "558", "海西"],
					["886", "559", "银川"],
					["887", "559", "石嘴山"],
					["888", "559", "吴忠"],
					["889", "559", "固原"],
					["906", "559", "中卫"],
					["890", "560", "乌鲁木齐"],
					["891", "560", "克拉玛依"],
					["892", "560", "吐鲁番"],
					["893", "560", "哈密"],
					["894", "560", "昌吉"],
					["895", "560", "博尔塔拉"],
					["896", "560", "巴音郭楞"],
					["897", "560", "阿克苏"],
					["898", "560", "克孜勒苏"],
					["899", "560", "喀什"],
					["900", "560", "和田"],
					["901", "560", "伊犁"],
					["902", "560", "塔城"],
					["903", "560", "阿勒泰"],
					["10061", "560", "石河子"],
					["10164", "560", "奎屯市"],
					["10166", "560", "乌苏"],
					["10176", "560", "阿拉尔"],
					["10177", "560", "图木舒克"],
					["10178", "560", "五家渠"],
					["932", "560", "北屯市"],
				],
				"cityid": -1,
				"countyid": -1,
				"provinceid": -1,
@ -504,11 +339,12 @@
				"provincename": "省份",
			}
		},
		mounted: function() {
		mounted: function() {		
			$(".dropdown-menu").on("click", "[data-stopPropagation]", function(e) {
				e.stopPropagation();
				var tabid = e.currentTarget.id //js控制标签页
				if(tabid.indexOf("_") > 0) {
				var bbb=tabid.indexOf("_") 
				if(tabid.indexOf("_") > -1) {
					$('#' + tabid).tab('show')
				}
			});
@ -522,18 +358,38 @@
				}
				vm.provinceid = id
				vm.provincename = name
				vm.getCities(id)
				vm.getAddress(id, true)
				$('#addresslist a[href="#city"]').tab('show')
			},
			getCities: function(id) {
			getAddress: function(id, iscity) {
				var vm = this
				var cities = []
				for(var i in vm.city) {
					if(vm.city[i][1] == id) {
						cities.push(vm.city[i])
				mineAPI.addressGet(id).then(function(res) {
					if(res) {
						if(iscity) {
							vm.cities = res.map(function(res) {
								return {
									id: res.id,
									name: res.name,
								}
							})
						} else {
							vm.Counties = res.map(function(res) {
								return {
									id: res.id,
									name:res.name,
								}
							})
						}
					}
				}
				vm.cities = cities
				$('#addresslist a[href="#city"]').tab('show')
				})
			},
			selectC: function(id, name) {
				var vm = this
				$("#" + id).addClass("active")
				vm.countyid = id
				vm.countyname = name
				vm.getAddress(id, false)
				$('#addresslist a[href="#county"]').tab('show')
			},
		},
	})

+ 31 - 101
component/mine/select-industry.js

@ -19,13 +19,13 @@
								</ul>
								<div class="tab-content industrybox">
									<div role="tabpanel" class="tab-pane active w3-row-padding industry" id="home">
										<div :id="'industry_'+industry.id" class="w3-quarter mb20" v-for="industry in industrys" @click="selectindustry(industry.id,industry.name)">
											<div class="industryname">{{industry.name}}</div>
										<div :id="'industry_'+industry.code" class="w3-quarter mb20" v-for="industry in industrys" @click="selectindustry(industry.code,industry.value)">
											<div class="industryname">{{industry.value}}</div>
										</div>
									</div>
									<div role="tabpanel" class="tab-pane  w3-row-padding industry" id="direction">
										<div :id="'direction_'+direction.id" class="w3-quarter mb20" v-for="direction in directions" @click="selectdirection(direction.id,direction.name)">
											<div class="industryname">{{direction.name}}</div>
										<div :id="'direction_'+direction.code" class="w3-quarter mb20" v-for="direction in directions" @click="selectdirection(direction.code,direction.value)">
											<div class="industryname">{{direction.value}}</div>
										</div>
									</div>
								</div>
@ -37,111 +37,46 @@
					</div>
				</div>
			</div>`,
		props: ["industryid", "directionid"],
		props: ["industryid", "directionid","directionname","industryname"],
		data: function() {
			return {
				industrys: [{
					id: 0,
					name: "政府科研NGO"
				}, {
					id: 1,
					name: "IT互联网",
					direction: [{
						id: 0,
						name: "开发"
					}, {
						id: 1,
						name: "测试"
					}, {
						id: 2,
						name: "运维/安全"
					}, {
						id: 3,
						name: "硬件"
					}, {
						id: 4,
						name: "产品"
					}, {
						id: 5,
						name: "运营"
					}, {
						id: 6,
						name: "设计"
					}, {
						id: 7,
						name: "编辑/文档"
					}, ]
				}, {
					id: 2,
					name: "文化传媒"
				}, {
					id: 3,
					name: "医疗生物"
				}, {
					id: 4,
					name: "通信"
				}, {
					id: 5,
					name: "金融"
				}, {
					id: 6,
					name: "学生"
				}, {
					id: 7,
					name: "教育培训"
				}, {
					id: 8,
					name: "司法法律"
				}, {
					id: 9,
					name: "房产建筑"
				}, {
					id: 10,
					name: "服务业"
				}, {
					id: 7,
					name: "教育培训"
				}, {
					id: 8,
					name: "司法法律"
				}, {
					id: 9,
					name: "房产建筑"
				}, {
					id: 10,
					name: "服务业"
				}, {
					id: 7,
					name: "教育培训"
				}, {
					id: 8,
					name: "司法法律"
				}, {
					id: 9,
					name: "房产建筑"
				}, {
					id: 10,
					name: "服务业"
				}],
				industrys: [],
				directions: [],
				industryname:"请选择行业",
				directionname:"请选择方向",
				industryname: "请选择行业",
				directionname: "请选择方向",
			}
		},
		mounted: function() {
			this.initindustry()
			this.getindustry(this.industryid,true)
		},
		methods: {
			initindustry: function() {
			getindustry: function() {
				var vm = this
				//			getAllIndustry() //获取所有行业
				$("#industry_" + vm.industryid).addClass("selected")
				if(vm.industryid == -1) {
					$('#_direction').parent("li").addClass("hidden")
				} else {
					vm.getDirection(vm.industryid)
					vm.selectindustry(vm.industryid,vm.industryname)
					vm.getindustry(vm.industryid,false)
					vm.selectdirection(vm.directionid,vm.directionname)
				}
			},
			getindustry: function(id, isindustry) {
				var params = {
					size: 100,
					page: 1,
					filters: 'dictId=160;catalog=' + id
				} //此页面不需要上拉加载
				mineAPI.workListGet(params).then(function(res) {
					if(isindustry) {
						vm.industrys = res;
						vm.getindustry()
					}else{
						vm.directions = res;
					}					//			getAllIndustry() //获取所有行业
				}).catch(function(err) {
					alert("获取行业列表失败");
				})
			},
			selectindustry: function(id, name) {
				var vm = this
				if(vm.industryid != -1) {
@ -154,12 +89,7 @@
					$('#_direction').parent("li").removeClass("hidden")
				}
				$('#industrylist a[href="#direction"]').tab('show') //转到方向页面
				vm.getDirection(id) //通过id获取方向
			},
			getDirection: function(id) {
				//			getAllDirection() //获取该行业所有方向			
				var vm = this
				vm.directions = vm.industrys[id].direction
				vm.getindustry(id,false) //通过id获取方向
			},
			selectdirection: function(id, name) {
				var vm = this

BIN
images/moren_touxiang_img.png


+ 1 - 1
page/mine/html/personal-info.html

@ -35,7 +35,7 @@
		<script src="../../../js/util.js " type="text/javascript " charset="utf-8 "></script>
		<script src="../../../api/http-request.js " type="text/javascript " charset="utf-8 "></script>
		<script src="../../../plugins/artDialog/6.0.5/api/js/dialog-plus.js " type="text/javascript " charset="utf-8 "></script>
		<script src="../../../js/selector.js " type="text/javascript " charset="utf-8 "></script>
		<script src="../../../api/patient/mine-api.js" type="text/javascript " charset="utf-8 "></script>
		<script src="../../../component/mine/personal-dialog-form.js "></script>
		<script src="../../../component/common/footer.js "></script>
		<script src="../../../component/common/header.js "></script>