金诚优选前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

263 lines
6.2 KiB

  1. <template>
  2. <view>
  3. <lf-nav title="我的" :showIcon="true" :spreadOut="false" bgColor="transparent" titleColor="#fff"></lf-nav>
  4. <block v-if="$isRight(detail)">
  5. <view class="head">
  6. <view class="bg-left"></view>
  7. <view class="bg-right"></view>
  8. <view class="head-content">
  9. <view class="lf-flex">
  10. <image class="head-img" mode="aspectFill" src="https://picsum.photos/id/237/200/300"></image>
  11. <view class="head-title lf-line-3">雅诗兰黛专卖店</view>
  12. </view>
  13. <view class="lf-flex">
  14. <view class="head-menu" @click="$url('/pages/business/balance/balance')">
  15. <text class="lf-iconfont icon-yue"></text>
  16. <text>余额</text>
  17. </view>
  18. <view class="head-menu" @click="onScanCode">
  19. <text class="lf-iconfont icon-saoyisao"></text>
  20. <text>扫一扫</text>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="notice">
  26. <u-notice-bar mode="vertical" type="none" :list="list"></u-notice-bar>
  27. </view>
  28. <view class="card">
  29. <view class="lf-row-between">
  30. <view class="title">待处理</view>
  31. <view class="lf-color-777" @click="$url('/pages/business/order/list')">
  32. <text class="lf-font-24 lf-m-r-10">订单管理</text>
  33. <text class="lf-iconfont icon-xiangyou lf-font-20"></text>
  34. </view>
  35. </view>
  36. <view class="lf-flex lf-m-t-50">
  37. <view class="item" :style="{width: 100 / 3 +'%'}">
  38. <view class="num">0</view>
  39. <view>待付款</view>
  40. </view>
  41. <view class="item" :style="{width: 100 / 3 +'%'}">
  42. <view class="num">0</view>
  43. <view>待发货</view>
  44. </view>
  45. <view class="item" :style="{width: 100 / 3 +'%'}">
  46. <view class="num">0</view>
  47. <view>待提货</view>
  48. </view>
  49. </view>
  50. </view>
  51. <view class="card">
  52. <view class="lf-row-between">
  53. <view class="title">今日数据</view>
  54. </view>
  55. <view class="lf-flex lf-m-t-50">
  56. <view class="item" :style="{width: 100 / 3 +'%'}">
  57. <view class="num">
  58. <text>0</text>
  59. <text class="lf-font-24">()</text>
  60. </view>
  61. <view>支付金额</view>
  62. </view>
  63. <view class="item" :style="{width: 100 / 3 +'%'}">
  64. <view class="num">
  65. <text>0</text>
  66. <text class="lf-font-24">()</text>
  67. </view>
  68. <view>线上订单</view>
  69. </view>
  70. <view class="item" :style="{width: 100 / 3 +'%'}">
  71. <view class="num">
  72. <text>0</text>
  73. <text class="lf-font-24">()</text>
  74. </view>
  75. <view>线下订单</view>
  76. </view>
  77. </view>
  78. </view>
  79. <view class="card">
  80. <view class="lf-row-between">
  81. <view class="title">我的商品</view>
  82. </view>
  83. <view class="lf-flex lf-m-t-50">
  84. <view class="item" :style="{width: 100 / 3 +'%'}">
  85. <view class="num">0</view>
  86. <view>销售中</view>
  87. </view>
  88. <view class="item" :style="{width: 100 / 3 +'%'}">
  89. <view class="num">0</view>
  90. <view>待上架</view>
  91. </view>
  92. <view class="item" :style="{width: 100 / 3 +'%'}">
  93. <view class="num">0</view>
  94. <view>已下架</view>
  95. </view>
  96. </view>
  97. </view>
  98. </block>
  99. </view>
  100. </template>
  101. <script>
  102. export default {
  103. data(){
  104. return {
  105. list: ['我有一只小毛驴,但我从来也不骑', '天苍苍野茫茫'],
  106. token: '',
  107. detail: {}
  108. }
  109. },
  110. onLoad(){
  111. let store_token = this.$cookieStorage.get('store_token');
  112. if(!store_token){
  113. this.$msg('登录状态异常, 即将跳转至登录页').then(() => {
  114. this.$url('/pages/business/login/login', {type: 'redirect'});
  115. })
  116. }else{
  117. this.token = store_token;
  118. this.getStoreCenter();
  119. }
  120. },
  121. methods: {
  122. getStoreCenter(){
  123. this.$http.get({
  124. api: 'api/supplier/index',
  125. header: {
  126. token: this.token
  127. }
  128. }).then(res => {
  129. console.log("getStoreCenter", res);
  130. this.detail = res.data.data;
  131. })
  132. },
  133. // 扫一扫
  134. onScanCode(){
  135. uni.scanCode({
  136. complete: res => {
  137. console.log(res);
  138. // 二维码内的内容
  139. let result = res.result;
  140. this.$url('/pages/business/payment/money');
  141. }
  142. })
  143. }
  144. }
  145. }
  146. </script>
  147. <style lang="scss" scoped="scoped">
  148. .head{
  149. width: 750rpx;
  150. height: 409rpx;
  151. background: linear-gradient(90deg, #1339B8 0%, #092788 100%);
  152. position: relative;
  153. overflow: hidden;
  154. display: flex;
  155. align-items: flex-end;
  156. box-sizing: border-box;
  157. padding: 60rpx 32rpx 110rpx;
  158. color: #FFFFFF;
  159. .bg-left{
  160. position: absolute;
  161. width: 196rpx;
  162. height: 196rpx;
  163. border-radius: 50%;
  164. background-color: rgba(255,255,255,0.04);
  165. left: -92rpx;
  166. bottom: 60rpx;
  167. }
  168. .bg-right{
  169. position: absolute;
  170. width: 520rpx;
  171. height: 520rpx;
  172. border-radius: 50%;
  173. background-color: rgba(255,255,255,0.04);
  174. right: -168rpx;
  175. top: -142rpx;
  176. }
  177. .head-content{
  178. width: 100%;
  179. display: flex;
  180. justify-content: space-between;
  181. position: relative;
  182. z-index: 9;
  183. .head-img{
  184. width: 100rpx;
  185. height: 100rpx;
  186. border: 2rpx solid #FFFFFF;
  187. box-sizing: border-box;
  188. margin-right: 20rpx;
  189. border-radius: 50%;
  190. }
  191. .head-title{
  192. font-size: 36rpx;
  193. color: #FFFFFF;
  194. font-weight: bold;
  195. width: 390rpx;
  196. }
  197. .head-menu{
  198. display: flex;
  199. flex-direction: column;
  200. align-items: center;
  201. justify-content: center;
  202. color: #FFFFFF;
  203. &:nth-child(n+2){
  204. margin-left: 30rpx;
  205. }
  206. &>text:nth-child(1){
  207. font-size: 50rpx;
  208. }
  209. &>text:nth-child(2){
  210. font-size: 24rpx;
  211. }
  212. }
  213. }
  214. }
  215. .notice{
  216. width: 686rpx;
  217. height: 100rpx;
  218. background: #FFFFFF;
  219. box-shadow: 0rpx 2rpx 8rpx 1rpx rgba(0, 0, 0, 0.1);
  220. border-radius: 20rpx;
  221. margin: -50rpx auto 0;
  222. position: relative;
  223. z-index: 9;
  224. padding: 16rpx 4rpx 0;
  225. box-sizing: border-box;
  226. }
  227. .card{
  228. padding: 30rpx;
  229. width: 686rpx;
  230. height: 287rpx;
  231. background: #FFFFFF;
  232. box-shadow: 0rpx 2rpx 8rpx 1rpx rgba(0, 0, 0, 0.1);
  233. border-radius: 20rpx;
  234. margin: 30rpx auto 0;
  235. &:last-child{
  236. margin-bottom: 50rpx;
  237. }
  238. .title{
  239. font-size: 32rpx;
  240. color: #222222;
  241. font-weight: bold;
  242. }
  243. .item{
  244. box-sizing: border-box;
  245. padding: 0 20rpx;
  246. text-align: center;
  247. font-size: 24rpx;
  248. color: #777777;
  249. .num{
  250. font-size: 36rpx;
  251. color: #222222;
  252. font-weight: bold;
  253. // word-break: break-all;
  254. // line-height: 1;
  255. }
  256. }
  257. }
  258. </style>