Bläddra i källkod

Signed-off-by: 1004749546@qq.com <1004749546@qq.com>
提交

1004749546@qq.com 4 år sedan
förälder
incheckning
a144e5b8a1
4 ändrade filer med 54 tillägg och 7 borttagningar
  1. 2 2
      App.vue
  2. 1 1
      api/store.js
  3. 48 1
      pages/coupon/index/index.vue
  4. 3 3
      pages/getOrder/getOrder.vue

+ 2 - 2
App.vue

@@ -1,6 +1,6 @@
 <script>
-	// const uat_URL = 'http://md.test.zyucgj.com/saas/clz/' // 预发布
-	const uat_URL = 'http://192.168.16.103:8103/cw-wechat/' // 本地
+	// const uat_URL = 'http://carwash.test.zyucgj.com/cw-wechat' // 预发布
+	const uat_URL = 'http://192.168.16.102:8103/cw-wechat/' // 本地
 	const pro_URL = 'https://car.zyucgj.com/saas/clz/'  // 生产
 	const buildType = 0 // 打包环境对应类型,1 生产 0 预发布
 	const buildURL = buildType ? pro_URL : uat_URL // 打包后实际对应的url

+ 1 - 1
api/store.js

@@ -36,7 +36,7 @@ export const getWaitPhoto = params => {
 // 查看网点营业状态
 export const getStoreStatus = params => {
   return axios.request({
-    url: `store/validateStoreAndDevice?storeId=${params.storeId}&deviceId=${params.deviceId}`,
+    url: `store/validateStoreAndDevice?storeId=${params.storeId}&deviceNo=${params.deviceNo}`,
     method: 'get'
   })
 };

+ 48 - 1
pages/coupon/index/index.vue

@@ -7,7 +7,11 @@
 		<swiper style="height: calc(100% - 40px);" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
 			<swiper-item class="swiper-item" v-for="(item, index) in tabsList" :key="index">
 				<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="onreachBottom">
-					<couponTpl></couponTpl>
+					<couponTpl :list="couponList"></couponTpl>
+					<u-empty :text="noDataText" img-width="120" v-if="couponList.length==0 && status!='loading'" mode="list"></u-empty>
+					<view style="padding: 20upx;">
+						<u-loadmore v-if="total>pageSize || status=='loading'" :status="status" />
+					</view>
 				</scroll-view>
 			</swiper-item>
 		</swiper>
@@ -22,6 +26,8 @@
 		},
 		data() {
 			return {
+				noDataText: '暂无数据',
+				status: 'loadmore',
 				tabsList: [{
 					name: '未使用'
 				}, {
@@ -29,6 +35,47 @@
 				}, {
 					name: '已过期'
 				}],
+				couponList: [{
+						id: 23432445,
+						name: "满100减50",
+						price: 100,
+						yxTime: "2020-05-16",
+						remarks: '优惠卷使用说明优惠卷使用说明优惠卷使用说明',
+						checked: false
+					},
+					{
+						id: 3544355,
+						name: "满100减50",
+						price: 100,
+						yxTime: "2020-05-16",
+						remarks: '优惠卷使用说明优惠卷使用说明优惠卷使用说明',
+						checked: false
+					},
+					{
+						id: 234234234,
+						name: "满100减50",
+						price: 100,
+						yxTime: "2020-05-16",
+						remarks: '优惠卷使用说明优惠卷使用说明优惠卷使用说明',
+						checked: false
+					},
+					{
+						id: 66264646,
+						name: "满100减50",
+						price: 100,
+						yxTime: "2020-05-16",
+						remarks: '优惠卷使用说明优惠卷使用说明优惠卷使用说明',
+						checked: false
+					},
+					{
+						id: 9794694698,
+						name: "满100减50",
+						price: 100,
+						yxTime: "2020-05-16",
+						remarks: '优惠卷使用说明优惠卷使用说明优惠卷使用说明',
+						checked: false
+					}
+				], // 优惠卷列表
 				// 因为内部的滑动机制限制,请将tabs组件和swiper组件的current用不同变量赋值
 				current: 0, // tabs组件的current值,表示当前活动的tab选项
 				swiperCurrent: 0, // swiper组件的current值,表示当前那个swiper-item是活动的

+ 3 - 3
pages/getOrder/getOrder.vue

@@ -206,7 +206,7 @@
 				})
 				getStoreStatus({
 					storeId: storeId,
-					deviceId: bizId
+					deviceNo: bizId
 				}).then(res => {
 					uni.hideLoading()
 					if(res.status == 200) {
@@ -345,12 +345,12 @@
 				})
 				let item = this.itemList[this.serverIndex]
 				let storeId = this.$store.state.vuex_orderInfo.storeId
-				let deviceId = this.$store.state.vuex_orderInfo.bizId
+				let deviceNo = this.$store.state.vuex_orderInfo.bizId
 				let params = {
 					"itemId": item.itemId, // 服务id
 					"itemCode": item.itemCode,
 					"storeId": storeId, // 门店id
-					"deviceId": deviceId, // 设备id
+					"deviceNo": deviceNo, // 设备编号
 					"orderTime": this.$u.timeFormat(Date.now(), 'yyyy-mm-dd hh:MM:ss'),
 					"payableAmount": this.amount, // 应付金额 即优惠前金额
 					"paymentAmount": this.finalAmount // 实收金额 即优惠后金额