Browse Source

2020.06.05

yinchengnuo 4 years ago
parent
commit
a80356c4f8
100 changed files with 414 additions and 91 deletions
  1. 1 0
      .gitignore
  2. 5 1
      apis/order.js
  3. 5 0
      components/public/num-input.vue
  4. 2 0
      index.html
  5. 4 0
      pages.json
  6. 4 0
      pages/auth-card/auth-card.vue
  7. 4 4
      pages/index/index.vue
  8. 5 5
      pages/my-order/my-order.vue
  9. 3 3
      pages/order-sum/order-sum.vue
  10. 1 1
      pages/person-card/person-card.vue
  11. 160 0
      pages/place-order/new_file.vue
  12. 43 68
      pages/place-order/place-order.vue
  13. 177 0
      pages/t-shart/t-shart.vue
  14. BIN
      unpackage/dist/build/h5/h5.zip
  15. 0 9
      unpackage/dist/build/h5/index.html
  16. BIN
      unpackage/dist/build/h5/static/.9.png/1.9.png
  17. BIN
      unpackage/dist/build/h5/static/.9.png/LaunchImage@3x.png
  18. BIN
      unpackage/dist/build/h5/static/appicon/Icon-App-1024x1024@1x.png
  19. BIN
      unpackage/dist/build/h5/static/appicon/logo.png
  20. BIN
      unpackage/dist/build/h5/static/avatar.jpg
  21. BIN
      unpackage/dist/build/h5/static/flashscreen.png
  22. BIN
      unpackage/dist/build/h5/static/icon/Video.png
  23. BIN
      unpackage/dist/build/h5/static/icon/active.png
  24. BIN
      unpackage/dist/build/h5/static/icon/activebg.png
  25. BIN
      unpackage/dist/build/h5/static/icon/appupdata.png
  26. BIN
      unpackage/dist/build/h5/static/icon/auth-float.png
  27. BIN
      unpackage/dist/build/h5/static/icon/auth-progress.png
  28. BIN
      unpackage/dist/build/h5/static/icon/copy.png
  29. BIN
      unpackage/dist/build/h5/static/icon/data-card.png
  30. BIN
      unpackage/dist/build/h5/static/icon/downToSuper.png
  31. BIN
      unpackage/dist/build/h5/static/icon/downToTop.png
  32. BIN
      unpackage/dist/build/h5/static/icon/downloadImg.png
  33. BIN
      unpackage/dist/build/h5/static/icon/emptyshopcar.png
  34. BIN
      unpackage/dist/build/h5/static/icon/h-line.png
  35. BIN
      unpackage/dist/build/h5/static/icon/heart-fill.png
  36. BIN
      unpackage/dist/build/h5/static/icon/heart.png
  37. BIN
      unpackage/dist/build/h5/static/icon/howuse.png
  38. BIN
      unpackage/dist/build/h5/static/icon/invite-proxy.png
  39. BIN
      unpackage/dist/build/h5/static/icon/like-fill.png
  40. BIN
      unpackage/dist/build/h5/static/icon/like.png
  41. BIN
      unpackage/dist/build/h5/static/icon/live-time.png
  42. BIN
      unpackage/dist/build/h5/static/icon/login-reg.png
  43. BIN
      unpackage/dist/build/h5/static/icon/money.png
  44. BIN
      unpackage/dist/build/h5/static/icon/nopass.png
  45. BIN
      unpackage/dist/build/h5/static/icon/o-line.png
  46. BIN
      unpackage/dist/build/h5/static/icon/ok.png
  47. BIN
      unpackage/dist/build/h5/static/icon/pass.png
  48. BIN
      unpackage/dist/build/h5/static/icon/s-line.png
  49. BIN
      unpackage/dist/build/h5/static/icon/share.png
  50. BIN
      unpackage/dist/build/h5/static/icon/sharemore.png
  51. BIN
      unpackage/dist/build/h5/static/icon/sharepyq.png
  52. BIN
      unpackage/dist/build/h5/static/icon/sharewx.png
  53. BIN
      unpackage/dist/build/h5/static/icon/super_price.png
  54. BIN
      unpackage/dist/build/h5/static/icon/top_price.png
  55. BIN
      unpackage/dist/build/h5/static/icon/upToCrown.png
  56. BIN
      unpackage/dist/build/h5/static/icon/upToTop.png
  57. BIN
      unpackage/dist/build/h5/static/icon/updata_wrapper.png
  58. BIN
      unpackage/dist/build/h5/static/img/auth-paper.d5bc7047.png
  59. BIN
      unpackage/dist/build/h5/static/img/auth-progress.eef992fe.png
  60. BIN
      unpackage/dist/build/h5/static/img/avatar.e0e8b509.jpg
  61. BIN
      unpackage/dist/build/h5/static/img/data-card.7e66a4f9.png
  62. BIN
      unpackage/dist/build/h5/static/img/defaultimg.0d75aba5.png
  63. BIN
      unpackage/dist/build/h5/static/img/emptyshopcar.979e1bca.png
  64. BIN
      unpackage/dist/build/h5/static/img/login-reg.300b8a80.png
  65. BIN
      unpackage/dist/build/h5/static/img/my-bg.2fe8227e.png
  66. BIN
      unpackage/dist/build/h5/static/img/nopass.9b1a9a0c.png
  67. BIN
      unpackage/dist/build/h5/static/img/ok.0dba888e.png
  68. 0 0
      unpackage/dist/build/h5/static/index.cdf7f91b.css
  69. BIN
      unpackage/dist/build/h5/static/index/index/down-order.png
  70. BIN
      unpackage/dist/build/h5/static/index/index/income-running.png
  71. BIN
      unpackage/dist/build/h5/static/index/index/income-shop.png
  72. BIN
      unpackage/dist/build/h5/static/index/index/invite-proxy.png
  73. BIN
      unpackage/dist/build/h5/static/index/index/manage-money.png
  74. BIN
      unpackage/dist/build/h5/static/index/index/manage-order.png
  75. BIN
      unpackage/dist/build/h5/static/index/index/manage-poeple.png
  76. BIN
      unpackage/dist/build/h5/static/index/index/my-invite.png
  77. BIN
      unpackage/dist/build/h5/static/index/index/my-order.png
  78. BIN
      unpackage/dist/build/h5/static/index/index/my-stock.png
  79. BIN
      unpackage/dist/build/h5/static/index/index/new/1.png
  80. BIN
      unpackage/dist/build/h5/static/index/index/new/2.png
  81. BIN
      unpackage/dist/build/h5/static/index/index/new/3.png
  82. BIN
      unpackage/dist/build/h5/static/index/index/new/4.png
  83. BIN
      unpackage/dist/build/h5/static/index/index/new/5.png
  84. BIN
      unpackage/dist/build/h5/static/index/index/new/6.png
  85. BIN
      unpackage/dist/build/h5/static/index/index/news.png
  86. BIN
      unpackage/dist/build/h5/static/index/index/place-order.png
  87. BIN
      unpackage/dist/build/h5/static/index/index/register-examine.png
  88. BIN
      unpackage/dist/build/h5/static/index/index/reward-in.png
  89. BIN
      unpackage/dist/build/h5/static/index/index/reward-out.png
  90. BIN
      unpackage/dist/build/h5/static/index/index/team-achievement.png
  91. BIN
      unpackage/dist/build/h5/static/index/index/team-manage.png
  92. BIN
      unpackage/dist/build/h5/static/index/my/address.png
  93. BIN
      unpackage/dist/build/h5/static/index/my/auth-paper.png
  94. BIN
      unpackage/dist/build/h5/static/index/my/auth.png
  95. BIN
      unpackage/dist/build/h5/static/index/my/defaultimg.png
  96. BIN
      unpackage/dist/build/h5/static/index/my/help.png
  97. BIN
      unpackage/dist/build/h5/static/index/my/medal.png
  98. BIN
      unpackage/dist/build/h5/static/index/my/message.png
  99. BIN
      unpackage/dist/build/h5/static/index/my/mixun.png
  100. BIN
      unpackage/dist/build/h5/static/index/my/my-bg.png

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+unpackage

