add:商户合同发起签约

This commit is contained in:
chenbo 2023-09-13 19:40:48 +08:00
parent 5205beca8b
commit 223b7fc966

View File

@ -202,7 +202,7 @@ class ShopContractLogic extends BaseLogic
"type"=>"party_a" "type"=>"party_a"
], ],
]; ];
if($result['type']==1){
$data[]= [ $data[]= [
"applyNo" => $result['contract_no'], //TODO * "applyNo" => $result['contract_no'], //TODO *
"fullName" => $result['party_b_info']['company_name'], //TODO * "fullName" => $result['party_b_info']['company_name'], //TODO *
@ -212,17 +212,7 @@ class ShopContractLogic extends BaseLogic
"type"=>"party_b" "type"=>"party_b"
]; ];
}else{
$data[]= [
"applyNo" => $result['contract_no'], //TODO *
"fullName" => $result['party_b_info']['nickname'], //TODO *
"identityCard" => $result['party_b_info']['id_card'], //TODO *
"identityType" => 1, //TODO *
"master_phone" => $result['party_b_info']['mobile'],
"type"=>"party_b"
];
}
$find = Db::name('shop_contract')->where('id', $params['id']) $find = Db::name('shop_contract')->where('id', $params['id'])
->withAttr('contract_type_name', function ($value, $data) { ->withAttr('contract_type_name', function ($value, $data) {
return Db::name('dict_data')->where('id', $data['contract_type'])->value('name'); return Db::name('dict_data')->where('id', $data['contract_type'])->value('name');
@ -242,10 +232,11 @@ class ShopContractLogic extends BaseLogic
'mobile' => $v['master_phone'], 'mobile' => $v['master_phone'],
'name' => $v['fullName'], 'name' => $v['fullName'],
'type' => '《商户入驻合同》', 'type' => '《商户入驻合同》',
'code' => 'api/Hetong/url?id=' . $find['id'].'&type='.$v['type'].'&sign_type=shop_contract', 'code' => 'api/Hetong/url?id=' . $find['id'].'&type='.$v['type'].'&t=1',
'scene' => 'WQ' 'scene' => 'WQ'
]; ];
$result = SmsLogic::contractUrl($sms); $result = SmsLogic::contractUrl($sms);
if ($result != true) { if ($result != true) {
return self::setError(SmsLogic::getError()); return self::setError(SmsLogic::getError());
} }