init commit

This commit is contained in:
2026-03-17 09:56:00 +08:00
commit e2c8ae752d
6827 changed files with 1211784 additions and 0 deletions

View File

@@ -0,0 +1,91 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\member;
use think\Model;
class AuthConfig extends Model
{
// 表名
protected $name = 'wdsxh_member_auth_config';
// 自动写入时间戳字段
protected $autoWriteTimestamp = false;
// 定义时间戳字段名
protected $createTime = false;
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
'address_book_is_openness_text',
'address_book_is_exclusive_text',
'member_details_text'
];
public function getAddressBookIsOpennessList()
{
return ['1' => __('Address_book_is_openness 1'), '2' => __('Address_book_is_openness 2')];
}
public function getAddressBookIsExclusiveList()
{
return ['1' => __('Address_book_is_exclusive 1'), '2' => __('Address_book_is_exclusive 2')];
}
public function getMemberDetailsList()
{
return ['1' => __('Member_details 1'), '2' => __('Member_details 2'), '3' => __('Member_details 3')];
}
public function getAddressBookSortOrderList()
{
return ['1' => __('Address_book_sort_order 1'), '2' => __('Address_book_sort_order 2'), '3' => __('Address_book_sort_order 3')];
}
public function getAddressBookIsOpennessTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['address_book_is_openness']) ? $data['address_book_is_openness'] : '');
$list = $this->getAddressBookIsOpennessList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getAddressBookIsExclusiveTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['address_book_is_exclusive']) ? $data['address_book_is_exclusive'] : '');
$list = $this->getAddressBookIsExclusiveList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getMemberDetailsTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['member_details']) ? $data['member_details'] : '');
$list = $this->getMemberDetailsList();
return isset($list[$value]) ? $list[$value] : '';
}
}

View File

@@ -0,0 +1,62 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\member;
use think\Model;
class Cert extends Model
{
// 表名
protected $name = 'wdsxh_member_cert';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = false;
// 追加属性
protected $append = [
'channel_text'
];
public function getChannelList()
{
return ['1' => __('Channel 1'), '2' => __('Channel 2')];
}
public function getChannelTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['channel']) ? $data['channel'] : '');
$list = $this->getChannelList();
return isset($list[$value]) ? $list[$value] : '';
}
public function member()
{
return $this->belongsTo('app\admin\model\wdsxh\member\Member','member_id','id')->setEagerlyType(0);
}
}

View File

@@ -0,0 +1,53 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\member;
use think\Model;
class Company extends Model
{
// 表名
protected $name = 'wdsxh_member';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
];
public function level()
{
return $this->belongsTo('Level', 'member_level_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@@ -0,0 +1,72 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\member;
use think\Model;
class FeesConfig extends Model
{
// 表名
protected $name = 'wdsxh_member_fees_config';
// 自动写入时间戳字段
protected $autoWriteTimestamp = false;
// 定义时间戳字段名
protected $createTime = false;
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
'expire_time_type_text',
'pay_method_text'
];
public function getExpireTimeTypeList()
{
return ['1' => __('Expire_time_type 1'), '2' => __('Expire_time_type 2')];
}
public function getPayMethodList()
{
return ['1' => __('Pay_method 1'), '2' => __('Pay_method 2'), '3' => __('Pay_method 3'), '4' => __('Pay_method 4')];
}
public function getExpireTimeTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['expire_time_type']) ? $data['expire_time_type'] : '');
$list = $this->getExpireTimeTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getPayMethodTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['pay_method']) ? $data['pay_method'] : '');
$list = $this->getPayMethodList();
return isset($list[$value]) ? $list[$value] : '';
}
}

View File

@@ -0,0 +1,66 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\member;
use think\Model;
class IndustryCategory extends Model
{
// 表名
protected $name = 'wdsxh_member_industry_category';
// 自动写入时间戳字段
protected $autoWriteTimestamp = false;
// 定义时间戳字段名
protected $createTime = false;
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
'status_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
});
}
public function getStatusList()
{
return ['0' => __('Status 0'), '1' => __('Status 1')];
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
}

View File

