my-userinfo.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <template>
  2. <view>
  3. <image src="/static/home/BG.jpg" class="bgImg" ></image>
  4. <!-- 这是user信息-->
  5. <!-- <button v-on:click="test">测试</button>-->
  6. <!-- <van-image src="static/home/BG.jpg"></van-image>-->
  7. <!-- nih-->
  8. <!-- <view class="my-grid">-->
  9. <!-- <van-grid clickable direction="horizontal" :border="true" :column-num="4" :square="true" >-->
  10. <!-- &lt;!&ndash; <van-icon name="cash-o" />&ndash;&gt;-->
  11. <!-- &lt;!&ndash; <van-icon name="paid" />&ndash;&gt;-->
  12. <!-- &lt;!&ndash; <van-icon name="orders-o" />&ndash;&gt;-->
  13. <!-- &lt;!&ndash; <van-icon name="like-o" />&ndash;&gt;-->
  14. <!-- <van-grid-item icon="like-o" text="收藏"-->
  15. <!-- link-type="navigateTo"-->
  16. <!-- url="/pages/dashboard/index"-->
  17. <!-- />-->
  18. <!-- <van-grid-item icon="cash-o" text="余额" />-->
  19. <!-- <van-grid-item icon="paid" text="卡券" />-->
  20. <!-- <van-grid-item icon="orders-o" text="订单" />-->
  21. <!-- </van-grid> </view>-->
  22. <!-- 面板区域 -->
  23. <view class="panel-list" style="margin-top: 20px">
  24. <!-- 第1个面板 -->
  25. <view class="panel">
  26. <view class="panel-body">
  27. <view class="panel-item">
  28. <van-icon name="star-o" size="25"></van-icon>
  29. <text>收藏</text>
  30. </view>
  31. <view class="panel-item">
  32. <van-icon name="balance-o" size="25"></van-icon>
  33. <text>红包</text>
  34. </view>
  35. <view class="panel-item">
  36. <van-icon name="paid" size="25"></van-icon>
  37. <text>卡券</text>
  38. </view>
  39. <view class="panel-item">
  40. <van-icon name="cash-o" size="25"></van-icon>
  41. <text>余额</text>
  42. </view>
  43. </view>
  44. </view>
  45. <!-- 第2个面板 -->
  46. <view class="panel">
  47. <view class="panel-title" style="font-family: 'Montserrat', sans-serif;font-weight: bolder">我的订单</view>
  48. <view class="panel-body">
  49. <view class="panel-item" @click="toOrders(StaticState().ORDER.UNPAY)">
  50. <van-icon name="gold-coin-o" size="28"/>
  51. <text>代付款</text>
  52. </view><view class="panel-item" @click="toOrders(StaticState().ORDER.UNRECEIVE)">
  53. <van-icon name="gift-card-o" class="icon" size="30"/>
  54. <text>代收货</text>
  55. </view><view class="panel-item" @click="toOrders(StaticState().ORDER.REFUND)">
  56. <van-icon name="cash-back-record-o" class="icon" size="29"/>
  57. <text>退款/退货</text>
  58. </view><view class="panel-item" @click="toOrders(StaticState().ORDER.UNCOMMENT)">
  59. <van-icon name="records-o" class="icon" size="26"/>
  60. <text>待评价</text>
  61. </view>
  62. </view>
  63. </view>
  64. <!-- 第3个面板 -->
  65. <view class="panel">
  66. <view class="panel-list-item">
  67. <text>收货地址</text>
  68. <van-icon type="arrowright" size="15"></van-icon>
  69. </view>
  70. <view class="panel-list-item">
  71. <text>联系客服</text>
  72. <van-icon type="arrowright" size="15"></van-icon>
  73. </view>
  74. <view class="panel-list-item" @click="logout">
  75. <text>退出登录</text>
  76. <van-icon type="arrowright" size="15"></van-icon>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. </template>
  82. <script>
  83. import {mapState,mapMutations} from 'vuex'
  84. import {StaticState} from "@/store/StaticState";
  85. export default {
  86. name: "my-userinfo",
  87. data() {
  88. return {};
  89. },
  90. methods: {
  91. StaticState,
  92. test() {
  93. console.log(1, "test");
  94. },
  95. beforeMount() {
  96. console.log(1, "beforeMount");
  97. },
  98. toOrders(pagetype) {
  99. // console.log('----------------------')
  100. // console.log(this.StaticState)
  101. // console.log(this.StaticState.ORDER)
  102. // console.log('toLogin')
  103. let self =this
  104. console.log(pagetype,"这是我传参的参数")
  105. uni.navigateTo({
  106. url: '/subpkg/order/order?pagetype=' + pagetype ,// 跳转至 subpkg 中的 selShop 页面
  107. success() {
  108. console.log('url跳转成功')
  109. setTimeout(() => {
  110. }, 500); // 延迟 1000 毫秒(即 1 秒)后调用 getToken() 函数
  111. },
  112. fail() {
  113. console.log('url跳转失败')
  114. }
  115. });
  116. }
  117. }
  118. };
  119. </script>
  120. <style lang="scss">
  121. .my-grid{
  122. position: absolute;
  123. //border-radius: 20px;
  124. background-color: antiquewhite;
  125. width: 90%;
  126. left: 5%;
  127. height: 200px;
  128. border-radius: 100px;
  129. margin-top: 10px;
  130. }
  131. .bgImg{
  132. position: absolute;
  133. width: 95%;
  134. left: 2.5%;
  135. top: 1%;
  136. }
  137. .panel-list{
  138. padding: 0 10px;
  139. position: relative;
  140. top: -10px;
  141. .panel{
  142. background-color: white;
  143. border-radius: 10px;
  144. margin-bottom: 8px;
  145. .panel-title{
  146. line-height: 40px;
  147. padding-left: 10px;
  148. font-size: 15px;
  149. border-bottom: 1px solid #f4f4f4;
  150. }
  151. .panel-body{
  152. display: flex;
  153. justify-content: space-around;
  154. .panel-item{
  155. display: flex;
  156. flex-direction: column;
  157. align-items: center;
  158. justify-content: space-around;
  159. padding: 10px 0;
  160. font-size: 13px;
  161. .icon{
  162. width: 35px;
  163. height: 35px;
  164. }
  165. }
  166. }
  167. }
  168. //.panel:nth-child(1){
  169. // margin-top: 10px;
  170. // border-radius: 10px;
  171. //}
  172. }
  173. .panel-list-item{
  174. display: flex;
  175. justify-content: space-between;
  176. align-items: center;
  177. font-size: 15px;
  178. padding: 0 10px;
  179. line-height: 45px;
  180. }
  181. </style>