mine.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. <template>
  2. <view class="mine-page">
  3. <!-- 头部 -->
  4. <headContent>
  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">
  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">
  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" 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. export default {
  168. components: {
  169. pageStyle,
  170. reverseBack
  171. },
  172. data() {
  173. return {
  174. showMuen:false,
  175. userInfo:{}
  176. };
  177. },
  178. onShow() {
  179. },
  180. computed: {
  181. ...mapGetters([
  182. 'token'
  183. ]),
  184. },
  185. watch:{
  186. token:{
  187. handler(newToken){
  188. this.showMuen = newToken ? true : false
  189. if(newToken){
  190. this.getUserInfo()
  191. }
  192. },
  193. immediate:true
  194. }
  195. },
  196. methods:{
  197. // 获取用户信息
  198. getUserInfo(){
  199. Way_getUserInfo().then(res => {
  200. this.userInfo = res
  201. }).catch(err => {
  202. this.userInfo = {}
  203. })
  204. },
  205. // 去登陆
  206. goLogin(){
  207. uni.navigateTo({
  208. url: '/pages/login/index'
  209. });
  210. },
  211. // 打开邀请
  212. openShare(){
  213. this.$nextTick(() => {
  214. this.$refs.sharePageRef.openShare()
  215. })
  216. },
  217. // 系统设置
  218. openSetting(){
  219. uni.navigateTo({
  220. url:'/pages/content/setting'
  221. })
  222. },
  223. // 安全设置
  224. openSafetySet(){
  225. uni.navigateTo({
  226. url:'/pages/content/safety-set'
  227. })
  228. },
  229. getService(){
  230. uni.navigateTo({
  231. url:'/pages/content/customer-service'
  232. })
  233. }
  234. }
  235. }
  236. </script>
  237. <style>
  238. page {
  239. background-color: #fff;
  240. }
  241. </style>
  242. <style lang="scss" scoped>
  243. .mine-info {
  244. width: 100%;
  245. min-height: 160rpx;
  246. background-color: $modules-box-bg;
  247. padding: 23rpx $pages-padding 30rpx;
  248. .mine-account {
  249. font-size: 38rpx;
  250. font-family: PingFang SC, PingFang SC-Bold;
  251. font-weight: 700;
  252. color: #1a1a1a;
  253. }
  254. .mine-UID {
  255. margin-top: 13rpx;
  256. font-size: 28rpx;
  257. font-family: PingFang SC, PingFang SC-Regular;
  258. font-weight: 400;
  259. color: #808080;
  260. .copy-UID {
  261. width: 22rpx;
  262. height: 26rpx;
  263. margin-left: 12rpx;
  264. }
  265. }
  266. }
  267. // <view class="mine-muen">
  268. // <view class="muen-content">
  269. // <image class="muen-icon" src="../../static/logo.png" mode="aspectFit" /> <text class="muen-text">安全设置</text>
  270. // </view>
  271. // <image class="muen-moey" src="../../static/logo.png" mode="aspectFit" />
  272. // </view>
  273. .mine-muen-item {
  274. width: 100%;
  275. height: 94rpx;
  276. display: flex;
  277. justify-content: space-between;
  278. align-items: center;
  279. background-color: $modules-box-bg;
  280. padding: 0 $pages-padding;
  281. border-bottom: 1rpx solid #f2f2f2;
  282. &:last-child {
  283. border-bottom: none;
  284. }
  285. .muen-content {
  286. display: flex;
  287. align-items: center;
  288. .muen-icon {
  289. width: 28rpx;
  290. height: 28rpx;
  291. }
  292. .muen-text {
  293. padding-left: 15rpx;
  294. font-size: 28rpx;
  295. font-family: PingFang SC, PingFang SC-Regular;
  296. font-weight: 400;
  297. color: #1a1a1a;
  298. line-height: 40rpx;
  299. }
  300. }
  301. .muen-more {
  302. flex-shrink: 0;
  303. display: flex;
  304. align-items: center;
  305. .muen-more-text {
  306. font-size: 28rpx;
  307. font-family: PingFang SC, PingFang SC-Regular;
  308. font-weight: 400;
  309. color: #0abd76;
  310. padding-right: 18rpx;
  311. }
  312. .muen-more-icon {
  313. font-size: 26rpx;
  314. color: #ccc;
  315. }
  316. }
  317. }
  318. .mine-btn{
  319. width: 690rpx;
  320. height: 90rpx;
  321. margin: 80rpx auto;
  322. background: #05c175;
  323. border-radius: 8rpx;
  324. font-size: 30rpx;
  325. font-family: PingFang SC, PingFang SC-Regular;
  326. font-weight: 400;
  327. text-align: center;
  328. color: #ffffff;
  329. line-height:90rpx;
  330. letter-spacing: 0.64rpx;
  331. }
  332. </style>