Commit 4e25803d by 刘海龙

Merge branch 'master' of http://132.232.91.252:9999/ice/quxiu

parents e0fd4684 ee1ce25b
...@@ -23,7 +23,7 @@ class RechangeController extends HomebaseController ...@@ -23,7 +23,7 @@ class RechangeController extends HomebaseController
{ {
return [ return [
'wechat' => [ 'wechat' => [
'appid' => 'wx98dd4477b89cb388', // app 开放平台的APPID // 'appid' => 'wx98dd4477b89cb388', // app 开放平台的APPID
'app_id' => 'wx37327dbb9d7b33f3', // 公众号 APPID 'app_id' => 'wx37327dbb9d7b33f3', // 公众号 APPID
'miniapp_id' => '', //小程序 APPID 'miniapp_id' => '', //小程序 APPID
'appSecret' => '7f8291af4e0795ee375f66487a721627', // 公众号 秘钥 'appSecret' => '7f8291af4e0795ee375f66487a721627', // 公众号 秘钥
...@@ -43,12 +43,16 @@ class RechangeController extends HomebaseController ...@@ -43,12 +43,16 @@ class RechangeController extends HomebaseController
public function wx() public function wx()
{ {
echo $this->getPay()->driver('wechat')->gateway('wap')->pay([ $data = [
'out_trade_no' => '128047_20200426175416265', // 订单号 'ulr' => $this->getPay()->driver('wechat')->gateway('wap')->pay([
'out_trade_no' => time(), // 订单号
'total_fee' => '1', // 订单金额,**单位:分** 'total_fee' => '1', // 订单金额,**单位:分**
'body' => '测试支付', // 订单描述 'body' => '测试支付', // 订单描述
// 'spbill_create_ip' => '', // 支付人的 IP // 'spbill_create_ip' => '', // 支付人的 IP
]); ])
];
echo json_encode(array("ret"=>200,'data'=>$data,'msg'=>''));
die; die;
} }
} }
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
</div> </div>
<div class="foot_right"> <div class="foot_right">
<img src="__PUBLIC__/appapi/pay/img/wx-icon.png" > <img src="__PUBLIC__/appapi/pay/img/wx-icon.png" >
<span>微信支付</span> <span @click="wx">微信支付</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -99,6 +99,35 @@ ...@@ -99,6 +99,35 @@
sel_money(index){ sel_money(index){
this.sel_num = index this.sel_num = index
}, },
wx() {
let _this = this;
$.ajax({
url:"/index.php?g=Appapi&m=rechange&a=wx",
dataType:"json",
data: {
},
type:"POST",
success:function(data){
console.log(data);
if(data.ret==200){
// let d = data.data;
// if (d.code > 0) {
// layer.msg(d.msg);
// } else {
// let info = d.info[0];
// sessionStorage.setItem("user_info",JSON.stringify(info));
// window.location.href = '/index.php?g=Appapi&m=Profit&a=index&uid='+info.id+'&token=' + info.token;
// }
}else{
layer.msg(data.msg);
}
},
error:function(e){
layer.msg(e.msg);
}
})
}
}, },
watch: { watch: {
//数据监测函数 //数据监测函数
......
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