Commit f5bde594 authored by shajiaiming's avatar shajiaiming

merge other branch

parents 19ca082c 428af9b3
......@@ -56,7 +56,7 @@ class ApplicationController extends BaseController
if(Yii::$app->request->isPost){
Yii::$app->response->format = 'json';
$category_id = Yii::$app->request->get('category_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'];
$fields = ['category_id','h5_icon','official_url','introduce_image','show_width','show_height','open_type', 'open_type_app', 'platform_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'];
$data = Yii::$app->request->post();
$data['open_type_app'] = (0 == $data['open_type_app']) ? 1 : $data['open_type_app'];
$params = array_merge($data,['category_id' => $category_id, 'platform_id' => Yii::$app->user->identity->platform_id]);
......@@ -82,7 +82,7 @@ class ApplicationController extends BaseController
{
if (Yii::$app->request->isPost) {
Yii::$app->response->format = 'json';
$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'];
$fields = ['category_id','id','h5_icon','official_url','introduce_image','show_width','show_height','open_type', 'open_type_app','platform_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'];
$data = Yii::$app->request->post();
$data['open_type_app'] = (0 == $data['open_type_app']) ? 1 : $data['open_type_app'];
$params = array_merge($data,['platform_id' => Yii::$app->user->identity->platform_id]);
......
......@@ -40,13 +40,14 @@ class CoinApplicationForm extends BaseForm
public $show_height;
public $open_type;
public $open_type_app;
public $platform_type;
public $platform_id;
public function scenarios()
{
return [
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', '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'],
self::SCENARIO_ADD => ['category_id','name','h5_icon','official_url','introduce_image','show_width','show_height','open_type', 'open_type_app', 'platform_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_EDIT => ['category_id','id','h5_icon','official_url','introduce_image','show_width','show_height','open_type', 'open_type_app', 'platform_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'],
];
}
......@@ -76,6 +77,7 @@ class CoinApplicationForm extends BaseForm
'show_height' => '显示高度',
'open_type' => 'H5打开方式 PC版',
'open_type_app' => 'H5打开方式 APP版',
'platform_type' => '所属平台',
'platform_id' => '平台Id'
];
}
......
......@@ -180,7 +180,16 @@
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">所属类型</label>
<div class="layui-input-block">
<select name="platform_type" >
<option value="1">币钱包</option>
<option value="2">托管账户</option>
<option value="3">通用</option>
</select>
</div>
</div>
<div class="layui-form-item">
<button class="layui-btn">提交</button>
</div>
......
......@@ -182,6 +182,16 @@
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">所属类型</label>
<div class="layui-input-block">
<select name="platform_type" >
<option value="1" <?php if($item['platform_type'] ==1) echo "selected"?>>币钱包</option>
<option value="2" <?php if($item['platform_type'] ==2) echo "selected"?>>托管账户</option>
<option value="3" <?php if($item['platform_type'] ==3) echo "selected"?>>通用</option>
</select>
</div>
</div>
</form>
</div>
</div>
......
......@@ -97,12 +97,12 @@ class ApplicationBusiness
$app_cate_Model = CoinAppCate::find();
if(array_key_exists('platform_id', $condition)){
$query = $app_cate_Model->JoinWith(['application'], false)
->select('cate_id,app_id,name,icon,type,native_url,native_login_url,h5_url,android_url,ios_url,app_store_url,advertise,redirect_type,open_type_app,'.CoinAppCate::tableName().'.sort')
->select('cate_id,app_id,name,icon,type,native_url,native_login_url,h5_url,android_url,ios_url,app_store_url,advertise,redirect_type,open_type_app,platform_type,'.CoinAppCate::tableName().'.sort')
->where($condition)
->orderBy(CoinAppCate::tableName().'.sort asc');
} else {
$query = $app_cate_Model->JoinWith(['application'], false)
->select('cate_id,app_id,name,icon,type,native_url,native_login_url,h5_url,android_url,ios_url,app_store_url,advertise,redirect_type,open_type_app,'.CoinAppCate::tableName().'.sort')
->select('cate_id,app_id,name,icon,type,native_url,native_login_url,h5_url,android_url,ios_url,app_store_url,advertise,redirect_type,open_type_app,platform_type,'.CoinAppCate::tableName().'.sort')
->orderBy(CoinAppCate::tableName().'.sort asc');
}
......
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