+ 5 - 1
apis/order.js

@@ -47,4 +47,8 @@ export const _API_OrderSend = data => request.post('/order/forward', data) // 
 
 
 export const _API_OrderStorage = data => request.get('/order/my_storage', data) // 我的库存
 export const _API_OrderStorage = data => request.get('/order/my_storage', data) // 我的库存
 
 
-export const _API_OrderAgain = data => request.get('/order/again', data) // 再次下单
+export const _API_OrderAgain = data => request.get('/order/again', data) // 再次下单
+
+
+export const _API_GetTShirtNum = data => request.get('/order/type_count', data) // 回去 t-shirt 数量
+export const _API_SubmitTShirtNum = data => request.post('/order/type_submit', data) // 提交 t-shirt 数量

+ 5 - 0
components/public/num-input.vue

@@ -35,6 +35,7 @@
 			red() {
 			red() {
 				if (this.value > 0) {
 				if (this.value > 0) {
 					this.$emit('change', this.value - 1, ...this.args)
 					this.$emit('change', this.value - 1, ...this.args)
+					this.$emit('input', this.value - 1, ...this.args)
 				}
 				}
 			},
 			},
 			add() {
 			add() {
@@ -42,17 +43,21 @@
 					uni.toast('数量不能再多了')
 					uni.toast('数量不能再多了')
 				} else {
 				} else {
 					this.$emit('change', this.value + 1, ...this.args)
 					this.$emit('change', this.value + 1, ...this.args)
+					this.$emit('input', this.value + 1, ...this.args)
 				}
 				}
 			},
 			},
 			comfirmNum() {
 			comfirmNum() {
 				if (this.inputNum) {
 				if (this.inputNum) {
 					if (+this.inputNum > this.max) {
 					if (+this.inputNum > this.max) {
 						this.$emit('change', this.max, ...this.args)
 						this.$emit('change', this.max, ...this.args)
+						this.$emit('input', this.max, ...this.args)
 					} else {
 					} else {
 						this.$emit('change', +this.inputNum, ...this.args)
 						this.$emit('change', +this.inputNum, ...this.args)
+						this.$emit('input', +this.inputNum, ...this.args)
 					}
 					}
 				} else {
 				} else {
 					this.$emit('change', 0, ...this.args)
 					this.$emit('change', 0, ...this.args)
+					this.$emit('input', 0, ...this.args)
 				}
 				}
 				this.showInput = false
 				this.showInput = false
 			}
 			}

+ 2 - 0
index.html