@@ -0,0 +1,121 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\member;
use think\Model;
class JoinConfig extends Model
{
// 表名
protected $name = 'wdsxh_member_join_config';
// 自动写入时间戳字段
protected $autoWriteTimestamp = false;
// 定义时间戳字段名
protected $createTime = false;
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
'type_text',
'status_text'
];
public function getTypeList()
{
return ['1' => __('Type 1'), '2' => __('Type 2'), '3' => __('Type 3')];
}
public function getStatusList()
{
return ['normal' => __('Status normal'), 'hidden' => __('Status hidden')];
}
public function getTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['type']) ? $data['type'] : '');
$list = $this->getTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public static function person_fieldset()
{
$config_file = ADDON_PATH . "wdsxh" . DS . 'config' . DS ."person.php";
if (is_file($config_file)) {
$person_fieldset = include $config_file;
}
if (empty($person_fieldset)) {
$person_fieldset = Member::person_data();
}
return $person_fieldset;
}
public static function company_fieldset()
{
$config_file = ADDON_PATH . "wdsxh" . DS . 'config' . DS ."company.php";
if (is_file($config_file)) {
$company_file_data = include $config_file;
$person_fieldset = $company_file_data['person'];
$company_fieldset = $company_file_data['company'];
}
if (empty($company_fieldset)) {
$person_fieldset = Member::company_person_data();
$company_fieldset = Member::company_data();
}
$data = array(
$person_fieldset,
$company_fieldset,
);
return $data;
}
public static function organize_fieldset()
{
$config_file = ADDON_PATH . "wdsxh" . DS . 'config' . DS ."organize.php";
if (is_file($config_file)) {
$organize_file_data = include $config_file;
$person_fieldset = $organize_file_data['person'];
$organize_fieldset = $organize_file_data['organize'];
}
if (empty($organize_fieldset)) {
$person_fieldset = Member::organize_person_data();
$organize_fieldset = Member::organize_data();
}
$data = array(
$person_fieldset,
$organize_fieldset,
);
return $data;
}
}

View File

@@ -0,0 +1,66 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\member;
use think\Model;
class Level extends Model
{
// 表名
protected $name = 'wdsxh_member_level';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = false;
// 追加属性
protected $append = [
'status_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
});
}
public function getStatusList()
{
return ['normal' => __('Status normal'), 'hidden' => __('Status hidden')];
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
}

View File

