mine.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. <template>
  2. <div class="mine">
  3. <div v-document_title>熊猫美妆</div>
  4. <group>
  5. <cell :title="userMsg.userName" :link="loginPath" style="padding: 30px 40px;">
  6. <img slot="icon" v-bind:src="userMsg.userImg"
  7. style="width: 122px; height: 118px; vertical-align: middle; margin-right: 32px;border-radius: 10px;"
  8. alt="logo"/>
  9. </cell>
  10. </group>
  11. <group>
  12. <cell title="我的订单" value="查看全部订单" is-link link="/order_tabs/全部/0/0" style="padding: 50px 40px;"></cell>
  13. <cell class="order_classify">
  14. <flexbox>
  15. <flexbox-item>
  16. <router-link :to="{ path: '/order_tabs/待付款/1/10'}">
  17. <div class="order_classify_icon order_classify_icon_1"></div>
  18. <p class="item_title">待付款</p>
  19. </router-link>
  20. </flexbox-item>
  21. <flexbox-item>
  22. <router-link :to="{ path: '/order_tabs/待发货/2/20'}">
  23. <div class="order_classify_icon order_classify_icon_2"></div>
  24. <p class="item_title">待发货</p>
  25. </router-link>
  26. </flexbox-item>
  27. </flexbox-item>
  28. <flexbox-item>
  29. <router-link :to="{ path: '/order_tabs/待收货/3/30'}">
  30. <div class="order_classify_icon order_classify_icon_3">
  31. </div>
  32. <p class="item_title">待收货</p>
  33. </router-link>
  34. </flexbox-item>
  35. </flexbox-item>
  36. <flexbox-item>
  37. <router-link :to="{ path: '/order_tabs/已收货/4/40'}">
  38. <div class="order_classify_icon order_classify_icon_4"></div>
  39. <p class="item_title">已收货</p>
  40. </router-link>
  41. </flexbox-item>
  42. <flexbox-item>
  43. <div @click="refoundClick" class="order_classify_icon order_classify_icon_5"></div>
  44. <p class="item_title">退款/售后</p>
  45. </flexbox-item>
  46. </flexbox>
  47. </cell>
  48. </group>
  49. <group>
  50. <cell title="熊猫红包" is-link :border-intent="false" @click.native="showBonus = !showBonus">
  51. <img slot="icon" src="../../../assets/bonus_icon.png"
  52. style="width: 32px;vertical-align: text-bottom;margin-right: 25px;"/>
  53. </cell>
  54. <div class="bonus_slide" v-for="bonus in userbonus" :class="showBonus?'animate':''">
  55. <div style="overflow: hidden;">
  56. <span class="bonus_label">{{bonus.rate+'%'}}</span>
  57. <span class="bonus_value">{{bonus.total}}元</span>
  58. </div>
  59. <br/>
  60. </div>
  61. <cell title="收货地址" is-link link="/address/list">
  62. <img slot="icon" src="../../../assets/address_icon.png"
  63. style="width: 34px;vertical-align: text-bottom;margin-right: 25px;"/>
  64. </cell>
  65. <cell title="我的F码" is-link link="/fcodelist">
  66. <img slot="icon" src="../../../assets/fcode_icon.png"
  67. style="width: 34px;vertical-align: text-bottom;margin-right: 25px;"/>
  68. </cell>
  69. <cell title="帮助中心" is-link link="http://p.lrlz.com/hfive/feed_back/question_answer.html">
  70. <img slot="icon" src="../../../assets/help_icon.png"
  71. style="width: 34px;vertical-align: text-bottom;margin-right: 25px;"/>
  72. </cell>
  73. </group>
  74. </div>
  75. </template>
  76. <script>
  77. import {Group, Cell, Flexbox, FlexboxItem, Divider} from 'vux'
  78. import DefaultImg from '../../../assets/mine_logo_icon.png'
  79. import WechatShare from '../../../wechat/WechatShare'
  80. export default {
  81. created(){
  82. let shareMsg = {
  83. title: '熊猫美妆商城',
  84. desc: '熊猫美妆极速商城',
  85. link: "http://" + window.location.host + '/mobile/index.html?#',
  86. img_url: 'http://a.lrlz.com/data/upload/shop/store/goods/6/6_05342032688036066_1280.jpg'
  87. };
  88. let WxShare = new WechatShare(shareMsg);
  89. if (this.$store.state.isLogIn) {
  90. this.userName = this.$store.state.user['name'];
  91. this.userImg = this.$store.state.user['image'];
  92. }
  93. else {
  94. this.userName = '登录';
  95. this.userImg = this.DefaultImg;
  96. }
  97. },
  98. mounted(){
  99. this.$store.commit('updateLoadingStatus', {isLoading: false});
  100. },
  101. components: {
  102. Group,
  103. Cell,
  104. Flexbox,
  105. FlexboxItem,
  106. Divider
  107. },
  108. data(){
  109. return {
  110. DefaultImg: DefaultImg,
  111. showContent002: true,
  112. user_bonus: this.$store.state.user_bonus,
  113. showBonus: false
  114. }
  115. },
  116. methods: {
  117. refoundClick (event){
  118. this.$vux.toast.show({
  119. type: 'text',
  120. text: "请到熊猫美妆APP操作!",
  121. position: 'middle'
  122. });
  123. }
  124. },
  125. computed: {
  126. userMsg () {
  127. let user = {};
  128. if (this.$store.state.isLogIn) {
  129. user.userName = this.$store.state.user['name'];
  130. user.userImg = this.$store.state.user['image'];
  131. }
  132. else {
  133. user.userName = '登录';
  134. user.userImg = this.DefaultImg;
  135. }
  136. return user;
  137. },
  138. loginPath (){
  139. let path = '';
  140. if (!this.$store.state.isLogIn) {
  141. path = '/login';
  142. }
  143. return path;
  144. },
  145. userbonus(){
  146. return this.$store.state.user_bonus;
  147. }
  148. }
  149. }
  150. </script>
  151. <style>
  152. .bonus_label {
  153. float: left;
  154. height: 50px;
  155. line-height: 50px;
  156. margin-left: 20px;
  157. }
  158. .bonus_value {
  159. float: right;
  160. line-height: 30px;
  161. margin-right: 20px;
  162. color: #EB4E4F;
  163. }
  164. .bonus_slide {
  165. padding: 0 20px;
  166. overflow: hidden;
  167. max-height: 0;
  168. transition: max-height .5s cubic-bezier(0, 1, 0, 1) -.1s;
  169. }
  170. .animate {
  171. max-height: 9999px;
  172. transition-timing-function: cubic-bezier(0.5, 0, 1, 0);
  173. transition-delay: 0s;
  174. }
  175. .mine {
  176. background: #f9f9f9;
  177. }
  178. .mine .weui-cells {
  179. font-size: 30px;
  180. }
  181. .mine .shop_state {
  182. position: absolute;
  183. }
  184. .mine .order_classify_icon {
  185. width: 100%;
  186. height: 40px;
  187. }
  188. .mine .order_classify_icon img {
  189. width: 40%;
  190. margin: 0 auto;
  191. }
  192. .mine .vux-flexbox-item p {
  193. white-space: nowrap;
  194. text-overflow: ellipsis;
  195. -o-text-overflow: ellipsis;
  196. overflow: hidden;
  197. text-align: center;
  198. font-size: 20px;
  199. margin-top: 10px;
  200. height: 30px;
  201. line-height: 30px;
  202. }
  203. .order_classify .weui-cell__ft {
  204. width: 100%;
  205. }
  206. .order_classify_icon_1 {
  207. background: url("../../../assets/payments_due_icon.png") no-repeat center;
  208. background-size: 30%;
  209. }
  210. .order_classify_icon_2 {
  211. background: url("../../../assets/shipping_term_icon.png") no-repeat center;
  212. background-size: 30%;
  213. }
  214. .order_classify_icon_3 {
  215. background: url("../../../assets/goods_receipt_icon.png") no-repeat center;
  216. background-size: 30%;
  217. }
  218. .order_classify_icon_4 {
  219. background: url("../../../assets/evaluated_icon.png") no-repeat center;
  220. background-size: 28%;
  221. }
  222. .order_classify_icon_5 {
  223. background: url("../../../assets/refund_terms_icon.png") no-repeat center;
  224. background-size: 30%;
  225. }
  226. </style>