聯(lián)系官方銷售客服
1835022288
028-61286886
下載文件時積分不足會跳轉(zhuǎn)到新頁面提示,請問怎么實(shí)現(xiàn)彈窗提示啦 下面積分提示頁php文件里的代碼
if (!$data['is_buy']
&& $this->input->get('action') == 'confirm') {
// 會員未登錄
!$this->member && $this->msg(fc_lang('會話超時,請重新登錄'));
// 積分檢查
-$data['score'] + $this->member['score'] < 0 && $this->msg(fc_lang(SITE_SCORE.'不足!本次需要%s'.SITE_SCORE.',當(dāng)前余額%s'.SITE_SCORE, $data['score'], $this->member['score']));
// 扣減積分
$this->member_model->update_score(1, $this->uid, -$data['score'], '', '購買《'.($data['name'] ? $data['name'] : $data['title']).'》');
// 記錄購買歷史
$insert = array(
'uid' => $this->uid,
'url' => $data['url'],
'score' => $data['score'],
'thumb' => $data['preview'] ? $data['preview'] : ($data['thumb'] ? $data['thumb'] : ''),
'inputtime' => SYS_TIME
);
if ($id) {
$insert['cid'] = $id;
$insert['title'] = $data['title'];
} else {
$insert['eid'] = $eid;
$insert['cid'] = $data['cid'];
$insert['title'] = ($data['ctitle'] ? $data['ctitle'].' - ' : '').$data['name'];
}
$this->db->insert($table, $insert);
$this->msg(fc_lang('購買成功'), $data['url'], 1);
} else {
$this->template->assign($data);
ob_start();
$this->template->display($tpl);
$html = ob_get_contents();
ob_clean();
echo $this->input->get('callback', TRUE).'('.json_encode(array('html' => $html)).')';exit;
}
}
請問怎么將這個弄成彈窗頁提示
應(yīng)該在模板html里面做彈窗吧,你這個是php里面沒辦法彈窗
下載的提示地址是 <a href="javascript:;" onclick="dr_confirm_url('此操作需要{SITE_SCORE}{$score},您確定購買嗎?', '/index.php?s={MOD_DIR}&c=api&m=buy&action=confirm&id={$id}')
虛擬幣不足的提示鏈接就是通過這個頁面提示的/index.php?s={MOD_DIR}&c=api&m=buy&action=confirm&id={$id}
【徐樹】1樓
沒什么難度