@@ -0,0 +1,609 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\member;
use think\Model;
class Member extends Model
{
// 表名
protected $name = 'wdsxh_member';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
'type_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
$pk = $row->getPk();
if (isset($row['native_place']) && !empty($row['native_place'])) {
$native_place = $row['native_place'];
$nativePlaceArray = explode('/',$native_place);
if (count($nativePlaceArray) == 3) {
$area_letter = \app\common\model\wdsxh\member\Member::getFirstCharter($nativePlaceArray[2]);
$row->getQuery()->where($pk, $row[$pk])->update(['area_letter' => $area_letter]);
}
}
if (isset($row['channel']) && $row['channel'] == 3) {
$pay_time = time();
$payData = array(
'member_id'=>$row[$pk],
'wechat_id'=>isset($row['wechat_id']) && !empty($row['wechat_id']) ? $row['wechat_id'] : '',
'order_no'=>wdsxh_create_order(),
'fees'=>(new Level())->where('id',$row['member_level_id'])->value('fees'),
'paid'=>'2',
'pay_time'=>$pay_time,
'level_id'=>$row['member_level_id'],
'channel'=>'3',
'pay_method'=>'4',
'delivery_state'=>'2'
);
(new Pay())->allowField(true)->save($payData);
}
});
self::afterUpdate(function ($row) {
$native_place = $row['native_place'];
$nativePlaceArray = explode('/',$native_place);
if (count($nativePlaceArray) == 3) {
$area_letter = \app\common\model\wdsxh\member\Member::getFirstCharter($nativePlaceArray[2]);
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['area_letter' => $area_letter]);
}
});
}
public function getStatusList()
{
return ['normal' => __('Status normal'), 'hidden' => __('Status hidden')];
}
public function getTypeList()
{
return ['1' => __('Type 1'), '2' => __('Type 2'), '3' => __('Type 3')];
}
public function getTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['type']) ? $data['type'] : '');
$list = $this->getTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function wechat()
{
return $this->belongsTo('app\admin\model\wdsxh\user\Wechat', 'wechat_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function level()
{
return $this->belongsTo('Level', 'member_level_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function industry()
{
return $this->belongsTo('\app\admin\model\wdsxh\member\IndustryCategory', 'industry_category_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
//$person_original_custom_content 个人原始字段(new \app\admin\model\wdsxh\member\JoinConfig)->person_data();
//$company_original_custom_content 企业原始字段(new \app\admin\model\wdsxh\member\JoinConfig)->company_data();
//$organize_original_custom_content 组织原始字段(new \app\admin\model\wdsxh\member\JoinConfig)->organize_data();
public static function get_member_edit_params($type = '',$person_original_custom_content = '',$params = array(),$company_original_custom_content = '',$organize_original_custom_content = '')
{
$joinConfigController = new \app\admin\controller\wdsxh\member\JoinConfig();
switch ($type) {
case 1:
$custom_content = self::get_member_edit_custom_content($person_original_custom_content,$params);
$fieldset = array_column(self::person_data(), 'field');
foreach ($custom_content as $v) {
if (in_array($v['field'],$fieldset)) {
if ($v['field'] == 'address') {
$params['address'] = $v['value']['address'];
$params['latitude'] = $v['value']['latitude'];
$params['longitude'] = $v['value']['longitude'];
} else {
$params[$v['field']] = $v['value'];
}
}
}
$params['custom_content'] = json_encode($custom_content);
break;
case 2:
$person_custom_content = self::get_member_edit_custom_content($person_original_custom_content,$params);
$fieldset = array_column(self::company_person_data(), 'field');
foreach ($person_custom_content as $v) {
if (in_array($v['field'],$fieldset)) {
if ($v['field'] == 'address') {
$params['address'] = $v['value']['address'];
$params['latitude'] = $v['value']['latitude'];
$params['longitude'] = $v['value']['longitude'];
} else {
$params[$v['field']] = $v['value'];
}
}
}
$company_custom_content = self::get_member_edit_custom_content($company_original_custom_content,$params);
$fieldset = array_column(self::company_data(), 'field');
foreach ($company_custom_content as $v) {
if (in_array($v['field'],$fieldset)) {
$params[$v['field']] = $v['value'];
}
}
$custom_content = array(
'person'=>$person_custom_content,
'company'=>$company_custom_content,
);
$params['custom_content'] = json_encode($custom_content);
break;
case 3:
$person_custom_content = self::get_member_edit_custom_content($person_original_custom_content,$params);
$fieldset = array_column(self::organize_person_data(), 'field');
foreach ($person_custom_content as $v) {
if (in_array($v['field'],$fieldset)) {
if ($v['field'] == 'address') {
$params['address'] = $v['value']['address'];
$params['latitude'] = $v['value']['latitude'];
$params['longitude'] = $v['value']['longitude'];
} else {
$params[$v['field']] = $v['value'];
}
}
}
$organize_custom_content = self::get_member_edit_custom_content($organize_original_custom_content,$params);
$fieldset = array_column(self::organize_data(), 'field');
foreach ($organize_custom_content as $v) {
if (in_array($v['field'],$fieldset)) {
$params[$v['field']] = $v['value'];
}
}
$custom_content = array(
'person'=>$person_custom_content,
'organize'=>$organize_custom_content,
);
$params['custom_content'] = json_encode($custom_content);
break;
}
$params['member_level_name'] = (new Level())->where('id',$params['member_level_id'])->value('name');
if (!empty($params['industry_category_id'])) {
$params['industry_category_name'] = (new IndustryCategory())->where('id',$params['industry_category_id'])->value('name');
} else {
$params['industry_category_name'] = '';
}
return $params;
}
public static function get_member_edit_custom_content($original_custom_content,$params) {
$custom_content = json_decode($original_custom_content,true);
foreach ($custom_content as $k=>$v) {
if ($v['field'] == 'address') {
if (isset($params['custom_content']['address']['address']) && !empty($params['custom_content']['address']['address'])) {
$custom_content[$k]['value']['address'] = $params['custom_content']['address']['address'];
$custom_content[$k]['value']['latitude'] = $params['custom_content']['address']['latitude'];
$custom_content[$k]['value']['longitude'] = $params['custom_content']['address']['longitude'];
} else {
$custom_content[$k]['value']['address'] = '';
$custom_content[$k]['value']['latitude'] = '';
$custom_content[$k]['value']['longitude'] = '';
}
} elseif ($v['type'] == 'checkbox') {
$custom_content[$k]['value'] = implode(',',$params['custom_content'][$v['field']]);
} elseif ($v['type'] == 'cert') {
$custom_content[$k]['value'] = array(
'name'=>$params['custom_content'][$v['field']]['name'],
'number'=>$params['custom_content'][$v['field']]['number'],
'image'=>$params['custom_content'][$v['field']]['image'],
);
} else {//解决radio没有选中问题
$custom_content[$k]['value'] = isset($params['custom_content'][$v['field']]) ? $params['custom_content'][$v['field']] : '';
}
if ($v['field'] == 'avatar' && empty($custom_content[$k]['value'])) {
$custom_content[$k]['value'] = '/assets/addons/wdsxh/img/avatar.png';
}
if ($v['field'] == 'company_logo' && empty($custom_content[$k]['value'])) {
$custom_content[$k]['value'] = '/assets/addons/wdsxh/img/company_logo.png';
}
if ($v['field'] == 'organize_logo' && empty($custom_content[$k]['value'])) {
$custom_content[$k]['value'] = '/assets/addons/wdsxh/img/organize_logo.png';
}
}
return $custom_content;
}
public static function organize_data()
{
$data = array(
0 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'text',
'label' => '团体名称',
'field' => 'organize_name',
'option' => '请输入团体名称',
),
1 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'image',
'label' => '团体Logo',
'field' => 'organize_logo',
'option' => '请上传团体Logo',
),
2 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'textarea',
'label' => '团体简介',
'field' => 'organize_introduction',
'option' => '请输入团体简介',
),
);
return $data;
}
public static function company_person_data()
{
$data = array(
0 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'text',
'label' => '姓名',
'field' => 'name',
'option' => '请输入你的姓名',
),
1 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'image',
'label' => '头像',
'field' => 'avatar',
'option' => '请上传头像',
),
2 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'number',
'label' => '手机号',
'field' => 'mobile',
'option' => '请输入你的手机号',
),
3 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'select',
'label' => '级别',
'field' => 'member_level_id',
'option' => '请选择会员级别',
),
4 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'select',
'label' => '籍贯',
'field' => 'native_place',
'option' => '请选择籍贯',
),
5 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'textarea',
'label' => '介绍',
'field' => 'introduce_content',
'option' => '请输入介绍',
),
6 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'text',
'label' => '所在地址',
'field' => 'address',
'option' => '请选择所在地址',
),
7 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'select',
'label' => '行业分类',
'field' => 'industry_category_id',
'option' => '请选择行业分类',
),
8 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'text',
'label' => '公司职务',
'field' => 'company_position',
'option' => '请输入公司职务',
),
);
return $data;
}
public static function organize_person_data()
{
$data = array(
0 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'text',
'label' => '姓名',
'field' => 'name',
'option' => '请输入你的姓名',
),
1 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'image',
'label' => '头像',
'field' => 'avatar',
'option' => '请上传头像',
),
2 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'number',
'label' => '手机号',
'field' => 'mobile',
'option' => '请输入你的手机号',
),
3 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'select',
'label' => '级别',
'field' => 'member_level_id',
'option' => '请选择会员级别',
),
4 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'select',
'label' => '籍贯',
'field' => 'native_place',
'option' => '请选择籍贯',
),
5 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'textarea',
'label' => '介绍',
'field' => 'introduce_content',
'option' => '请输入介绍',
),
6 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'text',
'label' => '所在地址',
'field' => 'address',
'option' => '请选择所在地址',
),
7 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'select',
'label' => '行业分类',
'field' => 'industry_category_id',
'option' => '请选择行业分类',
),
8 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'text',
'label' => '团体职务',
'field' => 'organize_position',
'option' => '请输入团体职务',
),
);
return $data;
}
public static function person_data()
{
$data = array(
0 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'text',
'label' => '姓名',
'field' => 'name',
'option' => '请输入你的姓名',
),
1 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'image',
'label' => '头像',
'field' => 'avatar',
'option' => '请上传头像',
),
2 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'number',
'label' => '手机号',
'field' => 'mobile',
'option' => '请输入你的手机号',
),
3 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'select',
'label' => '级别',
'field' => 'member_level_id',
'option' => '请选择会员级别',
),
4 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'select',
'label' => '籍贯',
'field' => 'native_place',
'option' => '请选择籍贯',
),
5 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'textarea',
'label' => '介绍',
'field' => 'introduce_content',
'option' => '请输入介绍',
),
6 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'text',
'label' => '所在地址',
'field' => 'address',
'option' => '请选择所在地址',
),
7 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'select',
'label' => '行业分类',
'field' => 'industry_category_id',
'option' => '请选择行业分类',
),
);
return $data;
}
public static function company_data()
{
$data = array(
0 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'text',
'label' => '公司名称',
'field' => 'company_name',
'option' => '请输入公司名称',
),
1 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'image',
'label' => '公司Logo',
'field' => 'company_logo',
'option' => '请上传公司Logo',
),
2 =>
array(
'show' => '1',
'apply_show' => '1',
'required' => '1',
'type' => 'textarea',
'label' => '公司简介',
'field' => 'company_introduction',
'option' => '请输入公司简介',
),
);
return $data;
}
}

