景徳镇旅游微信小程序
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.

394 lines
8.7 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="refundsOrExchange">
  3. <navbar :title="titleList[titleIndex]" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="frame">
  5. <!-- 登录和注册 -->
  6. <view class="loginRegister" v-if='titleIndex!=2'>
  7. <!-- 标题 -->
  8. <view class="title">{{titleList[titleIndex]}}</view>
  9. <!-- 头像 -->
  10. <view class="userIamge">
  11. <view>
  12. <img src="/static/image/center/11.svg" alt="" style="width: 100%;height: 100%;">
  13. </view>
  14. </view>
  15. <!-- 用户名&密码&隐私条款 -->
  16. <view class="form">
  17. <view>
  18. <uv-input v-model="form.userName" placeholder="请输入手机号/用户/邮箱" border="surround" shape='circle'
  19. clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
  20. </view>
  21. <view>
  22. <uv-input v-model="form.password" password placeholder="请输入密码" border="surround" shape='circle'
  23. clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
  24. </view>
  25. <view>
  26. <uv-checkbox-group v-model="form.checkboxValue" shape="circle">
  27. <view class="content">
  28. <view style="display: flex;">
  29. <uv-checkbox size="30rpx" :name="1"></uv-checkbox>
  30. 请你阅读并同意我们的<span style="color: #fd5100">隐私条款</span><span
  31. style="color: #fd5100">服务协议</span>
  32. </view>
  33. </view>
  34. </uv-checkbox-group>
  35. </view>
  36. </view>
  37. <!-- 按钮 -->
  38. <view class="btn">
  39. <button class='a'>{{titleList[titleIndex]}}</button>
  40. </view>
  41. <!-- tab -->
  42. <view class="bottomTab">
  43. <span :class="titleIndex==0 ? 'tabbarItemActive' : 'tabbarItemNoActive'"
  44. @click='changePage(0)'>注册账号</span>
  45. <span style="color: #9c9fa4">|</span>
  46. <span :class="titleIndex==1 ? 'tabbarItemActive' : 'tabbarItemNoActive'"
  47. @click='changePage(1)'>账号登录</span>
  48. <span style="color: #9c9fa4">|</span>
  49. <span :class="titleIndex==2 ? 'tabbarItemActive' : 'tabbarItemNoActive'"
  50. @click='changePage(2)'>忘记密码</span>
  51. </view>
  52. </view>
  53. <!-- 忘记密码 -->
  54. <view class='forgetPassword' v-if='titleIndex==2'>
  55. <!-- 标题 -->
  56. <view class="title">{{titleList[titleIndex]}}</view>
  57. <!-- 表单 -->
  58. <view class="form1">
  59. <view class="userName">
  60. <uv-input v-model="form1.userName" placeholder="请输入手机号/用户/邮箱" border="surround" shape='circle'
  61. clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
  62. </view>
  63. <view class="code">
  64. <view class="left">
  65. <uv-input v-model="form1.code" placeholder="请输入验证码" border="surround" shape='circle'
  66. clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
  67. </view>
  68. <view class="right">
  69. <view>
  70. <uv-toast ref="toast"></uv-toast>
  71. <uv-code :seconds="seconds" @end="end" @start="start" ref="code"
  72. @change="codeChange"></uv-code>
  73. <uv-button @tap="getCode" iconSize='10rpx' color='#fd5100'
  74. shape='circle'>{{tips}}</uv-button>
  75. </view>
  76. </view>
  77. </view>
  78. <view class="password1">
  79. <uv-input v-model="form1.password1" placeholder="设置您的新密码(6到50个字符)" password clearable
  80. border="surround" shape='circle' :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
  81. </view>
  82. <view class="password2">
  83. <uv-input v-model="form1.password2" placeholder="重新确认密码" password clearable border="surround"
  84. shape='circle' :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
  85. </view>
  86. </view>
  87. <!-- 按钮 -->
  88. <view class="btn">
  89. <button class='a'>{{titleList[titleIndex]}}</button>
  90. </view>
  91. <!-- tab -->
  92. <view class="bottomTab">
  93. <span :class="titleIndex==0 ? 'tabbarItemActive' : 'tabbarItemNoActive'"
  94. @click='changePage(0)'>注册账号</span>
  95. <span style="color: #9c9fa4">|</span>
  96. <span :class="titleIndex==1 ? 'tabbarItemActive' : 'tabbarItemNoActive'"
  97. @click='changePage(1)'>账号登录</span>
  98. <span style="color: #9c9fa4">|</span>
  99. <span :class="titleIndex==2 ? 'tabbarItemActive' : 'tabbarItemNoActive'"
  100. @click='changePage(2)'>忘记密码</span>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. </template>
  106. <script>
  107. import bottomBtn from "../../components/bottom/bottomBtn.vue"
  108. export default {
  109. components: {
  110. bottomBtn
  111. },
  112. onLoad(option) {
  113. this.titleIndex = option.index
  114. },
  115. data() {
  116. return {
  117. titleIndex: 0,
  118. titleList: ['注册账号', '账号密码登录', '重置密码'],
  119. checkboxValue: ['apple'],
  120. form: {
  121. userName: '',
  122. password: '',
  123. checkboxValue: 'apple',
  124. },
  125. form1: {
  126. userName: '',
  127. code: '',
  128. password1: '',
  129. password2: '',
  130. },
  131. bottomBtnStyle: {
  132. color: '#FFF',
  133. backgroundColor: '#fd5100',
  134. fontSize: '34rpx',
  135. width: '400rpx',
  136. height: '80rpx',
  137. borderRadius: '100rpx',
  138. bottom: '42%'
  139. },
  140. tips: '获取验证码',
  141. seconds: 60,
  142. }
  143. },
  144. methods: {
  145. // 切换页面
  146. changePage(index) {
  147. this.titleIndex = index
  148. },
  149. confirm() {
  150. },
  151. codeChange(text) {
  152. this.tips = text;
  153. },
  154. getCode() {
  155. if (this.$refs.code.canGetCode) {
  156. // 模拟向后端请求验证码
  157. uni.showLoading({
  158. title: '正在获取验证码'
  159. })
  160. setTimeout(() => {
  161. uni.hideLoading();
  162. // 这里此提示会被this.start()方法中的提示覆盖
  163. uni.$uv.toast('验证码已发送');
  164. // 通知验证码组件内部开始倒计时
  165. this.$refs.code.start();
  166. }, 2000);
  167. } else {
  168. uni.$uv.toast('请勿重复发送');
  169. }
  170. },
  171. end() {
  172. // uni.$uv.toast('倒计时结束');
  173. },
  174. start() {
  175. // uni.$uv.toast('倒计时开始');
  176. }
  177. }
  178. }
  179. </script>
  180. <style lang="scss" scoped>
  181. * {
  182. box-sizing: border-box;
  183. }
  184. .refundsOrExchange {
  185. background-color: #FFF;
  186. height: 100vh;
  187. .frame {
  188. background-color: #FFF;
  189. .loginRegister {
  190. display: flex;
  191. flex-direction: column;
  192. gap: 40rpx;
  193. .title {
  194. display: flex;
  195. justify-content: center;
  196. align-items: flex-end;
  197. height: 10vh;
  198. color: #000;
  199. font-size: 40rpx;
  200. font-weight: 700;
  201. }
  202. .userIamge {
  203. display: flex;
  204. justify-content: center;
  205. height: 10vh;
  206. >view:nth-of-type(1) {
  207. width: 25%;
  208. height: 100%;
  209. border-radius: 50%;
  210. overflow: hidden;
  211. }
  212. }
  213. .form {
  214. height: 12vh;
  215. >view:nth-of-type(1) {
  216. padding: 20rpx 100rpx;
  217. }
  218. >view:nth-of-type(2) {
  219. padding: 0 100rpx;
  220. }
  221. >view:nth-of-type(3) {
  222. display: flex;
  223. padding: 30rpx 100rpx 0 100rpx;
  224. font-size: 22rpx
  225. }
  226. }
  227. .btn {
  228. // height: 5vh;
  229. display: flex;
  230. justify-content: center;
  231. margin: 50rpx 0 0 0;
  232. .a {
  233. display: flex;
  234. justify-content: center;
  235. align-items: center;
  236. width: 70%;
  237. height: 80rpx;
  238. color: #FFF;
  239. background-color: #fd5100;
  240. border: 1px solid red;
  241. border-radius: 100rpx;
  242. font-size: 30rpx;
  243. }
  244. }
  245. .bottomTab {
  246. display: flex;
  247. justify-content: space-between;
  248. height: 10vh;
  249. padding: 0 80rpx;
  250. .tabbarItemActive {
  251. color: #fd5100;
  252. }
  253. .tabbarItemNoActive {
  254. color: #9c9fa4;
  255. }
  256. }
  257. }
  258. .forgetPassword {
  259. padding: 100rpx 40rpx 0 40rpx;
  260. .title {
  261. display: flex;
  262. justify-content: center;
  263. align-items: flex-end;
  264. height: 10vh;
  265. color: #000;
  266. font-size: 40rpx;
  267. font-weight: 700;
  268. }
  269. .form1 {
  270. display: flex;
  271. flex-direction: column;
  272. gap: 30rpx;
  273. margin-top: 20rpx;
  274. padding: 20rpx 80rpx;
  275. .userName {
  276. // padding: 20rpx 100 rpx;
  277. }
  278. .code {
  279. display: flex;
  280. width: 100%;
  281. .left {
  282. width: 55%;
  283. }
  284. .right {
  285. width: 45%;
  286. height: 100%;
  287. >view:nth-of-type(1) {
  288. display: flex;
  289. justify-content: center;
  290. align-items: center;
  291. width: 100%;
  292. }
  293. }
  294. }
  295. .password1 {}
  296. .password2 {}
  297. }
  298. .btn {
  299. // height: 5vh;
  300. display: flex;
  301. justify-content: center;
  302. margin: 30rpx 0 0 0;
  303. .a {
  304. display: flex;
  305. justify-content: center;
  306. align-items: center;
  307. width: 70%;
  308. height: 80rpx;
  309. color: #FFF;
  310. background-color: #fd5100;
  311. border: 1px solid red;
  312. border-radius: 100rpx;
  313. font-size: 30rpx;
  314. }
  315. }
  316. .bottomTab {
  317. display: flex;
  318. justify-content: space-between;
  319. margin: 50rpx 0 0 0;
  320. padding: 0 80rpx;
  321. .tabbarItemActive {
  322. color: #fd5100;
  323. }
  324. .tabbarItemNoActive {
  325. color: #9c9fa4;
  326. }
  327. }
  328. }
  329. }
  330. }
  331. </style>