Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

348 wiersze
6.1 KiB

  1. <template>
  2. <view>
  3. <view class="head">
  4. <text>智能高效客户管理平台</text>
  5. </view>
  6. <view class="input">
  7. <view class="cwjs-cells item-flex">
  8. <view class="cwjs-item center">
  9. <input type="text" v-model="username" placeholder="请输入手机号码" maxlength="11"
  10. placeholder-style='color:#AAAAAA' />
  11. </view>
  12. </view>
  13. <view class="textbox">
  14. <view class="textbox-1" @tap="bindVerification">密码登录</view>
  15. <view class="textbox-2"></view>
  16. <view class="textbox-11"></view>
  17. </view>
  18. </view>
  19. <view class="button" @tap="bindWxBLogin">获取验证码</view>
  20. <image src="https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/login/footer.png" class="footer">
  21. </image>
  22. </view>
  23. </template>
  24. <script>
  25. var util = require("../../utils/util.js");
  26. var config = require("../../config");
  27. var app = getApp();
  28. export default {
  29. data() {
  30. return {
  31. username: '',
  32. role: ''
  33. };
  34. },
  35. onLoad: function(options) {
  36. this.role=options.role;
  37. },
  38. methods: {
  39. //账号密码登录
  40. bindVerification() {
  41. uni.navigateTo({
  42. url: '/pages/login/index',
  43. })
  44. },
  45. //获取验证码
  46. bindWxBLogin: function(e) {
  47. if (!(/^1[34578]\d{9}$/.test(this.username))) {
  48. util.showNone("手机号码错误");
  49. this.username='';
  50. return false;
  51. } else {
  52. uni.request({
  53. url: config.service.sendCode + "?mobile=" + this.username,
  54. method: "GET",
  55. header: {
  56. 'content-type': 'application/json',
  57. 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
  58. },
  59. success: (data) => {
  60. console.log(data)
  61. // 成功地响应会话信息
  62. if (data.data.code == 10000) {
  63. util.showSuccess('发送成功');
  64. if(this.role==1){
  65. uni.navigateTo({
  66. url: '/pages/login/yinzhongmalogin?username=' + this.username +
  67. '&role=' + this.role,
  68. })
  69. }else{
  70. uni.navigateTo({
  71. url: '/pages/login/Verifythelogin?username=' + this.username +
  72. '&role=' + this.role,
  73. })
  74. }
  75. // 没有正确响应会话信息
  76. } else {
  77. util.showNone(data.data.message);
  78. return false;
  79. }
  80. },
  81. })
  82. }
  83. },
  84. }
  85. };
  86. </script>
  87. <style lang="scss">
  88. .cwjs-logo {
  89. display: block;
  90. width: 219rpx;
  91. height: 158rpx;
  92. margin: 54rpx auto 66rpx;
  93. }
  94. .cwjs-tips {
  95. font-size: 24rpx;
  96. padding: 80rpx 0;
  97. color: #8a8a8a;
  98. }
  99. .cwjs-form {
  100. position: relative;
  101. margin: 0;
  102. background-color: #fff;
  103. border-radius: 10px;
  104. padding: 20rpx 40rpx 113rpx;
  105. }
  106. .cwjs-cells {
  107. width: 569rpx;
  108. display: flex;
  109. flex-direction: row;
  110. justify-content: space-between;
  111. align-items: center;
  112. margin: 0 auto;
  113. height: 88rpx;
  114. overflow: hidden;
  115. border-bottom: 1rpx solid #BFC7D3;
  116. position: relative;
  117. }
  118. .center {
  119. flex: 1;
  120. }
  121. .cwjs-input {
  122. height: 48rpx;
  123. line-height: 48rpx;
  124. padding: 23rpx 23rpx 23rpx 78rpx;
  125. font-size: 28rpx;
  126. font-family: PingFangSC-Regular, PingFang SC;
  127. color: #000;
  128. }
  129. .images {
  130. display: block;
  131. width: 40rpx;
  132. height: 21rpx;
  133. margin-right: 30rpx;
  134. margin-top: 33.5rpx;
  135. }
  136. .mod-btn {
  137. position: absolute;
  138. bottom: -80rpx;
  139. left: 50%;
  140. margin-left: -80rpx;
  141. }
  142. .mod-btn .button {
  143. width: 160rpx;
  144. height: 160rpx;
  145. background: linear-gradient(180deg, rgba(116, 197, 230, 1) 0%, rgba(64, 147, 201, 1) 100%);
  146. border: 10rpx solid rgba(255, 255, 255, 1);
  147. border-radius: 100%;
  148. font-size: 36rpx;
  149. color: #fff;
  150. display: flex;
  151. justify-content: center;
  152. align-items: center;
  153. }
  154. .mod-btn .button::after {
  155. content: ""
  156. }
  157. .retPassword {
  158. display: inline;
  159. width: auto;
  160. font-size: 28rpx;
  161. color: rgba(64, 147, 201, 1);
  162. line-height: 40rpx;
  163. float: right;
  164. }
  165. .retPassword:active {
  166. background-color: #fff;
  167. }
  168. .appliyAdmin {
  169. position: absolute;
  170. left: 50%;
  171. margin-left: -57rpx;
  172. bottom: 100rpx;
  173. width: 114rpx;
  174. font-size: 28rpx;
  175. color: rgba(255, 255, 255, 1);
  176. line-height: 40rpx;
  177. }
  178. /* 头部 */
  179. .head {
  180. width: 750rpx;
  181. height: 410rpx;
  182. background-image: url(https://qufang.oss-cn-beijing.aliyuncs.com/channelHelper/background.png);
  183. background-size: 100vw auto;
  184. background-repeat: no-repeat;
  185. }
  186. .background {
  187. width: 750rpx;
  188. height: 400rpx;
  189. position: absolute;
  190. top: -3rpx;
  191. left: 0;
  192. }
  193. .logo {
  194. width: 248upx;
  195. height: 248upx;
  196. display: block;
  197. position: absolute;
  198. top: 134rpx;
  199. left: 240.5rpx;
  200. }
  201. .head text {
  202. font-size: 34rpx;
  203. font-family: PingFangSC-Medium, PingFang SC;
  204. font-weight: 500;
  205. color: #008EF2;
  206. position: absolute;
  207. top: 300rpx;
  208. width: 100%;
  209. text-align: center;
  210. }
  211. /* 输入框 */
  212. .input {
  213. width: 100%;
  214. height: auto;
  215. padding: 0 105rpx;
  216. box-sizing: border-box;
  217. }
  218. .logo_input {
  219. width: 34rpx;
  220. height: 38rpx;
  221. position: absolute;
  222. top: 25rpx;
  223. left: 0;
  224. }
  225. /* 登录 */
  226. .button {
  227. width: 603rpx;
  228. height: 89rpx;
  229. background: rgba(72, 149, 255, 1);
  230. box-shadow: 0rpx 2rpx 14rpx 0rpx rgba(151, 192, 255, 1);
  231. border-radius: 45rpx;
  232. text-align: center;
  233. line-height: 89rpx;
  234. color: #fff;
  235. margin: 0 auto;
  236. margin-top: 239rpx;
  237. font-size: 34rpx;
  238. }
  239. .footer {
  240. width: 100%;
  241. height: 157rpx;
  242. position: absolute;
  243. bottom: 0;
  244. left: 0;
  245. }
  246. .agreeBox {
  247. /* text-align: center; */
  248. /* width: 450rpx; */
  249. /* padding-left: 145rpx; */
  250. font-size: 28rpx;
  251. color: #88909E;
  252. margin: 0 auto;
  253. margin-top: 30rpx;
  254. position: relative;
  255. display: flex;
  256. margin-left: 83upx;
  257. }
  258. checkbox {
  259. transform: scale(0.5);
  260. }
  261. checkbox-group {
  262. display: inline;
  263. }
  264. navigator {
  265. display: inline
  266. }
  267. .agreeBox image {
  268. width: 26rpx;
  269. height: 26rpx;
  270. display: block;
  271. position: absolute;
  272. top: 9rpx;
  273. left: 18rpx;
  274. margin-right: 19rpx;
  275. }
  276. .imagesBox {
  277. width: 80rpx;
  278. height: 88rpx;
  279. }
  280. .chooseBox {
  281. width: 60rpx;
  282. height: 60rpx;
  283. }
  284. .login {
  285. text-decoration: underline;
  286. text-align: center;
  287. margin-top: 40px;
  288. color: #88909E;
  289. font-size: 28rpx;
  290. }
  291. .textbox {
  292. width: 569rpx;
  293. display: flex;
  294. margin-top: 40rpx;
  295. }
  296. .textbox-1 {
  297. width: 30%;
  298. font-size: 30rpx;
  299. color: #999999;
  300. }
  301. .textbox-11 {
  302. width: 30%;
  303. text-align: right;
  304. font-size: 30rpx;
  305. color: #999999;
  306. }
  307. .textbox-2 {
  308. width: 40%;
  309. }
  310. </style>