作者 sgj
1 个管道 的构建 通过 耗费 1 秒

sdk 收货地址添加

@@ -100,12 +100,16 @@ class ShopController extends WeChatBaseController @@ -100,12 +100,16 @@ class ShopController extends WeChatBaseController
100 $api[]='openAddress'; 100 $api[]='openAddress';
101 $sdk=$js->config($api, true); 101 $sdk=$js->config($api, true);
102 102
103 -  
104 $good_id=input('id'); 103 $good_id=input('id');
105 $num=input('num'); 104 $num=input('num');
106 $good=$this->GoodsModel->getGoodInfo($good_id); 105 $good=$this->GoodsModel->getGoodInfo($good_id);
107 $good['num']=$num; 106 $good['num']=$num;
108 $total_fee=$good['fee']*$num; 107 $total_fee=$good['fee']*$num;
  108 + /*
  109 + * 获取上次的地址
  110 + *
  111 + */
  112 +
109 113
110 $this->assign('good',$good); 114 $this->assign('good',$good);
111 $this->assign('sdk',$sdk); 115 $this->assign('sdk',$sdk);
@@ -115,6 +115,11 @@ @@ -115,6 +115,11 @@
115 } 115 }
116 }) 116 })
117 }) 117 })
  118 + wx.openAddress({
  119 + success: function (res) {
  120 + alert(JSON.stringify(res));
  121 + }
  122 + });
118 $('.address_info').click(function () { 123 $('.address_info').click(function () {
119 wx.openAddress({ 124 wx.openAddress({
120 success: function (res) { 125 success: function (res) {