华企号 企业信息化 珍有缘系统核心源码分享

珍有缘系统核心源码分享

珍有缘系统是本质是一个卷轴模式系统+电商系统+通证系统.
它的基本平台消费99元成为VIP,赠送一号任务包,每日一个广告任务,释放绿色积分,平台消费/变现/复投复利;零投:注册实名送100贡献值,贡献值每天参与空投股权通证,用股权通证兑换积分去交亿。积分6.5/个可交亿,每天涨;购物:帐户激活Vip,vip无*代浮池30;vip权益:送等值贡献值、送12积分任务包每天 产积分、购物产品包邮、交亿手续费降到38%;推广:直推10%…无*代3%贡献值;扫排线码注册兜底二星大区数据;四和一模式,股权通证通缩增值!以上是珍有缘模式的简短介绍,珍有缘系统源码开发交付,可以联系李铁牛程序员,15889726201。

珍有缘系统核心源码分享插图

以下是珍有缘系统的部分核心源码

class Memberinvoice extends BaseMember {

public function initialize() {
parent::initialize();
Lang::load(base_path() . ‘home/lang/’ . config(‘lang.default_lang’) . ‘/memberinvoice.lang.php’);
}

/*
* 收货地址列表
*/

public function index() {
$invoice_model = model(‘invoice’);
$invoice_list = $invoice_model->getInvoiceList(array(‘member_id’ => session(‘member_id’)));
View::assign(‘invoice_list’, $invoice_list);

/* 设置买家当前菜单 */
$this->setMemberCurMenu(‘member_invoice’);
/* 设置买家当前栏目 */
$this->setMemberCurItem(‘my_invoice’);
return View::fetch($this->template_dir . ‘index’);
}

private function get_data() {
$data = array();
$data[‘invoice_state’] = input(‘post.invoice_state’);
$data[‘invoice_title’] = input(‘post.invoice_title’);
$data[‘invoice_content’] = input(‘post.invoice_content’);
$data[‘invoice_code’] = input(‘post.invoice_code’);
$data[‘invoice_company’] = input(‘post.invoice_company’);
$data[‘invoice_company_code’] = input(‘post.invoice_company_code’);
$data[‘invoice_reg_addr’] = input(‘post.invoice_reg_addr’);
$data[‘invoice_reg_phone’] = input(‘post.invoice_reg_phone’);
$data[‘invoice_reg_bname’] = input(‘post.invoice_reg_bname’);
$data[‘invoice_reg_baccount’] = input(‘post.invoice_reg_baccount’);
// $data[‘invoice_rec_name’] = input(‘post.invoice_rec_name’);
// $data[‘invoice_rec_mobphone’] = input(‘post.invoice_rec_mobphone’);
// $data[‘invoice_rec_province’] = input(‘post.area_info’);
// $data[‘invoice_goto_addr’] = input(‘post.invoice_goto_addr’);
return $data;
}

public function add() {
if (!request()->isPost()) {

$invoice = $this->get_data();
$invoice[‘invoice_state’]=1;
View::assign(‘invoice’, $invoice);
/* 设置买家当前菜单 */
$this->setMemberCurMenu(‘member_invoice’);
/* 设置买家当前栏目 */
$this->setMemberCurItem(‘my_invoice_add’);
return View::fetch($this->template_dir . ‘form’);
} else {
$data = $this->get_data();
$data[‘member_id’] = session(‘member_id’);
$memberinvoice_validate = ds_validate(‘invoice’);
$scene=”;
if($data[‘invoice_state’]==1){
$scene = ‘invoice_1_update’;
}else{
$scene = ‘invoice_2_update’;
}
if (!$memberinvoice_validate->scene($scene)->check($data)) {
ds_json_encode(10001, $memberinvoice_validate->getError());
}

$invoice_model = model(‘invoice’);
$result = $invoice_model->addInvoice($data);
if ($result) {
ds_json_encode(10000, lang(‘ds_common_save_succ’));
} else {
ds_json_encode(10001, lang(‘ds_common_save_fail’));
}
}
}

public function edit() {

$invoice_id = intval(input(‘param.invoice_id’));
if (0 >= $invoice_id) {
ds_json_encode(10001, lang(‘param_error’));
}
$invoice_model = model(‘invoice’);
$invoice = $invoice_model->getInvoiceInfo(array(‘member_id’ => session(‘member_id’), ‘invoice_id’ => $invoice_id));
if (empty($invoice)) {
ds_json_encode(10001, lang(‘invoice_does_not_exist’));
}
if (!request()->isPost()) {

View::assign(‘invoice’, $invoice);
/* 设置买家当前菜单 */
$this->setMemberCurMenu(‘member_invoice’);
/* 设置买家当前栏目 */
$this->setMemberCurItem(‘my_invoice_edit’);
return View::fetch($this->template_dir . ‘form’);
} else {
$data = $this->get_data();
$memberinvoice_validate = ds_validate(‘invoice’);
$scene=”;
if($data[‘invoice_state’]==1){
$scene = ‘invoice_1_update’;
}else{
$scene = ‘invoice_2_update’;
}
if (!$memberinvoice_validate->scene($scene)->check($data)) {
ds_json_encode(10001, $memberinvoice_validate->getError());
}

$result = $invoice_model->editInvoice($data, array(‘member_id’ => session(‘member_id’), ‘invoice_id’ => $invoice_id));
if ($result) {
ds_json_encode(10000, lang(‘ds_common_save_succ’));
} else {
ds_json_encode(10001, lang(‘ds_common_save_fail’));
}
}
}

public function drop() {
$invoice_id = intval(input(‘param.invoice_id’));
if (0 >= $invoice_id) {
ds_json_encode(10001, lang(’empty_error’));
}
$invoice_model = model(‘invoice’);
$result = $invoice_model->delInvoice(array(‘invoice_id’ => $invoice_id,’member_id’=>session(‘member_id’)));
if ($result) {
ds_json_encode(10000, lang(‘ds_common_del_succ’));
} else {
ds_json_encode(10001, lang(‘ds_common_del_fail’));
}
}

/**
* 栏目菜单
*/
function getMemberItemList() {
$item_list = array(
array(
‘name’ => ‘my_invoice’,
‘text’ => lang(‘my_invoice’),
‘url’ => (string)url(‘Memberinvoice/index’),
),
array(
‘name’ => ‘my_invoice_add’,
‘text’ => lang(‘new_invoice’),
‘url’ => (string)url(‘Memberinvoice/add’),
),
);
if (request()->action() == ‘edit’) {
$item_list[] = array(
‘name’ => ‘my_invoice_edit’,
‘text’ => lang(‘edit_invoice’),
‘url’ => “javascript:void(0)”,
);
}

return $item_list;
}

}

 

作者: 李铁牛程序员

李铁牛,一直致力于企业客户软件定制开发,计算机专业毕业后,一直从事于互联网产品开发到现在。微信技术交流:tieniu6636
上一篇
下一篇

发表回复

联系我们

联系我们

028-84868647

在线咨询: QQ交谈

邮箱: tech@68v8.com

工作时间:周一至周五,9:00-17:30,节假日休息

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

关注微博
返回顶部