mine.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. <template>
  2. <view class="mine-page" >
  3. <!-- 头部 -->
  4. <headContent borderBottom>
  5. <template #left>
  6. <reverse-back />
  7. </template>
  8. <template #content>
  9. <view class="haed-title">
  10. 个人中心
  11. </view>
  12. </template>
  13. <template #right>
  14. <page-style />
  15. </template>
  16. </headContent>
  17. <!-- 个人信息 -->
  18. <view class="mine-info" v-if="showMuen">
  19. <view class="mine-account">{{ userInfo.account_number }}</view>
  20. <view class="mine-UID">UID: {{ userInfo.extension_code }}<image class="copy-UID" src="../../static/logo.png" mode=""></image>
  21. </view>
  22. </view>
  23. <!-- 个人信息 -->
  24. <view class="mine-info" v-else @click.stop="goLogin()">
  25. <view class="mine-account">点击登录/注册</view>
  26. <view class="mine-UID">Hi, 欢迎来到BiKing</view>
  27. </view>
  28. <gap />
  29. <!-- 个人信息 -->
  30. <view class="mine-muen">
  31. <view v-show="showMuen" class="mine-muen-item" @click.stop="openSafetySet()">
  32. <view class="muen-content">
  33. <image class="muen-icon" src="@/static/logo.png" mode="aspectFit" />
  34. <text class="muen-text">安全设置</text>
  35. </view>
  36. <view class="muen-more">
  37. <text class="more-icon iconfont">&#xe88e;</text>
  38. <!-- <image class="muen-more-icon" src="../../static/logo.png" mode="aspectFit" /> -->
  39. </view>
  40. </view>
  41. <view v-show="showMuen" class="mine-muen-item">
  42. <view class="muen-content">
  43. <image class="muen-icon" src="@/static/logo.png" mode="aspectFit" />
  44. <text class="muen-text">身份验证</text>
  45. </view>
  46. <view class="muen-more">
  47. <text class="muen-more-text">{{ userInfo.is_realname == 1 ? '去认证' : '' }}</text>
  48. <text class="more-icon iconfont">&#xe88e;</text>
  49. </view>
  50. </view>
  51. <view v-show="showMuen" class="mine-muen-item" @click.stop="getAddress()">
  52. <view class="muen-content">
  53. <image class="muen-icon" src="@/static/logo.png" mode="aspectFit" />
  54. <text class="muen-text">提现地址</text>
  55. </view>
  56. <view class="muen-more">
  57. <text class="more-icon iconfont">&#xe88e;</text>
  58. </view>
  59. </view>
  60. <view v-show="showMuen" class="mine-muen-item">
  61. <view class="muen-content">
  62. <image class="muen-icon" src="@/static/logo.png" mode="aspectFit" />
  63. <text class="muen-text">我的红包</text>
  64. </view>
  65. <view class="muen-more">
  66. <text class="more-icon iconfont">&#xe88e;</text>
  67. </view>
  68. </view>
  69. <view v-show="showMuen" class="mine-muen-item">
  70. <view class="muen-content">
  71. <image class="muen-icon" src="@/static/logo.png" mode="aspectFit" />
  72. <text class="muen-text">活动中心</text>
  73. </view>
  74. <view class="muen-more">
  75. <text class="more-icon iconfont">&#xe88e;</text>
  76. </view>
  77. </view>
  78. <view class="mine-muen-item" @click.stop="openShare()">
  79. <view class="muen-content">
  80. <image class="muen-icon" src="@/static/logo.png" mode="aspectFit" />
  81. <text class="muen-text">邀请链接</text>
  82. </view>
  83. <view class="muen-more">
  84. <text class="more-icon iconfont">&#xe88e;</text>
  85. </view>
  86. </view>
  87. <view v-show="showMuen" class="mine-muen-item">
  88. <view class="muen-content">
  89. <image class="muen-icon" src="@/static/logo.png" mode="aspectFit" />
  90. <text class="muen-text">合约战绩</text>
  91. </view>
  92. <view class="muen-more">
  93. <text class="more-icon iconfont">&#xe88e;</text>
  94. </view>
  95. </view>
  96. </view>
  97. <gap />
  98. <view class="mine-muen">
  99. <view class="mine-muen-item" @click.stop="openSetting()">
  100. <view class="muen-content">
  101. <image class="muen-icon" src="../../static/logo.png" mode="aspectFit" />
  102. <text class="muen-text">系统设置</text>
  103. </view>
  104. <view class="muen-more">
  105. <text class="more-icon iconfont">&#xe88e;</text>
  106. </view>
  107. </view>
  108. </view>
  109. <gap />
  110. <view class="mine-muen">
  111. <view class="mine-muen-item">
  112. <view class="muen-content">
  113. <image class="muen-icon" src="../../static/logo.png" mode="aspectFit" />
  114. <text class="muen-text">检查更新</text>
  115. </view>
  116. <view class="muen-more">
  117. <text class="muen-more-text">当前版本 V2.4.6 62</text>
  118. <text class="more-icon iconfont">&#xe88e;</text>
  119. </view>
  120. </view>
  121. </view>
  122. <gap />
  123. <view class="mine-muen">
  124. <!-- <view class="mine-muen-item">
  125. <view class="muen-content">
  126. <image class="muen-icon" src="../../static/logo.png" mode="aspectFit" />
  127. <text class="muen-text">消息中心</text>
  128. </view>
  129. <view class="muen-more">
  130. <text class="more-icon iconfont">&#xe88e;</text>
  131. </view>
  132. </view> -->
  133. <view class="mine-muen-item" @click.stop="getService()">
  134. <view class="muen-content">
  135. <image class="muen-icon" src="../../static/logo.png" mode="aspectFit" />
  136. <text class="muen-text">在线客服</text>
  137. </view>
  138. <view class="muen-more">
  139. <text class="more-icon iconfont">&#xe88e;</text>
  140. </view>
  141. </view>
  142. <view class="mine-muen-item" @click.stop="getAboutUs()">
  143. <view class="muen-content">
  144. <image class="muen-icon" src="../../static/logo.png" mode="aspectFit" />
  145. <text class="muen-text">关于我们</text>
  146. </view>
  147. <view class="muen-more">
  148. <text class="more-icon iconfont">&#xe88e;</text>
  149. </view>
  150. </view>
  151. <view class="mine-btn" @click.stop="retreatFromLogin" v-show="showMuen">
  152. 安全退出
  153. </view>
  154. </view>
  155. <!-- 邀请 -->
  156. <sharePage ref="sharePageRef" :tabBar="false"/>
  157. <!-- -->
  158. </view>
  159. </template>
  160. <script>
  161. import {
  162. mapGetters
  163. } from 'vuex'
  164. import reverseBack from "@/components/headModules/reverse-back.vue"
  165. import pageStyle from "@/components/headModules/style.vue"
  166. import { Way_getUserInfo } from "@/utils/common-request.js"
  167. import {
  168. refreshAccount
  169. } from "@/utils/common.js"
  170. export default {
  171. components: {
  172. pageStyle,
  173. reverseBack
  174. },
  175. data() {
  176. return {
  177. showMuen:false,
  178. userInfo:{}
  179. };
  180. },
  181. onShow() {
  182. },
  183. computed: {
  184. ...mapGetters([
  185. 'token'
  186. ]),
  187. },
  188. watch:{
  189. token:{
  190. handler(newToken){
  191. this.showMuen = newToken ? true : false
  192. if(newToken){
  193. this.getUserInfo()
  194. }
  195. },
  196. immediate:true
  197. }
  198. },
  199. methods:{
  200. // 获取用户信息
  201. getUserInfo(){
  202. Way_getUserInfo().then(res => {
  203. this.userInfo = res
  204. }).catch(err => {
  205. this.userInfo = {}
  206. })
  207. },
  208. // 去登陆
  209. goLogin(){
  210. uni.navigateTo({
  211. url: '/pages/login/index'
  212. });
  213. },
  214. // 打开邀请
  215. openShare(){
  216. this.$nextTick(() => {
  217. this.$refs.sharePageRef.openShare()
  218. })
  219. },
  220. // 系统设置
  221. openSetting(){
  222. uni.navigateTo({
  223. url:'/pages/content/setting'
  224. })
  225. },
  226. // 安全设置
  227. openSafetySet(){
  228. uni.navigateTo({
  229. url:'/pages/content/safety-set'
  230. })
  231. },
  232. // 在线客服
  233. getService(){
  234. uni.navigateTo({
  235. url:'/pages/content/customer-service'
  236. })
  237. },
  238. // 关于我们
  239. getAboutUs(){
  240. uni.navigateTo({
  241. url: `/pages/content/article-details?id=187`
  242. })
  243. },
  244. // 安全退出
  245. retreatFromLogin(){
  246. refreshAccount()
  247. },
  248. // 获取地址列表
  249. getAddress(){
  250. uni.navigateTo({
  251. url:'/pages/content/address'
  252. })
  253. }
  254. }
  255. }
  256. </script>
  257. <style>
  258. page {
  259. background-color: #fff;
  260. }
  261. </style>
  262. <style lang="scss" scoped>
  263. .mine-info {
  264. width: 100%;
  265. min-height: 140rpx;
  266. background-color: $modules-box-bg;
  267. padding: 23rpx $pages-padding 30rpx;
  268. display: flex;
  269. flex-direction: column;
  270. justify-content: space-between;
  271. .mine-account {
  272. font-size: 34rpx;
  273. font-family: PingFang SC, PingFang SC-Bold;
  274. font-weight: 700;
  275. color: #1a1a1a;
  276. }
  277. .mine-UID {
  278. margin-top: 13rpx;
  279. font-size: 22rpx;
  280. font-family: PingFang SC, PingFang SC-Regular;
  281. font-weight: 400;
  282. color: #808080;
  283. display: flex;
  284. align-items: center;
  285. .copy-UID {
  286. width: 22rpx;
  287. height: 26rpx;
  288. margin-left: 12rpx;
  289. }
  290. }
  291. }
  292. // <view class="mine-muen">
  293. // <view class="muen-content">
  294. // <image class="muen-icon" src="../../static/logo.png" mode="aspectFit" /> <text class="muen-text">安全设置</text>
  295. // </view>
  296. // <image class="muen-moey" src="../../static/logo.png" mode="aspectFit" />
  297. // </view>
  298. .mine-muen-item {
  299. width: 100%;
  300. height: 94rpx;
  301. display: flex;
  302. justify-content: space-between;
  303. align-items: center;
  304. background-color: $modules-box-bg;
  305. padding: 0 $pages-padding;
  306. border-bottom: 1rpx solid #f2f2f2;
  307. &:last-child {
  308. border-bottom: none;
  309. }
  310. .muen-content {
  311. display: flex;
  312. align-items: center;
  313. .muen-icon {
  314. width: 28rpx;
  315. height: 28rpx;
  316. }
  317. .muen-text {
  318. padding-left: 15rpx;
  319. font-size: 28rpx;
  320. font-family: PingFang SC, PingFang SC-Regular;
  321. font-weight: 400;
  322. color: #1a1a1a;
  323. line-height: 40rpx;
  324. }
  325. }
  326. .muen-more {
  327. flex-shrink: 0;
  328. display: flex;
  329. align-items: center;
  330. .muen-more-text {
  331. font-size: 28rpx;
  332. font-family: PingFang SC, PingFang SC-Regular;
  333. font-weight: 400;
  334. color: #0abd76;
  335. padding-right: 18rpx;
  336. }
  337. .muen-more-icon {
  338. font-size: 26rpx;
  339. color: #ccc;
  340. }
  341. }
  342. }
  343. .mine-btn{
  344. width: 690rpx;
  345. height: 90rpx;
  346. margin: 80rpx auto;
  347. background: #05c175;
  348. border-radius: 8rpx;
  349. font-size: 30rpx;
  350. font-family: PingFang SC, PingFang SC-Regular;
  351. font-weight: 400;
  352. text-align: center;
  353. color: #ffffff;
  354. line-height:90rpx;
  355. letter-spacing: 0.64rpx;
  356. }
  357. </style>