Commit 7dc699b5 authored by shajiaiming's avatar shajiaiming

增加不同客户端的打开方式

parent f39e20e4
...@@ -56,7 +56,7 @@ class ApplicationController extends BaseController ...@@ -56,7 +56,7 @@ class ApplicationController extends BaseController
if(Yii::$app->request->isPost){ if(Yii::$app->request->isPost){
Yii::$app->response->format = 'json'; Yii::$app->response->format = 'json';
$category_id = Yii::$app->request->get('category_id'); $category_id = Yii::$app->request->get('category_id');
$fields = ['category_id','h5_icon','official_url','introduce_image','show_width','show_height','open_type','name','sort','icon','type','native_url','native_login_url','h5_url','android_url','ios_url','app_store_url','advertise','description','redirect_type', 'platform_id']; $fields = ['category_id','h5_icon','official_url','introduce_image','show_width','show_height','open_type', 'open_type_app', 'name','sort','icon','type','native_url','native_login_url','h5_url','android_url','ios_url','app_store_url','advertise','description','redirect_type', 'platform_id'];
$params = array_merge(Yii::$app->request->post(),['category_id' => $category_id, 'platform_id' => Yii::$app->user->identity->platform_id]); $params = array_merge(Yii::$app->request->post(),['category_id' => $category_id, 'platform_id' => Yii::$app->user->identity->platform_id]);
$params = $this->initParams($params, $fields); $params = $this->initParams($params, $fields);
$coin_applicateion_form = new CoinApplicationForm(); $coin_applicateion_form = new CoinApplicationForm();
...@@ -80,7 +80,7 @@ class ApplicationController extends BaseController ...@@ -80,7 +80,7 @@ class ApplicationController extends BaseController
{ {
if (Yii::$app->request->isPost) { if (Yii::$app->request->isPost) {
Yii::$app->response->format = 'json'; Yii::$app->response->format = 'json';
$fields = ['category_id','id','h5_icon','official_url','introduce_image','show_width','show_height','open_type','name','sort','icon','type','native_url','native_login_url','h5_url','android_url','ios_url','app_store_url','advertise','description','redirect_type', 'platform_id']; $fields = ['category_id','id','h5_icon','official_url','introduce_image','show_width','show_height','open_type', 'open_type_app', 'name','sort','icon','type','native_url','native_login_url','h5_url','android_url','ios_url','app_store_url','advertise','description','redirect_type', 'platform_id'];
$params = array_merge(Yii::$app->request->post(),['platform_id' => Yii::$app->user->identity->platform_id]); $params = array_merge(Yii::$app->request->post(),['platform_id' => Yii::$app->user->identity->platform_id]);
$params = $this->initParams($params, $fields); $params = $this->initParams($params, $fields);
$coin_applicateion_form = new CoinApplicationForm(); $coin_applicateion_form = new CoinApplicationForm();
......
...@@ -39,13 +39,14 @@ class CoinApplicationForm extends BaseForm ...@@ -39,13 +39,14 @@ class CoinApplicationForm extends BaseForm
public $show_width; public $show_width;
public $show_height; public $show_height;
public $open_type; public $open_type;
public $open_type_app;
public $platform_id; public $platform_id;
public function scenarios() public function scenarios()
{ {
return [ return [
self::SCENARIO_ADD => ['category_id','name','h5_icon','official_url','introduce_image','show_width','show_height','open_type','sort','icon','type','native_url','native_login_url','h5_url','android_url','ios_url','app_store_url','advertise','description','redirect_type', 'platform_id'], self::SCENARIO_ADD => ['category_id','name','h5_icon','official_url','introduce_image','show_width','show_height','open_type', 'open_type_app','sort','icon','type','native_url','native_login_url','h5_url','android_url','ios_url','app_store_url','advertise','description','redirect_type', 'platform_id'],
self::SCENARIO_EDIT => ['category_id','id','h5_icon','official_url','introduce_image','show_width','show_height','open_type','name','sort','icon','type','native_url','native_login_url','h5_url','android_url','ios_url','app_store_url','advertise','description','redirect_type', 'platform_id'], self::SCENARIO_EDIT => ['category_id','id','h5_icon','official_url','introduce_image','show_width','show_height','open_type', 'open_type_app','name','sort','icon','type','native_url','native_login_url','h5_url','android_url','ios_url','app_store_url','advertise','description','redirect_type', 'platform_id'],
]; ];
} }
...@@ -73,7 +74,8 @@ class CoinApplicationForm extends BaseForm ...@@ -73,7 +74,8 @@ class CoinApplicationForm extends BaseForm
'redirect_type' => '跳转方式', 'redirect_type' => '跳转方式',
'show_width' => '显示宽度', 'show_width' => '显示宽度',
'show_height' => '显示高度', 'show_height' => '显示高度',
'open_type' => 'H5打开方式', 'open_type' => 'H5打开方式 PC版',
'open_type_app' => 'H5打开方式 APP版',
'platform_id' => '平台Id' 'platform_id' => '平台Id'
]; ];
} }
......
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">H5打开方式</label> <label class="layui-form-label">H5打开方式(PC版)</label>
<div class="layui-input-block"> <div class="layui-input-block">
<select name="open_type" > <select name="open_type" >
<option value="0">选择打开方式</option> <option value="0">选择打开方式</option>
...@@ -171,6 +171,17 @@ ...@@ -171,6 +171,17 @@
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">H5打开方式(APP版)</label>
<div class="layui-input-block">
<select name="open_type_app" >
<option value="0" >选择打开方式</option>
<option value="1">钱包内打开</option>
<option value="2">浏览器打开</option>
</select>
</div>
</div>
<div class="layui-form-item">
<button class="layui-btn">提交</button> <button class="layui-btn">提交</button>
</div> </div>
</form> </form>
......
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">H5打开方式</label> <label class="layui-form-label">H5打开方式(PC版)</label>
<div class="layui-input-block"> <div class="layui-input-block">
<select name="open_type" > <select name="open_type" >
<option value="0" >选择打开方式</option> <option value="0" >选择打开方式</option>
...@@ -171,6 +171,17 @@ ...@@ -171,6 +171,17 @@
</select> </select>
</div> </div>
</div> </div>
<div class="layui-form-item">
<label class="layui-form-label">H5打开方式(APP版)</label>
<div class="layui-input-block">
<select name="open_type_app" >
<option value="0" >选择打开方式</option>
<option value="1" <?php if($item['open_type_app'] ==1) echo "selected"?>>钱包内打开</option>
<option value="2" <?php if($item['open_type_app'] ==2) echo "selected"?>>浏览器打开</option>
</select>
</div>
</div>
</form> </form>
</div> </div>
</div> </div>
......
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 to comment