myaccount.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <template>
  2. <view style="position: relative;">
  3. <!-- 胶囊 -->
  4. <mvBar :mysNavConfig="mysNavConfig"></mvBar>
  5. <view style="height: 180rpx;width: 100%; position: fixed;background-color: #FFFFFF;top: 0;z-index: 8;">
  6. </view>
  7. <view class="menu">
  8. <view class="menu-item" @click="topersoninfo()">
  9. <p>个人资料</p>
  10. </view>
  11. <view class="menu-item" @click="tomylocation()">
  12. <p>收货地址</p>
  13. </view>
  14. <view class="menu-item">
  15. <p class='lor'>社媒账号</p>
  16. </view>
  17. <view class="menu-item" @click="tomybank()">
  18. <p>提现绑定</p>
  19. </view>
  20. </view>
  21. <view style="padding-top: 260rpx;width: 97%;">
  22. <!-- 已经绑定的账号-->
  23. <view class="card" style="margin-top: 2%;" v-for="item in account">
  24. <view class="Tasktext" @click="accountdetail(item)">
  25. <image :src="item.platform_icon" mode=""></image>
  26. <span>{{item.platform_nickname}}</span>
  27. </view>
  28. <view class="dou">
  29. <p style="padding-right: 20rpx;color:#A8A8A8;">粉丝数</p>
  30. <p>{{item.fans_count}}</p>
  31. </view>
  32. <view class="clickkk" @click="accountdetail(item)">
  33. <image :src="togoimg" mode="" style="width: 16rpx;height: 30rpx;"></image>
  34. </view>
  35. </view>
  36. <!-- 未绑定的 -->
  37. <view class="card" style="margin-top: 2%;" v-for="item in list1">
  38. <view class="Tasktext" @click="bindaccount(item)">
  39. <image :src="item.platform_icon" mode=""></image>
  40. <span>绑定{{item.platform_name}}账号</span>
  41. </view>
  42. <view class="dou"></view>
  43. <view class="clickkk" @click="bindaccount(item)">
  44. <image :src="togoimg" mode="" style="width: 16rpx;height: 30rpx;"></image>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="" style="width: 100%;height: 200rpx;">
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import mvBar from "@/components/mys_navBar/mysNavBar";
  54. export default {
  55. components: {
  56. mvBar,
  57. },
  58. data() {
  59. return {
  60. togoimg: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/task16.png',
  61. list1: [],
  62. account: [],
  63. mysNavConfig: {
  64. /* 开启单页显示首页图标 */
  65. isHome: true,
  66. /* 固定导航 */
  67. navFixed: true,
  68. /* 标题 (屏幕中心居中 两边图标中心居中使用slot center1) */
  69. navTitle: {
  70. text: "我的信息",
  71. color: "",
  72. fontSize: "32rpx", // px upx rpx
  73. fontWeight: "normal", // 100 - 700
  74. },
  75. btnType: "type2",
  76. onLeftClick: '/pages/mycenter/mycenter',
  77. /* type2 按钮 */
  78. type2Config: {
  79. // 左图标
  80. leftPath: "/static/img/png2.png",
  81. // 右图标
  82. rightPath: "/static/img/png4.png",
  83. // 圆角
  84. radius: "40rpx",
  85. },
  86. },
  87. }
  88. },
  89. onShow() {
  90. this.getlist1()
  91. uni.showLoading()
  92. setTimeout(() => {
  93. uni.hideLoading()
  94. }, 500)
  95. },
  96. onLoad() {
  97. },
  98. methods: {
  99. tomylocation() {
  100. uni.navigateTo({
  101. url: './mylocation'
  102. });
  103. },
  104. topersoninfo() {
  105. uni.navigateTo({
  106. url: './personinfo'
  107. });
  108. },
  109. tomybank() {
  110. uni.navigateTo({
  111. url: './mybank'
  112. });
  113. },
  114. // 信息表
  115. getlist() {
  116. this.$https.get('/youngee/c/t/g/get-talent-account')
  117. .then(res => {
  118. console.log(res)
  119. if (res.data.code !== -3) {
  120. this.account = res.data.data
  121. for (var i = 0; i < this.account.length; i++) {
  122. for (var j = 0; j < this.list1.length; j++) {
  123. if (this.list1[j].id == this.account[i].platform_id) {
  124. this.account[i].platform_icon = this.list1[j].platform_icon
  125. this.list1.splice(j, 1)
  126. }
  127. }
  128. }
  129. }
  130. })
  131. },
  132. // 默认信息表
  133. getlist1() {
  134. this.$https.get('/youngee/c/g/get-info-tables')
  135. .then(res => {
  136. console.log(res)
  137. this.list1 = res.data.data.ThirdPlatform
  138. this.getlist()
  139. })
  140. },
  141. // 前往绑定账号
  142. bindaccount(item) {
  143. uni.navigateTo({
  144. url: '/pages/mycenter/bindaccount?platform_id=' + item.id
  145. });
  146. },
  147. // 前往账号详情
  148. accountdetail(item) {
  149. uni.navigateTo({
  150. url: '/pages/mycenter/bindaccount?platform_id=' + item.platform_id + '&account_id=' + item
  151. .account_id
  152. });
  153. }
  154. }
  155. }
  156. </script>
  157. <style lang="scss" scoped>
  158. view {
  159. font-size: 14px;
  160. line-height: inherit;
  161. }
  162. .menu {
  163. position: fixed;
  164. top: 180rpx;
  165. border-bottom: #FCCF41;
  166. background-color: #FFFFFF;
  167. justify-content: space-around;
  168. height: 5%;
  169. width: 100%;
  170. display: flex;
  171. z-index: 10;
  172. }
  173. .menu-item p {
  174. font-weight: 600;
  175. &.lor {
  176. border-bottom: 5rpx solid #F0D232;
  177. color: #F0D232;
  178. padding-bottom: 15rpx;
  179. }
  180. }
  181. .card {
  182. display: flex;
  183. align-items: center;
  184. // justify-content: space-between;
  185. width: 88%;
  186. padding: 24rpx;
  187. margin-top: 30rpx;
  188. border-radius: 10rpx;
  189. background-color: #ffffff;
  190. margin: 0 auto;
  191. box-shadow: 0px 0px 10rpx 2rpx #F4F4F4;
  192. }
  193. .Tasktext {
  194. display: inline-block;
  195. padding: 0 0 0 1%;
  196. width: 400rpx;
  197. }
  198. .Tasktext span {
  199. color: #333333;
  200. font-weight: 550;
  201. text-indent: 2em;
  202. }
  203. .Tasktext image {
  204. vertical-align: middle;
  205. width: 50rpx;
  206. height: 50rpx;
  207. display: inline-block;
  208. padding-right: 14rpx;
  209. }
  210. .dou {
  211. display: flex;
  212. width: 250rpx;
  213. }
  214. .dou p {
  215. display: inline-block;
  216. font-size: 26rpx;
  217. color: #333333;
  218. font-weight: 550;
  219. }
  220. .dou span {
  221. font-size: 24rpx;
  222. color: #666666;
  223. }
  224. </style>