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