| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325 | 
							- <!DOCTYPE html>
 
- <html class="">
 
- <!--STATUS OK-->
 
- <head>
 
- 	<meta name="referrer" content="always" />
 
- 	<meta charset='utf-8' />
 
- 	<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
 
- 	<meta http-equiv="x-dns-prefetch-control" content="on">
 
- 	<meta name="description" content="">
 
- 	<meta name="format-detection" content="telephone=no" />
 
- 	<link rel="stylesheet" type="text/css" href="../css/aui-win.css" />
 
- 	<link rel="stylesheet" type="text/css" href="css/vant-ui.css" />
 
- 	<link rel="stylesheet" type="text/css" href="css/iconfont.css">
 
- 	<link rel="stylesheet" type="text/css" href="css/main.css" />
 
- 	<link rel="stylesheet" type="text/css" href="css/style.css" />
 
- 	<script src="js/vue.js"></script>
 
- 	<script src="js/vant-ui.js"></script>
 
- 	<script src="js/main.js"></script>
 
- 	<title></title>
 
- </head>
 
- <style>
 
- 	.login {
 
- 		padding-bottom: 0rem;
 
- 		height: auto;
 
- 		padding-top: .01rem;
 
- 		background: #ffffff;
 
- 		;
 
- 	}
 
- 	.login .loginFix {
 
- 		position: absolute;
 
- 	}
 
- 	.login .loginBox {
 
- 		width: 90%;
 
- 		height: auto;
 
- 		padding: 10px;
 
- 		padding-bottom: 1rem;
 
- 	}
 
- 	.pull-right {
 
- 		width: .15rem !important;
 
- 		height: .3rem !important;
 
- 	}
 
- 	.brandList {
 
- 		display: flex;
 
- 		width: 100%;
 
- 		flex-wrap: wrap;
 
- 		margin-top: .8rem;
 
- 	}
 
- 	.brandList .brandItem,
 
- 	.brandList .choose {
 
- 		width: 40%;
 
- 		margin: .1rem .3rem;
 
- 	}
 
- 	.brandItem {
 
- 		height: .6rem;
 
- 	}
 
- 	.anniu>input {
 
- 		width: 90%;
 
- 		height: .86rem;
 
- 		background: rgba(0, 160, 234, 1);
 
- 		border-radius: 5rem;
 
- 		color: #fff;
 
- 		font-size: .31rem;
 
- 		margin-top: .5rem;
 
- 	}
 
- 	.getCodeBtn {
 
- 		width: 150px;
 
- 		background-color: #00a0ea;
 
- 		padding: 5px;
 
- 		color: #fff;
 
- 		border-radius: 8px 5px;
 
- 		text-align: center;
 
- 	}
 
- 	.dontSend {
 
- 		background-color: #ccc !important;
 
- 		color: #999 !important;
 
- 	}
 
- 	.hasClick {
 
- 		border: 1px solid#ccc;
 
- 		padding: 0.05rem;
 
- 	}
 
- 	.noclick {
 
- 		padding: 0.05rem;
 
- 	}
 
- 	.card {
 
- 		width: 7rem;
 
- 		background: #FFFFFF;
 
- 		box-shadow: 0px 5px 20px 0px rgba(223, 223, 223, 0.91);
 
- 		border-radius: 10px;
 
- 		margin-top: .2rem;
 
- 	}
 
- 	.van-field__label {
 
-     color: #0095FF;
 
- }
 
- .van-field__control {
 
- 	color: #0095FF;
 
- }
 
- </style>
 
- <body>
 
- 	<div id="app" style="overflow-y: scroll;" v-cloak>
 
- 		<header class="aui-bar aui-bar-nav aui-bar-info" id="aui-header">
 
- 			<div>
 
- 				<a class="aui-btn aui-btn-info aui-pull-left" tapmode onclick="closeWin()"
 
- 					style="background: rgba(0, 160, 234, 1);"> <span class="aui-iconfont aui-icon-left"></span> </a>
 
- 				<div class="aui-title" id="aui-title">
 
- 					上传执照
 
- 				</div>
 
- 			</div>
 
- 		</header>
 
- 		<!-- 附件上传 -->
 
