更新添加联营上传物料

parent 502cb3d8
...@@ -14,7 +14,7 @@ class WebController extends Controller ...@@ -14,7 +14,7 @@ class WebController extends Controller
{ {
public function info(Request $request,$id=''){ public function info(Request $request,$id=''){
if(empty($id)){ if(empty($id)){
return redirect('/web/OrderList' ); return $request->supplier_id >0 ? redirect('/web/GoodsList' ) : redirect('/web/GoodsComList' );
} }
$data['id'] = $id; $data['id'] = $id;
$data['URL_YUNXIN'] = config("website.URL_YUNXIN"); $data['URL_YUNXIN'] = config("website.URL_YUNXIN");
......
...@@ -31,11 +31,12 @@ class CheckLogin ...@@ -31,11 +31,12 @@ class CheckLogin
return redirect('/web/login' ); return redirect('/web/login' );
} }
}else{ }else{
if (strpos($nowUrl,'/web/login') !== false){ //如果已经登录,跳到登录页
return redirect('/web/GoodsList' );
}
Redis::expire('yunxin_login_'.$yunxin_token,7200); //延长登录时间 Redis::expire('yunxin_login_'.$yunxin_token,7200); //延长登录时间
$userInfoArr = json_decode($userInfo,true); $userInfoArr = json_decode($userInfo,true);
if (strpos($nowUrl,'/web/login') !== false){ //如果已经登录,跳到登录页
return $userInfoArr['supplier_id'] >0 ? redirect('/web/GoodsList' ) : redirect('/web/GoodsComList' );
}
$request->mobile = $userInfoArr['mobile']; $request->mobile = $userInfoArr['mobile'];
$request->account_id = $userInfoArr['account_id']; //自营id $request->account_id = $userInfoArr['account_id']; //自营id
$request->supplier_id = $userInfoArr['supplier_id']; $request->supplier_id = $userInfoArr['supplier_id'];
......
...@@ -102,9 +102,11 @@ ...@@ -102,9 +102,11 @@
var t2 = window.setInterval(function () { var t2 = window.setInterval(function () {
var res = ajax_push2('/api/ApiComImportResult',{"id":logid}) var res = ajax_push2('/api/ApiComImportResult',{"id":logid})
if(res.code == 0){ if(res.code == 0){
layer.closeAll();
window.location.href = res.msg
window.clearInterval(t2) window.clearInterval(t2)
layer.closeAll();
alert_succ("导入成功",function () {
window.location.reload()
})
} }
if(res.code == 1){ if(res.code == 1){
layer.closeAll(); layer.closeAll();
......
...@@ -52,9 +52,6 @@ function ajax_push2(url,data){ ...@@ -52,9 +52,6 @@ function ajax_push2(url,data){
if(resp){ if(resp){
result=resp; result=resp;
} }
},
error: function (res) {
alert_err('网络阻塞,请重试!')
} }
}) })
return result; return result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment