|
@@ -14,6 +14,13 @@ class Yorder extends Api
|
|
|
protected $noNeedLogin = [];
|
|
|
protected $noNeedRight = ['*'];
|
|
|
|
|
|
+ /**
|
|
|
+ * 钓鱼下单
|
|
|
+ * @return void
|
|
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
+ * @throws \think\exception\DbException
|
|
|
+ */
|
|
|
public function order_create(){
|
|
|
$method_model =new Method();
|
|
|
$order_no = order_no($this->auth->id);
|
|
@@ -47,7 +54,7 @@ class Yorder extends Api
|
|
|
$order_model = new Order();
|
|
|
$order_id = $order_model->insertGetId($order_data);
|
|
|
foreach ($data['item'] as &$v){
|
|
|
- for ($i=1;$i<=$v['number'];$i++){
|
|
|
+ for ($i=0;$i<$v['number'];$i++){
|
|
|
$ruchang_number=rand('000000','999999').$order_id;
|
|
|
$code1 = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['SERVER_NAME'].'/index.php/api/exchange/saoma'.'?'.'sn'.'='.$data['sn_no'];
|
|
|
$ruchang_code= 'code/ruchang/'.$ruchang_number.'.png';//图片路径名
|
|
@@ -71,6 +78,9 @@ class Yorder extends Api
|
|
|
'yajin_number'=>$ruchang_number,
|
|
|
'yajin_code'=>'/'.$ruchang_code,
|
|
|
'yajin_ststus'=>1,
|
|
|
+ 'name'=>$data['user'][$i]['name'],
|
|
|
+ 'phone'=>$data['user'][$i]['phone'],
|
|
|
+ 'type'=>$v['type'],
|
|
|
|
|
|
];
|
|
|
if($data['wucan_money']>0){
|
|
@@ -101,6 +111,9 @@ class Yorder extends Api
|
|
|
$this->error('订单下单成功');
|
|
|
}
|
|
|
}
|
|
|
+ public function order_list(){
|
|
|
+
|
|
|
+ }
|
|
|
public function code($code,$image){
|
|
|
vendor('phpqrcode.phpqrcode');//包含类库文件
|
|
|
$a= new \QRcode();//实例化类
|