member_address.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <?php
  2. $type = array
  3. (
  4. 1 => '普通地址',
  5. 2 => '默认地址',
  6. );
  7. $tag = array
  8. (
  9. 1 => '公司',
  10. 2 => '家',
  11. 3 => '学校',
  12. //4 => '其他',
  13. );
  14. return array
  15. (
  16. # 表名
  17. 'name' => 'member_address',
  18. # 显示给用户看的名称
  19. 'lang' => '用户地址库',
  20. 'menu' => false,
  21. # 数据结构
  22. 'struct' => array
  23. (
  24. 'id' => array
  25. (
  26. 'type' => 'int-11',
  27. 'name' => 'ID',
  28. 'default' => '',
  29. 'desc' => '',
  30. 'match' => 'is_numeric',
  31. 'search' => 'order',
  32. 'update' => 'hidden',
  33. //'list' => true,
  34. ),
  35. 'mid' => array
  36. (
  37. 'type' => 'int-11',
  38. 'name' => '代理商',
  39. 'default' => '-1',
  40. 'desc' => '代理商',
  41. 'match' => 'is_string',
  42. 'update' => 'text',
  43. 'searchs' => array
  44. (
  45. 'api' => 'agent/member-select',
  46. 'col' => 'name',
  47. 'result' => 'id',
  48. ),
  49. //'list' => 'Dever::load("agent/member-find#name", {mid})',
  50. ),
  51. 'type' => array
  52. (
  53. 'type' => 'tinyint-1',
  54. 'name' => '类型',
  55. 'default' => '2',
  56. 'desc' => '类型',
  57. 'match' => 'is_numeric',
  58. 'option' => $type,
  59. 'update' => 'select',
  60. //'list' => true,
  61. ),
  62. 'contact' => array
  63. (
  64. 'type' => 'varchar-100',
  65. 'name' => '联系人',
  66. 'default' => '',
  67. 'desc' => '联系人',
  68. 'match' => 'option',
  69. 'search' => 'fulltext',
  70. //'update' => 'text',
  71. //'list' => true,
  72. ),
  73. 'mobile' => array
  74. (
  75. 'type' => 'varchar-100',
  76. 'name' => '联系电话',
  77. 'default' => '',
  78. 'desc' => '联系电话',
  79. 'match' => 'option',
  80. 'search' => 'fulltext',
  81. //'update' => 'text',
  82. //'list' => true,
  83. ),
  84. 'country' => array
  85. (
  86. 'type' => 'varchar-100',
  87. 'name' => '国家',
  88. 'default' => '',
  89. 'desc' => '国家',
  90. 'match' => 'option',
  91. //'update' => 'text',
  92. ),
  93. 'province' => array
  94. (
  95. 'type' => 'int-11',
  96. 'name' => '省份',
  97. 'default' => '',
  98. 'desc' => '省份',
  99. 'match' => 'option',
  100. //'update' => 'text',
  101. ),
  102. 'city' => array
  103. (
  104. 'type' => 'int-11',
  105. 'name' => '城市',
  106. 'default' => '',
  107. 'desc' => '城市',
  108. 'match' => 'option',
  109. //'update' => 'text',
  110. ),
  111. 'county' => array
  112. (
  113. 'type' => 'int-11',
  114. 'name' => '县区',
  115. 'default' => '',
  116. 'desc' => '县区',
  117. 'match' => 'option',
  118. //'update' => 'text',
  119. ),
  120. 'area' => array
  121. (
  122. 'type' => 'varchar-800',
  123. 'name' => '地区',
  124. 'default' => '',
  125. 'desc' => '地区',
  126. 'match' => 'is_string',
  127. 'search' => 'linkage',
  128. 'update' => 'linkage',
  129. 'option' => Dever::url('api.get', 'area'),
  130. 'list' => 'Dever::load("area/api.string", "{area}")',
  131. ),
  132. 'address' => array
  133. (
  134. 'type' => 'varchar-1000',
  135. 'name' => '详细地址',
  136. 'default' => '',
  137. 'desc' => '详细地址',
  138. 'match' => 'option',
  139. //'update' => 'text',
  140. //'list' => true,
  141. ),
  142. 'house_number' => array
  143. (
  144. 'type' => 'varchar-500',
  145. 'name' => '门牌号',
  146. 'default' => '',
  147. 'desc' => '门牌号',
  148. 'match' => 'option',
  149. //'update' => 'text',
  150. //'list' => true,
  151. ),
  152. 'tag' => array
  153. (
  154. 'type' => 'tinyint-1',
  155. 'name' => '标签',
  156. 'default' => '1',
  157. 'desc' => '标签',
  158. 'match' => 'is_numeric',
  159. 'option' => $tag,
  160. 'update' => 'radio',
  161. //'list' => true,
  162. ),
  163. 'state' => array
  164. (
  165. 'type' => 'tinyint-1',
  166. 'name' => '状态',
  167. 'default' => '1',
  168. 'desc' => '请选择状态',
  169. 'match' => 'is_numeric',
  170. ),
  171. 'cdate' => array
  172. (
  173. 'type' => 'int-11',
  174. 'name' => '操作时间',
  175. 'match' => array('is_numeric', time()),
  176. 'desc' => '',
  177. # 只有insert时才生效
  178. //'insert' => true,
  179. 'search' => 'date',
  180. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  181. ),
  182. ),
  183. 'manage' => array
  184. (
  185. ),
  186. 'request' => array
  187. (
  188. 'getList' => array
  189. (
  190. # 匹配的正则或函数 选填项
  191. 'option' => array
  192. (
  193. 'mid' => 'yes',
  194. 'state' => 1,
  195. ),
  196. 'type' => 'all',
  197. 'order' => array('type' => 'desc','id' => 'desc'),
  198. 'page' => array(10, 'list'),
  199. 'col' => '*',
  200. ),
  201. 'updateType' => array
  202. (
  203. 'set' => array
  204. (
  205. 'type' => 'yes',
  206. ),
  207. 'where' => array
  208. (
  209. 'type' => 'yes',
  210. ),
  211. 'type' => 'update',
  212. ),
  213. ),
  214. );