No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

Setthepassword.vue 5.6 KiB

hace 3 años
hace 3 años
hace 3 años
hace 3 años
hace 3 años
hace 3 años
hace 3 años
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. <template>
  2. <view>
  3. <view class="input">
  4. <view class="zcasfdasf">设置密码</view>
  5. <view class="tejHdgasd">设置密码后,就可以使用手机号码与密码登录了~</view>
  6. <view style="margin-top:60rpx" class="cwjs-cells item-flex">
  7. <view class="cwjs-item center">
  8. <input class="cwjs-item cwjs-input" v-model="username" password="true" placeholder="请设置6~12位的登录密码"
  9. placeholder-style='color:#AAAAAA' maxlength="12" />
  10. </view>
  11. </view>
  12. </view>
  13. <view class="button" @tap="bindWxBLogin">确认</view>
  14. </view>
  15. </template>
  16. <script>
  17. var util = require("../../utils/util.js");
  18. var config = require("../../config");
  19. var app = getApp();
  20. var WXB_SESSION_LOGIN_DATA = 'weapp_session_login_data';
  21. export default {
  22. data() {
  23. return {
  24. username: '', //获取到的密码
  25. phone: ''
  26. }
  27. },
  28. onLoad: function(options) {
  29. this.phone = options.username
  30. },
  31. methods: {
  32. bindWxBLogin() {
  33. if (this.username.length < 6) {
  34. util.showNone("密码小于6位,请重试");
  35. return false;
  36. } else {
  37. var loginParams = {
  38. name: this.phone, //手机号
  39. newPassword: this.username, //密码
  40. }
  41. uni.request({
  42. url: config.service.forgotPassword,
  43. header: {
  44. 'content-type': 'application/json'
  45. },
  46. data: loginParams,
  47. method: "POST",
  48. success: function(result) {
  49. if (result.data.code == 10000) {
  50. uni.reLaunch({
  51. url: '/pages/login/index',
  52. })
  53. } else {
  54. util.showNone(result.data.message);
  55. return false;
  56. }
  57. }
  58. })
  59. }
  60. }
  61. }
  62. };
  63. </script>
  64. <style lang="scss">
  65. .cwjs-logo {
  66. display: block;
  67. width: 219rpx;
  68. height: 158rpx;
  69. margin: 54rpx auto 66rpx;
  70. }
  71. .cwjs-tips {
  72. font-size: 24rpx;
  73. padding: 80rpx 0;
  74. color: #8a8a8a;
  75. }
  76. .cwjs-form {
  77. position: relative;
  78. margin: 0;
  79. background-color: #fff;
  80. border-radius: 10px;
  81. padding: 20rpx 40rpx 113rpx;
  82. }
  83. .zcasfdasf {
  84. height: 48rpx;
  85. font-size: 48rpx;
  86. font-weight: 400;
  87. color: #303030;
  88. line-height: 48rpx;
  89. margin-top: 80rpx;
  90. }
  91. .tejHdgasd {
  92. height: 28rpx;
  93. font-size: 26rpx;
  94. font-weight: 400;
  95. color: #303030;
  96. line-height: 28rpx;
  97. margin-top: 28rpx;
  98. }
  99. .cwjs-cells {
  100. width: 600rpx;
  101. display: flex;
  102. flex-direction: row;
  103. justify-content: space-between;
  104. align-items: center;
  105. margin: 0 auto;
  106. height: 88rpx;
  107. overflow: hidden;
  108. border-bottom: 1rpx solid #BFC7D3;
  109. position: relative;
  110. }
  111. .center {
  112. flex: 1;
  113. display: flex;
  114. }
  115. .texteasda {
  116. height: 88rpx;
  117. line-height: 88rpx;
  118. font-size: 28rpx;
  119. color: #000;
  120. }
  121. .cwjs-input {
  122. width: 100%;
  123. height: 88rpx;
  124. line-height: 88rpx;
  125. font-size: 28rpx;
  126. color: #000;
  127. }
  128. .images {
  129. display: block;
  130. width: 40rpx;
  131. height: 21rpx;
  132. margin-right: 30rpx;
  133. margin-top: 33.5rpx;
  134. }
  135. .mod-btn {
  136. position: absolute;
  137. bottom: -80rpx;
  138. left: 50%;
  139. margin-left: -80rpx;
  140. }
  141. .mod-btn .button {
  142. width: 160rpx;
  143. height: 160rpx;
  144. background: linear-gradient(180deg, rgba(116, 197, 230, 1) 0%, rgba(64, 147, 201, 1) 100%);
  145. border: 10rpx solid rgba(255, 255, 255, 1);
  146. border-radius: 100%;
  147. font-size: 36rpx;
  148. color: #fff;
  149. display: flex;
  150. justify-content: center;
  151. align-items: center;
  152. }
  153. .mod-btn .button::after {
  154. content: ""
  155. }
  156. .retPassword {
  157. display: inline;
  158. width: auto;
  159. font-size: 28rpx;
  160. color: rgba(64, 147, 201, 1);
  161. line-height: 40rpx;
  162. float: right;
  163. }
  164. .retPassword:active {
  165. background-color: #fff;
  166. }
  167. .appliyAdmin {
  168. position: absolute;
  169. left: 50%;
  170. margin-left: -57rpx;
  171. bottom: 100rpx;
  172. width: 114rpx;
  173. font-size: 28rpx;
  174. color: rgba(255, 255, 255, 1);
  175. line-height: 40rpx;
  176. }
  177. /* 头部 */
  178. .head {
  179. width: 750rpx;
  180. height: 355rpx;
  181. }
  182. .background {
  183. width: 750rpx;
  184. height: 400rpx;
  185. position: absolute;
  186. top: -3rpx;
  187. left: 0;
  188. }
  189. .logo {
  190. width: 123rpx;
  191. height: 107rpx;
  192. display: block;
  193. position: absolute;
  194. top: 84rpx;
  195. left: 313.5rpx;
  196. }
  197. .head text {
  198. font-size: 34rpx;
  199. font-family: PingFangSC-Medium, PingFang SC;
  200. font-weight: 500;
  201. color: #2343BD;
  202. position: absolute;
  203. top: 222rpx;
  204. left: 203rpx;
  205. }
  206. /* 输入框 */
  207. .input {
  208. width: 100%;
  209. height: auto;
  210. padding: 0 90rpx;
  211. box-sizing: border-box;
  212. }
  213. .logo_input {
  214. width: 34rpx;
  215. height: 38rpx;
  216. position: absolute;
  217. top: 25rpx;
  218. left: 0;
  219. }
  220. /* 登录 */
  221. .button {
  222. width: 603rpx;
  223. height: 89rpx;
  224. background: rgba(72, 149, 255, 1);
  225. box-shadow: 0rpx 2rpx 14rpx 0rpx rgba(151, 192, 255, 1);
  226. border-radius: 45rpx;
  227. text-align: center;
  228. line-height: 89rpx;
  229. color: #fff;
  230. margin: 0 auto;
  231. margin-top: 239rpx;
  232. font-size: 34rpx;
  233. }
  234. .footer {
  235. width: 100%;
  236. height: 157rpx;
  237. position: absolute;
  238. bottom: 0;
  239. left: 0;
  240. }
  241. .agreeBox {
  242. /* text-align: center; */
  243. /* width: 450rpx; */
  244. /* padding-left: 145rpx; */
  245. font-size: 28rpx;
  246. color: #88909E;
  247. margin: 0 auto;
  248. margin-top: 30rpx;
  249. position: relative;
  250. display: flex;
  251. }
  252. checkbox {
  253. transform: scale(0.5);
  254. }
  255. checkbox-group {
  256. display: inline;
  257. }
  258. navigator {
  259. display: inline
  260. }
  261. .agreeBox image {
  262. width: 26rpx;
  263. height: 26rpx;
  264. display: block;
  265. position: absolute;
  266. top: 9rpx;
  267. left: 18rpx;
  268. margin-right: 19rpx;
  269. }
  270. .imagesBox {
  271. width: 80rpx;
  272. height: 88rpx;
  273. }
  274. .chooseBox {
  275. width: 60rpx;
  276. height: 60rpx;
  277. }
  278. .login {
  279. text-decoration: underline;
  280. text-align: center;
  281. margin-top: 40px;
  282. color: #88909E;
  283. font-size: 28rpx;
  284. }
  285. .textbox {
  286. width: 569rpx;
  287. display: flex;
  288. margin-top: 40rpx;
  289. }
  290. .textbox-1 {
  291. width: 30%;
  292. font-size: 30rpx;
  293. color: #999999;
  294. }
  295. .textbox-11 {
  296. width: 30%;
  297. text-align: right;
  298. font-size: 30rpx;
  299. color: #999999;
  300. }
  301. .textbox-2 {
  302. width: 40%;
  303. }
  304. </style>