You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Setthepassword.vue 5.6 KiB

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