member_address.php 6.4 KB

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