🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
获取成为分销商商品信息 ~~~ function get_goods(){ global $_W; $data = m('common')->getPluginset('commission'); $goods = false; if (!empty($data['become_goodsid'])) { foreach ($data['become_goodsid'] as $item_good_id){ $gooditem = pdo_fetch('select id,title,thumb from ' . tablename('ewei_shop_goods') . ' where id=:id and uniacid=:uniacid limit 1 ', array(':id' => $item_good_id, ':uniacid' => $_W['uniacid'])); if ($gooditem){ $goods[] = $gooditem; } } } return $goods; } ~~~ 写入日志 ~~~ load()->func('logging'); logging_run('时间戳:'.time()); ~~~ 跳转 ~~~ mobileUrl($do = '', $query = NULL, $full = false); webUrl($do = '', $query = array(), $full = true); <a href="{php echo webUrl('pc/product',array('tid'=>$row['tid']))}">{php echo put_type($row['tid'])}</a> <a href="/app{php echo mobileUrl('goods.detail',array('id'=>$row['goodsid']))}" target="_blank">{$row['goodsid_text']}</a> ~~~ 设备判断 ~~~ is_weixin() 是否微信 is_h5app() 是否h5应用 is_ios() 是否苹果手机或ipad is_mobile() 是否移动设备 ~~~ 商品搜索选择器,输出 goodsid_text标题和goodsid商品编号 <?php $goods = pdo_fetch('SELECT * FROM ' . tablename('ewei_shop_goods') . ' WHERE id='.$item['goodsid']); echo tpl_selector('goodsid', array( 'preview'=>true, 'readonly'=>true, 'multi'=>0, 'value'=>$item['goodsid_text'], 'url'=>webUrl('goods/query'), 'items'=>$goods, 'nokeywords'=>1, 'autosearch'=>1, 'buttontext'=>'选择产品', 'placeholder'=>'请选择产品') )?> </div>