index.html 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>大卫博士-代理商授权查询</title>
  7. <script src="./js/vue@2.6.12.js"></script>
  8. <script src="./js/axios.min.js"></script>
  9. <script src="./js/pxtorem.js"></script>
  10. <style>
  11. * {
  12. margin: 0;
  13. padding: 0;
  14. }
  15. html, body, .container{
  16. width: 100%;
  17. height: 100%;
  18. user-select: none;
  19. overflow: hidden;
  20. }
  21. .container {
  22. background-image: url(./img/bg.png);
  23. background-repeat: no-repeat;
  24. background-size: cover;
  25. background-position: center;
  26. display: flex;
  27. align-items: center;
  28. justify-content: space-between;
  29. position: relative;
  30. }
  31. .LoginContainer {
  32. position: absolute;
  33. top: 50%;
  34. right: -5.36rem;
  35. width: 15.08rem;
  36. height: 15.08rem;
  37. border-radius: 50%;
  38. background: #ffffff;
  39. transform: translateY(-50%);
  40. }
  41. .Login-show {
  42. position: absolute;
  43. left: 0;
  44. top: 50%;
  45. transform: translateY(-50%);
  46. width: 9.72rem;
  47. }
  48. .Login-brand {
  49. width: calc(100% + 1.2rem);
  50. }
  51. .Login-brand> p:nth-of-type(1) {
  52. text-align: right;
  53. color: #333333;
  54. font-size: 0.46rem;
  55. margin-bottom: 0.05rem;
  56. font-weight: 500;
  57. }
  58. .Login-brand> p:nth-of-type(2) {
  59. color: #F5321D;
  60. font-size: 0.32rem;
  61. text-align: right;
  62. opacity: 0.3;
  63. }
  64. .Login-body {
  65. position: absolute;
  66. top: 50%;
  67. left: 0;
  68. transform: translateY(-50%);
  69. padding: 0.50rem 0.50rem 0.50rem 2.15rem;
  70. box-sizing: border-box;
  71. height: 100%;
  72. width: max-content;
  73. display: flex;
  74. flex-direction: column;
  75. justify-content: space-between;
  76. }
  77. .Login-title {
  78. width: 5.84rem;
  79. text-align: center;
  80. color: #333333;
  81. font-size: 0.68rem;
  82. font-weight: 500;
  83. text-align: center;
  84. margin-bottom: 0.05rem;
  85. }
  86. .Login-desc {
  87. width: 5.84rem;
  88. text-align: center;
  89. color: #333333;
  90. font-size: 0.34rem;
  91. font-weight: 400;
  92. text-align: center;
  93. margin-bottom: 0.60rem;
  94. }
  95. .login-input {
  96. width: 5.84rem;
  97. height: 0.90rem;
  98. line-height: 0.90rem;
  99. text-align: center;
  100. font-size: 0.28rem;
  101. border: 2px solid #F53C1E !important;
  102. border-radius: 4px;
  103. outline-color: #F53C1E !important;
  104. box-sizing: border-box;
  105. margin-bottom: 0.33rem;
  106. }
  107. .Login-btn {
  108. width: 5.84rem;
  109. height: 0.90rem;
  110. line-height: 0.90rem;
  111. text-align: center;
  112. color: #FFFFFF;
  113. font-size: 0.27rem;
  114. background: #F53C1E;
  115. border-radius: 4px;
  116. cursor: pointer;
  117. margin-bottom: 0.36rem;
  118. }
  119. .Login-tip {
  120. width: 5.84rem;
  121. text-align: center;
  122. color: #EA4A41;
  123. font-size: 0.20rem;
  124. text-align: center;
  125. }
  126. .Login-info {
  127. display: flex;
  128. align-items: flex-start;
  129. justify-content: flex-start;
  130. flex-direction: column;
  131. margin-top: 1.00rem;
  132. }
  133. .BrandContainer {
  134. padding-top: 1.40rem;
  135. padding-left: 0.80rem;
  136. padding-bottom: 0.30rem;
  137. height: 100%;
  138. box-sizing: border-box;
  139. display: flex;
  140. align-items: flex-start;
  141. justify-content: space-between;
  142. flex-direction: column;
  143. }
  144. .Brand-logo {
  145. display: block;
  146. height: 2.12rem;
  147. }
  148. .Brand-chengnuo {
  149. display: block;
  150. height: 3.73rem;
  151. margin-left: 0.50rem;
  152. }
  153. .Brand-start {
  154. width: calc(100% + 0.80rem);
  155. color: #ffffff;
  156. font-size: 0.18rem;
  157. text-align: right;
  158. margin-right: -0.20rem;
  159. }
  160. .Search-info {
  161. width: 5.52rem;
  162. margin-top: 0.67rem;
  163. }
  164. .Search-account {
  165. color: #333333;
  166. font-size: 0.24rem;
  167. margin-bottom: 0.20rem;
  168. text-align: center;
  169. width: 100%;
  170. }
  171. .Search-fixed-title {
  172. color: #F53C1E;
  173. font-size: 0.46rem;
  174. margin-bottom: 0.27rem;
  175. text-align: center;
  176. width: 100%;
  177. }
  178. .Search-fixed-desc {
  179. color: #333333;
  180. width: 80%;
  181. text-align: center;
  182. height: 0.25rem;
  183. font-size: 0.24rem;
  184. line-height: 0.25rem;
  185. background-image: url(./img/fixed_bg.png);
  186. background-size: 100% auto;
  187. background-position: center;
  188. background-repeat: no-repeat;
  189. margin: 0 auto;
  190. margin-bottom: 0.4rem;
  191. }
  192. .Member-info {
  193. width: 100%;
  194. list-style: none;
  195. margin-bottom: 0.50rem;
  196. }
  197. .Member-info>li {
  198. width: 100%;
  199. height: 0.70rem;
  200. display: flex;
  201. align-items: center;
  202. justify-content: space-between;
  203. border-bottom: 1px solid #EEEEEE;
  204. color: #333333;
  205. font-size: 0.28rem;
  206. }
  207. .Member-info>li .spec {
  208. color: #F53C1E;
  209. }
  210. .Secrch-see {
  211. width: 100%;
  212. height: 0.85rem;
  213. border-radius: 4px;
  214. color: #FFFFFF;
  215. font-size: 0.28rem;
  216. cursor: pointer;
  217. line-height: 0.85rem;
  218. text-align: center;
  219. background: #F53C1E;
  220. letter-spacing: 3px;
  221. }
  222. </style>
  223. </head>
  224. <body>
  225. <div id="app" class="container">
  226. <div class="BrandContainer">
  227. <img src="./img/logo.png" alt="" class="Brand-logo">
  228. <img src="./img/chengnuo.png" alt="" class="Brand-chengnuo">
  229. <p class="Brand-start">不变的承诺始于2014:90天——366天穿了不满意全额退款</p>
  230. </div>
  231. <div
  232. class="LoginContainer"
  233. ref="login"
  234. >
  235. <!-- :style="`height: %{ 1508 }`" -->
  236. <div class="Login-show" :style="`height:${screenH}px`">
  237. <div class="Login-body">
  238. <!-- <div class="Login-brand">
  239. <p>大卫博士</p>
  240. <p>Dr. David</p>
  241. </div> -->
  242. <div v-if="!status" class="Login-info">
  243. <p class="Login-title">代理商授权查询</p>
  244. <p class="Login-desc">Authorization query</p>
  245. <input v-model="phone" type="text" placeholder="请输入代理商手机号" class="login-input">
  246. <p class="Login-btn" @click="toSearch">立即查询</p>
  247. <p class="Login-tip">未查询到代理商信息,请勿轻易转款,谨防受骗受骗</p>
  248. </div>
  249. <div v-else class="Login-info Search-info">
  250. <p class="Search-account">账户{{ phone }}是</p>
  251. <p class="Search-fixed-title">大卫博士授权代理商</p>
  252. <p class="Search-fixed-desc">代理信息</p>
  253. <ul class="Member-info">
  254. <li>
  255. <p>级  别:</p>
  256. <p>{{ memberInfo.level }}</p>
  257. </li>
  258. <li>
  259. <p>昵  称:</p>
  260. <p>{{ memberInfo.wechat }}</p>
  261. </li>
  262. <li>
  263. <p>姓  名:</p>
  264. <p>{{ memberInfo.realname }}</p>
  265. </li>
  266. <li>
  267. <p>身份证号:</p>
  268. <p>{{ memberInfo.num | showCradNum }}</p>
  269. </li>
  270. <li>
  271. <p>授权状态</p>
  272. <p :class="memberInfo.status === 1 ? 'spec' : ''">{{ memberInfo.status === 1 ? '已授权' : '已过期' }}</p>
  273. </li>
  274. </ul>
  275. <p class="Secrch-see" @click="toSeeAuth">查看授权书</p>
  276. </div>
  277. <p style="opacity: 0">1</p>
  278. </div>
  279. </div>
  280. </div>
  281. </div>
  282. </body>
  283. <script>
  284. var app = new Vue({
  285. el: '#app',
  286. data() {
  287. return {
  288. screenH: 0,
  289. phone: '',
  290. status: false,
  291. memberInfo: {}
  292. }
  293. },
  294. filters: {
  295. showCradNum(str) {
  296. if (!str) {
  297. return ''
  298. }
  299. let arr = str.split('')
  300. if (arr.length === 18) {
  301. arr.splice(6, 8, 'xxxx')
  302. return arr.join('')
  303. } else if (arr.length === 15) {
  304. arr.splice(6, 6, 'xxxx')
  305. return arr.join('')
  306. } else {
  307. return str
  308. }
  309. },
  310. },
  311. mounted() {
  312. this.getScreenH()
  313. let _this = this
  314. window.onresize = function() {
  315. _this.getScreenH()
  316. }
  317. },
  318. methods:{
  319. getScreenH() {
  320. this.screenH = document.body.clientHeight
  321. let _W = document.body.clientWidth
  322. ratio = (1920 / _W).toFixed(2)
  323. this.$refs.login.setAttribute('style', `width: ${15 * ratio}rem; height: ${15 * ratio}rem; right: -${570 * ratio}px`)
  324. },
  325. toSearch() {
  326. if(!this.phone) {
  327. alert('请输入要查询的手机号')
  328. return false
  329. }
  330. axios.get("http://api.app.jiuweiyun.cn/api/user/auth_sel", {
  331. params: {
  332. phone: this.phone
  333. }
  334. }).then(res => {
  335. if(res.code === 200) {
  336. const { status } = res.data;
  337. if (status !== 3) {
  338. this.status = true
  339. this.memberInfo = res.data
  340. } else {
  341. alert(res.msg || '手机号未授权')
  342. }
  343. } else {
  344. alert('查询失败')
  345. }
  346. }).catch(() => {
  347. alert('服务器发生错误,查询失败')
  348. })
  349. },
  350. toSeeAuth() {
  351. axios.get("http://api.app.jiuweiyun.cn/api/user/auth_show", {
  352. params: {
  353. phone: this.phone
  354. }
  355. }).then(res => {
  356. if(res.code === 200){
  357. const { url } = res.data
  358. window.open(url, '_target')
  359. } else {
  360. alert(res.msg || '查看授权书失败')
  361. }
  362. }).catch(() => {
  363. alert('服务器发生错误,查看授权书失败')
  364. })
  365. }
  366. }
  367. })
  368. </script>
  369. </html>