View File

@@ -0,0 +1,86 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\member;
use think\Model;
class MemberApply extends Model
{
// 表名
protected $name = 'wdsxh_member_apply';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
'type_text',
'state_text'
];
public function getTypeList()
{
return ['1' => __('Type 1'), '2' => __('Type 2'), '3' => __('Type 3')];
}
public function getStateList()
{
return ['1' => __('State 1'), '2' => __('State 2'), '3' => __('State 3'), '4' => __('State 4')];
}
public function getStateExamineList()
{
return ['1' => __('State 1'), '2' => __('State 2'), '3' => __('State 3')];
}
public function getTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['type']) ? $data['type'] : '');
$list = $this->getTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getStateTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['state']) ? $data['state'] : '');
$list = $this->getStateList();
return isset($list[$value]) ? $list[$value] : '';
}
public function level()
{
return $this->belongsTo('app\admin\model\wdsxh\member\Level', 'member_level_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function getPayVoucherAttr($value)
{
return wdsxh_full_url($value);
}
}

View File

@@ -0,0 +1,53 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\member;
use think\Model;
class Organize extends Model
{
// 表名
protected $name = 'wdsxh_member';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
];
public function level()
{
return $this->belongsTo('Level', 'member_level_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@@ -0,0 +1,83 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\member;
use think\Model;
class Pay extends Model
{
// 表名
protected $name = 'wdsxh_member_pay';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
'paid_text',
'pay_time_text'
];
public function getPaidList()
{
return ['1' => __('Paid 1'), '2' => __('Paid 2')];
}
public function getPaidTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['paid']) ? $data['paid'] : '');
$list = $this->getPaidList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getPayTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['pay_time']) ? $data['pay_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
protected function setPayTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
public function level()
{
return $this->belongsTo('Level', 'level_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function wechat()
{
return $this->belongsTo('app\admin\model\wdsxh\user\UserWechat', 'wechat_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function member()
{
return $this->belongsTo('app\admin\model\wdsxh\member\Member', 'member_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@@ -0,0 +1,50 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\member;
use think\Model;
class Person extends Model
{
// 表名
protected $name = 'wdsxh_member';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = false;
protected $deleteTime = false;
}

View File

@@ -0,0 +1,44 @@
<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者,助力商协会发展
// +----------------------------------------------------------------------
// | Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
// +----------------------------------------------------------------------
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
// +----------------------------------------------------------------------
namespace app\admin\model\wdsxh\member;
use think\Model;
class Promotion extends Model
{
// 表名
protected $name = 'wdsxh_member_promotion';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
];
public function member()
{
return $this->belongsTo('app\admin\model\wdsxh\Member', 'member_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}