更新添加联营上传物料

parent 502cb3d8
......@@ -14,7 +14,7 @@ class WebController extends Controller
{
public function info(Request $request,$id=''){
if(empty($id)){
return redirect('/web/OrderList' );
return $request->supplier_id >0 ? redirect('/web/GoodsList' ) : redirect('/web/GoodsComList' );
}
$data['id'] = $id;
$data['URL_YUNXIN'] = config("website.URL_YUNXIN");
......
......@@ -31,11 +31,12 @@ class CheckLogin
return redirect('/web/login' );
}
}else{
if (strpos($nowUrl,'/web/login') !== false){ //如果已经登录,跳到登录页
return redirect('/web/GoodsList' );
}
Redis::expire('yunxin_login_'.$yunxin_token,7200); //延长登录时间
$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->account_id = $userInfoArr['account_id']; //自营id
$request->supplier_id = $userInfoArr['supplier_id'];
......
......@@ -102,9 +102,11 @@
var t2 = window.setInterval(function () {
var res = ajax_push2('/api/ApiComImportResult',{"id":logid})
if(res.code == 0){
layer.closeAll();
window.location.href = res.msg
window.clearInterval(t2)
layer.closeAll();
alert_succ("导入成功",function () {
window.location.reload()
})
}
if(res.code == 1){
layer.closeAll();
......
......@@ -52,9 +52,6 @@ function ajax_push2(url,data){
if(resp){
result=resp;
}
},
error: function (res) {
alert_err('网络阻塞,请重试!')
}
})
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