my.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <!-- 个人中心 -->
  2. <template>
  3. <view class="wrap">
  4. <view class="head">
  5. <image :src="isLogin ? info.headimg : '../../static/avatar.png'" class="avatar"
  6. mode="aspectFill"></image>
  7. <view class="head-sidebar">
  8. <view class="head-sidebar-top">
  9. <view class="my-name" v-if="isLogin">{{info.name}}</view>
  10. <view class="my-name" v-if="!isLogin"><text @tap="login">登录</text>/<text @tap="register">注册</text></view>
  11. <view class="head-btn-box">
  12. <button type="default" @tap="message">
  13. <image src="../../static/my-head1.png" mode=""></image>
  14. </button>
  15. <button type="default" @tap="setUp">
  16. <image src="../../static/my-head2.png" mode=""></image>
  17. </button>
  18. </view>
  19. </view>
  20. <view class="my-tag" @tap="member">
  21. <image src="../../static/grade.png" mode=""></image>
  22. 大众会员
  23. </view>
  24. </view>
  25. </view>
  26. <view class="content-box">
  27. <view class="card">
  28. <view class="card-top">
  29. <view class="card-top-item" @tap="myFans">
  30. 我的粉丝<text>28</text>
  31. </view>
  32. <view class="card-top-item" @tap="myCommission">
  33. 我的佣金<text>{{info.wallet.money}}</text>
  34. </view>
  35. </view>
  36. <view class="card-bottom">
  37. <view class="card-bottom-item" @tap="myCollection">
  38. <text>15</text>
  39. <text>收藏</text>
  40. </view>
  41. <view class="card-bottom-item" @tap="browseHistory">
  42. <text>15</text>
  43. <text>浏览记录</text>
  44. </view>
  45. <view class="card-bottom-item" @tap="integral">
  46. <text>{{info.wallet.integral}}</text>
  47. <text>积分</text>
  48. </view>
  49. <view class="card-bottom-item" @tap="coupon">
  50. <text>15</text>
  51. <text>卡券</text>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="my-module">
  56. <view class="my-top">
  57. <text class="my-top-name">我的订单</text>
  58. <view class="all-btn" @tap="myOrder">
  59. 查看全部订单
  60. <image src="../../static/back-icon2.png" mode="widthFix"></image>
  61. </view>
  62. </view>
  63. <view class="my-order-list">
  64. <view class="my-order-item">
  65. <image src="../../static/my-menu1.png" class="my-order-item-img" mode=""></image>
  66. 待付款
  67. <view class="num">6</view>
  68. </view>
  69. <view class="my-order-item">
  70. <image src="../../static/my-menu2.png" class="my-order-item-img" mode=""></image>
  71. 待发货
  72. <view class="num">6</view>
  73. </view>
  74. <view class="my-order-item">
  75. <image src="../../static/my-menu3.png" class="my-order-item-img" mode=""></image>
  76. 待收货
  77. </view>
  78. <view class="my-order-item">
  79. <image src="../../static/my-menu4.png" class="my-order-item-img" mode=""></image>
  80. 待评价
  81. <view class="num">6</view>
  82. </view>
  83. <view class="my-order-item">
  84. <image src="../../static/my-menu5.png" class="my-order-item-img" mode=""></image>
  85. 售后
  86. </view>
  87. </view>
  88. </view>
  89. <view class="my-module">
  90. <view class="my-top">
  91. <text class="my-top-name">常用功能</text>
  92. </view>
  93. <view class="my-nav-list">
  94. <view class="my-nav-item" @tap="joinHandsWithPartners">
  95. <image src="../../static/my-nav1.png" class="my-nav-item-img" mode=""></image>
  96. 携手合伙人
  97. </view>
  98. <view class="my-nav-item" @tap="signInAward">
  99. <image src="../../static/my-nav2.png" class="my-nav-item-img" mode=""></image>
  100. 签到奖励
  101. </view>
  102. <view class="my-nav-item" @tap="myCommission">
  103. <image src="../../static/my-nav3.png" class="my-nav-item-img" mode=""></image>
  104. 我的分销
  105. </view>
  106. <view class="my-nav-item">
  107. <image src="../../static/my-nav4.png" class="my-nav-item-img" mode=""></image>
  108. 产品溯源
  109. </view>
  110. <view class="my-nav-item" @tap="myAppointment">
  111. <image src="../../static/my-nav5.png" class="my-nav-item-img" mode=""></image>
  112. 我的预约
  113. </view>
  114. <view class="my-nav-item" @tap="feedback">
  115. <image src="../../static/my-nav6.png" class="my-nav-item-img" mode=""></image>
  116. 意见反馈
  117. </view>
  118. <view class="my-nav-item" @tap="onlineService">
  119. <image src="../../static/my-nav7.png" class="my-nav-item-img" mode=""></image>
  120. 在线客服
  121. </view>
  122. <view class="my-nav-item" @tap="informationMaterial">
  123. <image src="../../static/my-nav8.png" class="my-nav-item-img" mode=""></image>
  124. 资讯素材
  125. </view>
  126. </view>
  127. </view>
  128. </view>
  129. <!-- 底部tabbar组件 -->
  130. <tab-bar :current="4"></tab-bar>
  131. </view>
  132. </template>
  133. <script>
  134. import { userCenterGetUserInfo } from '../../common/service.js';
  135. export default {
  136. data() {
  137. return {
  138. //是否登录
  139. isLogin: false,
  140. info: {
  141. wallet: {},
  142. },
  143. }
  144. },
  145. onLoad() {
  146. },
  147. onShow() {
  148. this.getUserInfo();
  149. },
  150. methods: {
  151. getUserInfo() {
  152. userCenterGetUserInfo({
  153. success: ({code, data, msg}) => {
  154. if (code == 1) {
  155. uni.setStorageSync('USER_INFO', data.detail);
  156. this.info = data.detail;
  157. this.isLogin = true;
  158. } else {
  159. uni.showToast({
  160. icon: 'none',
  161. title: msg,
  162. });
  163. }
  164. },
  165. });
  166. },
  167. //跳转消息
  168. message() {
  169. uni.navigateTo({
  170. url: 'message/message'
  171. })
  172. },
  173. //跳转设置
  174. setUp() {
  175. uni.navigateTo({
  176. url: 'set-up/set-up'
  177. })
  178. },
  179. //跳转我的粉丝
  180. myFans() {
  181. uni.navigateTo({
  182. url: 'my-fans/my-fans'
  183. })
  184. },
  185. //跳转我的佣金
  186. myCommission() {
  187. uni.navigateTo({
  188. url: 'my-commission/my-commission'
  189. })
  190. },
  191. //跳转收藏
  192. myCollection() {
  193. uni.navigateTo({
  194. url: 'my-collection/my-collection'
  195. })
  196. },
  197. //跳转浏览记录
  198. browseHistory() {
  199. uni.navigateTo({
  200. url: 'browse-history/browse-history'
  201. })
  202. },
  203. //跳转积分
  204. integral() {
  205. uni.navigateTo({
  206. url: 'integral/integral'
  207. })
  208. },
  209. //跳转卡券
  210. coupon() {
  211. uni.navigateTo({
  212. url: 'coupon/coupon'
  213. })
  214. },
  215. //跳转我的分销
  216. myCommission() {
  217. uni.navigateTo({
  218. url: 'my-commission/my-commission'
  219. })
  220. },
  221. //跳转我的预约
  222. myAppointment() {
  223. uni.navigateTo({
  224. url: 'my-appointment/my-appointment'
  225. })
  226. },
  227. //跳转意见反馈
  228. feedback() {
  229. uni.navigateTo({
  230. url: 'feedback/feedback'
  231. })
  232. },
  233. //跳转咨询素材
  234. informationMaterial() {
  235. uni.navigateTo({
  236. url: 'information-material/information-material'
  237. })
  238. },
  239. //跳转签到奖励
  240. signInAward() {
  241. uni.navigateTo({
  242. url: 'sign-in-award/sign-in-award'
  243. })
  244. },
  245. //跳转在线客服
  246. onlineService() {
  247. uni.navigateTo({
  248. url: 'online-service/online-service'
  249. })
  250. },
  251. //跳转我的订单
  252. myOrder() {
  253. uni.navigateTo({
  254. url: '../my-order/my-order'
  255. })
  256. },
  257. //跳转登录
  258. login() {
  259. uni.navigateTo({
  260. url: '../login/login'
  261. })
  262. },
  263. //跳转注册
  264. register() {
  265. uni.navigateTo({
  266. url: '../login/register/register'
  267. })
  268. },
  269. //跳转大众会员
  270. member() {
  271. uni.navigateTo({
  272. url: 'member/member'
  273. })
  274. },
  275. //跳转携手合作人
  276. joinHandsWithPartners() {
  277. uni.navigateTo({
  278. url: 'join-hands-with-partners/join-hands-with-partners'
  279. })
  280. },
  281. }
  282. }
  283. </script>
  284. <style scoped lang="scss">
  285. @import "./my.css";
  286. </style>