member-post.html 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017
  1. {template 'common/header'}
  2. {if $do=='post'}
  3. <ol class="breadcrumb we7-breadcrumb">
  4. <a href="{php echo url('mc/member/display')}"><i class="wi wi-back-circle"></i> </a>
  5. <li>
  6. <a href="{php echo url('mc/member/display')}">会员管理</a>
  7. </li>
  8. <li>
  9. 编辑会员
  10. </li>
  11. </ol>
  12. <div class="user-head-info we7-padding-bottom">
  13. <img ng-src="./resource/images/nopic-107.png" class="img-circle user-avatar" src="./resource/images/nopic-107.png">
  14. <div class="info">
  15. <h3 class="tilte">姓名</h3>
  16. </div>
  17. </div>
  18. <div class="btn-group we7-btn-group">
  19. <a href="javascript:;" class="btn hidden">基本信息</a>
  20. <a href="javascript:;" class="btn active">积分、余额、消费</a>
  21. <a href="{php echo url('mc/member/credit_stat',array('uid' => $uid, 'type' => 1))}" title="日志" class="btn">日志</a>
  22. </div>
  23. <div class="btn-group we7-btn-group hidden">
  24. <a href="javascript:;" class="btn">基本信息</a>
  25. <a href="javascript:;" class="btn active">积分/余额</a>
  26. <a href="javbascript:;" class="btn">数据统计</a>
  27. </div>
  28. <div class="main">
  29. <form action="" class="we7-form form" method="post" enctype="multipart/form-data">
  30. {if !empty($profile)}
  31. <!--积分、余额-->
  32. <table class="table we7-table table-hover table-form hidden">
  33. <col width="140px">
  34. <col />
  35. <col width="100px">
  36. <tr>
  37. <th class="text-left" colspan="3">会员积分/余额操作</th>
  38. </tr>
  39. <tr>
  40. <td class="table-label">积分</td>
  41. <td>0.0</td>
  42. <td class="text-right">
  43. <div class="link-group"><a href="javascript:;">修改</a></div>
  44. </td>
  45. </tr>
  46. <tr>
  47. <td class="table-label">余额</td>
  48. <td>0.00</td>
  49. <td class="text-right">
  50. <div class="link-group"><a href="javascript:;">修改</a></div>
  51. </td>
  52. </tr>
  53. </table>
  54. <table class="table we7-table table-hover table-form hidden">
  55. <col width="140px">
  56. <col />
  57. <col width="100px">
  58. <col />
  59. <col />
  60. <col />
  61. <tr>
  62. <th colspan="6">
  63. <div class="btn-group we7-btn-group">
  64. <a href="javascript:;" class="btn">积分记录</a>
  65. <a href="javascript:;" class="btn active">余额记录</a>
  66. </div>
  67. </th>
  68. </tr>
  69. <tr>
  70. <th>账户类型</th>
  71. <th class="text-center">操作员</th>
  72. <th class="text-center">积分增减</th>
  73. <th class="text-center">模块</th>
  74. <th class="text-center">操作时间</th>
  75. <th class="text-center">备注</th>
  76. </tr>
  77. <tr>
  78. <td class="text-center">积分</td>
  79. <td class="text-center">admin</td>
  80. <td class="text-center">100</td>
  81. <td class="text-center">官方模块示例</td>
  82. <td class="text-center">2017-06-15 14:02</td>
  83. <td class="text-center">123456</td>
  84. </tr>
  85. </table>
  86. <!--end积分、余额-->
  87. <!--基本信息-->
  88. <table class="table we7-table table-hover table-form hidden">
  89. <col width="140px">
  90. <col width="500px">
  91. <tr>
  92. <th class="text-left" colspan="3">会员信息</th>
  93. </tr>
  94. <tr>
  95. <td class="table-label">会员名称</td>
  96. <td>admin</td>
  97. <td class="text-right">
  98. <div class="link-group"><a href="javascript:;">修改</a></div>
  99. </td>
  100. </tr>
  101. <tr>
  102. <td class="table-label">密码</td>
  103. <td>*****</td>
  104. <td class="text-right">
  105. <div class="link-group"><a href="javascript:;">修改</a></div>
  106. </td>
  107. </tr>
  108. </table>
  109. <table class="table we7-table table-hover table-form hidden">
  110. <col width="140px">
  111. <col />
  112. <col width="100px">
  113. <tr>
  114. <th class="text-left" colspan="3">基本信息</th>
  115. </tr>
  116. <tr>
  117. <td class="table-label">头像</td>
  118. <td><img src="" alt="" class="img-circle" style="width: 65px; height: 65px;"/></td>
  119. <td class="text-right">
  120. <div class="link-group"><a href="javascript:;">修改</a></div>
  121. </td>
  122. </tr>
  123. <tr>
  124. <td class="table-label">用户UID</td>
  125. <td colspan="2">{$uid}</td>
  126. </tr>
  127. <tr>
  128. <td class="table-label">所在会员组</td>
  129. <td>铜牌会员组</td>
  130. <td class="text-right">
  131. <div class="link-group"><a href="javascript:;">修改</a></div>
  132. </td>
  133. </tr>
  134. <tr>
  135. <td class="table-label">昵称</td>
  136. <td>hahaha</td>
  137. <td class="text-right">
  138. <div class="link-group"><a href="javascript:;">修改</a></div>
  139. </td>
  140. </tr>
  141. <tr>
  142. <td class="table-label">真实姓名</td>
  143. <td>韩梅梅</td>
  144. <td class="text-right">
  145. <div class="link-group"><a href="javascript:;">修改</a></div>
  146. </td>
  147. </tr>
  148. <tr>
  149. <td class="table-label">性别</td>
  150. <td>女</td>
  151. <td class="text-right">
  152. <div class="link-group"><a href="javascript:;">修改</a></div>
  153. </td>
  154. </tr>
  155. <tr>
  156. <td class="table-label">生日</td>
  157. <td>1990-01-01</td>
  158. <td class="text-right">
  159. <div class="link-group"><a href="javascript:;">修改</a></div>
  160. </td>
  161. </tr>
  162. <tr>
  163. <td class="table-label">户籍</td>
  164. <td>山西省太原市小店区</td>
  165. <td class="text-right">
  166. <div class="link-group"><a href="javascript:;">修改</a></div>
  167. </td>
  168. </tr>
  169. <tr>
  170. <td class="table-label">详细地址</td>
  171. <td>许坦东街锦东国际</td>
  172. <td class="text-right">
  173. <div class="link-group"><a href="javascript:;">修改</a></div>
  174. </td>
  175. </tr>
  176. <tr>
  177. <td class="table-label">手机</td>
  178. <td>18812345678</td>
  179. <td class="text-right">
  180. <div class="link-group"><a href="javascript:;">修改</a></div>
  181. </td>
  182. </tr>
  183. <tr>
  184. <td class="table-label">QQ</td>
  185. <td>123456</td>
  186. <td class="text-right">
  187. <div class="link-group"><a href="javascript:;">修改</a></div>
  188. </td>
  189. </tr>
  190. <tr>
  191. <td class="table-label">Email</td>
  192. <td>123@qq.com</td>
  193. <td class="text-right">
  194. <div class="link-group"><a href="javascript:;">修改</a></div>
  195. </td>
  196. </tr>
  197. </table>
  198. <table class="table we7-table table-hover table-form hidden">
  199. <col width="140px">
  200. <col />
  201. <col width="100px">
  202. <tr>
  203. <th class="text-left" colspan="3">联系方式</th>
  204. </tr>
  205. <tr>
  206. <td class="table-label">固定电话</td>
  207. <td>0351-12345678</td>
  208. <td class="text-right">
  209. <div class="link-group"><a href="javascript:;">修改</a></div>
  210. </td>
  211. </tr>
  212. <tr>
  213. <td class="table-label">MSN</td>
  214. <td>MSN</td>
  215. <td class="text-right">
  216. <div class="link-group"><a href="javascript:;">修改</a></div>
  217. </td>
  218. </tr>
  219. <tr>
  220. <td class="table-label">阿里旺旺</td>
  221. <td>aliwangwang</td>
  222. <td class="text-right">
  223. <div class="link-group"><a href="javascript:;">修改</a></div>
  224. </td>
  225. </tr>
  226. <tr>
  227. <td class="table-label">支付宝账号</td>
  228. <td>zhifubao@qq.com</td>
  229. <td class="text-right">
  230. <div class="link-group"><a href="javascript:;">修改</a></div>
  231. </td>
  232. </tr>
  233. </table>
  234. <table class="table we7-table table-hover table-form hidden">
  235. <col width="140px">
  236. <col width="100px">
  237. <tr>
  238. <th class="text-left">收货地址</th>
  239. <th class="text-right">
  240. <div class="link-group"><a href="javascript:;">添加收货地址</a></div>
  241. </th>
  242. </tr>
  243. <tr>
  244. <td class="table-label">
  245. 山西省-太原市-小店区-晋阳街长治路口 <span class="label label-success">默认收货地址</span>
  246. </td>
  247. <td class="text-right">
  248. <div class="link-group">
  249. <a href="javascript:;">编辑</a>
  250. <a href="javascript:;" class="del">删除</a>
  251. </div>
  252. </td>
  253. </tr>
  254. <tr>
  255. <td class="table-label">
  256. 山西省-太原市-小店区-晋阳街长治路口
  257. </td>
  258. <td class="text-right">
  259. <div class="link-group">
  260. <a href="javascript:;">设为默认</a>
  261. <a href="javascript:;">编辑</a>
  262. <a href="javascript:;" class="del">删除</a>
  263. </div>
  264. </td>
  265. </tr>
  266. </table>
  267. <table class="table we7-table table-hover table-form hidden">
  268. <col width="140px">
  269. <col />
  270. <col width="100px">
  271. <tr>
  272. <th class="text-left" colspan="3">教育情况</th>
  273. </tr>
  274. <tr>
  275. <td class="table-label">学号</td>
  276. <td></td>
  277. <td class="text-right">
  278. <div class="link-group"><a href="javascript:;">修改</a></div>
  279. </td>
  280. </tr>
  281. <tr>
  282. <td class="table-label">班级</td>
  283. <td></td>
  284. <td class="text-right">
  285. <div class="link-group"><a href="javascript:;">修改</a></div>
  286. </td>
  287. </tr>
  288. <tr>
  289. <td class="table-label">毕业学校</td>
  290. <td></td>
  291. <td class="text-right">
  292. <div class="link-group"><a href="javascript:;">修改</a></div>
  293. </td>
  294. </tr>
  295. <tr>
  296. <td class="table-label">学历</td>
  297. <td></td>
  298. <td class="text-right">
  299. <div class="link-group"><a href="javascript:;">修改</a></div>
  300. </td>
  301. </tr>
  302. </table>
  303. <table class="table we7-table table-hover table-form hidden">
  304. <col width="140px">
  305. <col />
  306. <col width="100px">
  307. <tr>
  308. <th class="text-left" colspan="3">工作情况</th>
  309. </tr>
  310. <tr>
  311. <td class="table-label">公司</td>
  312. <td></td>
  313. <td class="text-right">
  314. <div class="link-group"><a href="javascript:;">修改</a></div>
  315. </td>
  316. </tr>
  317. <tr>
  318. <td class="table-label">职业</td>
  319. <td></td>
  320. <td class="text-right">
  321. <div class="link-group"><a href="javascript:;">修改</a></div>
  322. </td>
  323. </tr>
  324. <tr>
  325. <td class="table-label">职位</td>
  326. <td></td>
  327. <td class="text-right">
  328. <div class="link-group"><a href="javascript:;">修改</a></div>
  329. </td>
  330. </tr>
  331. <tr>
  332. <td class="table-label">年收入</td>
  333. <td></td>
  334. <td class="text-right">
  335. <div class="link-group"><a href="javascript:;">修改</a></div>
  336. </td>
  337. </tr>
  338. </table>
  339. <table class="table we7-table table-hover table-form hidden">
  340. <col width="140px">
  341. <col />
  342. <col width="100px">
  343. <tr>
  344. <th class="text-left" colspan="3">个人情况</th>
  345. </tr>
  346. <tr>
  347. <td class="table-label">星座</td>
  348. <td></td>
  349. <td class="text-right">
  350. <div class="link-group"><a href="javascript:;">修改</a></div>
  351. </td>
  352. </tr>
  353. <tr>
  354. <td class="table-label">生肖</td>
  355. <td></td>
  356. <td class="text-right">
  357. <div class="link-group"><a href="javascript:;">修改</a></div>
  358. </td>
  359. </tr>
  360. <tr>
  361. <td class="table-label">国籍</td>
  362. <td></td>
  363. <td class="text-right">
  364. <div class="link-group"><a href="javascript:;">修改</a></div>
  365. </td>
  366. </tr>
  367. <tr>
  368. <td class="table-label">身高</td>
  369. <td></td>
  370. <td class="text-right">
  371. <div class="link-group"><a href="javascript:;">修改</a></div>
  372. </td>
  373. </tr>
  374. <tr>
  375. <td class="table-label">体重</td>
  376. <td></td>
  377. <td class="text-right">
  378. <div class="link-group"><a href="javascript:;">修改</a></div>
  379. </td>
  380. </tr>
  381. <tr>
  382. <td class="table-label">血型</td>
  383. <td></td>
  384. <td class="text-right">
  385. <div class="link-group"><a href="javascript:;">修改</a></div>
  386. </td>
  387. </tr>
  388. <tr>
  389. <td class="table-label">身份证号</td>
  390. <td></td>
  391. <td class="text-right">
  392. <div class="link-group"><a href="javascript:;">修改</a></div>
  393. </td>
  394. </tr>
  395. <tr>
  396. <td class="table-label">邮编</td>
  397. <td></td>
  398. <td class="text-right">
  399. <div class="link-group"><a href="javascript:;">修改</a></div>
  400. </td>
  401. </tr>
  402. <tr>
  403. <td class="table-label">个人主页</td>
  404. <td></td>
  405. <td class="text-right">
  406. <div class="link-group"><a href="javascript:;">修改</a></div>
  407. </td>
  408. </tr>
  409. <tr>
  410. <td class="table-label">情感状态</td>
  411. <td></td>
  412. <td class="text-right">
  413. <div class="link-group"><a href="javascript:;">修改</a></div>
  414. </td>
  415. </tr>
  416. <tr>
  417. <td class="table-label">交友目的</td>
  418. <td></td>
  419. <td class="text-right">
  420. <div class="link-group"><a href="javascript:;">修改</a></div>
  421. </td>
  422. </tr>
  423. <tr>
  424. <td class="table-label">自我介绍</td>
  425. <td></td>
  426. <td class="text-right">
  427. <div class="link-group"><a href="javascript:;">修改</a></div>
  428. </td>
  429. </tr>
  430. <tr>
  431. <td class="table-label">兴趣爱好</td>
  432. <td></td>
  433. <td class="text-right">
  434. <div class="link-group"><a href="javascript:;">修改</a></div>
  435. </td>
  436. </tr>
  437. </table>
  438. <table class="table we7-table table-hover table-form hidden">
  439. <col width="140px">
  440. <col />
  441. <col width="100px">
  442. <tr>
  443. <th class="text-left" colspan="3">其他信息</th>
  444. </tr>
  445. <tr>
  446. <td class="table-label">VIP级别</td>
  447. <td></td>
  448. <td class="text-right">
  449. <div class="link-group"><a href="javascript:;">修改</a></div>
  450. </td>
  451. </tr>
  452. <tr>
  453. <td class="table-label">出生生日</td>
  454. <td></td>
  455. <td class="text-right">
  456. <div class="link-group"><a href="javascript:;">修改</a></div>
  457. </td>
  458. </tr>
  459. <tr>
  460. <td class="table-label">居住地址</td>
  461. <td></td>
  462. <td class="text-right">
  463. <div class="link-group"><a href="javascript:;">修改</a></div>
  464. </td>
  465. </tr>
  466. <tr>
  467. <td class="table-label">工号</td>
  468. <td></td>
  469. <td class="text-right">
  470. <div class="link-group"><a href="javascript:;">修改</a></div>
  471. </td>
  472. </tr>
  473. </table>
  474. <!--end编辑会员-->
  475. <div class="panel we7-panel">
  476. <div class="panel-heading">修改密码</div>
  477. <div class="panel-body we7-padding">
  478. <div class="form-group">
  479. <label class="col-sm-2 control-label">新密码</label>
  480. <div class="col-sm-9 col-xs-12">
  481. <input type="password" class="form-control" name="newpwd" value="" />
  482. </div>
  483. </div>
  484. <div class="form-group">
  485. <label class="col-sm-2 control-label">重复新密码</label>
  486. <div class="col-sm-9 col-xs-12">
  487. <input type="password" class="form-control" name="rnewpwd" value="" />
  488. </div>
  489. </div>
  490. <div class="form-group">
  491. <label class="col-sm-2 control-label"></label>
  492. <div class="col-sm-9 col-xs-12">
  493. <a href="javascript:;" id="updatepwd" class="btn btn-primary">修改密码</a>
  494. <span class="label"></span>
  495. </div>
  496. </div>
  497. </div>
  498. </div>
  499. {/if}
  500. <div class="panel we7-panel">
  501. <input type="hidden" name="uid" value="{$uid}" />
  502. <input type="hidden" name="fanid" value="{$_GPC['fanid']}" />
  503. <input type="hidden" name="email_effective" value="{$profile['email_effective']}" />
  504. <div class="panel-heading">
  505. 基本资料
  506. </div>
  507. <div class="panel-body we7-padding">
  508. <div class="form-group">
  509. <label class="col-sm-2 control-label">头像</label>
  510. <div class="col-sm-9 col-xs-12">
  511. {php echo tpl_fans_form('avatar', $profile['avatar']);}
  512. </div>
  513. </div>
  514. <div class="form-group">
  515. <label class="col-sm-2 control-label">用户UID</label>
  516. <div class="col-sm-9 col-xs-12">
  517. <input type="text" class="form-control" name="" value="{$uid}" readonly="readonly">
  518. </div>
  519. </div>
  520. <div class="form-group">
  521. <label class="col-sm-2 control-label">所在会员组</label>
  522. <div class="col-sm-9 col-xs-12">
  523. <select name="groupid" class="form-control we7-select">
  524. {loop $groups $group}
  525. <option value="{$group['groupid']}" {if $profile['groupid'] == $group['groupid']}selected{/if}>{$group['title']}</option>
  526. {/loop}
  527. </select>
  528. </div>
  529. </div>
  530. <div class="form-group">
  531. <label class="col-sm-2 control-label">昵称</label>
  532. <div class="col-sm-9 col-xs-12">
  533. {php echo tpl_fans_form('nickname',$profile['nickname']);}
  534. </div>
  535. </div>
  536. <div class="form-group">
  537. <label class="col-sm-2 control-label">真实姓名</label>
  538. <div class="col-sm-9 col-xs-12">
  539. {php echo tpl_fans_form('realname',$profile['realname']);}
  540. </div>
  541. </div>
  542. <div class="form-group">
  543. <label class="col-sm-2 control-label">性别</label>
  544. <div class="col-sm-9 col-xs-12">
  545. {php echo tpl_fans_form('gender',$profile['gender']);}
  546. </div>
  547. </div>
  548. <div class="form-group">
  549. <label class="col-sm-2 control-label">生日</label>
  550. <div class="col-sm-9 col-xs-12">
  551. {php echo tpl_fans_form('birth',array('year' => $profile['birthyear'],'month' => $profile['birthmonth'],'day' => $profile['birthday']));}
  552. </div>
  553. </div>
  554. <div class="form-group">
  555. <label class="col-sm-2 control-label">户籍</label>
  556. <div class="col-sm-9 col-xs-12">
  557. {php echo tpl_fans_form('reside',array('province' => $profile['resideprovince'],'city' => $profile['residecity'],'district' => $profile['residedist']));}
  558. </div>
  559. </div>
  560. <div class="form-group">
  561. <label class="col-sm-2 control-label">详细地址</label>
  562. <div class="col-sm-9 col-xs-12">
  563. {php echo tpl_fans_form('address',$profile['address']);}
  564. </div>
  565. </div>
  566. <div class="form-group">
  567. <label class="col-sm-2 control-label">手机</label>
  568. <div class="col-sm-9 col-xs-12">
  569. {php echo tpl_fans_form('mobile',$profile['mobile']);}
  570. </div>
  571. </div>
  572. <div class="form-group">
  573. <label class="col-sm-2 control-label">QQ</label>
  574. <div class="col-sm-9 col-xs-12">
  575. {php echo tpl_fans_form('qq',$profile['qq']);}
  576. </div>
  577. </div>
  578. <div class="form-group">
  579. <label class="col-sm-2 control-label">Email</label>
  580. <div class="col-sm-9 col-xs-12">
  581. {php echo tpl_fans_form('email',$profile['email']);}
  582. </div>
  583. </div>
  584. </div>
  585. </div>
  586. <div class="panel we7-panel">
  587. <div class="panel-heading">联系方式</div>
  588. <div class="panel-body we7-padding">
  589. <div class="form-group">
  590. <label class="col-sm-2 control-label">固定电话</label>
  591. <div class="col-sm-9 col-xs-12">
  592. {php echo tpl_fans_form('telephone',$profile['telephone']);}
  593. </div>
  594. </div>
  595. <div class="form-group">
  596. <label class="col-sm-2 control-label">MSN</label>
  597. <div class="col-sm-9 col-xs-12">
  598. {php echo tpl_fans_form('msn',$profile['msn']);}
  599. </div>
  600. </div>
  601. <div class="form-group">
  602. <label class="col-sm-2 control-label">阿里旺旺</label>
  603. <div class="col-sm-9 col-xs-12">
  604. {php echo tpl_fans_form('taobao',$profile['taobao']);}
  605. </div>
  606. </div>
  607. <div class="form-group">
  608. <label class="col-sm-2 control-label">支付宝帐号</label>
  609. <div class="col-sm-9 col-xs-12">
  610. {php echo tpl_fans_form('alipay',$profile['alipay']);}
  611. </div>
  612. </div>
  613. </div>
  614. </div>
  615. <div class="panel we7-panel" id="tip">
  616. <div class="panel-heading">收货地址</div>
  617. <div class="panel-body we7-padding">
  618. <div id="address">
  619. {loop $addresss $address}
  620. <div class="form-group">
  621. <label class="col-sm-2 control-label"></label>
  622. <div class="col-sm-9 col-xs-12">
  623. <label data-id="{$address['id']}">{$address['province']}-{$address['city']}-{$address['district']}-{$address['address']}{if !empty($address['isdefault'])}<span id="default">【默认收货地址】</span>{/if}</label>
  624. <span class="help-block">
  625. <a href="javascript:" id="" class="isdefault" data-id="{$address['id']}">{if !$address['isdefault']}设为默认{/if}</a>
  626. <a href="javascript:" data-toggle="modal" data-target="#myModal" class="editaddr" data-id="{$address['id']}" data-username="{$address['username']}" data-mobile="{$address['mobile']}" data-zipcode="{$address['zipcode']}" data-province="{$address['province']}" data-city="{$address['city']}" data-district="{$address['district']}" data-address="{$address['address']}">编辑</a>
  627. <a href="javascript:" class="deleteaddr" data-id="{$address['id']}">删除</a>
  628. </span>
  629. </div>
  630. </div>
  631. {/loop}
  632. </div>
  633. <div class="form-group">
  634. <label class="col-sm-2 control-label"></label>
  635. <div class="col-sm-9 col-xs-12">
  636. <button type="button" id="add" class="btn btn-primary" data-toggle="modal" data-target="#myModal">
  637. 添加收货地址
  638. </button>
  639. </div>
  640. </div>
  641. </div>
  642. </div>
  643. <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  644. <div class="modal-dialog" role="document">
  645. <div class="modal-content">
  646. <div class="modal-header">
  647. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  648. <h4 class="modal-title" id="myModalLabel">添加收货地址</h4>
  649. </div>
  650. <div class="modal-body">
  651. <div class="addaddress">
  652. <div class="form-group">
  653. <label class="col-sm-2 control-label">姓名</label>
  654. <div class="col-sm-9 col-xs-12">
  655. <input class="form-control" name="name" value="{$_GPC['record']['username']}">
  656. </div>
  657. </div>
  658. <div class="form-group">
  659. <label class="col-sm-2 control-label">手机号</label>
  660. <div class="col-sm-9 col-xs-12">
  661. <input class="form-control" name="phone" value="{$_GPC['record']['mobile']}">
  662. </div>
  663. </div>
  664. <div class="form-group">
  665. <label class="col-sm-2 control-label">邮编</label>
  666. <div class="col-sm-9 col-xs-12">
  667. <input class="form-control" name="code" value="{$_GPC['record']['zipcode']}">
  668. </div>
  669. </div>
  670. <div class="form-group">
  671. <label class="col-sm-2 control-label">收货地址</label>
  672. <div class="col-sm-9 col-xs-12">
  673. {php echo tpl_form_field_district("addaddress", array('province' => $_GPC['record']['province'], 'city' => $_GPC['record']['city'], 'district' => $_GPC['record']['district']));}
  674. </div>
  675. </div>
  676. <div class="form-group">
  677. <label class="col-sm-2 control-label">详细地址</label>
  678. <div class="col-sm-9 col-xs-12">
  679. <input class="form-control" name="detail" value="{$_GPC['record']['address']}">
  680. </div>
  681. </div>
  682. <div class="form-group">
  683. <label class="col-sm-2 control-label"></label>
  684. <div class="col-sm-9 col-xs-12">
  685. <a href="javascript:" id="submitaddr" data-id="" data-op="" class="btn btn-default btn-primary">提交</a>
  686. </div>
  687. </div>
  688. </div>
  689. </div>
  690. </div>
  691. </div>
  692. </div>
  693. <script>
  694. $(function() {
  695. $('#add').click(function () {
  696. $('#myModalLabel').html('添加收货地址');
  697. $('[name="name"]').val('');
  698. $('[name="addaddress[province]"]').val('');
  699. $('[name="addaddress[city]"]').val('');
  700. $('[name="addaddress[district]"]').val('');
  701. $('[name="detail"]').val('');
  702. $('[name="code"]').val('');
  703. $('[name="phone"]').val('');
  704. $('#submitaddr').data('op', 'addaddress');
  705. });
  706. $('#address').on('click', ".editaddr", function() {
  707. $('#myModalLabel').html('修改收货地址');
  708. $('#submitaddr').data('op', 'editaddress');
  709. $('#edit').prop('id', '');
  710. $(this).prop('id', 'edit');
  711. $('[name="name"]').val($(this).data('username'));
  712. $('[name="addaddress[province]"]').val($(this).data('province'));
  713. $('[name="addaddress[province]"]').trigger('change');
  714. $('[name="addaddress[city]"]').val($(this).data('city'));
  715. $('[name="addaddress[city]"]').trigger('change');
  716. $('[name="addaddress[district]"]').val($(this).data('district'));
  717. $('[name="detail"]').val($(this).data('address'));
  718. $('[name="code"]').val($(this).data('zipcode'));
  719. $('[name="phone"]').val($(this).data('mobile'));
  720. $('#submitaddr').data('id', $(this).data('id'));
  721. });
  722. $('#address').on('click', ".isdefault",function () {
  723. var uid = {$_GPC['uid']};
  724. var id = $(this).data('id');
  725. var obj = $(this);
  726. $.post("{php echo url('mc/member/post' ,array('op' => 'isdefault'))}", {uid : uid, id: id}, function(data) {
  727. if (data.message.errno) {
  728. $('#default').parent().next().children(':first').html('设为默认');
  729. $('#default').remove();
  730. obj.parent().prev().html(obj.parent().prev().html()+'<span id="default">【默认收货地址】</span>');
  731. obj.html('');
  732. }
  733. },'json');
  734. });
  735. $('#address').on('click', '.deleteaddr', function () {
  736. if (!confirm('确认删除收货地址')) {
  737. return false;
  738. }
  739. var id = $(this).data('id');
  740. var obj = $(this);
  741. $.post("{php echo url('mc/member/post', array('op' => 'del'));}", {id : id}, function(data) {
  742. if (data.message.errno) {
  743. obj.parent().parent().remove();
  744. }
  745. }, 'json');
  746. });
  747. $('#submitaddr').click(function () {
  748. var name = $('[name="name"]').val();
  749. if (name == '') {
  750. util.message('请填写收货人姓名');
  751. return false;
  752. }
  753. var province = $('[name="addaddress[province]"]').val();
  754. var city = $('[name="addaddress[city]"]').val();
  755. var district = $('[name="addaddress[district]"]').val();
  756. var detail = $('[name="detail"]').val();
  757. var uid = {$_GPC['uid']};
  758. var code = $('[name="code"]').val();
  759. var phone = $('[name="phone"]').val();
  760. if (phone == '') {
  761. util.message('请填写收货人手机号');
  762. return false;
  763. }
  764. var reg = /^1\d{10}$/;
  765. if (!reg.test(phone)) {
  766. util.message('请填写正确的手机号码');
  767. return false;
  768. }
  769. if (city == '') {
  770. util.message('请填写收货地址');
  771. return false;
  772. }
  773. if (detail == '') {
  774. util.message('请填写详细收货地址');
  775. return false;
  776. }
  777. $('#myModal').modal('hide');
  778. var id = $(this).data('id');
  779. var op = $(this).data('op');
  780. $.post("./index.php?c=mc&a=member&do=post&op="+op, {province : province, city : city, district : district, detail : detail, uid : uid, name : name, code : code, phone : phone, id : id}, function(data) {
  781. var post = data.message.message;
  782. if (data.message.errno) {
  783. if (op == 'editaddress') {
  784. $('#edit').data({'username' : post.username, 'id' : post.id, 'mobile' : post.mobile, 'zipcode' : post.zipcode, 'province' : post.province, 'city' : post.city, 'district' : post.district, 'address' : post.address});
  785. var html = $('#edit').parent().prev().html();
  786. var edithtml = post.province + ' - ' + post.city + ' - ' + post.district + ' - '+ post.address;
  787. if (html.indexOf('默认收货地址') > -1) {
  788. edithtml += '<span id="default">【默认收货地址】</span>';
  789. }
  790. $('#edit').parent().prev().html(edithtml);
  791. util.message('修改成功');
  792. } else{
  793. var isdefault = '';
  794. if (post.isdefault == 1) {
  795. isdefault += '<span id="default">【默认收货地址】</span>';
  796. }
  797. $('#address').append(
  798. '<div class="form-group">' +
  799. ' <label class="col-sm-2 control-label"></label>' +
  800. ' <div class="col-sm-9 col-xs-12">'+
  801. '<label data-id='+post.id+'>'+post.province+'-'+post.city+'-'+post.district+'-'+post.address+isdefault+'</label>'+
  802. ' <span class="help-block">' +
  803. ' <a href="javascript:" class="isdefault" data-id="'+post.id+'">设为默认</a>'+
  804. ' <a href="javascript:" class="editaddr" data-toggle="modal" data-target="#myModal" data-id="'+post.id+'" data-username="'+post.username+'" data-mobile="'+post.mobile+'" data-zipcode="'+post.zipcode+'" data-province="'+post.province+'" data-city="'+post.city+'" data-district="'+post.district+'" data-address="'+post.address+'">编辑</a>'+
  805. ' <a href="javascript:" class="deleteaddr" data-id="'+post.id+'">删除</a>'+
  806. ' </span>'+
  807. ' </div>'+
  808. '</div>'
  809. );
  810. util.message('添加成功');
  811. }
  812. }
  813. }, 'json');
  814. });
  815. });
  816. </script>
  817. <div class="panel we7-panel">
  818. <div class="panel-heading">教育情况</div>
  819. <div class="panel-body we7-padding">
  820. <div class="form-group">
  821. <label class="col-sm-2 control-label">学号</label>
  822. <div class="col-sm-9 col-xs-12">
  823. {php echo tpl_fans_form('studentid',$profile['studentid']);}
  824. </div>
  825. </div>
  826. <div class="form-group">
  827. <label class="col-sm-2 control-label">班级</label>
  828. <div class="col-sm-9 col-xs-12">
  829. {php echo tpl_fans_form('grade',$profile['grade']);}
  830. </div>
  831. </div>
  832. <div class="form-group">
  833. <label class="col-sm-2 control-label">毕业学校</label>
  834. <div class="col-sm-9 col-xs-12">
  835. {php echo tpl_fans_form('graduateschool',$profile['graduateschool']);}
  836. </div>
  837. </div>
  838. <div class="form-group">
  839. <label class="col-sm-2 control-label">学历</label>
  840. <div class="col-sm-9 col-xs-12">
  841. {php echo tpl_fans_form('education',$profile['education']);}
  842. </div>
  843. </div>
  844. </div>
  845. </div>
  846. <div class="panel we7-panel">
  847. <div class="panel-heading">工作情况</div>
  848. <div class="panel-body we7-padding">
  849. <div class="form-group">
  850. <label class="col-sm-2 control-label">公司</label>
  851. <div class="col-sm-9 col-xs-12">
  852. {php echo tpl_fans_form('company',$profile['company']);}
  853. </div>
  854. </div>
  855. <div class="form-group">
  856. <label class="col-sm-2 control-label">职业</label>
  857. <div class="col-sm-9 col-xs-12">
  858. {php echo tpl_fans_form('occupation',$profile['occupation']);}
  859. </div>
  860. </div>
  861. <div class="form-group">
  862. <label class="col-sm-2 control-label">职位</label>
  863. <div class="col-sm-9 col-xs-12">
  864. {php echo tpl_fans_form('position',$profile['position']);}
  865. </div>
  866. </div>
  867. <div class="form-group">
  868. <label class="col-sm-2 control-label">年收入</label>
  869. <div class="col-sm-9 col-xs-12">
  870. {php echo tpl_fans_form('revenue',$profile['revenue']);}
  871. </div>
  872. </div>
  873. </div>
  874. </div>
  875. <div class="panel we7-panel">
  876. <div class="panel-heading">个人情况</div>
  877. <div class="panel-body we7-padding">
  878. <div class="form-group">
  879. <label class="col-sm-2 control-label">星座</label>
  880. <div class="col-sm-9 col-xs-12">
  881. {php echo tpl_fans_form('constellation',$profile['constellation']);}
  882. </div>
  883. </div>
  884. <div class="form-group">
  885. <label class="col-sm-2 control-label">生肖</label>
  886. <div class="col-sm-9 col-xs-12">
  887. {php echo tpl_fans_form('zodiac',$profile['zodiac']);}
  888. </div>
  889. </div>
  890. <div class="form-group">
  891. <label class="col-sm-2 control-label">国籍</label>
  892. <div class="col-sm-9 col-xs-12">
  893. {php echo tpl_fans_form('nationality',$profile['nationality']);}
  894. </div>
  895. </div>
  896. <div class="form-group">
  897. <label class="col-sm-2 control-label">身高</label>
  898. <div class="col-sm-9 col-xs-12">
  899. {php echo tpl_fans_form('height',$profile['height']);}
  900. </div>
  901. </div>
  902. <div class="form-group">
  903. <label class="col-sm-2 control-label">体重</label>
  904. <div class="col-sm-9 col-xs-12">
  905. {php echo tpl_fans_form('weight',$profile['weight']);}
  906. </div>
  907. </div>
  908. <div class="form-group">
  909. <label class="col-sm-2 control-label">血型</label>
  910. <div class="col-sm-9 col-xs-12">
  911. {php echo tpl_fans_form('bloodtype',$profile['bloodtype']);}
  912. </div>
  913. </div>
  914. <div class="form-group">
  915. <label class="col-sm-2 control-label">身份证号</label>
  916. <div class="col-sm-9 col-xs-12">
  917. {php echo tpl_fans_form('idcard',$profile['idcard']);}
  918. </div>
  919. </div>
  920. <div class="form-group">
  921. <label class="col-sm-2 control-label">邮编</label>
  922. <div class="col-sm-9 col-xs-12">
  923. {php echo tpl_fans_form('zipcode',$profile['zipcode']);}
  924. </div>
  925. </div>
  926. <div class="form-group">
  927. <label class="col-sm-2 control-label">个人主页</label>
  928. <div class="col-sm-9 col-xs-12">
  929. {php echo tpl_fans_form('site',$profile['site']);}
  930. </div>
  931. </div>
  932. <div class="form-group">
  933. <label class="col-sm-2 control-label">情感状态</label>
  934. <div class="col-sm-9 col-xs-12">
  935. {php echo tpl_fans_form('affectivestatus',$profile['affectivestatus']);}
  936. </div>
  937. </div>
  938. <div class="form-group">
  939. <label class="col-sm-2 control-label">交友目的</label>
  940. <div class="col-sm-9 col-xs-12">
  941. {php echo tpl_fans_form('lookingfor',$profile['lookingfor']);}
  942. </div>
  943. </div>
  944. <div class="form-group">
  945. <label class="col-sm-2 control-label">自我介绍</label>
  946. <div class="col-sm-9 col-xs-12">
  947. {php echo tpl_fans_form('bio',$profile['bio']);}
  948. </div>
  949. </div>
  950. <div class="form-group">
  951. <label class="col-sm-2 control-label">兴趣爱好</label>
  952. <div class="col-sm-9 col-xs-12">
  953. {php echo tpl_fans_form('interest',$profile['interest']);}
  954. </div>
  955. </div>
  956. </div>
  957. </div>
  958. <div class="panel we7-panel">
  959. <div class="panel-heading">其他信息</div>
  960. <div class="panel-body we7-padding">
  961. {loop $custom_fields $field}
  962. <div class="form-group">
  963. <label class="col-sm-2 control-label">{$all_fields[$field]}</label>
  964. <div class="col-sm-9 col-xs-12">
  965. <input name="{$field}" class="form-control" value="{$profile[$field]}">
  966. </div>
  967. </div>
  968. {/loop}
  969. </div>
  970. </div>
  971. <div class="form-group">
  972. <div class="col-sm-12">
  973. <button type="submit" class="btn btn-primary col-lg-1" name="submit" value="提交">提交</button>
  974. <input type="hidden" name="token" value="{$_W['token']}" />
  975. </div>
  976. </div>
  977. </form>
  978. </div>
  979. <script type="text/javascript">
  980. $('#updatepwd').click(function(){
  981. var newpwd = $("input[name='newpwd']").val();
  982. var rnewpwd = $("input[name='rnewpwd']").val();
  983. if (newpwd.length < 6) {
  984. util.message('密码不得少于6个字符');
  985. return false;
  986. }
  987. if (newpwd != rnewpwd) {
  988. util.message('两次输入的密码不一致');
  989. return false;
  990. }
  991. var uid = window.location.href.substr(window.location.href.lastIndexOf('=') + 1);
  992. $.post(location.href, {uid:uid, password:newpwd}, function(resp){
  993. if(resp == 'success') {
  994. $('#updatepwd').next().removeClass().addClass('label label-success').text('密码修改成功');
  995. $("input[name='newpwd']").val('');
  996. $("input[name='rnewpwd']").val('');
  997. setTimeout(function() {$('#updatepwd').next().empty();}, 2000);
  998. } else if (resp == 'error') {
  999. $('#updatepwd').next().removeClass().addClass('label label-danger').text('会员不存在或已删除');
  1000. } else {
  1001. $('#updatepwd').next().removeClass().addClass('label label-danger').text('网络错误,请稍后重试');
  1002. }
  1003. });
  1004. });
  1005. </script>
  1006. {/if}
  1007. {template 'common/footer'}