my.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <template>
  2. <view class="box">
  3. <view class="header">
  4. <view class="headerPng">
  5. <image :src="headerImg" mode="" />
  6. </view>
  7. <!-- <view class="nickName">你的昵称</view> -->
  8. <view class="phone">{{ phone }}</view>
  9. </view>
  10. <view class="meauList">
  11. <view class="menu-item" @click="updateOTA()">
  12. <view class="meanLeft">
  13. <image src="../../static/update.png" mode="" />
  14. <text>OTA升级</text>
  15. </view>
  16. <view class="meanRight">
  17. <image src="../../static/arrTwo.png" mode="" />
  18. </view>
  19. </view>
  20. <view class="menu-item" @click="gotoShare()">
  21. <view class="meanLeft">
  22. <image src="../../static/share.png" mode="" />
  23. <text>分享确认</text>
  24. </view>
  25. <view class="meanRight">
  26. <image src="../../static/arrTwo.png" mode="" />
  27. </view>
  28. </view>
  29. <view class="menu-item" @click="serverchange()">
  30. <view class="meanLeft">
  31. <image src="../../static/setting.png" mode="" />
  32. <text>网络配置</text>
  33. </view>
  34. <view class="meanRight">
  35. <image src="../../static/arrTwo.png" mode="" />
  36. </view>
  37. </view>
  38. <!-- <view class="menu-item" @click="deaAccount()">
  39. <view class="meanLeft">
  40. <image src="../../static/logoff.png" mode="" />
  41. <text>注销账户</text>
  42. </view>
  43. <view class="meanRight">
  44. <image src="../../static/arrTwo.png" mode="" />
  45. </view>
  46. </view> -->
  47. </view>
  48. <view class="logoutBtn" @click="goLogout">退出登录</view>
  49. <!-- <tenMinutes v-if="isIniTenMinutes" /> -->
  50. <alarModel v-if="showModle" />
  51. </view>
  52. </template>
  53. <script>
  54. export default {
  55. data() {
  56. return {
  57. headerImg: "../../static/headerInfo.jpg",
  58. phone: uni.getStorageSync("phone"),
  59. showModle: false,
  60. };
  61. },
  62. methods: {
  63. updateOTA() {
  64. uni.navigateTo({
  65. url: "/pagesA/OTA/OTA",
  66. });
  67. },
  68. gotoShare() {
  69. uni.setStorageSync("shareStatus", "all");
  70. uni.navigateTo({
  71. url: "/pagesA/shareList/shareList",
  72. });
  73. },
  74. goLogout() {
  75. uni.showModal({
  76. title: "提示",
  77. content: "是否确认退出登录?",
  78. success: function (res) {
  79. if (res.confirm) {
  80. uni.clearStorageSync();
  81. uni.reLaunch({
  82. url: "/pagesA/loginNew/loginNew",
  83. });
  84. } else if (res.cancel) {
  85. }
  86. },
  87. });
  88. },
  89. deaAccount() {
  90. uni.showModal({
  91. content: "是否确认注销登录",
  92. complete: (res) => {
  93. if (res.confirm) {
  94. this.$http
  95. .post(
  96. "wap/user/wx/logout",
  97. { userId: uni.getStorageSync("userId") },
  98. {
  99. header: {
  100. "Content-Type":
  101. "application/json;charset=UTF-8",
  102. },
  103. }
  104. )
  105. .then((res) => {
  106. if (res.data.code == 200) {
  107. uni.showToast({
  108. title: "注销成功",
  109. icon: "success",
  110. duration: 1500,
  111. });
  112. uni.clearStorageSync();
  113. uni.reLaunch({
  114. url: "/pagesA/loginNew/loginNew",
  115. });
  116. } else {
  117. uni.showToast({
  118. title: res.data.message,
  119. icon: "none",
  120. duration: 1500,
  121. });
  122. }
  123. });
  124. }
  125. },
  126. });
  127. },
  128. serverchange() {
  129. uni.navigateTo({
  130. url: "/pagesA/serChange/serChange",
  131. });
  132. },
  133. },
  134. onShow() {
  135. this.isIniTenMinutes = true;
  136. this.showModle = true;
  137. },
  138. onLoad() {},
  139. onHide() {
  140. this.showModle = false;
  141. },
  142. onUnload() {},
  143. };
  144. </script>
  145. <style lang="less" scoped>
  146. // Main Styles
  147. .box {
  148. padding: 10rpx 18rpx;
  149. width: 100vw;
  150. height: 100vh;
  151. background: linear-gradient(180deg, #faede2 0%, #f4f4f4 100%);
  152. box-sizing: border-box;
  153. .header {
  154. margin: 0 auto;
  155. width: 710rpx;
  156. height: 325rpx;
  157. background: linear-gradient(114.42deg, #a27867 0%, #74483d 100%),
  158. #ffffff;
  159. border-radius: 35rpx;
  160. box-sizing: border-box;
  161. .headerPng {
  162. display: flex;
  163. align-items: center;
  164. justify-content: center;
  165. padding-top: 40rpx;
  166. image {
  167. width: 115rpx;
  168. height: 115rpx;
  169. border-radius: 50%;
  170. }
  171. }
  172. .nickName {
  173. margin-top: 30rpx;
  174. font-weight: 500;
  175. color: #ffffff;
  176. font-size: 38rpx;
  177. text-align: center;
  178. }
  179. .phone {
  180. margin-top: 40rpx;
  181. color: #ffffff;
  182. font-size: 32rpx;
  183. text-align: center;
  184. }
  185. }
  186. .meauList {
  187. width: 710rpx;
  188. margin: 18rpx auto 0 auto;
  189. background: #fff;
  190. border-radius: 37rpx;
  191. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.03);
  192. padding: 0;
  193. box-sizing: border-box;
  194. .menu-item {
  195. display: flex;
  196. align-items: center;
  197. justify-content: space-between;
  198. margin: 0 32rpx;
  199. padding: 32rpx 0;
  200. border-bottom: 1rpx solid #f0f0f0;
  201. &:last-child {
  202. border-bottom: none;
  203. }
  204. .meanLeft {
  205. display: flex;
  206. align-items: center;
  207. justify-content: center;
  208. image {
  209. width: 38rpx;
  210. height: 38rpx;
  211. }
  212. text {
  213. margin-left: 10rpx;
  214. color: #111111;
  215. font-size: 32rpx;
  216. }
  217. }
  218. .meanRight image {
  219. width: 16rpx;
  220. height: 26rpx;
  221. }
  222. }
  223. }
  224. .logoutBtn {
  225. width: 710rpx;
  226. margin: 48rpx auto 0 auto;
  227. height: 88rpx;
  228. background: #fff;
  229. color: #b48a7c;
  230. font-size: 32rpx;
  231. border-radius: 30rpx;
  232. display: flex;
  233. align-items: center;
  234. justify-content: center;
  235. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.03);
  236. }
  237. }
  238. </style>