@@ -11,6 +11,8 @@
 		<script type="text/javascript" src="http://cdn.staticfile.org/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
 		<script type="text/javascript" src="http://cdn.staticfile.org/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
 		<script src="https://cdn.staticfile.org/pako/1.0.10/pako.min.js"></script>
 		<script src="https://cdn.staticfile.org/pako/1.0.10/pako.min.js"></script>
 		<script src="https://cdn.staticfile.org/Base64/1.0.2/base64.min.js"></script>
 		<script src="https://cdn.staticfile.org/Base64/1.0.2/base64.min.js"></script>
+		<link rel="stylesheet" href="http://www.kdniao.com/OutDemo/KDNWidget/KDNWidget.css" />
+		<script src="http://www.kdniao.com/OutDemo/KDNWidget/KDNWidget.js"></script>
         <script>
         <script>
             document.addEventListener('DOMContentLoaded', function() {
             document.addEventListener('DOMContentLoaded', function() {
                 document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
                 document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'

+ 4 - 0
pages.json

@@ -216,6 +216,10 @@
             "path" : "pages/order-sum/order-sum",
             "path" : "pages/order-sum/order-sum",
             "style": { "navigationBarTitleText": "订货汇总", "enablePullDownRefresh": true }
             "style": { "navigationBarTitleText": "订货汇总", "enablePullDownRefresh": true }
         }
         }
+        ,{
+            "path" : "pages/t-shart/t-shart",
+            "style" : {}
+        }
     ],
     ],
 	"tabBar": {
 	"tabBar": {
 		"color": "#666666",
 		"color": "#666666",

+ 4 - 0
pages/auth-card/auth-card.vue

@@ -50,6 +50,10 @@
 			uni.showLoading({ mask: true })
 			uni.showLoading({ mask: true })
 			_API_Auth_Code({ id: id ? id : this.$store.state.userinfo.id }).then(res => {
 			_API_Auth_Code({ id: id ? id : this.$store.state.userinfo.id }).then(res => {
 				uni.showLoading({ mask: true })
 				uni.showLoading({ mask: true })
+				if (!res.data.code) {
+					uni.showModal({ showCancel: false, title: '提示', content: '暂未授权' }).then(() => uni.navigateBack())
+					return
+				}
 				setTimeout(() => {
 				setTimeout(() => {
 					const can = document.getElementsByTagName('canvas')[0]
 					const can = document.getElementsByTagName('canvas')[0]
 					const ctx = can.getContext('2d')
 					const ctx = can.getContext('2d')

+ 4 - 4
pages/index/index.vue

@@ -43,8 +43,8 @@
 			</view>
 			</view>
 			<view class="area index-kingkong">
 			<view class="area index-kingkong">
 				<navigator v-for="(item, index) in kingkongList" :url="item.url" :key="index" :class="{ top: index > 3 }">
 				<navigator v-for="(item, index) in kingkongList" :url="item.url" :key="index" :class="{ top: index > 3 }">
-					<image v-if="!(index == 3)" :src="item.image"></image>
-					<text v-if="!(index == 3)">{{ item.name }}</text>
+					<image :src="item.image"></image>
+					<text>{{ item.name }}</text>
 				</navigator>
 				</navigator>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -115,8 +115,8 @@
 						image: '../../static/index/index/down-order.png'
 						image: '../../static/index/index/down-order.png'
 					},
 					},
 					{
 					{
-						name: '我的库存',
-						// url: '../../pages/my-storage/my-storage',
+						name: 'T恤统计',
+						url: '../../pages/t-shart/t-shart',
 						image: '../../static/index/index/my-stock.png'
 						image: '../../static/index/index/my-stock.png'
 					},
 					},
 					{
 					{

+ 5 - 5
pages/my-order/my-order.vue

@@ -26,11 +26,11 @@
 									</view>
 									</view>
 								</view>
 								</view>
 								<view class="bottom-bar">
 								<view class="bottom-bar">
-									<text>{{ orderItem.created_at }}</text>
+									<text class="time">{{ orderItem.created_at }}</text>
 									<!-- <view class="btn" v-if="!orderItem.is_deleted && !orderItem.pay_status" @click.stop="changeOrder(orderItem)">修改订单</view> -->
 									<!-- <view class="btn" v-if="!orderItem.is_deleted && !orderItem.pay_status" @click.stop="changeOrder(orderItem)">修改订单</view> -->
 									<view class="btns">
 									<view class="btns">
 										<view class="btn" @click.stop="buyAgain(orderItem)">再次购买</view>
 										<view class="btn" @click.stop="buyAgain(orderItem)">再次购买</view>
-										<!-- <view v-if="orderItem.express" class="btn" @click.stop="express(orderItem.express)">查看物流</view> -->
+										<view v-if="orderItem.express_num && orderItem.express_code" class="btn" @click.stop="express(orderItem.express_num, orderItem.express_code)">查看物流</view>
 										<view class="btn bg" v-if="!orderItem.is_deleted && !orderItem.pay_status" @click.stop="payNow(orderItem)">立即付款</view>
 										<view class="btn bg" v-if="!orderItem.is_deleted && !orderItem.pay_status" @click.stop="payNow(orderItem)">立即付款</view>
 										<view class="btn border" v-if="!orderItem.is_deleted && orderItem.pay_status && orderItem.status == 3" @click.stop="received(orderItem)">确认收货</view>
 										<view class="btn border" v-if="!orderItem.is_deleted && orderItem.pay_status && orderItem.status == 3" @click.stop="received(orderItem)">确认收货</view>
 									</view>
 									</view>
@@ -220,8 +220,8 @@
 					}
 					}
 				})
 				})
 			},
 			},
-			express(express) {
-				uni.navigateTo({ url: `../express-detail/express-detail?express_order=${express.split('&')[1].split('=')[1]}` })
+			express(expCode, expNo) {
+				KDNWidget.run({ serviceType: "A", expCode, expNo })
 			},
 			},
 			payNow({ order_num, money, order_id }) { // 点击立即付款
 			payNow({ order_num, money, order_id }) { // 点击立即付款
 				// console.log(order_id)
 				// console.log(order_id)
@@ -300,7 +300,7 @@
 							justify-content: space-between;
 							justify-content: space-between;
 							background: #FFFFFF;
 							background: #FFFFFF;
 							> text {
 							> text {
-								font-size: 28rpx;
+								font-size: 12rpx;
 								font-weight: bold;
 								font-weight: bold;
 							}
 							}
 							.btns {
 							.btns {

+ 3 - 3
pages/order-sum/order-sum.vue

@@ -122,7 +122,7 @@
 				rank: [],
 				rank: [],
 				choosedActie: -1,
 				choosedActie: -1,
 				activeList: [
 				activeList: [
-					{ label: '五月重启 强力回归', value: '1', start: '2020-05-12', end: '2020-05-14' }
+					{ label: '五月重启 强力回归', value: '1', start: '2020-05-11', end: '2020-05-15' }
 				]
 				]
 			};
 			};
 		},
 		},
@@ -185,10 +185,10 @@
 			request() {
 			request() {
 				uni.loading()
 				uni.loading()
 				if (this.date[0] && this.date[1]) {
 				if (this.date[0] && this.date[1]) {
-					_API_OrderSum({ satrt: this.date[0], end: this.date[1] }).then(({ data }) => {
+					_API_OrderSum({ start: this.date[0], end: this.date[1] }).then(({ data }) => {
 						this.data = data
 						this.data = data
 						uni.loading()
 						uni.loading()
-						_API_OrderRank({ satrt: this.date[0], end: this.date[1] }).then(({ data: { list } }) => {
+						_API_OrderRank({ start: this.date[0], end: this.date[1] }).then(({ data: { list } }) => {
 							list.sort((a, b) => b.all - a.all)
 							list.sort((a, b) => b.all - a.all)
 							this.rank = list
 							this.rank = list
 						})
 						})

+ 1 - 1
pages/person-card/person-card.vue

@@ -53,7 +53,7 @@
 					<text class="left">修改昵称</text>
 					<text class="left">修改昵称</text>
 					<text class="cuIcon-right"></text>
 					<text class="cuIcon-right"></text>
 				</view>
 				</view>
-				<view @tap="toAuthCard">
+				<view v-if="info.status == 0" @tap="toAuthCard">
 					<text class="left">授权书</text>
 					<text class="left">授权书</text>
 					<text class="cuIcon-right"></text>
 					<text class="cuIcon-right"></text>
 				</view>
 				</view>

+ 160 - 0
pages/place-order/new_file.vue

@@ -0,0 +1,160 @@
+<template>
+	<view class="place-order">
+		<custom-nav noback="noback" transparent="transparent" ref="ltm" title=" " />
+		<AddCart ref="addCart" />
+		<view class="content">
+			<scroll-view scroll-y :style="{ height: scrollviewHeight + 'px' }">
+				<view class="item" v-for="(item, index) in list" :key="index" :class="{ right: index % 2 == 1 }" @tap="tap(index)">
+					<image class="img" :src="item.main_img" mode="aspectFill"></image>
+					<view class="info">
+						<view class="top ellipsis">
+							
+						</view>
+						<view class="mid">¥{{ item.money }}/{{ item.unit }}</view>
+						<view class="bot">
+							<text>{{ item.size.length }}个尺码可选</text>
+							<view class="shopCar" @tap.stop="tapShopCar(item)">
+								<view v-if="item.cart.reduce((t, e) => t + e, 0)" class="sizeNum">{{ item.cart.reduce((t, e) => t + e, 0) }}</view>
+								<text class="cuIcon-cart"></text>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view v-if="!goodsList.length" class="loading">{{ status }}</view>
+			</scroll-view>
+			<navigator open-type="switchTab" url="../shop-car1/shop-car1" class="cart">
+				购物车
+				<text v-if="cartNum" class="sizeNum">{{ cartNum }}</text>
+			</navigator>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { deepClone } from '@/common/util/index.js'
+	import { _API_GoodList } from '@/apis/good.js'
+	import AddCart from '@/components/public/add-cart.vue'
+	export default {
+		components: { AddCart },
+		data() {
+			return {
+				title: '订货下单',
+				mode: 'square',
+				goodsList: [],
+				scrollviewHeight: 0,
+				status: '加载中...'
+			}
+		},
+		computed: {
+			list() {
+				const temp = deepClone(this.goodsList)
+				temp.forEach(goodItem => {
+					goodItem.cart = Array(goodItem.size.length).fill(0)
+					const itemInCart = this.$store.state.cart.list.find(e => e.attr_id === goodItem.attr_id)
+					if (itemInCart) {
+						Object.assign(goodItem, itemInCart)
+					}
+				})
+				return temp
+			},
+			cartNum() {
+				return this.$store.getters['cart/shopcarNum']
+			}
+		},
+		mounted() { // 获取商品列表
+			this.$offset('.content').then(res => this.scrollviewHeight = res.height - uni.upx2px(98)) // 设置scrollview 高
+			if (this.$store.state.userinfo.level !== '代理公司') {
+				uni.navigateBack()
+				setTimeout(() => uni.$emit('noopening'))
+				return
+			}
+			this.request()
+		},
+		onPullDownRefresh() {
+			this.request()
+		},
+		methods: {
+			request() {
+				uni.showLoading({ mask: true })
+				_API_GoodList().then(res => {
+					if (res.code === 200) {
+						this.goodsList = res.data.list
+						console.log(this.goodsList)
+						if (!this.goodsList.length) {
+							this.status = '暂无商品'
+						}
+					} else {
+						uni.toast('网络好像出了点问题,下拉刷新试试')
+					}
+					uni.stopPullDownRefresh()
+				}).catch(() => setTimeout(() => {
+					uni.toast('网络好像出了点问题,下拉刷新试试')
+					uni.stopPullDownRefresh()
+				}, 123))
+			},
+			tap(index) { // 查看商品详情
+				uni.setStorageSync('ggg', JSON.stringify(this.goodsList[index]))
+				uni.navigateTo({ url: `../good-detail1/good-detail1` })
+			},
+			tapShopCar(item) {
+				this.$refs.addCart.show(deepClone(item))
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.place-order {
+		@include page();
+		.content {
+			.cart {
+				height: 98rpx;
+				@include flex();
+				color: $app-base-color;
+				font-size: 36rpx;
+				// background: $app-base-color;
+				border-top: 1rpx solid #C0C0C0;
+				background: #FFFFFF;
+				position: relative;
+				.sizeNum {
+					@include flex();
+					position: absolute;
+					font-size: 20rpx;
+					left: 50%;
+					margin-left: 48rpx;
+					height: 32rpx;
+					color: #FFFFFF;
+					top: 24rpx;
+					padding: 2rpx 8rpx;
+					border-radius: 32rpx;
+					background: #FF0000;
+				}
+			}
+			.loading {
+				text-align: center;
+				margin-top: 567rpx;
+			}
+			.item {
+				&.right {
+					margin-left: 10rpx;
+				}
+				float: left;
+				height: 380rpx;
+				width: 370rpx;
+				align-items: flex-end;
+				@include flex(column);
+				.img {
+					height: 240rpx;
+					width: 100%;
+				}
+				.info {
+					@include flex(column);
+					flex: 1;
+					width: 100%;
+					margin-left: 23rpx;
+					align-items: flex-start;
+				}
+			}
+		}
+	}
+</style>

+ 43 - 68
pages/place-order/place-order.vue

@@ -5,19 +5,14 @@
 		<view class="content">
 		<view class="content">
 			<scroll-view scroll-y :style="{ height: scrollviewHeight + 'px' }">
 			<scroll-view scroll-y :style="{ height: scrollviewHeight + 'px' }">
 				<view class="item" v-for="(item, index) in list" :key="index" @tap="tap(index)">
 				<view class="item" v-for="(item, index) in list" :key="index" @tap="tap(index)">
-					<view class="img">
-						<image :src="item.main_img"></image>
-					</view>
+					<image class="img" :src="item.main_img" mode="aspectFill"></image>
 					<view class="info">
 					<view class="info">
 						<view class="top ellipsis">{{ item.name }}</view>
 						<view class="top ellipsis">{{ item.name }}</view>
 						<view class="mid">¥{{ item.money }}/{{ item.unit }}</view>
 						<view class="mid">¥{{ item.money }}/{{ item.unit }}</view>
-						<!-- <view class="bot">库存:{{ item.storage.reduce((t, e) => t + +e, 0) }}</view> -->
-						<view class="bot">
-							<text>{{ item.size.length }}个尺码可选</text>
-							<view class="shopCar" @tap.stop="tapShopCar(item)">
-								<view v-if="item.cart.reduce((t, e) => t + e, 0)" class="sizeNum">{{ item.cart.reduce((t, e) => t + e, 0) }}</view>
-								<text class="cuIcon-cart"></text>
-							</view>
+						<view class="bot">{{ item.size.length }}个尺码可选</view>
+						<view class="shopCar" @tap.stop="tapShopCar(item)">
+							<view v-if="item.cart.reduce((t, e) => t + e, 0)" class="sizeNum">{{ item.cart.reduce((t, e) => t + e, 0) }}</view>
+							<text class="cuIcon-cart"></text>
 						</view>
 						</view>
 					</view>
 					</view>
 				</view>
 				</view>
@@ -136,75 +131,55 @@
 				margin-top: 567rpx;
 				margin-top: 567rpx;
 			}
 			}
 			.item {
 			.item {
-				@include flex();
-				height: 300rpx;
+				float: left;
+				width: 330rpx;
+				height: 380rpx;
+				margin-top: 20rpx;
+				margin-left: 30rpx;
 				background: #FFFFFF;
 				background: #FFFFFF;
-				margin-bottom: 10rpx;
-				padding: 30rpx;
 				align-items: flex-end;
 				align-items: flex-end;
-				box-sizing: border-box;
+				@include flex(column);
 				.img {
 				.img {
-					height: 240rpx;
-					width: 300rpx;
-					image {
-						width: 100%;
-						height: 100%;
-					}
+					height: 220rpx;
+					width: 100%;
 				}
 				}
 				.info {
 				.info {
-					@include flex(column);
 					flex: 1;
 					flex: 1;
-					height: 100%;
-					margin-left: 23rpx;
+					width: 100%;
+					margin-left: 12rpx;
+					position: relative;
+					@include flex(column);
+					border-radius: 8rpx;
 					align-items: flex-start;
 					align-items: flex-start;
-					justify-content: space-between;
-					> view {
+					justify-content: space-around;
+					.top {
 						width: 100%;
 						width: 100%;
+						color: #181818;
+						font-size: 28rpx;
 						overflow: hidden;
 						overflow: hidden;
 						white-space: nowrap;
 						white-space: nowrap;
 						text-overflow: ellipsis;
 						text-overflow: ellipsis;
-						&.top {
-							font-size: 32rpx;
-							line-height: 2;
-						}
-						&.mid {
-							@include flex();
-							font-size: 26rpx;
-							color: $app-base-color;
-							justify-content: space-between;
-						}
-						&.bot {
-							width: 100%;
-							display: flex;
-							overflow: visible;
-							justify-content: space-between;
-							> text {
-								font-size: 26rpx;
-								line-height: 2;
-								color: #666666;
-							}
-							> view {
-								@include flex();
-								color: #FFFFFF;
-								height: 60rpx;
-								width: 60rpx;
-								font-size: 40rpx;
-								border-radius: 50%;
-								position: relative;
-								overflow: visible;
-								background: $app-base-color;
-								view {
-									position: absolute;
-									font-size: 20rpx;
-									right: 0;
-									height: 32rpx;
-									top: -24rpx;
-									padding: 2rpx 8rpx;
-									border-radius: 32rpx;
-									background: #FF0000;
-								}
-							}
-						}
+					}
+					.mid {
+						font-size: 32rpx;
+						color: $app-base-color;
+						font-weight: bold;
+					}
+					.bot {
+						font-size: 28rpx;
+						color: #666666;
+					}
+					.shopCar {
+						right: 24rpx;
+						bottom: 13rpx;
+						width: 60rpx;
+						height: 60rpx;
+						color: #FFFFFF;
+						@include flex();
+						font-size: 42rpx;
+						position: absolute;
+						border-radius: 50%;
+						background: $app-base-color;
 					}
 					}
 				}
 				}
 			}
 			}

+ 177 - 0
pages/t-shart/t-shart.vue

@@ -0,0 +1,177 @@
+<template>
+	<view class="t-shart">
+		<template v-if="list.length">
+			<view class="title">T恤统计截止至5月16日下午6点,逾期不候</view>
+			<view class="memberr-item" v-for="item in list" :key="item.mobile">
+				<view class="userinfo">
+					<text>{{ item.mobile }}</text>
+					<text>{{ item.nickname }}</text>
+					<text>总数量:{{ item.total }} / <text class="basecolor">{{ ' ' }}{{ item.type_l + item.type_xl + item.type_3xl }}</text></text>
+				</view>
+				<view class="size-item address">
+					<text class="name">收货地址:</text>
+					<text>{{ item.province }}{{ item.city }}{{ item.area }}{{ item.address }}</text>
+				</view>
+				<view class="size-item">
+					<text>L:</text>
+					<NumInput :max="item.total - (item.type_l + item.type_xl + item.type_3xl) + item.type_l" v-model="item.type_l" />
+				</view>
+				<view class="size-item">
+					<text>XL:</text>
+					<NumInput :max="item.total - (item.type_l + item.type_xl + item.type_3xl) + item.type_xl" v-model="item.type_xl" />
+				</view>
+				<view class="size-item">
+					<text>3XL:</text>
+					<NumInput :max="item.total - (item.type_l + item.type_xl + item.type_3xl) + item.type_3xl" v-model="item.type_3xl" />
+				</view>
+			</view>
+			<view class="big-btn bg" :class="{ not: !couldSubmit }" @click="submit"><text v-if="couldSubmit" class="countDown">距离截止还剩:{{ countDown }}</text>{{ couldSubmit ?  '提交' : '已截止' }}</view>
+		</template>
+		<template v-else>
+			<view style="margin-top: 48vh;">暂无统计</view>
+		</template>
+	</view>
+</template>
+
+<script>
+	import { _API_GetTShirtNum, _API_SubmitTShirtNum } from '@/apis/order.js'
+	import NumInput from '@/components/public/num-input.vue'
+	export default {
+		components: {
+			NumInput
+		},
+		data() {
+			return {
+				num: 20,
+				L: 0,
+				list: [],
+				couldSubmit: false,
+				s: 1589536800000,
+				e: 1589623200000,
+				n: 0
+			};
+		},
+		computed: {
+			countDown() {
+				const add0 = num => num < 10 ? '0' + num : num
+				const sec = Math.floor((this.e - this.n) / 1000)
+				const day = Math.floor(sec / 86400)
+				const hour = Math.floor((sec % 86400) / 3600)
+				const minite = Math.floor((sec - 86400 * day - hour * 3600) / 60)
+				const second = Math.floor(sec - 86400 * day - hour * 3600 - minite * 60)
+				return `${add0(day)}天${add0(hour)}时${add0(minite)}分${add0(second)}秒`
+			}
+		},
+		mounted() {
+			uni.loading()
+			_API_GetTShirtNum().then(({ data }) => {
+				this.list = data
+			})
+			this.n = Date.now()
+			if (this.n >= this.s && this.n <= this.e) {
+				this.couldSubmit = true
+				this.timer = setInterval(() => {
+					if (this.n + 1000 >= this.e) {
+						this.couldSubmit = false
+						clearInterval(this.timer)
+					}
+					this.n = Date.now()
+				}, 1000)
+			}
+		},
+		methods: {
+			submit() {
+				// const find = this.list.find(item => item.total !== item.type_l + item.type_xl + item.type_3xl)
+				// if (find) {
+				// 	uni.toast(`${find.nickname}的数量没有选够`)
+				// 	return
+				// } else {
+					if (!this.couldSubmit) {
+						uni.toast('提交时间已截止')
+						return
+					}
+					uni.loading()
+					_API_SubmitTShirtNum({
+						id: this.list.map(e => e.id),
+						type_l: this.list.map(e => e.type_l),
+						type_xl: this.list.map(e => e.type_xl),
+						type_3xl: this.list.map(e => e.type_3xl),
+					}).then(() => {
+						uni.showModal({ showCancel: false, title: '提示', content: '提交成功' }).then(() => uni.navigateBack())
+					})
+				// }
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+.t-shart {
+	height: 100vh;
+	overflow: auto;
+	-webkit-overflow-scrolling : touch;
+	@include flex(column);
+	padding-top: 66rpx;
+	padding-bottom: 123rpx;
+	box-sizing: border-box;
+	background: $app-base-bg;
+	justify-content: flex-start;
+	.title {
+		@include flex();
+		background: #FFFFFF;
+		color: #FF0000;
+		font-size: 36rpx;
+		font-weight: bold;
+		border-bottom: 1rpx solid #C8C7CC;
+		top: 0;
+		width: 100%;
+		height: 66rpx;
+		position: fixed;
+	}
+	.memberr-item {
+		width: 100%;
+		margin-bottom: 10rpx;
+		.userinfo {
+			@include flex();
+			padding: 30rpx;
+			background: #FFFFFF;
+			box-sizing: border-box;
+			justify-content: space-between;
+			font-size: 32rpx;
+			font-weight: bold;
+		}
+		.size-item {
+			&.address {
+				font-size: 28rpx;
+				.name {
+					width: 280rpx;
+					font-weight: bold;
+				}
+			}
+			@include flex();
+			background: #FFFFFF;
+			margin-bottom: 1rpx;
+			padding: 30rpx;
+			box-sizing: border-box;
+			justify-content: space-between;
+		}
+	}
+	.big-btn {
+		height: 123rpx;
+		position: fixed;
+		bottom: 0;
+		width: 100vw;
+		border-radius: 0;
+		&.not {
+			background: #C8C7CC;
+			border-color: #C8C7CC;
+		}
+		.countDown {
+			top: 0;
+			left: 8rpx;
+			position: absolute;
+			font-size: 28rpx;
+		}
+	}
+}
+</style>

BIN
unpackage/dist/build/h5/h5.zip


+ 0 - 9
unpackage/dist/build/h5/index.html

@@ -1,9 +0,0 @@
-<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><title>大卫博士公众号</title><script src=http://cdn.staticfile.org/jquery/2.1.1/jquery.min.js></script><script src=http://cdn.staticfile.org/jquery.qrcode/1.0/jquery.qrcode.min.js></script><script src=https://cdn.staticfile.org/pako/1.0.10/pako.min.js></script><script src=https://cdn.staticfile.org/Base64/1.0.2/base64.min.js></script><script>document.addEventListener('DOMContentLoaded', function() {
-                document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
-            })</script><style type=text/css>.uni-simple-toast__text {
-				font-size: 24px!important;
-				width: 65vw!important;
-			}
-			.uni-modal__btn_primary, .uni-picker-action-confirm {
-				color: #F76454!important;
-			}</style><link rel=stylesheet href=/gzh/static/index.cdf7f91b.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/gzh/static/js/chunk-vendors.933c9aba.js></script><script src=/gzh/static/js/index.f5447e2a.js></script></body></html>

BIN
unpackage/dist/build/h5/static/.9.png/1.9.png


BIN
unpackage/dist/build/h5/static/.9.png/LaunchImage@3x.png


BIN
unpackage/dist/build/h5/static/appicon/Icon-App-1024x1024@1x.png


BIN
unpackage/dist/build/h5/static/appicon/logo.png


BIN
unpackage/dist/build/h5/static/avatar.jpg


BIN
unpackage/dist/build/h5/static/flashscreen.png


BIN
unpackage/dist/build/h5/static/icon/Video.png


BIN
unpackage/dist/build/h5/static/icon/active.png


BIN
unpackage/dist/build/h5/static/icon/activebg.png


BIN
unpackage/dist/build/h5/static/icon/appupdata.png


BIN
unpackage/dist/build/h5/static/icon/auth-float.png


BIN
unpackage/dist/build/h5/static/icon/auth-progress.png


BIN
unpackage/dist/build/h5/static/icon/copy.png


BIN
unpackage/dist/build/h5/static/icon/data-card.png


BIN
unpackage/dist/build/h5/static/icon/downToSuper.png


BIN
unpackage/dist/build/h5/static/icon/downToTop.png


BIN
unpackage/dist/build/h5/static/icon/downloadImg.png


BIN
unpackage/dist/build/h5/static/icon/emptyshopcar.png


BIN
unpackage/dist/build/h5/static/icon/h-line.png


BIN
unpackage/dist/build/h5/static/icon/heart-fill.png


BIN
unpackage/dist/build/h5/static/icon/heart.png


BIN
unpackage/dist/build/h5/static/icon/howuse.png


BIN
unpackage/dist/build/h5/static/icon/invite-proxy.png


BIN
unpackage/dist/build/h5/static/icon/like-fill.png


BIN
unpackage/dist/build/h5/static/icon/like.png


BIN
unpackage/dist/build/h5/static/icon/live-time.png


BIN
unpackage/dist/build/h5/static/icon/login-reg.png


BIN
unpackage/dist/build/h5/static/icon/money.png


BIN
unpackage/dist/build/h5/static/icon/nopass.png


BIN
unpackage/dist/build/h5/static/icon/o-line.png


BIN
unpackage/dist/build/h5/static/icon/ok.png


BIN
unpackage/dist/build/h5/static/icon/pass.png


BIN
unpackage/dist/build/h5/static/icon/s-line.png


BIN
unpackage/dist/build/h5/static/icon/share.png


BIN
unpackage/dist/build/h5/static/icon/sharemore.png


BIN
unpackage/dist/build/h5/static/icon/sharepyq.png


BIN
unpackage/dist/build/h5/static/icon/sharewx.png


BIN
unpackage/dist/build/h5/static/icon/super_price.png


BIN
unpackage/dist/build/h5/static/icon/top_price.png


BIN
unpackage/dist/build/h5/static/icon/upToCrown.png


BIN
unpackage/dist/build/h5/static/icon/upToTop.png


BIN
unpackage/dist/build/h5/static/icon/updata_wrapper.png


BIN
unpackage/dist/build/h5/static/img/auth-paper.d5bc7047.png


BIN
unpackage/dist/build/h5/static/img/auth-progress.eef992fe.png


BIN
unpackage/dist/build/h5/static/img/avatar.e0e8b509.jpg


BIN
unpackage/dist/build/h5/static/img/data-card.7e66a4f9.png


BIN
unpackage/dist/build/h5/static/img/defaultimg.0d75aba5.png


BIN
unpackage/dist/build/h5/static/img/emptyshopcar.979e1bca.png


BIN
unpackage/dist/build/h5/static/img/login-reg.300b8a80.png


BIN
unpackage/dist/build/h5/static/img/my-bg.2fe8227e.png


BIN
unpackage/dist/build/h5/static/img/nopass.9b1a9a0c.png


BIN
unpackage/dist/build/h5/static/img/ok.0dba888e.png


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/index.cdf7f91b.css


BIN
unpackage/dist/build/h5/static/index/index/down-order.png


BIN
unpackage/dist/build/h5/static/index/index/income-running.png


BIN
unpackage/dist/build/h5/static/index/index/income-shop.png


BIN
unpackage/dist/build/h5/static/index/index/invite-proxy.png


BIN
unpackage/dist/build/h5/static/index/index/manage-money.png


BIN
unpackage/dist/build/h5/static/index/index/manage-order.png


BIN
unpackage/dist/build/h5/static/index/index/manage-poeple.png


BIN
unpackage/dist/build/h5/static/index/index/my-invite.png


BIN
unpackage/dist/build/h5/static/index/index/my-order.png


BIN
unpackage/dist/build/h5/static/index/index/my-stock.png


BIN
unpackage/dist/build/h5/static/index/index/new/1.png


BIN
unpackage/dist/build/h5/static/index/index/new/2.png


BIN
unpackage/dist/build/h5/static/index/index/new/3.png


BIN
unpackage/dist/build/h5/static/index/index/new/4.png


BIN
unpackage/dist/build/h5/static/index/index/new/5.png


BIN
unpackage/dist/build/h5/static/index/index/new/6.png


BIN
unpackage/dist/build/h5/static/index/index/news.png


BIN
unpackage/dist/build/h5/static/index/index/place-order.png


BIN
unpackage/dist/build/h5/static/index/index/register-examine.png


BIN
unpackage/dist/build/h5/static/index/index/reward-in.png


BIN
unpackage/dist/build/h5/static/index/index/reward-out.png


BIN
unpackage/dist/build/h5/static/index/index/team-achievement.png


BIN
unpackage/dist/build/h5/static/index/index/team-manage.png


BIN
unpackage/dist/build/h5/static/index/my/address.png


BIN
unpackage/dist/build/h5/static/index/my/auth-paper.png


BIN
unpackage/dist/build/h5/static/index/my/auth.png


BIN
unpackage/dist/build/h5/static/index/my/defaultimg.png


BIN
unpackage/dist/build/h5/static/index/my/help.png


BIN
unpackage/dist/build/h5/static/index/my/medal.png


BIN
unpackage/dist/build/h5/static/index/my/message.png


BIN
unpackage/dist/build/h5/static/index/my/mixun.png


BIN
unpackage/dist/build/h5/static/index/my/my-bg.png


Some files were not shown because too many files changed in this diff