...
|
...
|
@@ -122,7 +122,10 @@ class Secret extends Api |
|
|
"current_price": "10.00", // 当前价格
|
|
|
"original_price": "10000.00", //原价
|
|
|
"description": "测试密卷", //密卷介绍
|
|
|
"do_num": 20 //做过人数
|
|
|
"do_num": 20, //做过人数
|
|
|
"description": '密卷介绍', //密卷介绍
|
|
|
"is_buy": 0, //是否已购买:0=否,1=是
|
|
|
"have_spec": 0, //是否有规格:0=否,1=是
|
|
|
}
|
|
|
})
|
|
|
*/
|
...
|
...
|
@@ -166,7 +169,10 @@ class Secret extends Api |
|
|
->field('id')
|
|
|
->find();
|
|
|
$info->is_buy = !empty($order) ? 1 : 0;
|
|
|
$info = $info->visible(['id','title','current_price','original_price','do_num','description'])->append(['is_buy']);
|
|
|
// 是否有规格
|
|
|
$have_spec = SecretSpec::where('secret_id',$info['id'])->find();
|
|
|
$info->have_spec = $have_spec ? 1 : 0;
|
|
|
$info = $info->visible(['id','title','current_price','original_price','do_num','description'])->append(['is_buy','have_spec']);
|
|
|
$this->success('成功',$info);
|
|
|
}
|
|
|
|
...
|
...
|
|