金诚优选前端代码
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.

262 lines
6.4 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="detail.brand.logo"></image>
  11. <view class="head-title lf-line-3">{{ detail.brand.name }}</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" v-if="detail.notice.length">
  26. <u-notice-bar mode="vertical" type="none" :list="detail.notice"></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">{{ detail.todo.new }}</view>
  39. <view>待付款</view>
  40. </view>
  41. <view class="item" :style="{width: 100 / 3 +'%'}">
  42. <view class="num">{{ detail.todo.send }}</view>
  43. <view>待发货</view>
  44. </view>
  45. <view class="item" :style="{width: 100 / 3 +'%'}">
  46. <view class="num">{{ detail.todo.pick }}</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>{{ detail.today.pay }}</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>{{ detail.today.online }}</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>{{ detail.today.offline }}</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">{{ detail.goods.del }}</view>
  86. <view>销售中</view>
  87. </view>
  88. <view class="item" :style="{width: 100 / 3 +'%'}">
  89. <view class="num">{{ detail.goods.on_sell }}</view>
  90. <view>待上架</view>
  91. </view>
  92. <view class="item" :style="{width: 100 / 3 +'%'}">
  93. <view class="num">{{ detail.goods.off_sell }}</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. token: '',
  106. detail: {}
  107. }
  108. },
  109. onLoad(){
  110. let store_token = this.$cookieStorage.get('store_token');
  111. if(!store_token){
  112. this.$msg('登录状态异常, 即将跳转至登录页').then(() => {
  113. this.$url('/pages/business/login/login', {type: 'redirect'});
  114. })
  115. }else{
  116. this.token = store_token;
  117. this.getStoreCenter();
  118. }
  119. },
  120. methods: {
  121. getStoreCenter(){
  122. this.$http.get({
  123. api: 'api/supplier/index',
  124. header: {
  125. token: this.token
  126. }
  127. }).then(res => {
  128. console.log("getStoreCenter", res);
  129. this.detail = res.data.data;
  130. })
  131. },
  132. // 扫一扫
  133. onScanCode(){
  134. uni.scanCode({
  135. complete: res => {
  136. console.log(res);
  137. // 二维码内的内容
  138. let result = res.result;
  139. this.$url('/pages/business/payment/money');
  140. }
  141. })
  142. }
  143. }
  144. }
  145. </script>
  146. <style lang="scss" scoped="scoped">
  147. .head{
  148. width: 750rpx;
  149. height: 409rpx;
  150. background: linear-gradient(90deg, #1339B8 0%, #092788 100%);
  151. position: relative;
  152. overflow: hidden;
  153. display: flex;
  154. align-items: flex-end;
  155. box-sizing: border-box;
  156. padding: 60rpx 32rpx 110rpx;
  157. color: #FFFFFF;
  158. .bg-left{
  159. position: absolute;
  160. width: 196rpx;
  161. height: 196rpx;
  162. border-radius: 50%;
  163. background-color: rgba(255,255,255,0.04);
  164. left: -92rpx;
  165. bottom: 60rpx;
  166. }
  167. .bg-right{
  168. position: absolute;
  169. width: 520rpx;
  170. height: 520rpx;
  171. border-radius: 50%;
  172. background-color: rgba(255,255,255,0.04);
  173. right: -168rpx;
  174. top: -142rpx;
  175. }
  176. .head-content{
  177. width: 100%;
  178. display: flex;
  179. justify-content: space-between;
  180. position: relative;
  181. z-index: 9;
  182. .head-img{
  183. width: 100rpx;
  184. height: 100rpx;
  185. border: 2rpx solid #FFFFFF;
  186. box-sizing: border-box;
  187. margin-right: 20rpx;
  188. border-radius: 50%;
  189. }
  190. .head-title{
  191. font-size: 36rpx;
  192. color: #FFFFFF;
  193. font-weight: bold;
  194. width: 390rpx;
  195. }
  196. .head-menu{
  197. display: flex;
  198. flex-direction: column;
  199. align-items: center;
  200. justify-content: center;
  201. color: #FFFFFF;
  202. &:nth-child(n+2){
  203. margin-left: 30rpx;
  204. }
  205. &>text:nth-child(1){
  206. font-size: 50rpx;
  207. }
  208. &>text:nth-child(2){
  209. font-size: 24rpx;
  210. }
  211. }
  212. }
  213. }
  214. .notice{
  215. width: 686rpx;
  216. height: 100rpx;
  217. background: #FFFFFF;
  218. box-shadow: 0rpx 2rpx 8rpx 1rpx rgba(0, 0, 0, 0.1);
  219. border-radius: 20rpx;
  220. margin: -50rpx auto 0;
  221. position: relative;
  222. z-index: 9;
  223. padding: 16rpx 4rpx 0;
  224. box-sizing: border-box;
  225. }
  226. .card{
  227. padding: 30rpx;
  228. width: 686rpx;
  229. height: 287rpx;
  230. background: #FFFFFF;
  231. box-shadow: 0rpx 2rpx 8rpx 1rpx rgba(0, 0, 0, 0.1);
  232. border-radius: 20rpx;
  233. margin: 30rpx auto 0;
  234. &:last-child{
  235. margin-bottom: 50rpx;
  236. }
  237. .title{
  238. font-size: 32rpx;
  239. color: #222222;
  240. font-weight: bold;
  241. }
  242. .item{
  243. box-sizing: border-box;
  244. padding: 0 20rpx;
  245. text-align: center;
  246. font-size: 24rpx;
  247. color: #777777;
  248. .num{
  249. font-size: 36rpx;
  250. color: #222222;
  251. font-weight: bold;
  252. // word-break: break-all;
  253. // line-height: 1;
  254. }
  255. }
  256. }
  257. </style>