UserShare.blade.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501
  1. {include file="Application/Home/View/Public/header.blade.php"}
  2. {include file="Application/Home/View/Public/userLeft.blade.php"}
  3. <link rel="stylesheet" href="/Public/Home/css/center.css"/>
  4. {literal}
  5. <style type="text/css">
  6. .content_h{
  7. margin-left: 0px;
  8. width: 100%;
  9. }
  10. .memberTitle{
  11. padding-bottom: 0px;
  12. line-height: 50px;
  13. background-color: #f4f4f4;
  14. }
  15. .share_title{
  16. width: 200px;
  17. height: 30px;
  18. margin: 30px auto;
  19. }
  20. .share_word{
  21. width: 100px;
  22. height: 30px;
  23. line-height: 30px;
  24. font-size: 14px;
  25. text-align: center;
  26. float: left;
  27. border:1px solid #dedede;
  28. margin-left: -1px;
  29. cursor: pointer;
  30. }
  31. .sharediv{
  32. float: left;
  33. width: 100%;
  34. }
  35. .exclu_url{
  36. float: left;
  37. width: 100%;
  38. }
  39. .sharebr{
  40. border-radius:5px 0px 0px 5px;
  41. }
  42. .sharebrtwo{
  43. border-radius:0px 5px 5px 0px;
  44. }
  45. .celar{
  46. clear: both;
  47. }
  48. .act{
  49. background-color: #ff0000;
  50. color: #fff;
  51. }
  52. .sharecontent{
  53. width: 700px;
  54. margin: 60px auto;
  55. }
  56. .share_left{
  57. width: 160px;
  58. float: left;
  59. }
  60. .share_right{
  61. width: 500px;
  62. float: right;
  63. }
  64. .share_left_img{
  65. width: 160px;
  66. height: 160px;
  67. padding:20px;
  68. box-shadow: 0 0 50px #edb7b7;
  69. }
  70. .share_left_img img{
  71. width: 100%;
  72. height: 100%;
  73. }
  74. .share_left_word{
  75. margin-top: 15px;
  76. }
  77. .share_left_word{
  78. width: 100%;
  79. }
  80. .share_left_word label{
  81. float: left;
  82. line-height: 30px;
  83. margin-top: 5px;
  84. }
  85. .share_left_word a{
  86. float: left;
  87. width: 30px;
  88. height: 30px;
  89. margin-left: 5px;
  90. }
  91. .share_left_word a img{
  92. width: 30px;
  93. height: 30px;
  94. }
  95. .share_right_input{
  96. width: 100%;
  97. height: 35px;
  98. line-height: 35px;
  99. }
  100. .share_right_input select{
  101. width: 360px;
  102. float: left;
  103. height: 35px;
  104. border:none;
  105. background-color: #e7e7e7;
  106. color:#666;
  107. border-radius: 5px;
  108. line-height: 35px;
  109. padding: 0 10px;
  110. }
  111. .share_right_button{
  112. width: 100px;
  113. height: 35px;
  114. color: #fff;
  115. text-align: center;
  116. line-height: 35px;
  117. background-color: #d91d36;
  118. border-radius: 5px;
  119. float: right;
  120. cursor: pointer;
  121. }
  122. .exclu_url_button{
  123. width: 100px;
  124. height: 35px;
  125. color: #fff;
  126. text-align: center;
  127. line-height: 35px;
  128. background-color: #d91d36;
  129. border-radius: 5px;
  130. float: right;
  131. cursor: pointer;
  132. }
  133. .share_right_word{
  134. width: 100%;
  135. margin-top: 30px;
  136. font-size: 14px;
  137. color:#666;
  138. margin-bottom: 20px;
  139. }
  140. .share_right_word b{
  141. color:#ff0000;
  142. }
  143. .share_right_wordtwo{
  144. width: 100%;
  145. margin-top: 10px;
  146. font-size: 14px;
  147. color:#666;
  148. }
  149. .sharefromdiv{
  150. width: 480px;
  151. margin:30px auto;
  152. }
  153. .sharefrom{
  154. width: 100%;
  155. margin-top: 10px;
  156. }
  157. .sharefrom label{
  158. font-size: 14px;
  159. color:#666;
  160. font-weight: initial;
  161. width: 80px;
  162. margin-right: 20px;
  163. text-align: right;
  164. float: left;
  165. line-height: 30px;
  166. }
  167. .sharefrom input{
  168. width: 260px;
  169. height: 30px;
  170. line-height: 30px;
  171. border:none;
  172. border-radius: 5px;
  173. border:1px solid #ccc;
  174. padding: 0px 10px;
  175. }
  176. .exclu_input{
  177. width: 360px;
  178. float: left;
  179. height: 35px;
  180. border: none;
  181. background-color: #e7e7e7;
  182. color: #666;
  183. border-radius: 5px;
  184. line-height: 35px;
  185. padding: 0 10px;
  186. }
  187. #codes{
  188. float: left;
  189. }
  190. .exclu_share_right{
  191. margin-top: 50px;
  192. }
  193. .titles{
  194. height: 50px;
  195. line-height: 50px;
  196. width: 100%;
  197. text-align: center;
  198. font-weight: bold;
  199. }
  200. .bdshare-button-style1-32 a{
  201. width: 30px;
  202. height: 30px;
  203. background-size: 100% 100%;
  204. }
  205. .bdshare-button-style1-32 .qq{
  206. background-image: url('/Public/Home/img/share04.png');
  207. }
  208. .bdshare-button-style1-32 .weixin{
  209. background-image: url('/Public/Home/img/share02.png');
  210. }
  211. .bdshare-button-style1-32 .bds_sqq{
  212. background-position:0 0;
  213. }
  214. .bdshare-button-style1-32 .bds_weixin{
  215. background-position:0 0;
  216. }
  217. </style>
  218. {/literal}
  219. {literal}
  220. <div class="member-content" id="content">
  221. <div class="content_h">
  222. <h3 class="memberTitle">分享给朋友</h3>
  223. <div class="share_title">
  224. <div class="share_word sharebr act" data-id="shareLink">分享链接</div>
  225. <div class="share_word sharebrtwo" data-id="shareOpen">直接开户</div>
  226. <div class="celar"></div>
  227. </div>
  228. <div class="sharecontent" id="share_link" style="display: none;">
  229. <div class="titles">级差代理</div>
  230. <div class="sharediv" id="shareLink" >
  231. <div class="share_left">
  232. <div class="share_left_img" id="code"></div>
  233. </div>
  234. <div class="share_right">
  235. <div class="share_right_input">
  236. <select name="shareurl" id="shareurl">
  237. <option value="{{li+'?invita='+ todos.open_invitation}}" v-for="li in list.agent_url">
  238. {{li+'?invita='+ todos.open_invitation}}
  239. </option>
  240. </select>
  241. <div class="share_right_button">复制地址</div>
  242. </div>
  243. <div class="share_right_word">您的邀请码:<b v-text="todos.open_invitation"></b></div>
  244. <div class="share_right_wordtwo">*通过以上链接或扫描二维码的用户即为您的下线</div>
  245. <div class="share_right_wordtwo">*用户注册时填写您的邀请码,即可成为您的下线。</div>
  246. </div>
  247. </div>
  248. <div class="exclu_url" id="exclu_url">
  249. <div class="titles">专属代理</div>
  250. <div class="share_left_img" id="codes"></div>
  251. <div class="share_right exclu_share_right">
  252. <div class="share_right_input">
  253. <select name="excluurl" id="excluurl">
  254. <option value="{{li}}" v-for="li in list.exclu_url">
  255. {{li}}
  256. </option>
  257. </select>
  258. <div class="exclu_url_button">复制地址</div>
  259. </div>
  260. </div>
  261. </div>
  262. <!--div class="bdsharebuttonbox share_left_word" id="shares">
  263. <label>分享到:</label>
  264. <a href="javascript:;" class="bds_sqq qq" data-cmd="sqq"></a>
  265. <!--<a href="javascript:;" class="bds_weixin weixin" data-cmd="weixin"></a>
  266. <div class="celar"></div>
  267. </div>-->
  268. <div class="sharediv" id="shareOpen" style="display: none;">
  269. <div class="sharefromdiv">
  270. <div class="sharefrom">
  271. <label>用户名:</label>
  272. <input type="text" name="account" id="accounts" placeholder="用户名" value="" maxlength="11" onblur="leave('ns')"><br><i class="ns">*用户名须为6-11个字母或数字、下划线的组合</i>
  273. <div class="celar"></div>
  274. </div>
  275. <div class="sharefrom">
  276. <label>真实姓名:</label>
  277. <input type="text" name="name" id="username" placeholder="真实姓名" value="" maxlength="8" onblur="leave('name')"><br><i class="name">*请如实填写姓名,与转出银行卡匹配,否则无法进行取现</i>
  278. <div class="celar"></div>
  279. </div>
  280. <div class="sharefrom">
  281. <label>输入密码:</label>
  282. <input type="password" name="password" id="password" placeholder="输入密码" value="" maxlength="18" onblur="leave('ssd')"><br><i class="ssd" >*密码不能为空,不少于6位</i>
  283. <div class="celar"></div>
  284. </div>
  285. <div class="sharefrom">
  286. <label>确定密码:</label>
  287. <input type="password" name="again_password" id="again_password" placeholder="确定密码" value="" maxlength="18" onblur="leave('loa')"><br><i class="loa">*确认密码不能为空,不少于6位</i>
  288. <div class="celar"></div>
  289. </div>
  290. <div class="sharefrom">
  291. <label>手机号码:</label>
  292. <input type="text" name="phone" id="phone" placeholder="手机号码" value="" maxlength="11" onblur="leave('phone')" onkeyup="this.value=this.value.replace(/\D/g,'')"><br><i class="phone">*您输入的手机号有误</i>
  293. <div class="celar"></div>
  294. </div>
  295. <!-- <div class="sharefrom"><label id="v_container" style="width: 130px;"></label><input style="width: 210px;" type="text" id="code_input" onblur="leave('lp')" placeholder="验证码"><br><i class="lp">*您输入的验证码有误</i><div class="celar"></div></div> -->
  296. <br>
  297. <br>
  298. <input type="hidden" id="usershare" value='1'>
  299. <p class="tijiao">
  300. <button id="reg">确定</button>
  301. </p>
  302. </div>
  303. </div>
  304. <div class="celar"></div>
  305. </div>
  306. </div>
  307. </div>
  308. {/literal}
  309. </div>
  310. </div>
  311. <script src="/Public/Home/js/checkToken.js"></script>
  312. <script src="/Public/Home/js/jqPaginator.js"></script>
  313. <script src="/Public/Home/js/clipboard.min.js"></script>
  314. <!-- <script src="/Public/js/gVerify.js"></script> -->
  315. <script src="/Public/Home/js/register.js"></script>
  316. <script type="text/javascript" src="/Public/Home/js/jquery.qrcode.min.js"></script>
  317. {literal}
  318. <script type="text/javascript">
  319. var datas = new Vue({
  320. el: "#content",
  321. data: {
  322. todos: [],
  323. list:[],
  324. pool: '1234567890', // 字符串ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890
  325. width: 120,
  326. height: 43,
  327. exclu_url:''
  328. }
  329. });
  330. $(function () {
  331. //var share_input = window.location.href;
  332. var share_input,exclu_input;
  333. apiAjax('/Api-Account/getAccount', {}, function (data) {
  334. datas.todos = data.data;
  335. });
  336. apiAjax('/Api-Nagent/getAgentDom', {}, function (data) {
  337. if(data.status == 1){
  338. datas.list = data.data;
  339. $("#code").qrcode({
  340. width: 120, //宽度
  341. height:120, //高度
  342. text: data.data.agent_url[0] +"?invita="+ datas.todos.open_invitation
  343. });
  344. share_input = data.data.agent_url[0] +"?invita="+ datas.todos.open_invitation;
  345. //专属
  346. if(data.data.exclu_url !="")
  347. {
  348. datas.exclu_url = data.data.exclu_url ;
  349. exclu_input = data.data.exclu_url[0];
  350. $("#codes").qrcode({
  351. width: 120, //宽度
  352. height:120, //高度
  353. text: data.data.exclu_url[0]
  354. });
  355. }else{
  356. $('#exclu_url').hide();
  357. }
  358. $('#share_link').show();
  359. }
  360. });
  361. $(".share_word").click(function(){
  362. $(".share_word").removeClass('act');
  363. $(this).addClass('act');
  364. if($(this).attr('data-id') =='shareLink'){
  365. $("#shareLink").show();
  366. if(datas.exclu_url !="")
  367. {
  368. $("#exclu_url").show();
  369. }
  370. $("#shares").show();
  371. $(".titles").show();
  372. $("#shareOpen").hide();
  373. }else{
  374. $("#shareLink").hide();
  375. $("#exclu_url").hide();
  376. $("#shares").hide();
  377. $(".titles").hide();
  378. $("#shareOpen").show();
  379. }
  380. });
  381. $("#shareurl").change(function(){
  382. $("#code").html('');
  383. share_input = $(this).val();
  384. $("#code").qrcode({
  385. width: 120, //宽度
  386. height:120, //高度
  387. text: $(this).val() //任意内容
  388. });
  389. });
  390. $("#excluurl").change(function(){
  391. $("#codes").html('');
  392. exclu_input = $(this).val();
  393. $("#codes").qrcode({
  394. width: 120, //宽度
  395. height:120, //高度
  396. text: $(this).val() //任意内容
  397. });
  398. });
  399. var clipboard = new ClipboardJS('.share_right_button', {
  400. text: function() {
  401. return share_input;
  402. }
  403. });
  404. clipboard.on('success', function(e) {
  405. layer. msg('复制成功!');
  406. });
  407. clipboard.on('error', function(e) {
  408. layer. msg('复制失败!');
  409. });
  410. var clipboard1 = new ClipboardJS('.exclu_url_button', {
  411. text: function() {
  412. return exclu_input;
  413. }
  414. });
  415. clipboard1.on('success', function(e) {
  416. layer. msg('复制成功!');
  417. });
  418. clipboard1.on('error', function(e) {
  419. layer. msg('复制失败!');
  420. });
  421. $('#reg').click(function () {
  422. var account = $('#accounts').val();
  423. var name= $('#username').val();
  424. var password= $('#password').val();
  425. var again_password= $('#again_password').val();
  426. var phone= $('#phone').val();
  427. if (!account || !/^[a-zA-Z0-9]{4,11}$/.test(account)) {
  428. layer. alert('用户名格式错误')
  429. return false
  430. }
  431. if (!name || !/^[\u4e00-\u9fa5]+$/.test(name)) {
  432. layer. alert('请填写真实姓名,否则不能提现')
  433. return false
  434. }
  435. if (!password || !/^[a-zA-Z0-9]{6,12}$/.test(password)) {
  436. layer. alert('密码格式错误')
  437. return false
  438. }
  439. if (password != again_password) {
  440. layer. alert('两次密码不一样')
  441. return false
  442. }
  443. if(phone){
  444. if(!phone.match(/^(1[3456789])\d{9}$/)){
  445. layer. alert('手机格式错误')
  446. return false
  447. }
  448. }else{
  449. layer. alert('请填写手机号码')
  450. return false
  451. }
  452. apiAjax('/api-Account/directAccount', {
  453. account: account,
  454. name: name,
  455. password: password,
  456. again_password: again_password,
  457. phone: phone,
  458. invita: datas.todos.open_invitation
  459. }, function (data) {
  460. if(data.status > 0){
  461. layer. alert('注册成功');
  462. window.location.reload();
  463. }
  464. });
  465. });
  466. })
  467. </script>
  468. <script>
  469. /*window._bd_share_config={
  470. "common":{
  471. "bdSnsKey":{},
  472. "bdText":"分享",
  473. "bdMini":"2",
  474. "bdMiniList":["weixin","sqq"],
  475. "bdPic":"",
  476. "bdStyle":"1",
  477. "bdSize":"32"},
  478. "share":{}
  479. };
  480. with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];*/
  481. </script>
  482. {/literal}
  483. {include file="Application/Home/View/Public/footer.php"}