- 		<div style="display: flex;justify-content: center;">
 
- 			<div class="card">
 
- 				<div style="display: flex;align-items: center;">
 
- 					<div style="width: 4px;height: 24px;background: #0292FD;margin: .2rem;">
 
- 					</div>
 
- 					<div>
 
- 						为保障积分商城正常使用,请上传真实营业执照
 
- 					</div>
 
- 				</div>
 
- 				<div style="width: 666px;height: 1px;background: #F4F4F4;"></div>
 
- 				<div style="display: flex;justify-content: center;">
 
- 					<div>
 
- 						<input accept="image/x-png,image/gif,image/jpeg,image/bmp" class="change" id="files1"
 
- 							type="file" multiple="multiple" style="width: 5rem;opacity: 0"
 
- 							onchange="changePhoto(event,1)" />
 
- 						<img :src="urldata1 == '' ? './image/tpyulan.png' : urldata1" style="width: 5rem;"
 
- 							v-on:click="choosePhoto(1)" />
 
- 						<p
 
- 							style="width: 5rem;text-align: center;margin: .2rem 0;font-size: .3rem;font-family: Source Han Sans CN;color: #787878;">
 
- 							营业执照
 
- 						</p>
 
- 					</div>
 
- 				</div>
 
- 			</div>
 
- 		</div>
 
- 		<div style="display: flex;justify-content: center;">
 
- 			<div class="card">
 
- 				<div style="display: flex;justify-content: center;padding: .2rem;">
 
- 					<div>
 
- 						<div>
 
- 							<van-field v-model="companyName" label="公司名称" placeholder="请输入公司名称" readonly />
 
- 						</div>
 
- 						<div>
 
- 							<van-field v-model="userName" label="门店名称" placeholder="请输入门店名称" />
 
- 						</div>
 
- 						<div>
 
- 							<van-field v-model="legalPerson" label="法人" placeholder="请输入法人" readonly />
 
- 					</div>
 
- 					</div>
 
- 				</div>
 
- 			</div>
 
- 		</div>
 
- 		<div style="font-size: 16px;color: #787878;display: flex;margin:.3rem .3rem 0 .3rem;">
 
- 			<div>注:</div>
 
- 			<div>1、请上传清晰、准确、符合规范的营业执照,并确保系统识别出来的信息与营业执照的信息一致。若存在差异,请重新上传。<br>
 
- 				2、为保证后期能够顺利申请店招店、形象店等,请尽量保持门店名称与营业执照名称一致。</div>
 
- 		</div>
 
- 		<div style="display: flex; justify-content: center;margin-top: .5rem;">
 
- 			<div style="background-color:#0095FF;color: #fff;width:6rem;height: .8rem;border-radius: .4rem;display: flex;justify-content: center; align-items: center;"
 
- 				v-on:click="storeUpdatalicense">确认提交</div>
 
- 		</div>
 
- 	</div>
 
- </body>
 
- <script type="text/javascript" src="../script/aui_compress.min.js"></script>
 
- <script type="text/javascript" src="../script/jquery-1.11.0.min.js"></script>
 
- <script type="text/javascript" src="../script/api.js"></script>
 
- <script type="text/javascript" src="../script/httpRequest.js"></script>
 
- <script type="text/javascript" src="../script/vue_plugins.js"></script>
 
- <script type="text/javascript">
 
- 	function closeWin() {
 
- 		api.closeWin({});
 
- 	}
 
- 	var vm;
 
- 	apiready = function () {
 
- 		var licenseUrl = api.pageParam.licenseUrl;
 
- 		var companyName = api.pageParam.companyName;
 
- 		var userName = api.pageParam.userName;
 
- 		var legalPerson = api.pageParam.legalPerson;
 
- 		var header = $api.byId('aui-header');
 
- 		$api.fixStatusBar(header);
 
- 		vm = new Vue({
 
- 			el: '#app',
 
- 			data: {
 
- 				userLicense:licenseUrl, // 营业执照
 
- 				urldata1: licenseUrl,
 
- 				companyName: companyName,
 
- 				userName: userName,
 
- 				legalPerson: legalPerson,
 
- 				check2: '',
 
- 				check: '',
 
- 			},
 
- 			methods: {
 
- 				getBrandNum: function (index) {
 
- 					return this.chooseBrands.indexOf(index) >= 0;
 
- 				},
 
- 				//  初始化数据
 
- 				init: function () {
 
- 					this.storeId = $api.getStorage('userid');
 
- 				},
 
- 				//  点击选择附件
 
- 				choosePhoto: function (type) {
 
- 					var _this = this;
 
- 					//  判断是不是有权限,如果没有则需要开启
 
- 					this.ifHasPrme('storage', function (ret) {
 
- 						if (ret == true) {
 
- 							_this.ifHasPrme('camera', function (res) {
 
- 								if (res == true) {
 
- 									_this.chooseImage(function (ret) {
 
- 										uploadFile(ret, type);
 
- 										//
 
- 										if (type == 1) {
 
- 											vm.urldata1 = _this.localImage;
 
- 										}
 
- 									})
 
- 								}
 
- 							})
 
- 						}
 
- 					})
 
- 				},
 
- 				storeUpdatalicense: function () {
 
- 					var url = "storeUpdatalicense",
 
- 						_this = this;
 
- 					data = {
 
- 						"url": "json",
 
- 						"type": 'body',
 
- 						"id": _this.storeId,
 
- 						"licenseUrl": _this.userLicense,
 
- 						"companyName": _this.companyName,
 
- 						"legalPerson": _this.legalPerson,
 
- 						"storeName": _this.userName
 
- 					}
 
- 					this.$post(url,data, function (ret) {
 
- 						if (ret.code == 0 || ret.code == '0') {
 
- 							api.closeWin();
 
- 						}
 
- 					})
 
- 				},
 
- 				//获取照片信息
 
- 				licenseDiscern: function () {
 
- 					var url = "licenseDiscern",
 
- 						_this = this;
 
- 						this.$postuser(url, {						
 
- 						"url": "json",
 
- 						"type": 'body',
 
- 						"fileBox": _this.userLicense
 
- 					}, function (ret) {
 
- 						if (ret.code == 0 || ret.code == '0') {
 
- 							api.alert({
 
- 								title: '温馨提示',
 
- 								msg: '如果识别的营业执照名称和法定代表人与营业执照上的信息存在差异,请重新上传清晰度更高的营业执照!',
 
- 							}, function (ret, err) {
 
- 							});
 
- 							_this.companyName = ret.data.wordsResultQuery.company.words;
 
- 							_this.userName = ret.data.wordsResultQuery.company.words;
 
- 							_this.legalPerson = ret.data.wordsResultQuery.person.words;
 
- 						}else{
 
- 							_this.companyName = ""
 
- 							_this.userName = ""
 
- 							_this.legalPerson = ""	
 
- 						}
 
- 					})
 
- 				},
 
- 			},
 
- 			filters: {},
 
- 			mounted: function () {
 
- 				this.init();
 
- 			}
 
- 		})
 
- 	}
 
- 	function changePhoto(event, type) {
 
- 		uploadFile(event.target.files[0], type);
 
- 	}
 
- 	//  jq 的上传文件
 
- 	function uploadFile(file, type) {
 
- 		var formdata = new FormData();
 
- 		formdata.append('file', file);
 
- 		// api.showProgress({});
 
- 		$.ajax({
 
- 			url: "http://b2bcnapi.sailuntire.com/api/test/web/file/upload",
 
- 			type: "POST",
 
- 			data: formdata,
 
- 			processData: false, // 告诉jQuery不要去处理发送的数据
 
- 			contentType: false, // 告诉jQuery不要去设置Content-Type请求头
 
- 			success: function (ret, status, xhr) {
 
- 				// api.hideProgress();
 
- 				if (ret.code == 0 || ret.code == '0') {
 
- 					api.toast({
 
- 						msg: '上传成功'
 
- 					});
 
- 					if (type == 1) {
 
- 						vm.userLicense = ret.data;
 
- 						vm.licenseDiscern()
 
- 					}
 
- 				} else {
 
- 					api.toast({
 
- 						msg: '上传失败'
 
- 					});
 
- 				}
 
- 			}
 
- 		});
 
- 	}
 
- </script>
 
- </html>
 
 
  |