hmp 4 rokov pred
rodič
commit
3df343c61d
41 zmenil súbory, kde vykonal 2703 pridanie a 1197 odobranie
  1. 39 22
      assets/colorui/app.scss
  2. 190 87
      assets/http/api.js
  3. 3 33
      assets/http/global.js
  4. 793 0
      components/loading/loading.vue
  5. 1 1
      components/mescroll-body/mescroll-uni-option.js
  6. 6 5
      components/my-bills.vue
  7. 91 0
      components/my-order.vue
  8. 120 0
      components/pay-confirm.vue
  9. 279 0
      components/toast/toast.vue
  10. 6 0
      main.js
  11. 15 10
      pages.json
  12. 1 1
      pages/gain/comps/card1.vue
  13. 6 2
      pages/gain/comps/card2.vue
  14. 29 12
      pages/mine/mine.vue
  15. 71 0
      pages/order/comps/card.vue
  16. 97 0
      pages/order/comps/item.vue
  17. 91 0
      pages/order/order.vue
  18. 10 79
      pages/test/test.vue
  19. 13 20
      pagesA/pages/bill/bill-detail.vue
  20. 34 14
      pagesA/pages/bill/my-bills.vue
  21. 2 3
      pagesA/pages/bill/statistics.vue
  22. 29 12
      pagesA/pages/my-balance/my-balance.vue
  23. 1 1
      pagesA/pages/my-balance/statistics.vue
  24. 26 6
      pagesA/pages/my-points/my-points.vue
  25. 15 0
      pagesA/pages/setting/setting.vue
  26. BIN
      pagesA/static/setting/logout.png
  27. BIN
      pagesA/static/setting/logout1.png
  28. 4 4
      pagesB/comps/tki-qrcode/qrcode.js
  29. 120 0
      pagesC/comps/pay-confirm.vue
  30. 67 29
      pagesC/pages/checkstand/index.vue
  31. 0 253
      pagesC/pages/checkstand/index1.vue
  32. 0 197
      pagesC/pages/checkstand/pay-qrcode1.vue
  33. 301 240
      pagesD/pages/menu/menu.vue
  34. 215 152
      pagesD/pages/pay/pay.vue
  35. 11 14
      pagesD/pages/take-order/take-order.vue
  36. BIN
      static/icon/logout.png
  37. BIN
      static/icon/my-order.png
  38. BIN
      static/icon/order6.png
  39. BIN
      static/icon/setting2.png
  40. BIN
      static/icon/todayOrder1.png
  41. 17 0
      utils/util.js

+ 39 - 22
assets/colorui/app.scss

@@ -259,6 +259,23 @@
 	padding: 30rpx;
 }
 
+.price::after {
+	content: '元';
+	margin-left: 6rpx;
+	font-size: 0.5em;
+}
+
+.reduce::before {
+	content: '-';
+	margin-right: 10rpx;
+}
+.plus::before {
+	content: '+';
+	margin-right: 10rpx;
+}
+
+
+
 button {
 	margin: 0;
 
@@ -320,26 +337,26 @@ button {
 	
 	
 	
-	@mixin arch {
-		content: "";
-		position: absolute;
-		background-color: #F1F1F1;
-		width: 30rpx;
-		height: 30rpx;
-		bottom: -15rpx;
-		z-index: 10;
-		border-radius: 100%;
+@mixin arch {
+	content: "";
+	position: absolute;
+	background-color: #F1F1F1;
+	width: 30rpx;
+	height: 30rpx;
+	bottom: -15rpx;
+	z-index: 10;
+	border-radius: 100%;
+}
+.section {
+	position: relative;
+	
+	&::before {
+		@include arch;
+		left: -15rpx;
 	}
-	.section {
-		position: relative;
-		
-		&::before {
-			@include arch;
-			left: -15rpx;
-		}
-		
-		&::after {
-			@include arch;
-			right: -15rpx;
-		}
-	}
+	
+	&::after {
+		@include arch;
+		right: -15rpx;
+	}
+}

+ 190 - 87
assets/http/api.js

@@ -1,121 +1,199 @@
-import {http} from './service.js'
+import {
+	http
+} from './service.js'
 
 //微信api
-const wxApp={
-	getOpenId:p => http.get('/wx-app/getOpenId', {params:p}),
-	getOpenData:p => http.post('/wx-app/getOpenData',p),
-	getGenerateScheme:p => http.get('/wx-app/getGenerateScheme', {params:p}),
-	createWxaQrCode:p => http.get('/wx-app/createWxaQrCode', {params:p}),
+const wxApp = {
+	getOpenId: p => http.get('/wx-app/getOpenId', {
+		params: p
+	}),
+	getOpenData: p => http.post('/wx-app/getOpenData', p),
+	getGenerateScheme: p => http.get('/wx-app/getGenerateScheme', {
+		params: p
+	}),
+	createWxaQrCode: p => http.get('/wx-app/createWxaQrCode', {
+		params: p
+	}),
+	getCode: p => http.get('/wx-app/getCode', {params: p}),
 }
 
 //字典
-const dict={
-	list:p => http.get('/blade-system/dict-biz/dictionary', {params:p}),
-	dictionaryPage:p => http.get('/blade-system/dict-biz/dictionaryPage', {params:p}),
+const dict = {
+	list: p => http.get('/blade-system/dict-biz/dictionary', {
+		params: p
+	}),
+	dictionaryPage: p => http.get('/blade-system/dict-biz/dictionaryPage', {
+		params: p
+	}),
 }
 
 
 //文件上传
-const uploadFile =(p)=> http.upload('blade-resource/oss/endpoint/put-file', {name:'file',filePath:p})
+const uploadFile = (p) => http.upload('blade-resource/oss/endpoint/put-file', {
+	name: 'file',
+	filePath: p
+})
 
 //活动管理
 const activity = {
 	//音乐之声活动
-	yyzs_list:p => http.get('yyzs/cyzh-activity/activity/selectPageWithTag', {params:p,custom: {yyzs: true}}),
+	yyzs_list: p => http.get('yyzs/cyzh-activity/activity/selectPageWithTag', {
+		params: p,
+		custom: {
+			yyzs: true
+		}
+	}),
 	//商户活动
-	list:p => http.get("/common/activity/list", {params:p}),
+	list: p => http.get("/common/activity/list", {
+		params: p
+	}),
 	//活动详情
-	detail:p => http.get("ldt_activity/activity/detail", {params:p}),
+	detail: p => http.get("ldt_activity/activity/detail", {
+		params: p
+	}),
 	//获取地址信息
-	getLocation:p => http.get("/common/activity/getLocation", {params:p}),
+	getLocation: p => http.get("/common/activity/getLocation", {
+		params: p
+	}),
 }
 
 //用户管理
-const loginUser={
-	detail:p => http.get('ldt_user/loginuser/detail', {params:p}),
-	submit:p => http.post('ldt_user/loginuser/submit', p),
-	login:p => http.post('client/user/login', p),
-	payBefore:p => http.post('cyzh-ldt/loginuser/payBeforeNew', p),
-	payBeforeForNormal:p => http.post('cyzh-ldt/loginuser/payBeforeForNormal', p),
-	getBillrecordFromRedis:p => http.get('cyzh-ldt/loginuser/getBillrecordFromRedis', {params:p}),
-	clearBillRecordCache:p => http.get('cyzh-ldt/loginuser/clearBillRecordCache', {params:p}),
+const loginUser = {
+	detail: p => http.get('ldt_user/loginuser/detail', {
+		params: p
+	}),
+	submit: p => http.post('ldt_user/loginuser/submit', p),
+	login: p => http.post('client/user/login', p),
+	payBefore: p => http.post('cyzh-ldt/loginuser/payBeforeNew', p),
+	payBeforeForNormal: p => http.post('cyzh-ldt/loginuser/payBeforeForNormal', p),
+	getBillrecordFromRedis: p => http.get('cyzh-ldt/loginuser/getBillrecordFromRedis', {
+		params: p
+	}),
+	clearBillRecordCache: p => http.get('cyzh-ldt/loginuser/clearBillRecordCache', {
+		params: p
+	}),
 }
 
 
 
 //商户管理
-const shop={
-	list:p => http.get('shop/list', {params:p}),
-	detail:p => http.get('ldt_shop/shop/detail', {params:p}),
-	indexInfo:p => http.get("shop/indexInfo", {params:p}),
+const shop = {
+	list: p => http.get('shop/list', {
+		params: p
+	}),
+	detail: p => http.get('ldt_shop/shop/detail', {
+		params: p
+	}),
+	indexInfo: p => http.get("shop/indexInfo", {
+		params: p
+	}),
 }
 
 //审核管理
-const audit={
-	list:p => http.get("ldt_shop/audit/list", {params:p}),
-	submit:p => http.post('ldt_shop/audit/submit',p),
-	detail:p => http.get("ldt_shop/audit/detail", {params:p}),
+const audit = {
+	list: p => http.get("ldt_shop/audit/list", {
+		params: p
+	}),
+	submit: p => http.post('ldt_shop/audit/submit', p),
+	detail: p => http.get("ldt_shop/audit/detail", {
+		params: p
+	}),
 }
 
 //商场管理
-const mall={
+const mall = {
 	//获取商场列表
-	list:p => http.get('mall/list',{params:p}),
+	list: p => http.get('mall/list', {
+		params: p
+	}),
 }
 
 //代理商
-const agenter={
-	list:p => http.get('ldt_agent/agentrecord/list',{params:p}),
-	submit:p => http.post('ldt_agent/agentrecord/submit', p),
-	statistics:p => http.get('app/agent/agenterInfo',{params:p}),
-	earningsDetail:p => http.get('app/agent/earningsDetail',{params:p}),
+const agenter = {
+	list: p => http.get('ldt_agent/agentrecord/list', {
+		params: p
+	}),
+	submit: p => http.post('ldt_agent/agentrecord/submit', p),
+	statistics: p => http.get('app/agent/agenterInfo', {
+		params: p
+	}),
+	earningsDetail: p => http.get('app/agent/earningsDetail', {
+		params: p
+	}),
 }
 
 //代理类型
-const agenterType={
-	detail:p => http.get('ldt_platform/platformsetting/detail',{params:p}),
+const agenterType = {
+	detail: p => http.get('ldt_platform/platformsetting/detail', {
+		params: p
+	}),
 }
 
 
 //用户银行
-const userBank={
-	detail:p => http.get('ldt_user/userbank/detail',{params:p}),
-	list:p => http.get('ldt_user/userbank/list',{params:p}),
-	appList:p => http.get('common/userbank/list',{params:p}),
-	submit:p => http.post('ldt_user/userbank/submit', p),
-	remove:p => http.post('ldt_user/userbank/remove?ids='+p),
+const userBank = {
+	detail: p => http.get('ldt_user/userbank/detail', {
+		params: p
+	}),
+	list: p => http.get('ldt_user/userbank/list', {
+		params: p
+	}),
+	appList: p => http.get('common/userbank/list', {
+		params: p
+	}),
+	submit: p => http.post('ldt_user/userbank/submit', p),
+	remove: p => http.post('ldt_user/userbank/remove?ids=' + p),
 }
 
 //支付
-const pay={
+const pay = {
 	//获取wx支付所需参数
-	getPayOrderPamams:p => http.post('client/trade/scanPay',p),
+	getPayOrderPamams: p => http.post('client/trade/scanPay', p),
 	//h5获取wx支付所需参数
-	getPayOrderPamamsForH5:p => http.post('client/trade/scanPayByWeChat',p),
+	getPayOrderPamamsForH5: p => http.post('client/trade/scanPayByWeChat', p),
 	//wx支付
-	payOrder:p => http.get('payment/payOrder/YEE_PAY/MINI_PROGRAM',{params:p}),
+	payOrder: p => http.get('payment/payOrder/YEE_PAY/MINI_PROGRAM', {
+		params: p
+	}),
 	//扫码支付
-	payOrderOfscanCode:p => http.get('payment/payOrder/YEE_PAY/SCAN_CODE',{params:p}),
+	payOrderOfscanCode: p => http.get('payment/payOrder/YEE_PAY/SCAN_CODE', {
+		params: p
+	}),
 	//支付策略
-	getPointPayType:p => http.post('cyzh-ldt/loginuser/getPointPayType',p),
+	getPointPayType: p => http.post('cyzh-ldt/loginuser/getPointPayType', p),
 }
 
-const billRecord={
-	addAgentOrder: p => http.post('/app/agent/addAgentOrder',p),
-	submit:p => http.post('ldt_bills/bills/submit', p),
-	detail:p => http.get('ldt_bills/bills/detail', {params:p}),
+const billRecord = {
+	addAgentOrder: p => http.post('/app/agent/addAgentOrder', p),
+	submit: p => http.post('ldt_bills/bills/submit', p),
+	detail: p => http.get('ldt_bills/bills/detail', {
+		params: p
+	}),
 }
 
-const balanceBills={
-	list:p => http.get('common/balancebills/list',{params:p}),
+const balanceBills = {
+	list: p => http.get('common/balancebills/list', {
+		params: p
+	}),
 }
 
-const pointbills={
-	list:p => http.get('common/pointbills/list',{params:p}),
+const pointbills = {
+	list: p => http.get('common/pointbills/list', {
+		params: p
+	}),
 }
 
-const bills={
-	list:p => http.get('/common/bills/myBills',{params:p}),
+const goodsbills = {
+	list: p => http.get('goodsbills/list', {
+		params: p
+	}),
+}
+
+
+const bills = {
+	list: p => http.get('/common/bills/myBills', {
+		params: p
+	}),
 }
 
 const setting = {
@@ -124,53 +202,77 @@ const setting = {
 
 //账号
 const account = {
-	pointList:p => http.get('cyzh-ldt/loginuser/channeluserpoint/list',{params:p}),
-	remainList:p => http.get('cyzh-ldt/loginuser/remaining/list',{params:p}),
+	pointList: p => http.get('cyzh-ldt/loginuser/channeluserpoint/list', {
+		params: p
+	}),
+	remainList: p => http.get('cyzh-ldt/loginuser/remaining/list', {
+		params: p
+	}),
 }
 
 //webSocket
-const webSocket={
-	sendInfo:p => http.post('webSocket/sendInfo',p),
+const webSocket = {
+	sendInfo: p => http.post('webSocket/sendInfo', p),
 }
 
-const joinRecord={
+const joinRecord = {
 	//活动详情查看该活动的参加者
-	list:p => http.get("ldt_activity/joinrecord/list", {params:p}),
+	list: p => http.get("ldt_activity/joinrecord/list", {
+		params: p
+	}),
 }
 
-const statistics={
-	getBillStatistics:p => http.get('/common/bills/getBillStatistics',{params:p})
+const statistics = {
+	getBillStatistics: p => http.get('/common/bills/getBillStatistics', {
+		params: p
+	})
 }
 
-const withdraw={
-	submit:p => http.post('common/withdrawrec/withdraw',p),
-	payOrder:p => http.get('payment/payOrder/YEE_PAY/USER_WITHDRAW',{params:p}),
-	list:p => http.get("ldt_bills/withdrawrec/list", {params:p}),
+const withdraw = {
+	submit: p => http.post('common/withdrawrec/withdraw', p),
+	payOrder: p => http.get('payment/payOrder/YEE_PAY/USER_WITHDRAW', {
+		params: p
+	}),
+	list: p => http.get("ldt_bills/withdrawrec/list", {
+		params: p
+	}),
 }
 
-const goods={
-	menu:p => http.get("goods/getGoodsMenuList", {params:p}),
-	order:p => http.post('goodsbills/order',p),
+const goods = {
+	menu: p => http.get("goods/getGoodsMenuList", {
+		params: p
+	}),
+	order: p => http.post('goodsbills/order', p),
 }
 
-const address={
-	list:p => http.get("client/useraddress/list", {params:p}),
-	detail:p => http.get("ldt_user_address/useraddress/detail", {params:p}),
-	submit:p => http.post('client/useraddress/submit', p),
+const address = {
+	list: p => http.get("client/useraddress/list", {
+		params: p
+	}),
+	detail: p => http.get("ldt_user_address/useraddress/detail", {
+		params: p
+	}),
+	submit: p => http.post('client/useraddress/submit', p),
 }
 
 
-const userChannelPoint={
-	list:p => http.get('common/userchannelpoint/list',{params:p}),
+const userChannelPoint = {
+	list: p => http.get('common/userchannelpoint/list', {
+		params: p
+	}),
 }
-const order={
-	list:p => http.get("ldt_bills/goodsbills/list", {params:p}),
-	detail:p => http.get("goodsbills/detail", {params:p}),
+const order = {
+	list: p => http.get("ldt_bills/goodsbills/list", {
+		params: p
+	}),
+	detail: p => http.get("goodsbills/detail", {
+		params: p
+	}),
 }
 
 
 
-export const api={
+export const api = {
 	wxApp,
 	dict,
 	uploadFile,
@@ -186,6 +288,7 @@ export const api={
 	billRecord,
 	balanceBills,
 	pointbills,
+	goodsbills,
 	bills,
 	setting,
 	account,
@@ -197,4 +300,4 @@ export const api={
 	address,
 	userChannelPoint,
 	order
-}
+}

+ 3 - 33
assets/http/global.js

@@ -56,45 +56,15 @@ global.takeType = {
 global.takeTypeList = ['店内堂食', '到店自取', '商家配送']
 
 global.payStatus = {
-	IS_WAIT: '0',
-	IS_PAY: '1',
-	IS_CANCEL: '2'
+	IS_WAIT: '待付款',
+	IS_PAY: '付款成功',
+	IS_CANCEL: '取消付款'
 }
 
 global.wxParams = {
 	APPID: 'wx9ad53e8c83ae1a51'
 }
 
-global.APPID = {
-	nanyue: 'wxd78a776416719686', //南粤药业
-	didi: 'wxaf35009675aa0b2a', //滴滴出行
-}
-
-//webSocket 收到服务端的信息
-global.socketMessage = {
-	payForPaymentCode: '用户通过付款码付款', //商家扫描用户的付款码支付
-}
-
-
-// 用户积分足够够有三种情况,分别是CHANNEL_ENOUGN、CHANNEL_ZERO_RARE_ENOUGH、CHANNEL_NOENOUGH_RARE_ENOUGH
-global.pointPayType = {
-	//渠道积分足够支付
-	CHANNEL_ENOUGN: 'CHANNEL_ENOUGN',
-	//渠道积分为0,用户余额为0
-	CHANNEL_ZERO_RARE_ZERO: 'CHANNEL_ZERO_RARE_ZERO',
-	//渠道积分为0,用户余额够扣
-	CHANNEL_ZERO_RARE_ENOUGH: 'CHANNEL_ZERO_RARE_ENOUGH',
-	//渠道积分为0,用户余额不够扣
-	CHANNEL_ZERO_RARE_NOENOUGH: 'CHANNEL_ZERO_RARE_NOENOUGH',
-	//渠道积分不为0,用户余额为0
-	CHANNEL_NOENOUGH_RARE_ZERO: 'CHANNEL_NOENOUGH_RARE_ZERO',
-	//渠道积分不为0,用户余额足够扣
-	CHANNEL_NOENOUGH_RARE_ENOUGH: 'CHANNEL_NOENOUGH_RARE_ENOUGH',
-	//渠道积分不为0,用户余额不够扣
-	CHANNEL_NOENOUGH_RARE_NOENOUGH: 'CHANNEL_NOENOUGH_RARE_NOENOUGH'
-}
-
-
 global.TRANSFORM_PARAMS = '95963'
 
 

+ 793 - 0
components/loading/loading.vue

@@ -0,0 +1,793 @@
+<template>
+	<!-- 1、常用loading加载弹窗 -->
+	<view class="aui-loading aui-loading-ring" :class="{'aui-loading-ring-row': direction == 'row'}" v-if="SHOW && type == 1">
+		<view class="aui-mask" v-if="mask" @touchmove.stop.prevent></view>
+		<view class="aui-loading-main">
+			<view class="aui-loading-animate">
+				<view class="span"></view>
+				<view class="span"></view>
+				<view class="span"></view>
+				<view class="span"></view>
+				<view class="span"></view>
+				<view class="span"></view>
+				<view class="span"></view>
+				<view class="span"></view>
+				<view class="span"></view>
+				<view class="span"></view>
+				<view class="span"></view>
+				<view class="span"></view>
+			</view>
+			<view class="aui-loading-msg" v-if="msg">{{msg}}</view>
+		</view>
+	</view>
+	<!-- 2、按钮内显示loading加载动画 -->
+	<view class="aui-loading aui-loading-button" v-else-if="SHOW && type == 2">
+		<view class="aui-loading-main" :style="{background: styles.background, borderRadius: styles.borderRadius, zIndex: styles.zIndex}">
+			<view class="aui-loading-warp">
+				<view class="aui-loading-animate">
+					<view class="span" :style="{borderColor: styles.color}"></view>
+					<view class="span" :style="{borderColor: styles.color}"></view>
+					<view class="span" :style="{borderColor: styles.color}"></view>
+					<view class="span" :style="{borderColor: styles.color}"></view>
+					<view class="span" :style="{borderColor: styles.color}"></view>
+					<view class="span" :style="{borderColor: styles.color}"></view>
+					<view class="span" :style="{borderColor: styles.color}"></view>
+					<view class="span" :style="{borderColor: styles.color}"></view>
+					<view class="span" :style="{borderColor: styles.color}"></view>
+					<view class="span" :style="{borderColor: styles.color}"></view>
+					<view class="span" :style="{borderColor: styles.color}"></view>
+					<view class="span" :style="{borderColor: styles.color}"></view>
+				</view>
+				<view class="aui-loading-msg" v-if="msg" :style="{color: styles.color}">{{msg}}</view>
+			</view>
+		</view>
+	</view>
+	<!-- 3、特殊风格loading加载弹窗 -> 四方块旋转 -->
+	<view class="aui-loading aui-loading-squarefour" :class="{'aui-loading-squarefour-style-1': theme==1, 'aui-loading-squarefour-style-2': theme==2}" v-else-if="SHOW && type == 3">
+		<view class="aui-mask" v-if="mask" @touchmove.stop.prevent></view>
+		<view class="aui-loading-main" :style="{background: styles.background, zIndex: styles.zIndex}">
+			<view class="aui-loading-animate">
+				<view class="span1"></view>
+				<view class="span2"></view>
+				<view class="span3"></view>
+				<view class="span4"></view>
+			</view>
+			<view class="aui-loading-msg" style="top: 40%;" v-if="msg" :style="{color: styles.color}">{{msg}}</view>
+		</view>
+	</view>
+	<!-- 4、三平行四边形放大缩小(全屏首次加载过度动画) -->
+	<view class="aui-loading aui-loading-dots" v-else-if="SHOW && type == 4">
+		<view class="aui-mask" v-if="mask" @touchmove.stop.prevent></view>
+		<view class="aui-loading-main">
+			<view class="aui-loading-dot-items">
+				<view class="aui-loading-dot-item dot_one"></view>
+				<view class="aui-loading-dot-item dot_two"></view>
+				<view class="aui-loading-dot-item dot_three"></view>
+			</view>
+		</view>
+	</view>
+	<!-- 5、三圆点背景过度(全屏首次加载过度动画) -->
+	<view class="aui-loading aui-loading-dots-opacity" v-else-if="SHOW && type == 5">
+		<view class="aui-mask" v-if="mask" @touchmove.stop.prevent></view>
+		<view class="aui-loading-main">
+			<view class="aui-loading-dot-items">
+				<view class="aui-loading-dot-item dot_one"></view>
+				<view class="aui-loading-dot-item dot_two"></view>
+				<view class="aui-loading-dot-item dot_three"></view>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	export default {
+		name: "aui-loading",
+		props: {
+			type: { //默认圆环风格(<1>、1:toast圆环风格,<2>、2:点击按钮后在按钮内显示加载动画) <3>、3:四方块水平方向旋转,
+				type: Number,
+				default: 1
+			},
+			mask: { //是否显示遮罩,默认false
+				type: Boolean,
+				default: true
+			},
+			direction: { //横向("row")或纵向("col")控制,默认纵向
+				type: String,
+				default: 'row'
+			},
+			theme: { //控制风格 type==3时生效
+				type: Number,
+				default: 1
+			},
+			styles: { //样式
+				type: Object,
+				default () {
+					return {
+						color: '',
+						borderRadius: '',
+						background: '',
+						zIndex: ''
+					};
+				}
+			},
+		},
+		data() {
+			return {
+				msg:'加载中...',
+				SHOW: false, //是否显示
+			};
+		},
+		created(){
+			//console.log(this.styles);
+		},
+		methods:{
+			//显示
+			show(msg='加载中...'){
+				var _this = this;
+				_this.msg=msg
+				return new Promise(function(resolve, reject){
+					_this.SHOW = true;
+					var Timer = setTimeout(function(){
+						clearTimeout(Timer)
+						_this.hide(); //隐藏loading
+					},2000)
+					resolve();
+				});
+			},
+			showLoading(msg='加载中...'){
+				var _this = this;
+				_this.msg=msg
+				return new Promise(function(resolve, reject){
+					_this.SHOW = true;
+					resolve();
+				});
+			},
+			//隐藏
+			hide(){
+				var _this = this;
+				return new Promise(function(resolve, reject){
+					_this.SHOW = false;
+					resolve();
+				});
+			},
+		}
+	}
+</script>
+
+<style>
+	/* loading加载弹窗 */
+	/* loading-ring 样式设置 */
+	.aui-loading.aui-loading-ring{
+		width: 100%;
+		height: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 999;
+	}
+	.aui-loading.aui-loading-ring .aui-loading-main{
+		width: auto;
+		height: auto;
+		min-width: 55px;
+		min-height: 55px;
+		background: rgba(0,0,0,.8);
+		border-radius: 10px;
+		box-shadow: 0 0 1px rgba(100,100,100,.5);
+		padding: 15px;
+		box-sizing: border-box;
+		-ms-animation: aui-fade-in .1s ease-out forwards;
+		-webkit-animation: aui-fade-in .1s ease-out forwards;
+		animation: aui-fade-in .1s ease-out forwards;
+		position: absolute;
+		top: 40%;
+		left: 50%;
+		z-index: 999;
+		-ms-transform: translate(-50%, -50%);
+		-webkit-transform: translate(-50%, -50%);
+		transform: translate(-50%, -50%);
+	}
+	.aui-loading.aui-loading-ring .aui-loading-animate{
+		width: 25px;
+		height: 25px;
+		margin: 0 auto;
+		border-radius: 50%;
+		position: relative;
+		z-index: 999;
+	}
+	.aui-loading.aui-loading-ring .aui-loading-msg{
+		width: 100%;
+		height: 17px;
+		max-width: -webkit-calc(100vw - 40px);
+		max-width: calc(100vw - 40px);
+		line-height: 17px;
+		position: relative;
+		top: 5px;
+		font-size: 13px;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+		color: #FFF;
+		text-align: center;
+		opacity: .8;
+	}
+	.aui-loading.aui-loading-ring .aui-loading-animate .span{
+		width: -webkit-calc(100% - 6px);
+		width: calc(100% - 6px);
+		height: 2px;
+		display: inline-block;
+		border-radius: 2px;
+		position: absolute;
+		box-sizing: initial !important;
+		top: -webkit-calc(50% - 1px);
+		top: calc(50% - 1px);
+		left: 0;
+		opacity: 0.3;
+		-ms-animation: load-button 0.6s ease infinite;
+		-webkit-animation: load-button 0.6s ease infinite;
+		animation: load-button 0.6s ease infinite;
+	}
+	.aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(1){
+		border-left: 6px solid #FFF;
+		-ms-transform: rotate(0deg);
+		-webkit-transform: rotate(0deg);
+		transform: rotate(0deg);
+		-ms-animation-delay: 0.05s;
+		-webkit-animation-delay: 0.05s;
+		animation-delay: 0.05s;
+	}
+	.aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(2){
+		border-left: 6px solid #FFF;
+		-ms-transform: rotate(30deg);
+		-webkit-transform: rotate(30deg);
+		transform: rotate(30deg);
+		-ms-animation-delay: 0.1s;
+		-webkit-animation-delay: 0.1s;
+		animation-delay: 0.1s;
+	}
+	.aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(3){
+		border-left: 6px solid #FFF;
+		-ms-transform: rotate(60deg);
+		-webkit-transform: rotate(60deg);
+		transform: rotate(60deg);
+		-ms-animation-delay: 0.15s;
+		-webkit-animation-delay: 0.15s;
+		animation-delay: 0.15s;
+	}
+	.aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(4){
+		border-left: 6px solid #FFF;
+		-ms-transform: rotate(90deg);
+		-webkit-transform: rotate(90deg);
+		transform: rotate(90deg);
+		-ms-animation-delay: 0.2s;
+		-webkit-animation-delay: 0.2s;
+		animation-delay: 0.2s;
+	}
+	.aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(5){
+		border-left: 6px solid #FFF;
+		-ms-transform: rotate(120deg);
+		-webkit-transform: rotate(120deg);
+		transform: rotate(120deg);
+		-ms-animation-delay: 0.25s;
+		-webkit-animation-delay: 0.25s;
+		animation-delay: 0.25s;
+	}
+	.aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(6){
+		border-left: 6px solid #FFF;
+		-ms-transform: rotate(150deg);
+		-webkit-transform: rotate(150deg);
+		transform: rotate(150deg);
+		-ms-animation-delay: 0.3s;
+		-webkit-animation-delay: 0.3s;
+		animation-delay: 0.3s;
+	}
+	.aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(7){
+		border-right: 6px solid #FFF;
+		-ms-transform: rotate(0deg);
+		-webkit-transform: rotate(0deg);
+		transform: rotate(0deg);
+		-ms-animation-delay: 0.35s;
+		-webkit-animation-delay: 0.35s;
+		animation-delay: 0.35s;
+	}
+	.aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(8){
+		border-right: 6px solid #FFF;
+		-ms-transform: rotate(30deg);
+		-webkit-transform: rotate(30deg);
+		transform: rotate(30deg);
+		-ms-animation-delay: 0.4s;
+		-webkit-animation-delay: 0.4s;
+		animation-delay: 0.4s;
+	}
+	.aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(9){
+		border-right: 6px solid #FFF;
+		-ms-transform: rotate(60deg);
+		-webkit-transform: rotate(60deg);
+		transform: rotate(60deg);
+		-ms-animation-delay: 0.45s;
+		-webkit-animation-delay: 0.45s;
+		animation-delay: 0.45s;
+	}
+	.aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(10){
+		border-right: 6px solid #FFF;
+		-ms-transform: rotate(90deg);
+		-webkit-transform: rotate(90deg);
+		transform: rotate(90deg);
+		-ms-animation-delay: 0.5s;
+		-webkit-animation-delay: 0.5s;
+		animation-delay: 0.5s;
+	}
+	.aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(11){
+		border-right: 6px solid #FFF;
+		-ms-transform: rotate(120deg);
+		-webkit-transform: rotate(120deg);
+		transform: rotate(120deg);
+		-ms-animation-delay: 0.55s;
+		-webkit-animation-delay: 0.55s;
+		animation-delay: 0.55s;
+	}
+	.aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(12){
+		border-right: 6px solid #FFF;
+		-ms-transform: rotate(150deg);
+		-webkit-transform: rotate(150deg);
+		transform: rotate(150deg);
+		-ms-animation-delay: 0.6s;
+		-webkit-animation-delay: 0.6s;
+		animation-delay: 0.6s;
+	}
+	
+	.aui-loading.aui-loading-ring.aui-loading-ring-row .aui-loading-main{
+		display: block;
+		min-height: 40px;
+		padding: 10px 15px;
+		border-radius: 6px;		
+	}
+	.aui-loading.aui-loading-ring.aui-loading-ring-row .aui-loading-animate{
+		display: inline-block;
+		vertical-align: top;
+	}
+	.aui-loading.aui-loading-ring.aui-loading-ring-row .aui-loading-msg{
+		width: auto;
+		height: 25px;
+		line-height: 25px;
+		top: 0;
+		margin-left: 10px;
+		display: inline-block;
+		vertical-align: top;
+	}
+	/* loading-button 样式设置 */
+	.aui-loading.aui-loading-button{
+		width: 100%;
+		height: 100%;
+		position: absolute;
+		top: 0;
+		left: 0;
+	}
+	.aui-loading.aui-loading-button .aui-loading-main{
+		width: 100%;
+		height: 100%;
+		text-align: center;
+		position: absolute;
+		top: 0;
+		left: 0;
+		z-index: 996;
+		background: #FFF;
+		white-space: nowrap;
+		-ms-animation: aui-fade-in .2s ease-out forwards;
+		-webkit-animation: aui-fade-in .2s ease-out forwards;
+		animation: aui-fade-in .2s ease-out forwards;
+	}
+	.aui-loading.aui-loading-button .aui-loading-warp{
+		width: auto;
+		height: auto;
+		display: flex;
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		-webkit-transform: translate(-50%, -50%);
+		transform: translate(-50%, -50%);
+	}
+	.aui-loading.aui-loading-button .aui-loading-animate{
+		width: 20px;
+		height: 20px;
+		display: inline-block;
+		vertical-align: top;
+		position: relative;
+	}
+	.aui-loading.aui-loading-button .aui-loading-msg{
+		height: 20px;
+		line-height: 20px;
+		font-size: 13px;
+		margin-left: 5px;
+		display: inline-block;
+		vertical-align: top;
+		position: relative;
+		top: 1px;
+	}
+	.aui-loading.aui-loading-button .aui-loading-animate .span{
+		width: -webkit-calc(100% - 6px);
+		width: calc(100% - 6px);
+		height: 2px;
+		display: inline-block;
+		border-radius: 2px;
+		box-sizing: initial !important;
+		position: absolute;
+		top: -webkit-calc(50% - 1px);
+		top: calc(50% - 1px);
+		left: 0;
+		opacity: 0.3;
+		-ms-animation: load-button 0.6s ease infinite;
+		-webkit-animation: load-button 0.6s ease infinite;
+		animation: load-button 0.6s ease infinite;
+	}
+	.aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(1){
+		border-left: 5px solid #909090;
+		-ms-transform: rotate(0deg);
+		-webkit-transform: rotate(0deg);
+		transform: rotate(0deg);
+		-ms-animation-delay: 0.05s;
+		-webkit-animation-delay: 0.05s;
+		animation-delay: 0.05s;
+	}
+	.aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(2){
+		border-left: 5px solid #909090;
+		-ms-transform: rotate(30deg);
+		-webkit-transform: rotate(30deg);
+		transform: rotate(30deg);
+		-ms-animation-delay: 0.1s;
+		-webkit-animation-delay: 0.1s;
+		animation-delay: 0.1s;
+	}
+	.aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(3){
+		border-left: 5px solid #909090;
+		-ms-transform: rotate(60deg);
+		-webkit-transform: rotate(60deg);
+		transform: rotate(60deg);
+		-ms-animation-delay: 0.15s;
+		-webkit-animation-delay: 0.15s;
+		animation-delay: 0.15s;
+	}
+	.aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(4){
+		border-left: 5px solid #909090;
+		-ms-transform: rotate(90deg);
+		-webkit-transform: rotate(90deg);
+		transform: rotate(90deg);
+		-ms-animation-delay: 0.2s;
+		-webkit-animation-delay: 0.2s;
+		animation-delay: 0.2s;
+	}
+	.aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(5){
+		border-left: 5px solid #909090;
+		-ms-transform: rotate(120deg);
+		-webkit-transform: rotate(120deg);
+		transform: rotate(120deg);
+		-ms-animation-delay: 0.25s;
+		-webkit-animation-delay: 0.25s;
+		animation-delay: 0.25s;
+	}
+	.aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(6){
+		border-left: 5px solid #909090;
+		-ms-transform: rotate(150deg);
+		-webkit-transform: rotate(150deg);
+		transform: rotate(150deg);
+		-ms-animation-delay: 0.3s;
+		-webkit-animation-delay: 0.3s;
+		animation-delay: 0.3s;
+	}
+	.aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(7){
+		border-right: 5px solid #909090;
+		-ms-transform: rotate(0deg);
+		-webkit-transform: rotate(0deg);
+		transform: rotate(0deg);
+		-ms-animation-delay: 0.35s;
+		-webkit-animation-delay: 0.35s;
+		animation-delay: 0.35s;
+	}
+	.aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(8){
+		border-right: 5px solid #909090;
+		-ms-transform: rotate(30deg);
+		-webkit-transform: rotate(30deg);
+		transform: rotate(30deg);
+		-ms-animation-delay: 0.4s;
+		-webkit-animation-delay: 0.4s;
+		animation-delay: 0.4s;
+	}
+	.aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(9){
+		border-right: 5px solid #909090;
+		-ms-transform: rotate(60deg);
+		-webkit-transform: rotate(60deg);
+		transform: rotate(60deg);
+		-ms-animation-delay: 0.45s;
+		-webkit-animation-delay: 0.45s;
+		animation-delay: 0.45s;
+	}
+	.aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(10){
+		border-right: 5px solid #909090;
+		-ms-transform: rotate(90deg);
+		-webkit-transform: rotate(90deg);
+		transform: rotate(90deg);
+		-ms-animation-delay: 0.5s;
+		-webkit-animation-delay: 0.5s;
+		animation-delay: 0.5s;
+	}
+	.aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(11){
+		border-right: 5px solid #909090;
+		-ms-transform: rotate(120deg);
+		-webkit-transform: rotate(120deg);
+		transform: rotate(120deg);
+		-ms-animation-delay: 0.55s;
+		-webkit-animation-delay: 0.55s;
+		animation-delay: 0.55s;
+	}
+	.aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(12){
+		border-right: 5px solid #909090;
+		-ms-transform: rotate(150deg);
+		-webkit-transform: rotate(150deg);
+		transform: rotate(150deg);
+		-ms-animation-delay: 0.6s;
+		-webkit-animation-delay: 0.6s;
+		animation-delay: 0.6s;
+	}
+	/* loading-squarefour 样式设置 */
+	.aui-loading.aui-loading-squarefour{
+		width: 100%;
+		height: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 999;
+	}
+	.aui-loading.aui-loading-squarefour .aui-loading-main{
+		width: 100%;
+		height: 100%;
+		position: absolute;
+		top: 0;
+		left: 0;
+		z-index: 996;
+		background: #FFF;
+		-ms-animation: aui-fade-in .2s ease-out forwards;
+		-webkit-animation: aui-fade-in .2s ease-out forwards;
+		animation: aui-fade-in .2s ease-out forwards;
+	}
+	.aui-loading.aui-loading-squarefour .aui-loading-animate{
+		width: 30px;
+		height: 30px;
+		display: block;
+		margin: auto;
+		position: absolute;
+		top: -webkit-calc(50% - 15px);
+		top: calc(40% - 25px);
+		left: -webkit-calc(50% - 15px);
+		left: calc(50% - 15px);
+		-ms-animation: aui-loading-squarefour-animate 1s infinite;
+		-webkit-animation: aui-loading-squarefour-animate 1s infinite;
+		animation: aui-loading-squarefour-animate 1s infinite;
+	}
+	.aui-loading.aui-loading-squarefour .aui-loading-animate view{
+		width: 12px;
+		height: 12px;
+		display: block;
+		border-radius: 2px;
+		background: #2cb0b2;
+		position: absolute;
+	}
+	.aui-loading.aui-loading-squarefour .aui-loading-animate .span1{
+		background: #8BC34A;
+		left: 0px;
+		-ms-animation: aui-loading-square-span1-animate 2s linear 0s infinite normal;
+		-webkit-animation: aui-loading-square-span1-animate 2s linear 0s infinite normal;
+		animation: aui-loading-square-span1-animate 2s linear 0s infinite normal;
+	}
+	.aui-loading.aui-loading-squarefour .aui-loading-animate .span2{
+		background: #F44336;
+		right: 0;
+		-ms-animation: aui-loading-square-span2-animate 2s linear 0s infinite normal;
+		-webkit-animation: aui-loading-square-span2-animate 2s linear 0s infinite normal;
+		animation: aui-loading-square-span2-animate 2s linear 0s infinite normal;
+	}
+	.aui-loading.aui-loading-squarefour .aui-loading-animate .span3{
+		background: #FFB74D;
+		bottom: 0;
+		-ms-animation: aui-loading-square-span3-animate 2s linear 0s infinite normal;
+		-webkit-animation: aui-loading-square-span3-animate 2s linear 0s infinite normal;
+		animation: aui-loading-square-span3-animate 2s linear 0s infinite normal;
+	}
+	.aui-loading.aui-loading-squarefour .aui-loading-animate .span4{
+		background: #82bcf9;
+		right: 0;
+		bottom: 0;
+		-ms-animation: aui-loading-square-span4-animate 2s linear 0s infinite normal;
+		-webkit-animation: aui-loading-square-span4-animate 2s linear 0s infinite normal;
+		animation: aui-loading-square-span4-animate 2s linear 0s infinite normal;
+	}
+	.aui-loading.aui-loading-squarefour .aui-loading-msg{
+		width: 100%;
+		height: 50px;
+		line-height: 60px;
+		font-size: 13px;
+		color: #909090;
+		text-align: center;
+		position: absolute;
+		top: 50%;
+		left: 0;
+	}
+	.aui-loading.aui-loading-squarefour.aui-loading-squarefour-style-2{
+		z-index: 996;
+	}
+	.aui-loading.aui-loading-squarefour.aui-loading-squarefour-style-1{
+		z-index: 999;
+	}
+	.aui-loading.aui-loading-squarefour.aui-loading-squarefour-style-1 .aui-loading-main{
+		width: auto;
+		height: auto;
+		min-width: 54px;
+		min-height: 54px;
+		background: rgba(0,0,0,.8);
+		border-radius: 10px;
+		box-shadow: 0 0 1px rgba(100,100,100,.3) inset;
+		padding: 15px;
+		box-sizing: border-box;
+		top: 50%;
+		left: 50%;
+		z-index: 999;
+		-ms-transform: translate(-50%, -50%);
+		-webkit-transform: translate(-50%, -50%);
+		transform: translate(-50%, -50%);
+	}
+	.aui-loading.aui-loading-squarefour.aui-loading-squarefour-style-1 .aui-loading-main .aui-loading-animate{
+		position: relative;
+		top: 0;
+		left: 0;
+	}
+	.aui-loading.aui-loading-squarefour.aui-loading-squarefour-style-1 .aui-loading-main .aui-loading-msg{
+		height: 22px;
+		line-height: 20px;
+		padding: 0 10px;
+		box-sizing: border-box;
+		font-size: 14px;
+		color: #FFF;
+		opacity: 0.9;		
+		position: relative;
+		top: 6px;
+		left: 0;
+	}
+	/* 三平行四边形放大缩小动画放大缩小动画(全屏首次加载过度动画) */
+	.aui-loading.aui-loading-dots{background-color: #FFF; height: 100%; width: 100%; position: fixed; z-index: 996; margin-top: 0px; top: 0px;}
+	.aui-loading.aui-loading-dots .aui-loading-main{width: 100%;height: 100%;position: relative;}
+	.aui-loading.aui-loading-dots .aui-loading-dot-items {position: absolute;left: 50%;top: 50%;height: 60px;width: 120px; text-align: center; margin-top: -30px;margin-left: -60px;}
+	.aui-loading.aui-loading-dots .aui-loading-dot-item{width: 10px;height: 10px; background-color: #ec2b45; display: inline-block; margin-right: 6px; margin-top: 20px; border-radius: 2px; -webkit-transform: scale(1) skewX(-30deg); transform: scale(1) skewX(-30deg);}
+	.aui-loading.aui-loading-dots .dot_one {background: #197DE0; -webkit-animation: dot_one 1.5s infinite; animation: dot_one 1.5s infinite;}
+	.aui-loading.aui-loading-dots .dot_two {background: #2CB0B2; -webkit-animation: dot_two 1.5s infinite; animation: dot_two 1.5s infinite; -webkit-animation-delay: 0.2s; animation-delay: 0.2s;}
+	.aui-loading.aui-loading-dots .dot_three {background: #4CD964; margin-right: 0; -webkit-animation: dot_three 1.5s infinite; animation: dot_three 1.5s infinite; -webkit-animation-delay: 0.4s; animation-delay: 0.4s;}
+	/* 圆点背景过度动画-微信小程序效果(全屏首次加载过度动画) */
+	.aui-loading.aui-loading-dots-opacity{background-color: #FFF; height: 100%; width: 100%; position: fixed; z-index: 996; margin-top: 0px; top: 0px;}
+	.aui-loading.aui-loading-dots-opacity .aui-loading-main{width: 100%;height: 100%;position: relative;}
+	.aui-loading.aui-loading-dots-opacity .aui-loading-dot-items {position: absolute;left: 50%;top: 50%;height: 60px;width: 80px; text-align: center; margin-top: -30px;margin-left: -40px;}
+	.aui-loading.aui-loading-dots-opacity .aui-loading-dot-item{width: 9px;height: 9px; opacity: 1; background-color: #ec2b45; display: inline-block; margin-right: 8px;margin-top: 30px;-moz-border-radius: 50% 50% 50% 50%;-webkit-border-radius: 50% 50% 50% 50%;border-radius: 50% 50% 50% 50%;}
+	.aui-loading.aui-loading-dots-opacity .dot_one {background: #197DE0;-webkit-animation: dot-opacity 1.5s infinite; animation: dot-opacity 1.5s infinite;}
+	.aui-loading.aui-loading-dots-opacity .dot_two {background: #2CB0B2;-webkit-animation: dot-opacity 1.5s infinite; animation: dot-opacity 1.5s infinite; -webkit-animation-delay: 0.25s; animation-delay: 0.25s;}
+	.aui-loading.aui-loading-dots-opacity .dot_three {background: #4CD964;margin-right: 0; -webkit-animation: dot-opacity 1.5s infinite; animation: dot-opacity 1.5s infinite; -webkit-animation-delay: 0.5s; animation-delay: 0.5s;}
+	@-webkit-keyframes dot-opacity {
+		50% {opacity: 0.1; }
+	}
+	@keyframes dot-opacity {
+		50% {opacity: 0.1; }
+	}
+	@-webkit-keyframes dot_one {
+		75% {-webkit-transform: scale(0) skewX(-30deg); }
+	}
+	@keyframes dot_one {
+		75% {transform: scale(0) skewX(-30deg); -webkit-transform: scale(0) skewX(-30deg);}
+	}
+	@-webkit-keyframes dot_two {
+		 75% {-webkit-transform: scale(0) skewX(-30deg); }
+	}
+	@keyframes dot_two {
+		75% {transform: scale(0) skewX(-30deg); -webkit-transform:  scale(0) skewX(-30deg);}
+	}
+	@-webkit-keyframes dot_three {
+		75% {-webkit-transform: scale(0) skewX(-30deg); }
+	}
+	@keyframes dot_three {
+		75% {transform: scale(0) skewX(-30deg);-webkit-transform: scale(0) skewX(-30deg);} 
+	}
+	/* loading加载弹窗 load-button 动画 */
+	@-ms-keyframes load-button {
+		0% {opacity: 1;}
+		100% {opacity: 0.3;}
+	}
+	@-webkit-keyframes load-button {
+		0% {opacity: 1;}
+		100% {opacity: 0.3;}
+	}
+	@keyframes load-button {
+		0% {opacity: 1;}
+		100% {opacity: 0.3;}
+	}
+
+	/* loading加载弹窗 aui-loading-squarefour 动画 */
+	@-ms-keyframes aui-loading-squarefour-animate{
+		0%{-ms-transform: rotate(0deg); -webkit-transform: rotate(0deg); transform: rotate(0deg);}
+		100%{-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);}
+	}
+	@-webkit-keyframes aui-loading-squarefour-animate{
+		0%{-ms-transform: rotate(0deg); -webkit-transform: rotate(0deg); transform: rotate(0deg);}
+		100%{-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);}
+	}
+	@keyframes aui-loading-squarefour-animate{
+		0%{-ms-transform: rotate(0deg); -webkit-transform: rotate(0deg); transform: rotate(0deg);}
+		100%{-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);}
+	}
+	
+	@-ms-keyframes aui-loading-square-span1-animate{
+		0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
+		25%{-ms-transform: translate(0, 18px); -webkit-transform: translate(0, 18px); transform: translate(0, 18px);}
+		50%{-ms-transform: translate(18px, 18px); -webkit-transform: translate(18px, 18px); transform: translate(18px, 18px);}
+		75%{-ms-transform: translate(18px, 0); -webkit-transform: translate(18px, 0); transform: translate(18px, 0);}
+	}
+	@-webkit-keyframes aui-loading-square-span1-animate{
+		0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
+		25%{-ms-transform: translate(0, 18px); -webkit-transform: translate(0, 18px); transform: translate(0, 18px);}
+		50%{-ms-transform: translate(18px, 18px); -webkit-transform: translate(18px, 18px); transform: translate(18px, 18px);}
+		75%{-ms-transform: translate(18px, 0); -webkit-transform: translate(18px, 0); transform: translate(18px, 0);}
+	}
+	@keyframes aui-loading-square-span1-animate{
+		0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
+		25%{-ms-transform: translate(0, 18px); -webkit-transform: translate(0, 18px); transform: translate(0, 18px);}
+		50%{-ms-transform: translate(18px, 18px); -webkit-transform: translate(18px, 18px); transform: translate(18px, 18px);}
+		75%{-ms-transform: translate(18px, 0); -webkit-transform: translate(18px, 0); transform: translate(18px, 0);}
+	}
+	
+	@-ms-keyframes aui-loading-square-span2-animate{
+		0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
+		25%{-ms-transform: translate(-18px, 0); -webkit-transform: translate(-18px, 0); transform: translate(-18px, 0);}
+		50%{-ms-transform: translate(-18px, 18px); -webkit-transform: translate(-18px, 18px); transform: translate(-18px, 18px);}
+		75%{-ms-transform: translate(0, 18px); -webkit-transform: translate(0, 18px); transform: translate(0, 18px);}
+	}
+	@-webkit-keyframes aui-loading-square-span2-animate{
+		0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
+		25%{-ms-transform: translate(-18px, 0); -webkit-transform: translate(-18px, 0); transform: translate(-18px, 0);}
+		50%{-ms-transform: translate(-18px, 18px); -webkit-transform: translate(-18px, 18px); transform: translate(-18px, 18px);}
+		75%{-ms-transform: translate(0, 18px); -webkit-transform: translate(0, 18px); transform: translate(0, 18px);}
+	}
+	@keyframes aui-loading-square-span2-animate{
+		0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
+		25%{-ms-transform: translate(-18px, 0); -webkit-transform: translate(-18px, 0); transform: translate(-18px, 0);}
+		50%{-ms-transform: translate(-18px, 18px); -webkit-transform: translate(-18px, 18px); transform: translate(-18px, 18px);}
+		75%{-ms-transform: translate(0, 18px); -webkit-transform: translate(0, 18px); transform: translate(0, 18px);}
+	}
+	@-ms-keyframes aui-loading-square-span3-animate{
+		0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
+		25%{-ms-transform: translate(18px, 0); -webkit-transform: translate(18px, 0); transform: translate(18px, 0);}
+		50%{-ms-transform: translate(18px, -18px); -webkit-transform: translate(18px, -18px); transform: translate(18px, -18px);}
+		75%{-ms-transform: translate(0, -18px); -webkit-transform: translate(0, -18px); transform: translate(0, -18px);}
+	}
+	@-webkit-keyframes aui-loading-square-span3-animate{
+		0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
+		25%{-ms-transform: translate(18px, 0); -webkit-transform: translate(18px, 0); transform: translate(18px, 0);}
+		50%{-ms-transform: translate(18px, -18px); -webkit-transform: translate(18px, -18px); transform: translate(18px, -18px);}
+		75%{-ms-transform: translate(0, -18px); -webkit-transform: translate(0, -18px); transform: translate(0, -18px);}
+	}
+	@keyframes aui-loading-square-span3-animate{
+		0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
+		25%{-ms-transform: translate(18px, 0); -webkit-transform: translate(18px, 0); transform: translate(18px, 0);}
+		50%{-ms-transform: translate(18px, -18px); -webkit-transform: translate(18px, -18px); transform: translate(18px, -18px);}
+		75%{-ms-transform: translate(0, -18px); -webkit-transform: translate(0, -18px); transform: translate(0, -18px);}
+	}
+	@-ms-keyframes aui-loading-square-span4-animate{
+		0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
+		25%{-ms-transform: translate(0, -18px); -webkit-transform: translate(0, -18px); transform: translate(0, -18px);}
+		50%{-ms-transform: translate(-18px, -18px); -webkit-transform: translate(-18px, -18px); transform: translate(-18px, -18px);}
+		75%{-ms-transform: translate(-18px, 0); -webkit-transform: translate(-18px, 0); transform: translate(-18px, 0);}
+	}
+	@-webkit-keyframes aui-loading-square-span4-animate{
+		0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
+		25%{-ms-transform: translate(0, -18px); -webkit-transform: translate(0, -18px); transform: translate(0, -18px);}
+		50%{-ms-transform: translate(-18px, -18px); -webkit-transform: translate(-18px, -18px); transform: translate(-18px, -18px);}
+		75%{-ms-transform: translate(-18px, 0); -webkit-transform: translate(-18px, 0); transform: translate(-18px, 0);}
+	}
+	@keyframes aui-loading-square-span4-animate{
+		0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
+		25%{-ms-transform: translate(0, -18px); -webkit-transform: translate(0, -18px); transform: translate(0, -18px);}
+		50%{-ms-transform: translate(-18px, -18px); -webkit-transform: translate(-18px, -18px); transform: translate(-18px, -18px);}
+		75%{-ms-transform: translate(-18px, 0); -webkit-transform: translate(-18px, 0); transform: translate(-18px, 0);}
+	}
+</style>

+ 1 - 1
components/mescroll-body/mescroll-uni-option.js

@@ -15,7 +15,7 @@ const GlobalOption = {
 	up: {
 		// 其他up的配置参数也可以写,这里只展示了常用的配置:
 		textLoading: '加载中 ...', // 加载中的提示文本
-		textNoMore: '到底啦', // 没有更多数据的提示文本
+		textNoMore: '没有更多啦', // 没有更多数据的提示文本
 		offset: 150, // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
 		toTop: {
 			// 回到顶部按钮,需配置src才显示

+ 6 - 5
components/my-bills.vue

@@ -1,17 +1,16 @@
 <template>
-	<!-- 钱包卡片 -->
 	<view class="sh-wallet-box u-flex u-m-b-10 u-p-r-10" style="border-radius: 16rpx;">
 		<view class="u-flex wallet-left">
-			<view  @click="$jump('/pagesA/pages/my-points/my-points?point='+data.channelPoint)" class="wallet-item u-flex-col u-col-center">
+			<view  @click="jump('/pagesA/pages/my-points/my-points?point='+data.channelPoint)" class="wallet-item u-flex-col u-col-center">
 				<text class="wallet-item__detail item-balance u-ellipsis-1">{{data.channelPoint || 0.00}}</text>
 				<text class="wallet-item__title">通兑积分</text>
 			</view>
-			<view @click="$jump('/pagesA/pages/my-balance/my-balance?pointValue='+data.balance)" class="wallet-item u-flex-col u-col-center" >
+			<view @click="jump('/pagesA/pages/my-balance/my-balance?pointValue='+data.balance)" class="wallet-item u-flex-col u-col-center" >
 				<text class="wallet-item__detail item-score u-ellipsis-1">{{data.balance || 0.00}}</text>
 				<text class="wallet-item__title">积分余额</text>
 			</view>
 		</view>
-		<view @click="$jump('/pagesA/pages/bill/my-bills')" class="wallet-item u-flex-col wallet-right u-col-center">
+		<view @click="jump('/pagesA/pages/bill/my-bills')" class="wallet-item u-flex-col wallet-right u-col-center">
 			<image class="cut-off--line" src="../static/icon/line.png" mode=""></image>
 			<image class="wallet-img" src="../static/icon/mybills1.png" mode="aspectFill"></image>
 			<text class="wallet-item__title">我的账单</text>
@@ -28,7 +27,9 @@ export default {
 		return {};
 	},
 	methods: {
-		
+		jump(url){
+			this.$emit('click',url)
+		}
 	}
 };
 </script>

+ 91 - 0
components/my-order.vue

@@ -0,0 +1,91 @@
+<template>
+	<view class="sh-wallet-box u-flex u-m-b-10 u-p-r-10" style="border-radius: 16rpx;">
+		<view class="u-flex wallet-left">
+			<view  @click="jump('/pagesA/pages/my-points/my-points?point='+data.channelPoint)" class="wallet-item u-flex-col u-col-center">
+				<image style="width: 50rpx;height: 50rpx;" src="../static/icon/todayOrder1.png" mode=""></image>
+				<text class="wallet-item__title">今日订单</text>
+			</view>
+			<view @click="jump('/pagesA/pages/my-balance/my-balance?pointValue='+data.balance)" class="wallet-item u-flex-col u-col-center" >
+				<image style="width: 50rpx;height: 50rpx;" src="../static/icon/lishiOrder.png" mode=""></image>
+				<text class="wallet-item__title">历史订单</text>
+			</view>
+		</view>
+		<view @click="jump('/pagesA/pages/bill/my-bills')" class="wallet-item u-flex-col wallet-right u-col-center">
+			<image class="cut-off--line" src="../static/icon/line.png" mode=""></image>
+			<image class="wallet-img" src="../static/icon/my-order.png" mode="aspectFill"></image>
+			<text class="wallet-item__title">我的订单</text>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	props:{
+		data:Object
+	},
+	data() {
+		return {};
+	},
+	methods: {
+		jump(url){
+			this.$emit('click',url)
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+// 钱包卡片
+.sh-wallet-box {
+	background: #fff;
+	height: 180rpx;
+	position: relative;
+	.wallet-left {
+		flex: 4;
+	}
+	.wallet-right {
+		position: relative;
+		.cut-off--line {
+			position: absolute;
+			top: 50%;
+			transform: translateY(-50%);
+			right: (750rpx/5) - 15rpx;
+			width: 30rpx;
+			height: 136rpx;
+		}
+	}
+	.wallet-item {
+		flex: 1;
+		.wallet-img {
+			width: 50rpx;
+			height: 50rpx;
+		}
+		.wallet-item__detail {
+			font-size: 40rpx;
+			width: 180rpx;
+			text-align: center;
+			color: $base-color;
+		}
+		.wallet-item__title {
+			font-size: 26rpx;
+			color: #242424;
+			margin-top: 20rpx;
+		}
+		.item-balance::after {
+			content: '元';
+			font-size: 20rpx;
+			margin-left: 4rpx;
+		}
+		.item-score::after {
+			content: '元';
+			font-size: 20rpx;
+			margin-left: 4rpx;
+		}
+		.item-coupon::after {
+			content: '笔';
+			font-size: 20rpx;
+			margin-left: 4rpx;
+		}
+	}
+}
+</style>

+ 120 - 0
components/pay-confirm.vue

@@ -0,0 +1,120 @@
+<template>
+	<view style="background-color: #F1F1F1;min-height: 100vh">
+		<view class="center info" style="padding-bottom: 50rpx;">
+			<image :src="info.shop.cover" mode=""></image>
+			<text class="text-lg" style="color: #1C1C1C;font-size: 30rpx;">{{info.shop.name}}</text>
+		</view>
+
+		<view class="card" style="background-color: #FFFFFF;">
+			<view class="flex flex-direction margin-bottom-40">
+				<text class="text-lg text-bold">支付确认</text>
+				<text class=" text-sm margin-top-10" style="color: #999999;">您本次交易可使用积分抵扣,具体如下:</text>
+			</view>
+			<view class="item">
+				<view class="left">商品价格</view>
+				<view class="right price">{{info.bills.cost}}</view>
+			</view>
+			<view class="item">
+				<view class="left">商家活动抵扣</view>
+				<view class="right" style="color: #EE9230;"><text class="price reduce">{{info.bills.discount || 0}}</text></view>
+			</view>
+			<view class="item">
+				<view class="left">渠道积分抵扣</view>
+				<view class="right" style="color: #EE9230;"><text class="price reduce">{{info.bills.pointNum}}</text></view>
+			</view>
+			<view class="item">
+				<view class="left">积分余额抵扣</view>
+				<view class="right" style="color: #EE9230;"><text class="price reduce">{{info.bills.balanceNum}}</text></view>
+			</view>
+			<view class="item">
+				<view class="left">积分交易手续费</view>
+				<view class="right"><text class="price">{{info.bills.pointFee}}</text></view>
+			</view>
+			<view class="item u-border-top" style="margin-top: 10rpx;padding-top: 40rpx;padding-bottom: 0;">
+				<view class="left" style="font-size: 30rpx;">您仍需支付</view>
+				<view class="right text-bold" style="font-size: 40rpx;"><text class="price">{{info.bills.price}}</text></view>
+			</view>
+		</view>
+
+		<view class="center flex-direction" style="margin-top: 150rpx;">
+			<text class="text-gray text-sm margin-bottom-20">感谢使用联兑通,越用越优惠</text>
+			<view @click="confirm" class="cu-btn  flex  text-lg btn-bg-color round" style="padding: 42rpx 0;width: 90%;">
+				确认支付
+			</view>
+			<text @click="cancel" class="text-base payConfirm" style="margin-top: 50rpx;font-size: 28rpx;text-decoration: underline;">暂不支付</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:{
+			info:Object
+		},
+		data() {
+			return {
+			
+			}
+		},
+		methods: {
+			confirm(){
+				this.$emit('confirm')
+			},
+			cancel(){
+				this.$emit('cancel')
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.info {
+		display: flex;
+		justify-content: center;
+		align-content: center;
+		padding: 60rpx;
+		flex-direction: column;
+
+		image {
+			width: 120rpx;
+			height: 120rpx;
+			border-radius: 50%;
+			margin-bottom: 20rpx;
+		}
+	}
+
+	.card {
+		margin: 0 40rpx;
+		border-radius: 20rpx;
+		padding: 40rpx;
+		background-color: #FFFFFF;
+
+		.item {
+			padding: 20rpx 0;
+			display: flex;
+			justify-content: space-between;
+			font-size: 28rpx;
+
+			.left {
+				color: #353535;
+				font-weight: 300;
+			}
+
+			.right {
+				font-size: 30rpx;
+				color: #353535;
+			}
+		}
+	}
+
+	.price::after {
+		content: '元';
+		margin-left: 6rpx;
+		font-size: 0.8em;
+	}
+
+	.reduce::before {
+		content: '-';
+		margin-right: 10rpx;
+	}
+</style>

+ 279 - 0
components/toast/toast.vue

@@ -0,0 +1,279 @@
+<template>
+	<view :style="{zIndex: zIndex}" class="container">
+		<block v-for="message in messageQueue" :key="message.id">
+			<view :class="[message.animation, backgroundClass(message)]" class="message">
+				<text v-if="message.type === 'info'" class="bm-icon info">&#xe671;</text>
+				<text v-if="message.type === 'success'" class="bm-icon success">&#xe62f;</text>
+				<text v-if="message.type === 'warn'" class="bm-icon warn">&#xe671;</text>
+				<text v-if="message.type === 'error'" class="bm-icon error">&#xe630;</text>
+				<text>{{message.content}}</text>
+			</view>
+		</block>
+	</view>
+</template>
+
+<script>
+	// 需要支持的单独配置项:显示时长、是否启用背景、类型、内容
+	export default {
+		name: 'bobo-message-cpt',
+		props: {
+			zIndex: {
+				type: Number,
+				default: 10000
+			},
+			duration: {
+				type: Number,
+				default: 2000
+			},
+			background: {
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+				messageQueue: [],
+				lastId: 0
+			}
+		},
+		computed: {
+			backgroundClass() {
+				return msg => {
+					return this.background || msg.background ? `background-${msg.type}` : ''
+				}
+			}
+		},
+		methods: {
+			/**
+			 * 展示普通提示信息
+			 * @param {Object} content
+			 */
+			info(arg) {
+				uni.hideLoading()
+				const message = {
+					type: 'info'
+				}
+				if (typeof arg === 'object' && arg) {
+					message.content = arg.content
+					message.duration = arg.duration
+					message.background = arg.background
+				} else if(typeof arg === 'string') {
+					message.content = arg
+				}
+				this.fadeIn(message)
+			},
+			/**
+			 * 展示成功提示
+			 * @param {Object} content
+			 */
+			success(arg) {
+				uni.hideLoading()
+				const message = {
+					type: 'success'
+				}
+				if (typeof arg === 'object' && arg) {
+					message.content = arg.content
+					// 显示时长会用在 settimeout的参数中,必须保证类型正确
+					if (arg.duration && typeof arg.duration === 'number' && arg.duration >= 0) {
+						message.duration = arg.duration
+					}
+					message.background = arg.background
+				} else if(typeof arg === 'string') {
+					message.content = arg
+				}
+				this.fadeIn(message)
+			},
+			/**
+			 * 展示警告提示
+			 */
+			warn(arg) {
+				uni.hideLoading()
+				const message = {
+					type: 'warn'
+				}
+				if (typeof arg === 'object' && arg) {
+					message.content = arg.content
+					if (arg.duration && typeof arg.duration === 'number' && arg.duration >= 0) {
+						message.duration = arg.duration
+					}
+					message.background = arg.background
+				} else if(typeof arg === 'string') {
+					message.content = arg
+				}
+				this.fadeIn(message)
+			},
+			/**
+			 * 展示错误提示
+			 * @param {Object} message
+			 */
+			error(arg) {
+				uni.hideLoading()
+				const message = {
+					type: 'error'
+				}
+				if (typeof arg === 'object' && arg) {
+					message.content = arg.content
+					if (arg.duration && typeof arg.duration === 'number' && arg.duration >= 0) {
+						message.duration = arg.duration
+					}
+					message.background = arg.background
+				} else if(typeof arg === 'string') {
+					message.content = arg
+				}
+				this.fadeIn(message)
+			},
+			fadeIn(message) {
+				
+				message.id = this.generateId()
+				message.animation = 'fadeIn'
+				this.messageQueue.push(message)
+				// 动画执行完毕后取消动画效果,防止列表刷新时重新执行动画
+				setTimeout(() => {
+					message.animation = ''
+				}, 410)
+				// 显示一段时间后隐藏
+				setTimeout(() => {
+					this.fadeOut(message)
+				}, message.duration || this.duration)
+			},
+			fadeOut(message) {
+				message.animation = 'fadeOut'
+				setTimeout(() => {
+					let idx = 0
+					this.messageQueue.some((msg, index) => {
+						if (msg.id === message.id) {
+							idx = index
+							return true
+						}
+					})
+					this.messageQueue.splice(idx, 1)
+				}, 500)
+			},
+			generateId() {
+				return (new Date()).getTime() * 1000 + (this.lastId++) % 1000
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	
+	@font-face {
+	  font-family: 'bobo-message-iconfont';  /* project id 1477381 */
+	  src: url('https://at.alicdn.com/t/font_1477381_i3ji49ios6.eot');
+	  src: url('https://at.alicdn.com/t/font_1477381_i3ji49ios6.eot?#iefix') format('embedded-opentype'),
+	  url('https://at.alicdn.com/t/font_1477381_i3ji49ios6.ttf') format('truetype'),
+	  url('https://at.alicdn.com/t/font_1477381_i3ji49ios6.svg#iconfont') format('svg');
+	}
+
+	.container {
+		left: 0;
+		right: 0;
+		top: 30%;
+		min-width: 10rpx;
+		max-width: 550rpx;
+		position: fixed;
+		margin: 0 auto;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		// 透明层允许点击穿透
+		pointer-events: none;
+
+		.message {
+			display: flex;
+			// 内容区域禁止点击穿透
+			pointer-events: all;
+			align-items: center;
+			padding: 8px 16px;
+			border-radius: 4px;
+			margin-top: 5px;
+			box-shadow: 0 1px 6px rgba(0, 0, 0, .2);
+			background: #fff;
+			min-height: 37px;
+			transition: all .5s;
+			box-sizing: border-box;
+
+			.bm-icon {
+				font-family: bobo-message-iconfont;
+				margin-right: 10rpx;
+			}
+
+			.info {
+				color: #288ced;
+			}
+
+			.success {
+				color: #09be70;
+			}
+
+			.warn {
+				color: #ff991f;
+			}
+
+			.error {
+				color: #ef4017;
+			}
+		}
+
+		.background-info {
+			border: 2px solid #d4eefe;
+			background: #f0faff;
+			color: #288ced;
+			box-shadow: none !important;
+		}
+
+		.background-success {
+			border: 2px solid #baf2d1;
+			background: #edfff4;
+			color: #09be70;
+			box-shadow: none !important;
+		}
+
+		.background-warn {
+			border: 2px solid #ffe7a7;
+			background: #fff9e7;
+			color: #ff991f;
+			box-shadow: none !important;
+		}
+
+		.background-error {
+			border: 2px solid #ffcfb9;
+			background: #ffefe6;
+			color: #ef4017;
+			box-shadow: none !important;
+		}
+
+		.fadeIn {
+			animation: fadeIn 0.4s both;
+		}
+
+		@keyframes fadeIn {
+			from {
+				opacity: 0;
+				transform: translate(0, -30px);
+			}
+
+			to {
+				opacity: 1;
+				transform: translate(0, 0);
+			}
+		}
+
+		.fadeOut {
+			animation: fadeOut 0.4s forwards;
+		}
+
+		@keyframes fadeOut {
+			from {
+				opacity: 1;
+				transform: translate(0, 0);
+			}
+
+			to {
+				opacity: 0;
+				margin-top: -37px;
+			}
+		}
+	}
+</style>

+ 6 - 0
main.js

@@ -9,6 +9,12 @@ Vue.mixin(vuexStore);
 import uView from "uview-ui";
 Vue.use(uView);
 
+import toast from '@/components/toast/toast.vue'
+Vue.use(toast)
+
+import loading from '@/components/loading/loading.vue'
+Vue.use(loading)
+
 //mescroll
 import MescrollBody from "@/components/mescroll-body/mescroll-body.vue"
 Vue.component('MescrollBody', MescrollBody)

+ 15 - 10
pages.json

@@ -96,7 +96,16 @@
 			}
 
 		}
-	],
+	    ,{
+            "path" : "pages/order/order",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "我的订单",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+    ],
 	"subPackages": [{
 		//tarbar下mine的分包
 		"root": "pagesA",
@@ -321,15 +330,6 @@
 				"enablePullDownRefresh": false
 			}
 
-		}, {
-			"path": "pages/checkstand/pay-qrcode1",
-			"style": {
-				"navigationBarTitleText": "付款码",
-				"navigationBarTextStyle": "white",
-				"navigationBarBackgroundColor": "#18b566",
-				"enablePullDownRefresh": false
-			}
-
 		}]
 	}, {
 		//商品点餐包
@@ -358,6 +358,7 @@
 		}, {
 			"path": "pages/pay/pay",
 			"style": {
+				"navigationStyle":"custom",
 				"navigationBarTitleText": "付款",
 				"enablePullDownRefresh": false
 			}
@@ -397,6 +398,10 @@
 		"pages/consume/consume": {
 			"network": "all",
 			"packages": ["pagesD"]
+		},
+		"pages/order/order": {
+			"network": "all",
+			"packages": ["pagesD"]
 		}
 	},
 	"tabBar": {

+ 1 - 1
pages/gain/comps/card1.vue

@@ -57,7 +57,7 @@
 			}
 		},
 		created() {
-			// this.getActivityList()
+			this.getActivityList()
 		},
 		methods: {
 			getActivityList() {

+ 6 - 2
pages/gain/comps/card2.vue

@@ -109,8 +109,12 @@
 				]
 			}
 		},
-		created() {
-			this.fetchStatistics()
+		watch:{
+			vuex_userId(){
+				if (this.$isNotEmpty(this.vuex_userId)) {
+					this.fetchStatistics()
+				}
+			}
 		},
 		methods:{
 			login(){

+ 29 - 12
pages/mine/mine.vue

@@ -18,11 +18,14 @@
 							</block>
 						</view>
 					</view>
+					<view class="center margin-right-40">
+						<image @click="$jump('/pagesA/pages/setting/setting')" style="width: 60rpx;height: 60rpx;" src="../../static/icon/setting2.png" mode=""></image>
+					</view>
 				</view>
 				<view class="info" v-else>
 					<view class="flex">
 						<image class="avatar" src="/static/icon/avatar.png"></image>
-						<view class="nickname">
+						<view class="nickname" >
 							<block style="display: flex;">
 								<text >用户未登录</text>
 								<view @click="showLogin" class="cu-tag bg-tag sm round margin-left-20">
@@ -33,6 +36,7 @@
 					</view>
 				</view>
 				
+				
 				<view class="cu-list grid col-3 no-border" style="border-radius:20rpx ;">
 					<view class="cu-item" @click="item.name=='扫一扫'? scanCode() :jump(item.path)" v-for="(item,index) in menuList" :key="index">
 						<view class="grid-icon" >
@@ -44,7 +48,6 @@
 				</view>
 			</view>
 		</view>
-		
 		<view class="navbar-top" :style="{ 'background': 'rgba(255, 139, 47,'+toumindu+')'}">
 			<view class="text-center text-white title ">联兑通</view>
 		</view>
@@ -53,9 +56,15 @@
 			<view style="padding: 20rpx 20rpx 0 20rpx;">
 				<text class="title">我的账单</text>
 			</view>
-			<my-bills :data="userInfo"></my-bills>
+			<my-bills :data="userInfo" @click="jump"></my-bills>
 		</view>
 		
+<!-- 		<view class="account" style="padding: 0;">
+			<view style="padding: 20rpx 20rpx 0 20rpx;">
+				<text class="title">我的订单</text>
+			</view>
+			<my-order  @click="jump"></my-order>
+		</view> -->
 		
 		
 		<view class="exchange">
@@ -105,7 +114,7 @@
 			</view>
 		</view>
 		
-		<view class="consume" @click="jump('/pages/gain/gain',1)">
+		<view class="consume" @click="jump('/pages/consume/consume',1)">
 			<view class="top" style="padding: 20rpx 30rpx 10rpx;">
 				<text>去花积分</text>
 				<text>更多 ></text>
@@ -123,15 +132,19 @@
 		</view>
 		
 		<login ref="login"  @signIn="signIn"></login>
+		<toast ref="toast" ></toast>
 	</view>
 </template>
 
 <script>
+	import myOrder from "@/components/my-order.vue"
 	import myBills from "@/components/my-bills.vue"
 	import login from "@/components/login.vue"
 	export default {
 		components:{
-			login,myBills
+			login,
+			myOrder,
+			myBills
 		},
 		data() {
 			return {
@@ -205,7 +218,7 @@
 				if (this.$isEmpty(this.vuex_phone)) {
 					this.showPhoneModal()
 				}else{
-					this.$u.toast('登录成功')
+					this.$refs.toast.info('登录成功')
 				}
 				//获取数据
 				this.init()
@@ -233,6 +246,10 @@
 			},
 			// 登录 end
 			scanCode(){
+				if (this.$isEmpty(this.vuex_userId)) {
+					this.login()
+					return
+				}
 				const _this = this;
 				uni.scanCode({
 				    success: function (res) {
@@ -281,9 +298,9 @@
 						path:'/pagesC/pages/checkstand/pay-qrcode'
 					},
 					{
-						icon:'/static/icon/setting1.png',
-						name:'设置',
-						path:'/pagesA/pages/setting/setting'
+						icon:'/static/icon/order6.png',
+						name:'我的订单',
+						path:'/pages/order/order'
 					}
 				]
 				this.gainList=[
@@ -312,17 +329,17 @@
 					{
 						icon:'/static/icon/jiaotong.png',
 						name:'交通出行',
-						path:this.$global.APPID.didi
+						path:'wxaf35009675aa0b2a'
 					},
 					{
 						icon:'/static/icon/shop.png',
 						name:'购物',
-						path:''
+						path:'wx57426a7da2ea4f6a'
 					},
 					{
 						icon:'/static/icon/yiyao.png',
 						name:'医疗',
-						path:this.$global.APPID.nanyue
+						path:'wxd78a776416719686'
 					},
 					
 				]

+ 71 - 0
pages/order/comps/card.vue

@@ -0,0 +1,71 @@
+<template>
+	<view>
+		<view @click="$jump('/pagesD/pages/take-order/take-order?id='+item.id)" class="card" v-for="(item,index) in list" :key="index">
+			<view class="center">
+				<image
+					src="https://guosen-bucket-ldt.obs.cn-south-1.myhuaweicloud.com:443/b15e8992179b4b30b9bdb943d8ad9c07-uWGk0l5GutNQ3013850822b2cdb5f77a445ce68ab57e.jpeg"
+					mode="aspectFill"></image>
+			</view>
+			<view class="content">
+				<view class="flex justify-between">
+					<text class="text-bold text-lg">杨国福麻辣烫</text>
+					<view class="">
+						<text v-if="item.payStatus=='付款成功'" class="text-base">{{item.orderStatus}}</text>
+						<text v-else class="text-base">{{item.payStatus}}</text>
+					</view>
+				</view>
+				
+				<view style="font-size: 26rpx;color: #888888;">
+					<view class="margin-bottom-10">
+						<text>{{item.id}}</text>
+						<text @click="$util.copy(item.id)" class="margin-left-10 text-black">复制</text>
+					</view>
+					<view class="flex justify-between ">
+						<text class="center">{{item.createTime}}</text>
+						<text class="">消费:{{item.totalPrice / 100}}元</text>
+					</view>
+				</view>
+
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:{
+			list:Array
+		},
+		data() {
+			return {
+
+			}
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss">
+	.card {
+		margin: 10rpx;
+		background-color: #FFFFFF;
+		display: flex;
+		padding: 18rpx;
+
+		image {
+			width: 150rpx;
+			height: 150rpx;
+			border-radius: 8rpx;
+		}
+
+		.content {
+			width: calc(100% - 140rpx - 20rpx - 20rpx);
+			margin-left: 20rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-between;
+		}
+	}
+</style>

+ 97 - 0
pages/order/comps/item.vue

@@ -0,0 +1,97 @@
+<template>
+	<MeScroll  :up="up" :down="down" @up="upFn" :fixed="false" @down="downFn" @init="initMeScroll">
+		<card :list="list" ></card>
+	</MeScroll>
+</template>
+<script>
+	import MeScroll from '@/components/mescroll-body/mescroll-uni.vue'
+	import card from './card.vue'
+	export default {
+		components:{
+			MeScroll,card
+		},
+		props: {
+			type: Number,
+			i: Number,
+			item:Object
+		},
+		data() {
+			return {
+				isInit: false, // 是否初始化
+				list: [], // 列表数据
+				mescroll: null, // mescroll 对象
+				// 上拉配置参数
+				up: {
+					noMoreSize: 5, 
+					auto: false,
+					page: {
+						page: 0,
+						size: 10
+					}
+				},
+				// 下拉配置参数
+				down: {
+					use: false, 
+					auto: false
+				}
+			}
+		},
+		created() {
+			
+		},
+		watch:{
+			type(val) {
+				if(!this.isInit && val === this.i) {
+					this.mescroll.resetUpScroll()
+				}
+			}
+		},
+		mounted() {
+			if(!this.isInit && this.i === 0) {
+				this.mescroll.resetUpScroll()
+			}
+		},
+		methods: {
+			//初始化组件
+			initMeScroll(mescroll) {
+				this.mescroll = mescroll
+			},
+			//上拉回调
+			upFn(mescroll) {
+				let params={
+					payId:this.vuex_userId,
+					current:mescroll.num,
+					size:mescroll.size
+				}
+				if (this.item.value==0) {
+					params.createTime=this.$dateTime.format()
+				}
+				try{
+					this.$api.goodsbills.list(params).then(res=>{
+						let data=res.data.records
+						let length=data.length
+						let total=res.data.total
+						mescroll.endBySize(length, total);
+						if(mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
+						this.list=this.list.concat(data); //追加新数据
+					})
+				}catch(e){
+					mescroll.endErr();
+				}
+			},
+			//下拉回调
+			downFn(mescroll) {
+				setTimeout(()=>{
+					this.u.toast('刷新成功')
+					this.mescroll.resetUpScroll()
+				},1500)
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	view{
+		box-sizing: border-box;
+	}
+</style>

+ 91 - 0
pages/order/order.vue

@@ -0,0 +1,91 @@
+<template>
+	<view class="container">
+		<view class="tabs">
+			<scroll-view scroll-x class="bg-white nav">
+				<view class="flex text-center">
+					<view class="cu-item flex-sub" :class="index==current?'text-base cur text-xl text-bold ':'text-lg'"
+						v-for="(item,index) in tabs" :key="index" @tap="tabChange(index)">
+						{{item.name}}
+					</view>
+				</view>
+			</scroll-view>
+		</view>
+		<view style="height: 100%;">
+			<swiper style="height: 100%;" :current="current" @change="swiperChange" @animationfinish="animationfinish">
+				<swiper-item v-for="(item,index) in tabs" :key="index">
+					<scroll-view scroll-y style="height: 100%;">
+						<item :i="index" :item="item" :type="current"></item>
+					</scroll-view>
+				</swiper-item>
+			</swiper>
+		</view>
+	</view>
+</template>
+<script>
+	import item from "./comps/item.vue"
+	export default {
+		components:{
+			item
+		},
+		data() {
+			return {
+				current: 0,
+				swiperCurrent: 0,
+				tabs: [{
+						name: '今日订单',
+						value: 0
+					},
+					{
+						name: '全部订单',
+						value: 1
+					}
+				],
+			}
+		},
+		onLoad() {
+
+		},
+		methods: {
+			tabChange(index) {
+				this.current = index
+			},
+			swiperChange(e) {
+				uni.pageScrollTo({
+					scrollTop: 0,
+					duration: 0
+				});
+				this.current = e.detail.current
+			},
+			animationfinish({
+				detail: {
+					current
+				}
+			}) {
+				this.swiperCurrent = current;
+				this.current = current;
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.text-xl {
+		font-size: 34rpx;
+	}
+
+	.container {
+		height: calc(100vh);
+		background-color: #F6F6F6;
+		padding: 78rpx 0rpx 0rpx;
+
+		.tabs {
+			position: fixed;
+			top: -10rpx;
+			left: 0;
+			width: 100%;
+			background-color: #FFFFFF;
+			box-sizing: border-box;
+			z-index: 3;
+		}
+	}
+</style>

+ 10 - 79
pages/test/test.vue

@@ -1,95 +1,26 @@
 <template>
-	<!-- 钱包卡片 -->
-	<view class="sh-wallet-box u-flex u-m-b-10 u-p-r-20">
-		<view class="u-flex wallet-left">
-			<view class="wallet-item u-flex-col u-col-center" >
-				<text class="wallet-item__detail item-balance u-ellipsis-1">0</text>
-				<text class="wallet-item__title">通兑积分</text>
-			</view>
-			<view class="wallet-item u-flex-col u-col-center" >
-				<text class="wallet-item__detail item-score u-ellipsis-1">0</text>
-				<text class="wallet-item__title">积分余额</text>
-			</view>
-			<view class="wallet-item u-flex-col u-col-center" >
-				<text class="wallet-item__detail item-coupon u-ellipsis-1">0</text>
-				<text class="wallet-item__title">现金交易</text>
-			</view>
-		</view>
-		<view class="wallet-item u-flex-col wallet-right u-col-center">
-			<image class="cut-off--line" src="http://file.shopro.top/imgs/user/cut_off_line.png" mode=""></image>
-			<image class="wallet-img" src="https://guosen-bucket-ldt.obs.cn-south-1.myhuaweicloud.com:443/33456520560a489c97001067ebf933fb-1WVTKPv7pPRY56bd16f50ac21bf860f78d0335131292.png" mode="aspectFill"></image>
-			<text class="wallet-item__title">我的账单</text>
-		</view>
+	<view class="">
+		<loading ref="loading" type="3" theme="2"/>
 	</view>
 </template>
 
 <script>
 export default {
+	name: '',
 	data() {
 		return {
 			
 		};
 	},
-	methods: {
+	onLoad() {
+		this.$refs.loading.show()
+	},
+	methods:{
 		
 	}
 };
 </script>
 
-<style lang="scss">
-// 钱包卡片
-.sh-wallet-box {
-	background: #fff;
-	height: 180rpx;
-	position: relative;
-	.wallet-left {
-		flex: 4;
-	}
-	.wallet-right {
-		position: relative;
-		.cut-off--line {
-			position: absolute;
-			top: 50%;
-			transform: translateY(-50%);
-			right: (750rpx/5) - 15rpx;
-			width: 30rpx;
-			height: 136rpx;
-		}
-	}
-	.wallet-item {
-		flex: 1;
-		.wallet-img {
-			width: 50rpx;
-			height: 50rpx;
-		}
-		.wallet-item__detail {
-			font-size: 34rpx;
-			width: 180rpx;
-			text-align: center;
-			font-weight: 500;
-			color: $base-color;
-		}
-		.wallet-item__title {
-			font-size: 26rpx;
-			font-weight: 400;
-			color: rgba(153, 153, 153, 1);
-			margin-top: 20rpx;
-		}
-		.item-balance::after {
-			content: '元';
-			font-size: 20rpx;
-			margin-left: 4rpx;
-		}
-		.item-score::after {
-			content: '元';
-			font-size: 20rpx;
-			margin-left: 4rpx;
-		}
-		.item-coupon::after {
-			content: '元';
-			font-size: 20rpx;
-			margin-left: 4rpx;
-		}
-	}
-}
-</style>
+<style lang="scss" scoped>
+	
+</style>

+ 13 - 20
pagesA/pages/bill/bill-detail.vue

@@ -6,12 +6,10 @@
 				<text class="title">{{item.channelName}}</text>
 				<view class="data text-center center">
 					<view v-if="item.type=='PAY_CONSUMER'" style="padding: 0;">
-						<text>-</text>
-						<text>{{item.totalPrice}}</text>
+						<text class="price reduce" style="padding: 0;color: #F39248;margin-left: -10rpx;">{{item.totalPrice}}</text>
 					</view>
 					<view v-else style="padding: 0;">
-						<text>+</text>
-						<text>{{item.price}}</text>
+						<text class="price plus" style="margin-left: -10rpx;">{{item.price}}</text>
 					</view>
 				</view>
 			</view>
@@ -50,12 +48,10 @@
 				<text class="title">{{item.name}}</text>
 				<view class="data text-center center">
 					<view v-if="item.type=='PAY_CONSUMER'" >
-						<text style="padding: 0;color: #F39248;">-</text>
-						<text style="padding: 0;color: #F39248;">{{item.totalPrice}}</text>
+						<text class="price reduce" style="padding: 0;color: #F39248;margin-left: -10rpx;">{{item.totalPrice}}</text>
 					</view>
 					<view v-else style="padding: 0;">
-						<text>+</text>
-						<text>{{item.price}}</text>
+						<text class="price plus" style="margin-left: -10rpx;">{{item.price}}</text>
 					</view>
 				</view>
 			</view>
@@ -70,11 +66,11 @@
 				</view>
 				<view class="item">
 					<text>交易金额</text>
-					<text>{{item.price}}</text>
+					<text class="price">{{item.price}}</text>
 				</view>
 				<view class="item" v-if="item.type=='PAY_CONSUMER'">
 					<text>积分手续费</text>
-					<text>{{item.fee}}</text>
+					<text class="price">{{item.fee}}</text>
 				</view>
 				<view class="item">
 					<text>交易类型</text>
@@ -105,12 +101,10 @@
 				
 				<view class="data text-center center">
 					<view style="padding: 0;" v-if="item.type=='AGENT_CHARGE'">
-						<text style="color: #F39248;">-</text>
-						<text style="color: #F39248;">{{item.price}}</text>
+						<text class="price reduce" style="padding: 0;color: #F39248;margin-left: -10rpx;">{{item.totalPrice}}</text>
 					</view>
 					<view style="padding: 0;" v-else>
-						<text style="color: #F39248;">-</text>
-						<text style="color: #F39248;">{{item.totalPrice}}</text>
+						<text class="price plus" style="padding: 0;color: #F39248;margin-left: -10rpx;">{{item.totalPrice}}</text>
 					</view>
 				</view>
 			</view>
@@ -125,24 +119,23 @@
 				</view>
 				<view class="item" v-if="$isNotEmpty(item.pointNum) && item.pointNum != -1">
 					<text>积分支付</text>
-					<text>{{item.pointNum}}</text>
+					<text class="price">{{item.pointNum}}</text>
 				</view>
 				<view class="item">
 					<text>余额支付</text>
-					<text v-if="item.balanceNum && item.balanceNum!=-1">{{item.balanceNum}}</text>
-					<text v-else>0</text>
+					<text class="price">{{item.balanceNum}}</text>
 				</view>
 				<view class="item">
 					<text>现金支付</text>
-					<text>{{item.price}}</text>
+					<text class="price">{{item.price}}</text>
 				</view>
 				<view class="item" v-if="$isNotEmpty(item.pointFee) && item.pointFee != -1">
 					<text>积分手续费</text>
-					<text>{{item.pointFee}}</text>
+					<text class="price">{{item.pointFee}}</text>
 				</view>
 				<view class="item" v-if="$isNotEmpty(item.fee) && item.fee != -1">
 					<text>交易手续费</text>
-					<text>{{item.fee}}</text>
+					<text class="price">{{item.fee}}</text>
 				</view>
 				<view class="item">
 					<text>交易时间</text>

+ 34 - 14
pagesA/pages/bill/my-bills.vue

@@ -1,21 +1,18 @@
 <template>
 	<view>
-		<u-picker v-model="showTime" mode="time" :params="params" :default-time="defaultTime" @confirm="confirmTime"></u-picker>
+		<u-picker v-model="showTime" mode="time" :params="params"  @confirm="confirmTime"></u-picker>
 		<view class="top">
 			<view class="value">
 				<text>交易笔数</text>
-				<text>{{payCount}}</text>
+				<text class="count">{{payCount}}</text>
 			</view>
 		</view>
 		<view class="data">
 			<view class="left">
 				<view @click.stop="showTime = true">
-					<text>{{defaultTime}}</text>
+					<text>{{defaultTime || '筛选'}}</text>
 					<text class="cuIcon-unfold padding-left-10"></text>
 				</view>
-				<!-- <view>
-					<text>支出 ¥ 165.00 收入 ¥ 463.00</text>
-				</view> -->
 			</view>
 			<view class="right" @click="$jump('/pagesA/pages/bill/statistics')">
 				<text>统计</text>
@@ -24,6 +21,14 @@
 		</view>
 
 		<view class="card">
+			<view  style="display: flex;justify-content: space-between;padding:30rpx 30rpx 20rpx 80rpx;">
+				<view >
+					<text>交易方</text>
+				</view>
+				<view >
+					<text>交易金额</text>
+				</view>
+			</view>
 			<mescroll-body :height="height" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption"
 				:up="upOption">
 				<view @click="$jump('/pagesA/pages/bill/bill-detail?billDetail='+JSON.stringify(item)+'&type=all')" class="item" hover-class="hoverClass"
@@ -46,8 +51,8 @@
 					</view>
 					<view  class="area3 text-area u-flex-1" >
 						<view class="item-padding" style="text-align: right;flex:1;font-size: 34rpx;margin-right: 20rpx;">
-							<text v-if="item.type=='USER_PAY'" style="color: #F39248;">-¥{{item.totalPrice}}</text>
-							<text v-if="item.type=='AGENT_CHARGE'" style="color: #F39248;">-¥{{item.price}}</text>
+							<text class="price reduce" v-if="item.type=='USER_PAY'" style="color: #F39248;">{{item.totalPrice}}</text>
+							<text class="plus price" v-if="item.type=='AGENT_CHARGE'" style="color: #F39248;">{{item.price}}</text>
 						</view>
 					</view>
 				</view>
@@ -76,7 +81,7 @@
 			}
 		},
 		onLoad(options) {
-			this.defaultTime =this.$dateTime.format(new Date(),'YYYY-mm')
+			// this.defaultTime =this.$dateTime.format(new Date(),'YYYY-mm')
 		},
 		onReady() {
 			this.getElInfo()
@@ -99,8 +104,6 @@
 				}
 				if (this.defaultTime) {
 					params.createTime = this.$dateTime.format(new Date(this.defaultTime))
-				} else {
-					params.createTime = this.$dateTime.format(new Date())
 				}
 				
 				try {
@@ -262,8 +265,25 @@
 		.item:last-child{
 			border: none;
 		}
-
-
-
+	}
+	
+	.count::after {
+		content: '笔';
+		margin-left: 6rpx;
+		font-size: 0.5em;
+	}
+	.price::after {
+		content: '元';
+		margin-left: 6rpx;
+		font-size: 0.5em;
+	}
+	
+	.reduce::before {
+		content: '-';
+		margin-right: 10rpx;
+	}
+	.plus::before {
+		content: '+';
+		margin-right: 10rpx;
 	}
 </style>

+ 2 - 3
pagesA/pages/bill/statistics.vue

@@ -50,7 +50,7 @@
 				</view>
 			</mescroll-body>
 		</view>
-		<u-picker v-model="showTime" mode="time" :params="params" :default-time="defaultTime" @confirm="confirmTime"></u-picker>
+		<u-picker v-model="showTime" mode="time" :params="params"  @confirm="confirmTime"></u-picker>
 	</view>
 </template>
 
@@ -75,7 +75,6 @@
 				showTime:false,
 				params: {
 					year: true,
-					month: true,
 				},
 				
 				upOption:{
@@ -86,7 +85,7 @@
 			}
 		},
 		onLoad() {
-			this.defaultTime =this.$dateTime.format(new Date(),'YYYY-mm')
+			this.defaultTime =this.$dateTime.format(new Date(),'YYYY')
 			this.getData()
 		},
 		methods: {

+ 29 - 12
pagesA/pages/my-balance/my-balance.vue

@@ -1,19 +1,19 @@
 <template>
 	<view>
-		<u-picker v-model="showTime" mode="time" :params="params" :default-time="defaultTime" @confirm="confirmTime"></u-picker>
+		<u-picker v-model="showTime" mode="time" :params="params"  @confirm="confirmTime"></u-picker>
 		<view class="top">
 			<view class="value">
 				<text>积分余额</text>
-				<text>{{pointValue}}</text>
+				<text class="price">{{pointValue}}</text>
 			</view>
 		</view>
 		<view class="data">
 			<view class="left">
 				<view @click.stop="showTime = true">
-					<text>{{defaultTime}}</text>
+					<text>{{defaultTime || '筛选'}}</text>
 					<text class="cuIcon-unfold padding-left-10"></text>
 				</view>
-				<!-- <view>
+				<!-- <view style="margin-top: 10rpx;">
 					<text>支出 ¥ 165.00 收入 ¥ 463.00</text>
 				</view> -->
 			</view>
@@ -24,6 +24,14 @@
 		</view>
 
 		<view class="card">
+			<view  style="display: flex;justify-content: space-between;padding:30rpx 30rpx 20rpx 80rpx;">
+				<view >
+					<text>交易方</text>
+				</view>
+				<view >
+					<text>积分价值</text>
+				</view>
+			</view>
 			<mescroll-body :height="height" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption"
 				:up="upOption">
 				<view @click="$jump('/pagesA/pages/bill/bill-detail?billDetail='+JSON.stringify(item)+'&type=balance')" class="item" hover-class="hoverClass"
@@ -39,8 +47,8 @@
 					</view>
 					<view  class="area3 text-area u-flex-1" >
 						<view class="item-padding" style="text-align: right;flex:1;font-size: 34rpx;margin-right: 20rpx;">
-							<text style="color: #F39248;;" v-if="item.type=='PAY_CONSUMER'">-¥{{item.totalPrice}}</text>
-							<text  v-else>+¥{{item.price}}</text>
+							<text class="price reduce" style="color: #F39248;;" v-if="item.type=='PAY_CONSUMER'">{{item.totalPrice}}</text>
+							<text class="plus price"  v-else>{{item.price}}</text>
 						</view>
 					</view>
 				</view>
@@ -73,7 +81,6 @@
 			if(options.pointValue){
 				this.pointValue = options.pointValue
 			}
-			this.defaultTime =this.$dateTime.format(new Date(),'YYYY-mm')
 		},
 		onReady() {
 			this.getElInfo()
@@ -96,8 +103,6 @@
 				}
 				if (this.defaultTime) {
 					params.createTime = this.$dateTime.format(new Date(this.defaultTime))
-				} else {
-					params.createTime = this.$dateTime.format(new Date())
 				}
 				
 				try {
@@ -257,8 +262,20 @@
 		.item:last-child{
 			border: none;
 		}
-
-
-
+	}
+	
+	.price::after {
+		content: '元';
+		margin-left: 6rpx;
+		font-size: 0.5em;
+	}
+	
+	.reduce::before {
+		content: '-';
+		margin-right: 10rpx;
+	}
+	.plus::before {
+		content: '+';
+		margin-right: 10rpx;
 	}
 </style>

+ 1 - 1
pagesA/pages/my-balance/statistics.vue

@@ -50,7 +50,7 @@
 				</view>
 			</mescroll-body>
 		</view>
-		<u-picker v-model="showTime" mode="time" :params="params" :default-time="defaultTime" @confirm="confirmTime"></u-picker>
+		<u-picker v-model="showTime" mode="time" :params="params"  @confirm="confirmTime"></u-picker>
 	</view>
 </template>
 

+ 26 - 6
pagesA/pages/my-points/my-points.vue

@@ -1,10 +1,10 @@
 <template>
 	<view>
-		<u-picker v-model="showTime" mode="time" :params="params" :default-time="defaultTime" @confirm="confirmTime"></u-picker>
+		<u-picker v-model="showTime" mode="time" :params="params"  @confirm="confirmTime"></u-picker>
 		<view class="top">
 			<view class="value">
 				<text>积分价值</text>
-				<text>{{point}}</text>
+				<text class="price">{{point}}</text>
 			</view>
 			<view class="flex justify-center align-center">
 				<view class="cu-btn btn" hover-class="hoverClass1" @click="$jump('/pagesA/pages/my-points/accredit')">
@@ -15,7 +15,7 @@
 		<view class="data">
 			<view class="left">
 				<view @click.stop="showTime = true">
-					<text>{{defaultTime}}</text>
+					<text>{{defaultTime || '筛选'}}</text>
 					<text class="cuIcon-unfold padding-left-10"></text>
 				</view>
 				<!-- <view>
@@ -51,8 +51,8 @@
 						</view>
 					</view>
 					<view class="area3 text-area ">
-						<view v-if="item.type=='PAY_CONSUMER'" class="item-padding" style="font-size: 34rpx;color: #000;">-¥{{item.totalPrice}}</view>
-						<view v-else class="item-padding" style="font-size: 34rpx;color: #000;">+¥{{item.price}}</view>
+						<view class="price reduce item-padding" v-if="item.type=='PAY_CONSUMER'" style="font-size: 34rpx;color: #000;">{{item.totalPrice}}</view>
+						<view class="price plus item-padding" v-else  style="font-size: 34rpx;color: #000;">{{item.price}}</view>
 					</view>
 				</view>
 			</mescroll-body>
@@ -81,7 +81,6 @@
 			}
 		},
 		onReady(){
-			this.defaultTime=this.$dateTime.format(new Date(),'YYYY-mm')
 			this.getElInfo()
 		},
 		onLoad(options) {
@@ -109,7 +108,13 @@
 					current:mescroll.num,
 					size:mescroll.size,
 					payId:this.vuex_userId,
+					payStatus:this.$global.payStatus.IS_PAY
 				}
+				
+				if (this.defaultTime) {
+					params.createTime = this.$dateTime.format(new Date(this.defaultTime))
+				}
+				
 				try {
 					this.$api.pointbills.list(params).then(res => {
 						let data = res.data.records
@@ -270,4 +275,19 @@
 
 
 	}
+	
+	.price::after {
+		content: '元';
+		margin-left: 6rpx;
+		font-size: 0.5em;
+	}
+	
+	.reduce::before {
+		content: '-';
+		margin-right: 10rpx;
+	}
+	.plus::before {
+		content: '+';
+		margin-right: 10rpx;
+	}
 </style>

+ 15 - 0
pagesA/pages/setting/setting.vue

@@ -34,12 +34,27 @@
 						icon:'/pagesA/static/setting/tousu.png',
 						name:'投诉及反馈',
 						path:'/pagesA/pages/setting/question'
+					},
+					{
+						icon:'/pagesA/static/setting/logout1.png',
+						name:'退出登录',
+						path:'logout'
 					}
 				]
 			}
 		},
 		methods: {
 			jump(url){
+				if (url=='logout') {
+					uni.clearStorage()
+					this.$u.vuex('vuex_userId',null)
+					this.$u.vuex('vuex_phone',null)
+					this.$u.vuex('vuex_agenter_type',null)
+					uni.reLaunch({
+						url:"/pages/mine/mine"
+					})
+				}
+				
 				uni.navigateTo({
 					url
 				})

BIN
pagesA/static/setting/logout.png


BIN
pagesA/static/setting/logout1.png


+ 4 - 4
pagesB/comps/tki-qrcode/qrcode.js

@@ -1085,10 +1085,10 @@ let QRCode = {};
         // 创建canvas
         let createCanvas = function (options) {
             if (options.showLoading) {
-                uni.showLoading({
-                    title: options.loadingText,
-                    mask: true
-                });
+                // uni.showLoading({
+                //     title: options.loadingText,
+                //     mask: true
+                // });
             }
             var ctx = uni.createCanvasContext(options.canvasId, options.context);
             var count = qrCodeAlg.getModuleCount();

+ 120 - 0
pagesC/comps/pay-confirm.vue

@@ -0,0 +1,120 @@
+<template>
+	<view style="background-color: #F1F1F1;min-height: 100vh">
+		<view class="center info" style="padding-bottom: 50rpx;">
+			<image :src="info.shop.cover" mode=""></image>
+			<text class="text-lg" style="color: #1C1C1C;font-size: 30rpx;">{{info.shop.name}}</text>
+		</view>
+
+		<view class="card" style="background-color: #FFFFFF;">
+			<view class="flex flex-direction margin-bottom-40">
+				<text class="text-lg text-bold">支付确认</text>
+				<text class=" text-sm margin-top-10" style="color: #999999;">您本次交易可使用积分抵扣,具体如下:</text>
+			</view>
+			<view class="item">
+				<view class="left">商品价格</view>
+				<view class="right price">{{info.bills.cost}}</view>
+			</view>
+			<view class="item">
+				<view class="left">商家活动抵扣</view>
+				<view class="right" style="color: #EE9230;"><text class="price reduce">{{info.bills.discount}}</text></view>
+			</view>
+			<view class="item">
+				<view class="left">渠道积分抵扣</view>
+				<view class="right" style="color: #EE9230;"><text class="price reduce">{{info.bills.pointNum}}</text></view>
+			</view>
+			<view class="item">
+				<view class="left">积分余额抵扣</view>
+				<view class="right" style="color: #EE9230;"><text class="price reduce">{{info.bills.balanceNum}}</text></view>
+			</view>
+			<view class="item">
+				<view class="left">积分交易手续费</view>
+				<view class="right"><text class="price">{{info.bills.pointFee}}</text></view>
+			</view>
+			<view class="item u-border-top" style="margin-top: 10rpx;padding-top: 40rpx;padding-bottom: 0;">
+				<view class="left" style="font-size: 30rpx;">您仍需支付</view>
+				<view class="right text-bold" style="font-size: 40rpx;"><text class="price">{{info.bills.price}}</text></view>
+			</view>
+		</view>
+
+		<view class="center flex-direction" style="margin-top: 150rpx;">
+			<text class="text-gray text-sm margin-bottom-20">感谢使用联兑通,越用越优惠</text>
+			<view @click="confirm" class="cu-btn  flex  text-lg btn-bg-color round" style="padding: 42rpx 0;width: 90%;">
+				确认支付
+			</view>
+			<text @click="cancel" class="text-base payConfirm" style="margin-top: 50rpx;font-size: 28rpx;text-decoration: underline;">暂不支付</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:{
+			info:Object
+		},
+		data() {
+			return {
+			
+			}
+		},
+		methods: {
+			confirm(){
+				this.$emit('confirm')
+			},
+			cancel(){
+				this.$emit('cancel')
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.info {
+		display: flex;
+		justify-content: center;
+		align-content: center;
+		padding: 60rpx;
+		flex-direction: column;
+
+		image {
+			width: 120rpx;
+			height: 120rpx;
+			border-radius: 50%;
+			margin-bottom: 20rpx;
+		}
+	}
+
+	.card {
+		margin: 0 40rpx;
+		border-radius: 20rpx;
+		padding: 40rpx;
+		background-color: #FFFFFF;
+
+		.item {
+			padding: 20rpx 0;
+			display: flex;
+			justify-content: space-between;
+			font-size: 28rpx;
+
+			.left {
+				color: #353535;
+				font-weight: 300;
+			}
+
+			.right {
+				font-size: 30rpx;
+				color: #353535;
+			}
+		}
+	}
+
+	.price::after {
+		content: '元';
+		margin-left: 6rpx;
+		font-size: 0.8em;
+	}
+
+	.reduce::before {
+		content: '-';
+		margin-right: 10rpx;
+	}
+</style>

+ 67 - 29
pagesC/pages/checkstand/index.vue

@@ -2,59 +2,74 @@
 	<view class="">
 		<!-- #ifdef  MP-WEIXIN-->
 		<view class="">
-			<u-navbar title="收银台"></u-navbar>
+			<u-navbar :isBack="isBack" :title="title"></u-navbar>
 		</view>
 		<!-- #endif -->
 
-		<view class="shopInfo">
-			<image :src="shopDetail.cover" mode=""></image>
-			<text>{{shopDetail.name}}</text>
-		</view>
-		<view class="data">
-			<text style="color: #000;">付款金额</text>
-			<view class="price">
-				<view class="input-bar center" @tap="show">
-					<view class="icon center">¥</view>
-					<view class="input" style="display: flex; align-items: center;">
-						<view style="font-size: 80rpx;">{{filterMoney(orderAmount)}}</view>
-						<view class="cusor"></view>
+		<view class="" v-show="!payShow">
+			<view class="shopInfo">
+				<image :src="shopDetail.cover" mode=""></image>
+				<text>{{shopDetail.name}}</text>
+			</view>
+			<view class="data">
+				<text style="color: #000;">付款金额</text>
+				<view class="price">
+					<view class="input-bar center" @tap="show">
+						<view class="icon center">¥</view>
+						<view class="input" style="display: flex; align-items: center;">
+							<view style="font-size: 80rpx;">{{filterMoney(orderAmount)}}</view>
+							<view class="cusor"></view>
+						</view>
 					</view>
 				</view>
+				<view class="text-center text-base padding-top-20">
+					<text>*使用联兑通付款有优惠打折</text>
+				</view>
 			</view>
-			<view class="text-center text-base padding-top-20">
-				<text>*使用联兑通付款会有优惠打折</text>
+			
+			<view style="margin-top: -20rpx;">
+				<channel-list ></channel-list>
 			</view>
+			<!-- #ifdef  MP-WEIXIN-->
+			
+			<!-- #endif -->
+			
+			<amountInput ref="amountInput" confirmText="付款" btnColor="#ff9900" placeholder="请输入交易金额" @change="change"
+				@confirm="debouncePay"></amountInput>
+			
+			<u-modal v-model="modalShow" :mask-close-able="true" :showCancelButton="true" @cancel="payOfh5"
+				@confirm="jumpLDT" cancel-text="直接付款" confirm-color="#FF9447" confirmText="去联兑通支付"
+				content="去联兑通小程序付款有更多优惠哟~"></u-modal>
 		</view>
 		
-		<view style="margin-top: -20rpx;">
-			<channel-list ></channel-list>
-		</view>
-		<!-- #ifdef  MP-WEIXIN-->
-
-		<!-- #endif -->
-
-		<amountInput ref="amountInput" confirmText="付款" btnColor="#ff9900" placeholder="请输入交易金额" @change="change"
-			@confirm="debouncePay"></amountInput>
-
-		<u-modal v-model="modalShow" :mask-close-able="true" :showCancelButton="true" @cancel="payOfh5"
-			@confirm="jumpLDT" cancel-text="直接付款" confirm-color="#FF9447" confirmText="去联兑通支付"
-			content="去联兑通小程序付款会有更多优惠哟~"></u-modal>
+		<pay-confirm v-show="payShow" :info="info" @confirm="doWxPay(bills.id)" @cancel="cancelPay"></pay-confirm>
 	</view>
 </template>
 
 <script>
+	import payConfirm from '@/components/pay-confirm.vue'
 	import channelList from '@/components/channel-list.vue'
 	import amountInput from '../../comps/amountInput/amountInput.vue';
 	export default {
 		components: {
+			payConfirm,
 			channelList,
 			amountInput
 		},
 		data() {
 			return {
+				//navbar
+				title:"收银台",
+				isBack:true,
+				
 				//第一次点击支付不需要防抖操作
 				isFirstPay: true,
 				orderAmount: '',
+				//支付bills信息
+				payShow:false,
+				info:{},
+				bills:{},
+				
 				modalShow: false,
 				shopId: '',
 				shopDetail: {},
@@ -111,6 +126,9 @@
 			}
 			this.fetchShopDetail()
 		},
+		onShow() {
+			console.log(this.orderAmount);
+		},
 		methods: {
 			//防抖支付
 			debouncePay() {
@@ -241,11 +259,31 @@
 				if (resp.data.status == '付款成功') {
 					this.handelResult(true)
 				} else if (resp.data.status == '待付款') {
-					this.doWxPay(resp.data.bills.id)
+					this.bills=resp.data.bills
+					if (this.bills.discount==-1) {
+						this.bills.discount=0
+					}
+					if (this.bills.cost==this.bills.price) {
+						this.doWxPay(this.bills.id)
+					}else{
+						this.info={
+							shop:this.shopDetail,
+							bills:this.bills,
+						}
+						this.title="支付确认"
+						this.isBack=false
+						this.payShow=true
+					}
+					
 				} else {
 					this.handelResult(false)
 				}
 			},
+			cancelPay(){
+				this.title="收银台"
+				this.isBack=true
+				this.payShow=false
+			},
 			async doWxPay(orderId) {
 				let obj = {
 					orderType: this.$global.orderType.USER_PAY,

+ 0 - 253
pagesC/pages/checkstand/index1.vue

@@ -1,253 +0,0 @@
-<template>
-	<view class="">
-		<!-- #ifdef  MP-WEIXIN-->
-		<view class="">
-			<u-navbar title="收银台"></u-navbar>
-		</view>
-		<!-- #endif -->
-
-		<view class="check-panel flex-direction">
-			<image :src="shopDetail.cover" class="buyer-logo"></image>
-			<view class="title center">{{shopDetail.name}}</view>
-			<view class="input-content">
-				<view class="tips">交易金额</view>
-				<view class="input-bar center" @tap="show=true">
-					<view class="icon center">¥</view>
-					<view class="input center">
-						<view :style="!$isEmpty(orderAmount)?'margin-left: -15%;':''">{{orderAmount}}</view>
-						<view class="cusor" :style="$isEmpty(orderAmount)?'margin-left: -15%;':''"></view>
-					</view>
-				</view>
-				<view style="height: 50rpx;"></view>
-				<view class="" style="z-index: 99;">
-					<u-button throttle-time="1200"  class="button" type="warning" @click="pay">付款</u-button>
-				</view>
-			</view>
-
-			<view class="bottom-line center"> -- 联兑通提供技术支持 --</view>
-			<u-keyboard z-index="9" ref="uKeyboard" :show-tips="false" :safe-area-inset-bottom="true" :mask="false"
-				v-model="show" @change="handleInput" @confirm="pay" @backspace="handleDelete"></u-keyboard>
-		</view>
-		
-		<u-modal v-model="payModalShow" :showCancelButton="true" confirm-color="#FF9447">
-			<view class="center flex-direction text-df" style="padding: 30rpx 40rpx;">
-				<view>您的积分可足额抵扣支付</view>
-				<view class="padding-top-10">本次支付不会扣除您的现金</view>
-			</view>
-		</u-modal>
-
-		<u-modal v-model="modalShow"  :showCancelButton="true" @cancel="payOfh5"  @confirm="jumpLDT" cancel-text="直接付款" confirm-color="#FF9447"
-			confirmText="去联兑通支付" content="去联兑通小程序付款会有更多优惠哟~"></u-modal>
-	</view>
-</template>
-
-<script>
-	export default {
-		onLoad(option) {},
-		data() {
-			return {
-				payModalShow:false,
-				modalShow: false,
-				show: false,
-				logo: "/static/icon/BOC.png",
-				buyer: "联兑通",
-				orderAmount: '',
-				shopId: '',
-				shopDetail: {}
-			}
-		},
-		onLoad(options) {
-			this.shopId = options.id
-			if (this.$isEmpty(this.shopId)) {
-				this.$dialog.showModal('商户id不能为空', false).then(() => {
-					uni.navigateBack()
-				})
-				return
-			}
-			this.fetchShopDetail()
-		},
-		methods: {
-			fetchShopDetail() {
-				this.$api.shop.detail({
-					id: this.shopId
-				}).then(res => {
-					if (this.$isEmpty(res.data)) {
-						this.$dialog.showModal('获取不到商户信息', false).then(() => {
-							this.show = false
-							uni.navigateBack({
-								delta: 1
-							})
-						})
-					} else {
-						this.show = true
-						this.shopDetail = res.data
-					}
-				}).catch(err => {
-					this.$dialog.showModal('获取不到商户信息', false).then(() => {
-						uni.navigateBack({
-							delta: 1
-						})
-					})
-				})
-			},
-			handleInput(num) {
-				if (this.orderAmount.length > 12) {
-					return
-				}
-				this.orderAmount = this.orderAmount + num
-			},
-			handleDelete() {
-				if (this.$isEmpty(this.orderAmount)) {
-					return
-				}
-				this.orderAmount = this.orderAmount.substr(0, this.orderAmount.length - 1)
-			},
-			jumpLDT() {
-				location.href = "weixin://dl/business/?t=X2CyIQDbgtm"
-			},
-			async payOfh5() {
-				let expireTime=this.$dateTime.getExpireTime(5)
-				let params={
-					money:this.orderAmount,
-					shopId:this.shopId,
-					billsTitle:'用户微信扫码支付',
-					expireTime
-				}
-				let resp=await this.$api.loginUser.payBeforeForNormal(params)
-				let payObj={
-					orderType:this.$global.orderType.USER_PAY,
-					orderId:resp.data.id
-				}
-				let res=await this.$api.pay.payOrderOfscanCode(payObj)
-				if (!this.$isEmpty(res.data.qrCodeUrl)) {
-					location.href=res.data.qrCodeUrl
-				}
-				this.$u.toast('支付失败')
-			},
-			async pay() {
-				if (this.$isEmpty(this.orderAmount)) {
-					this.$u.toast('请输入交易金额')
-					return
-				}
-				// #ifdef  H5
-				this.modalShow = true
-				// #endif
-
-				// #ifdef MP-WEIXIN
-				let flag=false
-				if (flag) {
-					//可以足额支付
-					this.payModalShow=true
-				}else{
-					//积分不足额支付,调易宝支付
-					this.toWXPay()
-				}
-				// #endif
-			},
-			async toWXPay(){
-				let expireTime = this.$dateTime.getExpireTime(5)
-				let params = {
-					shopId: this.shopId,
-					loginUserId: this.vuex_userId,
-					money: this.orderAmount,
-					billsTitle: '用户支付',
-					expireTime,
-					appId: this.$global.wxParams.APPID,
-					openId: this.$cache.get('userInfo').openId,
-					type: 1 //type: 1-用户扫商户收款码支付 2-商户扫用户付款码支付
-				}
-				let resp = await this.$api.loginUser.payBefore(params)
-				if (!resp.success) {
-					this.$u.toast(resp.msg)
-					return
-				}
-				let obj = {
-					orderType: this.$global.orderType.USER_PAY,
-					orderId: resp.data.id,
-					payStatus: this.$global.payStatus.IS_WAIT
-				}
-				let res = await this.$api.pay.payOrder(obj)
-				let prePayTn = JSON.parse(res.data.prePayTn)
-				await this.$mpi.requestPayment(prePayTn)
-				uni.navigateTo({
-					url: "/pages/checkstand/order-res?orderId=" + resp.data.id
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.check-panel {
-		.buyer-logo {
-			width: 130rpx;
-			height: 130rpx;
-			margin-top: 50rpx;
-			margin-left: calc(50% - 65rpx);
-			border-radius: 50%;
-		}
-
-		.title {
-			font-weight: 800;
-			height: 70rpx;
-			letter-spacing: 3rpx;
-			color: #5D5D5D;
-		}
-
-		.input-content {
-			margin-top: 50rpx;
-			padding: 50rpx;
-			background-color: #FFFFFF;
-			width: 100%;
-			border-radius: 25rpx 25rpx 0 0;
-
-			.tips {
-				height: 100rpx;
-				font-size: 30rpx;
-				display: flex;
-				justify-content: left;
-				align-items: center;
-			}
-
-			.input-bar {
-				height: 150rpx;
-				border-bottom: 1rpx solid #DDDDDD;
-
-				.icon {
-					width: 15%;
-					font-size: 70rpx;
-					font-weight: 900;
-					height: 100%;
-				}
-
-				.input {
-					width: 85%;
-					height: 100%;
-					overflow: hidden;
-					font-size: 70rpx;
-				}
-
-				.cusor {
-					width: 2rpx;
-					height: 80%;
-					background-color: #FD711B;
-					animation: blink 1500ms infinite ease-in-out;
-				}
-			}
-		}
-	}
-
-	.bottom-line {
-		position: absolute;
-		bottom: 50rpx;
-		left: 0;
-		width: 100%;
-		color: #dddddd;
-	}
-
-	@keyframes blink {
-		from {
-			opacity: 0;
-		}
-	}
-</style>

+ 0 - 197
pagesC/pages/checkstand/pay-qrcode1.vue

@@ -1,197 +0,0 @@
-<!-- 纯轮询做法 -->
-<template>
-	<view class="code-container">
-		<view class="title center">{{isPayment? "向商家付款":"扫一扫,向我付款"}}</view>
-		<view class="main-content">
-			<view v-if="isPayment">
-				<!-- 占位 -->
-				<view style="height: 50rpx;"></view>
-				<!-- 条形码 -->
-				<view class="bar-code center">
-					<tki-barcode ref="barcode" :val="content" onval=true :opations="barOption" />
-				</view>
-				<!-- 付款码 -->
-				<view class="qr-code center">
-					<tki-qrcode cid="2" ref="qrcode" :val="content" size="300" :onval="true" :loadMake="true"
-						:usingComponents="true" />
-				</view>
-			</view>
-			<!-- 收款码 -->
-			<view v-else class="charge-code center">
-				<tki-qrcode cid="1" ref="qrcode-charge" :val="id" :icon="avatar" size="440" :onval="true"
-					:loadMake="true" :usingComponents="true" />
-			</view>
-		</view>
-		<view class="footer center">
-			<text class="text-xl text-bold">{{nickName}}</text>
-		</view>
-	</view>
-</template>
-
-<script>
-	import tkiQrcode from "../../comps/tki-qrcode/tki-qrcode.vue"
-	import tkiBarcode from "../../comps/tki-barcode/tki-barcode.vue"
-	import totp from "../../utils/totp.js"
-	export default {
-		components: {
-			tkiBarcode,
-			tkiQrcode
-		},
-		computed: {
-			content() {
-				let transformStr = this.id
-				return transformStr + this.secret
-			}
-		},
-		data() {
-			return {
-				id: '',
-				avatar: "",
-				nickName:'',
-				secret: '000000',
-				isPayment: true,
-				timer: '',
-				timerBillRecords:null,
-				barOption: {
-					width: 3,
-					height: 130,
-					displayValue: false
-				}
-			}
-		},
-		methods: {
-			refreshCode() {
-				this.timer = setInterval(() => {
-					this.secret = totp.getSecret(this.id);
-					console.log(this.secret);
-				}, 1000)
-			},
-			async initAvatat(url) {
-				return new Promise((reslove, reject) => {
-					uni.downloadFile({
-						url,
-						success: (res) => {
-							reslove(res);
-						},
-						fail: (err) => {
-							reject(err)
-						}
-					})
-				})
-			},
-			async queryBillRecords(){
-				let resp=await this.$api.loginUser.getBillrecordFromRedis({userId:this.vuex_userId})
-				if (this.$isEmpty(resp.data)) {
-					return
-				}
-				if (resp.data.realPayAmount>0) {
-					clearInterval(this.timerBillRecords)
-					//去支付
-					let params={
-						orderType:this.$global.orderType.USER_PAY,
-						orderId:resp.data.id,
-						payStatus:this.$global.payStatus.IS_WAIT
-					}
-					let res=await this.$api.pay.payOrder(params)
-					if (!this.$isEmpty(res.data.prePayTn)) {
-						let prePayTn= JSON.parse(res.data.prePayTn)
-						this.$mpi.requestPayment(prePayTn).then(()=>{
-							this.$dialog.showModal('支付成功',false).then(()=>{
-								this.$api.loginUser.clearBillRecordCache({userId:this.vuex_userId})
-								uni.navigateBack({
-									delta:1
-								})
-							})
-						}).catch(err=>{
-							this.$dialog.showModal('支付失败',false).then(()=>{
-								this.$api.loginUser.clearBillRecordCache({userId:this.vuex_userId})
-								uni.navigateBack({
-									delta:1
-								})
-							})
-						})
-					}
-				}
-			},
-		},
-		async created(option) {
-			let res = await this.$api.loginUser.detail({
-				id: this.vuex_userId
-			})
-			this.nickName=res.data.nickName
-			// this.avatar =(await  this.initAvatat(res.data.avatar)).tempFilePath;
-			//清除缓存
-			await this.$api.loginUser.clearBillRecordCache({userId:this.vuex_userId})
-			//轮询	
-			this.timerBillRecords =  setInterval(this.queryBillRecords,5000);
-		},
-		async mounted(option) {
-			//获取用户ID
-			this.id = this.vuex_userId
-			//生成动态密码
-			this.refreshCode();
-		},
-		beforeDestroy() {
-			clearInterval(this.timer);
-			clearInterval(this.timerBillRecords);
-			uni.hideLoading()
-		}
-		
-	}
-</script>
-
-<style>
-	page {
-		background-color: #18b566;
-	}
-</style>
-<style lang="scss" scoped>
-	.code-container {
-		background-color: #FFFFFF;
-		border-radius: 16rpx;
-		min-height: 800rpx;
-		margin: 60rpx 20rpx;
-
-		.title {
-			border-radius: 25rpx 25rpx 0 0;
-			height: 100rpx;
-			width: 100%;
-			font-size: 35rpx;
-			color: #18b566;
-			background-color: #F7F7F7;
-			font-weight: 600;
-			letter-spacing: 3rpx;
-		}
-
-		.footer {
-			width: 90%;
-			height: 160rpx;
-			margin-left: 5%;
-			border-top: 1rpx dashed #dddddd;
-		}
-
-		.main-content {
-			width: 100%;
-			height: 600rpx;
-			scroll-margin-top: 600rpx;
-
-			// overflow: hidden;
-			.bar-code {
-				margin-left: 5%;
-				width: 90%;
-				height: 150rpx;
-			}
-
-			.qr-code {
-				width: 100%;
-				height: 450rpx;
-			}
-
-			.charge-code {
-				width: 100%;
-				height: 600rpx;
-				transition: transform 1s ease-in-out;
-			}
-		}
-	}
-</style>

+ 301 - 240
pagesD/pages/menu/menu.vue

@@ -1,106 +1,107 @@
 <template>
 	<view class="u-wrap" :style="$isEmpty(goods)?'background-color: #FFFFFF;':''">
-		<view class="goods_empty" v-if="$isEmpty(goods)">
-			<image src="/pagesD/static/icon/goods_empty.png" mode=""></image>
-			<text style="font-weight: 400;">该商铺还未上架商品</text>
-		</view>
-		
-		<view class="" v-else>
-			<login ref="login"  @signIn="signIn"></login>
-			<view class="u-search-box">
-				<view class="nav" >
-					<view class="header">
-						<view class="left overflow-hidden">
-							<view class="flex align-center overflow-hidden" v-if="takeType == takeTypeGlobal.delivery">
-								<image src="/pagesD/static/icon/location1.png" style="width: 30rpx; height: 30rpx;"
-									class="margin-right-10">
-								</image>
-								<text v-if="$isEmpty(vuex_userId)" @tap="showLogin">去登录</text>
-								<view class="" v-else @click="$jump('/pagesD/pages/address/address')">
-									<text  v-if="$isEmpty(address)">请完善地址信息</text>
-									<view style="margin-right: 20rpx;"  v-else  >
-										<text class="text-cut-1">{{address.address}}</text>
+		<view class="" v-show="!isLoading">
+			<view class="goods_empty" v-if="$isEmpty(goods)">
+				<image src="/pagesD/static/icon/goods_empty.png" mode=""></image>
+				<text style="font-weight: 400;">该商铺还未上架商品</text>
+			</view>
+			<view class="" v-else>
+				<login ref="login"  @signIn="signIn"></login>
+				<view class="u-search-box">
+					<view class="nav" >
+						<view class="header">
+							<view class="left overflow-hidden">
+								<view class="flex align-center overflow-hidden" v-if="takeType == takeTypeGlobal.delivery">
+									<image src="/pagesD/static/icon/location1.png" style="width: 30rpx; height: 30rpx;"
+										class="margin-right-10">
+									</image>
+									<text v-if="$isEmpty(vuex_userId)" @tap="showLogin">去登录</text>
+									<view class="" v-else @click="$jump('/pagesD/pages/address/address')">
+										<text  v-if="$isEmpty(address)">请完善地址信息</text>
+										<view style="margin-right: 20rpx;"  v-else  >
+											<text class="text-cut-1">{{address.address}}</text>
+										</view>
 									</view>
 								</view>
+								<view class="flex align-center overflow-hidden" v-else>
+									<image src="/pagesD/static/icon/shop2.png" style="width: 30rpx; height: 30rpx;"
+										class="margin-right-10">
+									</image>
+									<text style="font-size: 36rpx;font-weight: 800;">{{appProperties.shopName}}</text>
+								</view>
 							</view>
-							<view class="flex align-center overflow-hidden" v-else>
-								<image src="/pagesD/static/icon/shop2.png" style="width: 30rpx; height: 30rpx;"
-									class="margin-right-10">
-								</image>
-								<text style="font-size: 36rpx;font-weight: 800;">杨国福麻辣烫</text>
+							<view @click="modalCheckedShow" class="cu-btn round bg-red sm" style="font-size: 24rpx;">
+								<text class="center">{{takeType.substring(2,4)}}</text>
+								<text class="cuIcon-order center text-bold" style="transform: rotate(90deg);margin-left: 6rpx;"></text>
 							</view>
 						</view>
-						<view @click="modalCheckedShow" class="cu-btn round bg-red sm" style="font-size: 24rpx;">
-							<text class="center">{{takeType.substring(2,4)}}</text>
-							<text class="cuIcon-order center text-bold" style="transform: rotate(90deg);margin-left: 6rpx;"></text>
+						<view class="bg-white">
+							<u-notice-bar mode="horizontal" :list="appProperties.shopNotice"></u-notice-bar>
 						</view>
 					</view>
-					<view class="bg-white">
-						<u-notice-bar mode="horizontal" :list="appProperties.shopNotice"></u-notice-bar>
-					</view>
 				</view>
-			</view>
-			<view class="u-menu-wrap">
-				<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop"
-					:scroll-into-view="itemId">
-					<view  v-for="(item,index) in goods" :key="index" class="u-tab-item"
-						:class="[current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)">
-						<text class="u-line-1">{{item.goodsCategoryName}}</text>
-					</view>
-				</scroll-view>
-				<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box"
-					@scroll="rightScroll">
-					<view class="page-view">
-						<view  class="class-item" :id="'item' + index" v-for="(item , index) in goods" :key="index">
-							<view class="item-title" >
-								<text>{{item.goodsCategoryName}}</text>
-							</view>
-							<view class="item-container" >
-								<view class="thumb-box" v-for="(goods, index1) in item.goodsList" :key="index1">
-									<image class="item-menu-image" :src="goods.image" mode=""></image>
-									<view class="item-content" >
-										<view class="name">{{goods.name}}</view>
-										<view class="tips">
-											{{ goods.description && goods.description != '' ? goods.description : goods.name }}
-										</view>
-										<view class="price_and_action">
-											<text class="price">¥{{ goods.defaultPrice / 100 }}</text>
-											<!-- 商品没有下架 -->
-											<view v-if="goods.isSell">
-												<!-- 要选商品规格详细信息 -->
-												<view class="btn-group"
-													v-if="goods.goodsPropertyVos && goods.goodsPropertyVos.length">
-													<button type="primary" class="btn property_btn" hover-class="none"
-														size="mini" @tap="showGoodDetailModal(goods)">
-														选规格
-													</button>
-													<view class="dot" v-show="goodsCartNum(goods.id)">
-														{{ goodsCartNum(goods.id) }}
+				<view class="u-menu-wrap">
+					<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop"
+						:scroll-into-view="itemId">
+						<view  v-for="(item,index) in goods" :key="index" class="u-tab-item"
+							:class="[current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)">
+							<text class="u-line-1">{{item.goodsCategoryName}}</text>
+						</view>
+					</scroll-view>
+					<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box"
+						@scroll="rightScroll">
+						<view class="page-view">
+							<view  class="class-item" :id="'item' + index" v-for="(item , index) in goods" :key="index">
+								<view class="item-title" >
+									<text>{{item.goodsCategoryName}}</text>
+								</view>
+								<view class="item-container" >
+									<view class="thumb-box" v-for="(goods, index1) in item.goodsList" :key="index1">
+										<image class="item-menu-image" :src="goods.image" mode=""></image>
+										<view class="item-content" >
+											<view class="name">{{goods.name}}</view>
+											<view class="tips">
+												{{ goods.description && goods.description != '' ? goods.description : goods.name }}
+											</view>
+											<view class="price_and_action">
+												<text class="price">¥{{ goods.defaultPrice / 100 }}</text>
+												<!-- 商品没有下架 -->
+												<view v-if="goods.isSell">
+													<!-- 要选商品规格详细信息 -->
+													<view class="btn-group"
+														v-if="goods.goodsPropertyVos && goods.goodsPropertyVos.length">
+														<button type="primary" class="btn property_btn" hover-class="none"
+															size="mini" @tap="showGoodDetailModal(goods)">
+															选规格
+														</button>
+														<view class="dot" v-show="goodsCartNum(goods.id)">
+															{{ goodsCartNum(goods.id) }}
+														</view>
 													</view>
-												</view>
-												<!-- 可以直接添加,不用选择商品属性 -->
-												<view class="btn-group" v-else>
-													<button type="default" v-show="goodsCartNum(goods.id)" plain
-														class="btn reduce_btn" size="mini" hover-class="none"
-														@tap="handleReduceFromCart(goods)">
-														<view class="iconfont iconsami-select"></view>
-													</button>
-													<view class="number" v-show="goodsCartNum(goods.id)">
-														{{ goodsCartNum(goods.id) }}
+													<!-- 可以直接添加,不用选择商品属性 -->
+													<view class="btn-group" v-else>
+														<button type="default" v-show="goodsCartNum(goods.id)" plain
+															class="btn reduce_btn" size="mini" hover-class="none"
+															@tap="handleReduceFromCart(goods)">
+															<view class="iconfont iconsami-select"></view>
+														</button>
+														<view class="number" v-show="goodsCartNum(goods.id)">
+															{{ goodsCartNum(goods.id) }}
+														</view>
+														<button type="primary" class="btn add_btn" size="min" hover-class="none"
+															@tap="handleAddToCart(goods)">
+															<view class="iconfont iconadd-select"></view>
+														</button>
 													</view>
-													<button type="primary" class="btn add_btn" size="min" hover-class="none"
-														@tap="handleAddToCart(goods)">
-														<view class="iconfont iconadd-select"></view>
-													</button>
 												</view>
-											</view>
-											<!-- 已经下架了 -->
-											<view v-else>
-												<view class="btn-group">
-													<button type="primary" disabled class="btn property_btn"
-														style="text-decoration: line-through;background-color: rgba(255, 148, 71,.6);" size="mini">
-														已售空
-													</button>
+												<!-- 已经下架了 -->
+												<view v-else>
+													<view class="btn-group">
+														<button type="primary" disabled class="btn property_btn"
+															style="text-decoration: line-through;background-color: rgba(255, 148, 71,.6);" size="mini">
+															已售空
+														</button>
+													</view>
 												</view>
 											</view>
 										</view>
@@ -108,154 +109,157 @@
 								</view>
 							</view>
 						</view>
-					</view>
-				</scroll-view>
-			
-			
-			<view class="">
-				<!-- 购物车栏 begin -->
-				<view class="cart-box" v-if="cart && cart.length">
-					<view class="mark" @tap="cartPopupVisible = !cartPopupVisible">
-						<image src="/pagesD/static/icon/cart1.png" class="cart-img"></image>
-						<view class="tag">{{ getCartGoodsNumber }}</view>
-					</view>
-					<view class="price" @tap="cartPopupVisible = !cartPopupVisible">¥{{ getCartGoodsPrice / 100 }}</view>
-					<view v-if="!appProperties.shopStatus"><button type="primary" class="pay-btn" disabled>商家休息中</button>
-					</view>
-					<view v-else-if="isBusinessTime">
-						<button :style="!disabledPay?'background-color: #FF9447;':''"  type="primary" class="pay-btn" @tap="toPay()"
-							:disabled="disabledPay">{{ disabledPay ? `差${spread / 100}元起送` : '去结算' }}</button>
-					</view>
-					<view v-else><button type="primary" class="pay-btn" disabled>未在营业时段</button></view>
-				</view>
-				<!-- 购物车栏 end -->
+					</scroll-view>
+				
 				
-				<!-- 商品详情模态框 begin -->
-				<modal :show="goodDetailModalVisible" class="good-detail-modal" color="#5A5B5C" width="90%" custom
-					padding="0rpx" radius="12rpx">
-					<view class="cover">
-						<image v-if="currentGoods.image" :src="currentGoods.image" class="image"></image>
-						<view class="btn-group">
-							<image src="/pagesD/static/icon/close.png" @tap="closeGoodDetailModal"></image>
+				<view class="">
+					<!-- 购物车栏 begin -->
+					<view class="cart-box" v-if="cart && cart.length">
+						<view class="mark" @tap="cartPopupVisible = !cartPopupVisible">
+							<image src="/pagesD/static/icon/cart1.png" class="cart-img"></image>
+							<view class="tag">{{ getCartGoodsNumber }}</view>
 						</view>
+						<view class="price" @tap="cartPopupVisible = !cartPopupVisible">¥{{ getCartGoodsPrice / 100 }}</view>
+						<view v-if="!appProperties.shopStatus"><button type="primary" class="pay-btn" disabled>商家休息中</button>
+						</view>
+						<view v-else-if="isBusinessTime">
+							<button :style="!disabledPay?'background-color: #FF9447;':''"  type="primary" class="pay-btn" @tap="toPay()"
+								:disabled="disabledPay">{{ disabledPay ? `差${spread / 100}元起送` : '去结算' }}</button>
+						</view>
+						<view v-else><button type="primary" class="pay-btn" disabled>未在营业时段</button></view>
 					</view>
-					<scroll-view class="detail" scroll-y style="padding-bottom: 100px;">
-						<view class="wrapper">
-							<view class="basic">
-								<view class="name">{{ currentGoods.name }}</view>
-								<view class="tips">{{ currentGoods.description }}</view>
+					<!-- 购物车栏 end -->
+					
+					<!-- 商品详情模态框 begin -->
+					<modal :show="goodDetailModalVisible" class="good-detail-modal" color="#5A5B5C" width="90%" custom
+						padding="0rpx" radius="12rpx">
+						<view class="cover">
+							<image v-if="currentGoods.image" :src="currentGoods.image" class="image"></image>
+							<view class="btn-group">
+								<image src="/pagesD/static/icon/close.png" @tap="closeGoodDetailModal"></image>
 							</view>
-							<!-- 商品的额外属性 -->
-							<view class="properties"
-								v-if="currentGoods.goodsPropertyVos && currentGoods.goodsPropertyVos.length">
-								<view class="property" v-for="(goodsPropertyVo, index) in currentGoods.goodsPropertyVos"
-									:key="index">
-									<view class="title">
-										<text class="name">
-											<text v-if="goodsPropertyVo.required" style="color: red">*</text>
-											{{ goodsPropertyVo.category }}
-										</text>
-									</view>
-									<view class="values">
-										<view class="value" v-for="(property, index2) in goodsPropertyVo.propertyList"
-											:key="index2" :class="{ default: property.isDefault }"
-											@tap="changePropertyDefault(index, index2)">
-											{{ property.propertyOption }}
-											{{ property.rebasePrice && property.rebasePrice >=0 ? '¥' + property.rebasePrice / 100 : property.extraPrice / 100 ? '¥' + property.extraPrice / 100 : '' }}
+						</view>
+						<scroll-view class="detail" scroll-y style="padding-bottom: 100px;">
+							<view class="wrapper">
+								<view class="basic">
+									<view class="name">{{ currentGoods.name }}</view>
+									<view class="tips">{{ currentGoods.description }}</view>
+								</view>
+								<!-- 商品的额外属性 -->
+								<view class="properties"
+									v-if="currentGoods.goodsPropertyVos && currentGoods.goodsPropertyVos.length">
+									<view class="property" v-for="(goodsPropertyVo, index) in currentGoods.goodsPropertyVos"
+										:key="index">
+										<view class="title">
+											<text class="name">
+												<text v-if="goodsPropertyVo.required" style="color: red">*</text>
+												{{ goodsPropertyVo.category }}
+											</text>
+										</view>
+										<view class="values">
+											<view class="value" v-for="(property, index2) in goodsPropertyVo.propertyList"
+												:key="index2" :class="{ default: property.isDefault }"
+												@tap="changePropertyDefault(index, index2)">
+												{{ property.propertyOption }}
+												{{ property.rebasePrice && property.rebasePrice >=0 ? '¥' + property.rebasePrice / 100 : property.extraPrice / 100 ? '¥' + property.extraPrice / 100 : '' }}
+											</view>
 										</view>
 									</view>
 								</view>
 							</view>
-						</view>
-					</scroll-view>
-					<view class="action">
-						<!-- 价格和属性 -->
-						<view class="left">
-							<view class="price">¥{{ currentGoods.realPrice / 100 }}</view>
-							<view class="props" v-if="getGoodSelectedProps(currentGoods)">
-								{{ getGoodSelectedProps(currentGoods) }}
+						</scroll-view>
+						<view class="action">
+							<!-- 价格和属性 -->
+							<view class="left">
+								<view class="price">¥{{ currentGoods.realPrice / 100 }}</view>
+								<view class="props" v-if="getGoodSelectedProps(currentGoods)">
+									{{ getGoodSelectedProps(currentGoods) }}
+								</view>
+							</view>
+							<!-- 模态窗里面增减商品 -->
+							<view class="btn-group">
+								<button type="default" plain class="btn" size="mini" hover-class="none"
+									@tap="changeCurrentGoodsNumber(-1)">
+									<view class="iconfont iconsami-select"></view>
+								</button>
+								<view class="number">{{ currentGoods.number }}</view>
+								<button type="primary" class="btn" size="min" hover-class="none" @tap="changeCurrentGoodsNumber(1)">
+									<view class="iconfont iconadd-select"></view>
+								</button>
 							</view>
 						</view>
-						<!-- 模态窗里面增减商品 -->
-						<view class="btn-group">
-							<button type="default" plain class="btn" size="mini" hover-class="none"
-								@tap="changeCurrentGoodsNumber(-1)">
-								<view class="iconfont iconsami-select"></view>
-							</button>
-							<view class="number">{{ currentGoods.number }}</view>
-							<button type="primary" class="btn" size="min" hover-class="none" @tap="changeCurrentGoodsNumber(1)">
-								<view class="iconfont iconadd-select"></view>
-							</button>
+						<view class="add-to-cart-btn" @tap="addCurrentGoodsToCart()">
+							<view>确认</view>
 						</view>
-					</view>
-					<view class="add-to-cart-btn" @tap="addCurrentGoodsToCart()">
-						<view>确认</view>
-					</view>
-				</modal>
-				<!-- 商品详情模态框 end -->
-				
-				<!-- 购物车详情popup -->
-				
-				<u-popup z-index="99" v-model="cartPopupVisible" mode="bottom">
-					<view class="cart-popup">
-						<view class="top"><text @tap="handleCartClear">清空</text></view>
-						<scroll-view class="cart-list" scroll-y>
-							<view class="wrapper">
-								<view class="item" v-for="(goods, index) in cart" :key="index">
-									<view class="left">
-										<view class="name">{{ goods.name }}</view>
-										<view class="props">{{ getGoodSelectedProps(goods) }}</view>
-									</view>
-									<view class="center">
-										<text>¥{{ goods.realPrice / 100 }}</text>
-									</view>
-									<view class="right">
-										<!-- 购物车里添加数量 -->
-										<button type="default" plain size="mini" class="btn" hover-class="none"
-											@tap="handleCartItemReduce(index)">
-											<view class="iconfont iconsami-select"></view>
-										</button>
-										<view class="number">{{ goods.number }}</view>
-										<!-- 购物车里减少数量 -->
-										<button type="primary" class="btn" size="min" hover-class="none"
-											@tap="handleCartItemAdd(index)">
-											<view class="iconfont iconadd-select"></view>
-										</button>
-									</view>
-								</view>
-								<view class="item" v-if="takeType == takeTypeGlobal.package">
-									<view class="left">
-										<view class="name">包装费</view>
-									</view>
-									<view class="center">
-										<text>¥{{ appProperties.packingPrice / 100 }}</text>
-									</view>
-								</view>
-								<view class="item" v-if="takeType == takeTypeGlobal.delivery">
-									<view class="left">
-										<view class="name">包装费</view>
-									</view>
-									<view class="center">
-										<text>¥{{ appProperties.packingPrice / 100 }}</text>
+					</modal>
+					<!-- 商品详情模态框 end -->
+					
+					<!-- 购物车详情popup -->
+					
+					<u-popup z-index="99" v-model="cartPopupVisible" mode="bottom">
+						<view class="cart-popup">
+							<view class="top"><text @tap="handleCartClear">清空</text></view>
+							<scroll-view class="cart-list" scroll-y>
+								<view class="wrapper">
+									<view class="item" v-for="(goods, index) in cart" :key="index">
+										<view class="left">
+											<view class="name">{{ goods.name }}</view>
+											<view class="props">{{ getGoodSelectedProps(goods) }}</view>
+										</view>
+										<view class="center">
+											<text>¥{{ goods.realPrice / 100 }}</text>
+										</view>
+										<view class="right">
+											<!-- 购物车里添加数量 -->
+											<button type="default" plain size="mini" class="btn" hover-class="none"
+												@tap="handleCartItemReduce(index)">
+												<view class="iconfont iconsami-select"></view>
+											</button>
+											<view class="number">{{ goods.number }}</view>
+											<!-- 购物车里减少数量 -->
+											<button type="primary" class="btn" size="min" hover-class="none"
+												@tap="handleCartItemAdd(index)">
+												<view class="iconfont iconadd-select"></view>
+											</button>
+										</view>
 									</view>
-									<view class="left">
-										<view class="name">配送费</view>
+									<view class="item" v-if="takeType == takeTypeGlobal.package">
+										<view class="left">
+											<view class="name">包装费</view>
+										</view>
+										<view class="center">
+											<text>¥{{ appProperties.packingPrice / 100 }}</text>
+										</view>
 									</view>
-									<view class="center">
-										<text>¥{{ appProperties.sendingPrice / 100 }}</text>
+									<view class="item" v-if="takeType == takeTypeGlobal.delivery">
+										<view class="left">
+											<view class="name">包装费</view>
+										</view>
+										<view class="center">
+											<text>¥{{ appProperties.packingPrice / 100 }}</text>
+										</view>
+										<view class="left">
+											<view class="name">配送费</view>
+										</view>
+										<view class="center">
+											<text>¥{{ appProperties.sendingPrice / 100 }}</text>
+										</view>
 									</view>
 								</view>
-							</view>
-						</scroll-view>
-					</view>
-				</u-popup>
-				<!-- 购物车详情popup -->
+							</scroll-view>
+						</view>
+					</u-popup>
+					<!-- 购物车详情popup -->
+					
+					<modal-checked @confirm="modalConfirm" ref="modalChecked" :list="checkList"></modal-checked>
+					<login ref="login"  @signIn="signIn"></login>
+				</view>
+				</view>
 				
-				<modal-checked @confirm="modalConfirm" ref="modalChecked" :list="checkList"></modal-checked>
-				<login ref="login"  @signIn="signIn"></login>
-			</view>
+				<toast ref="toast" ></toast>
 			</view>
 		</view>
+		<loading ref="loading" type="3" theme="2"/>
 	</view>
 </template>
 <script>
@@ -274,13 +278,16 @@
 		},
 		data() {
 			return {
+				isLoading:true,
+				
 				shopId:'',
 				address: {},
 				cart: [],
 				takeType: "店内堂食",
 				takeTypeGlobal:global.takeType,
+				shopDetail:{},
 				appProperties: {
-					"shopName": "杨国福麻辣烫",
+					"shopName": "",
 					"sendingPrice": 100, // 商家配送费
 					"packingPrice": 100, // 包装费
 					"sendingNeedLeastPrice": 2000, // 起送需要的最低价格
@@ -296,6 +303,8 @@
 				selectedPropertyList: [], // 当前商品的属性
 				cartPopupVisible: false,
 				
+				//座位号
+				seatNum:0,
 				/**
 				 * uview菜单begin
 				 */
@@ -315,25 +324,35 @@
 				 */
 				checkList:[
 					{
-						name:global.takeType.dine_in,
+						//店内堂食
+						name:"扫一扫店内下单",
 						icon:"/pagesD/static/icon/order.png",
 					},
 					{
-						name:global.takeType.package,
+						name:"到店自取",
 						icon:"/pagesD/static/icon/pickup.png",
 					}
 				]
 			}
 		},
 		onLoad(options) {
+			this.$refs.loading.showLoading()
+			
 			_this = this
-			if (!options.shopId) {
-				this.$dialog.showModalAndBack('系统错误')
-				return
+			if (this.$isNotEmpty(options.q)) {
+				//获取普通二维码的参数
+				let params= this.$util.getUrlParams(options.q)
+				this.shopId=params.shopId
+				this.seatNum=params.seatNum
+			}
+			if (this.$isNotEmpty(options.shopId)) {
+				this.shopId=options.shopId
+			}
+			if (this.$isNotEmpty(options.seatNum)) {
+				this.seatNum=options.seatNum
 			}
-			this.shopId=options.shopId
-			this.init()
 			
+			this.init()
 		},
 		onShow() {
 			this.address = this.$util.getBackParams('addressData')
@@ -411,7 +430,7 @@
 			modalCheckedShow(){
 				this.$refs.modalChecked.showModal()
 			},
-			timeRange(beginTime, endTime) {//判断是否在缴费查询时间
+			timeRange(beginTime, endTime) {//判断是否在查询时间
 			  var strb = beginTime.split (":");
 			  if (strb.length != 3) {
 			    return false;
@@ -450,33 +469,73 @@
 
 			//页面初始化
 			async init() {
-				this.initMenu()
-				this.initCart()
+				await this.initShop()
+				await this.initMenu()
+				await this.initCart()
 			},
-			initMenu(){
-				this.$api.goods.menu({
-					shopId: this.shopId
-				}).then(res => {
-					this.goods = res.data;
+			initShop(){
+				let params={
+					id:this.shopId
+				}
+				this.$api.shop.detail(params).then(res=>{
+					this.shopDetail=res.data
+					this.appProperties.shopName=this.shopDetail.name
 				})
+			},
+			async initMenu(){
+				let res=await this.$api.goods.menu({shopId: this.shopId})
+				this.goods = res.data;
+				
+				setTimeout(()=>{
+					_this.$refs.loading.hide()
+					_this.isLoading=false
+					if (_this.$isNotEmpty(_this.goods)&&_this.$isEmpty(_this.seatNum)) {
+						_this.$nextTick(function(){
+							_this.modalCheckedShow()
+						})
+					}
+				},200)
+				
+				
 			},
 			//初始化购物车
 			initCart() {
 				this.cartKey = this.$global.cart_prefix + this.shopId
-			
-				if (!this.$isEmpty(this.$cache.get(this.cartKey))) {
-					this.cart = this.$cache.get(this.cartKey)
+				if (this.$isEmpty(this.$cache.get(this.cartKey))) {
+					return
 				}
+				this.cart = this.$cache.get(this.cartKey)
 			},
 			putCart() {
 				this.$cache.put(this.cartKey, this.cart)
 			},
 			modalConfirm(index){
+				let takeType=this.checkList[index].name
+				if (takeType=='扫一扫店内下单') {
+					this.scanCodeOrder()
+					this.takeType=this.$global.takeType.dine_in
+					return
+				}
 				this.takeType=this.checkList[index].name
 				if (this.takeType==this.takeTypeGlobal.delivery) {
 					this.takeout()
 				}
 			},
+			scanCodeOrder(){
+				uni.scanCode({
+					success: (res) => {
+						_this.seatNum=this.$util.getUrlParams(res.result).seatNum
+						if (_this.$isEmpty(_this.seatNum)) {
+							_this.$dialog.showModal('非点餐二维码!',false)
+							_this.modalCheckedShow()
+							return
+						}
+					},
+					fail: (err) => {
+						_this.modalCheckedShow()
+					}
+				})
+			},
 			// 选择商家配送的方式下单
 			takeout() {
 				if (this.$isEmpty(this.vuex_userId)) {
@@ -658,13 +717,15 @@
 					return
 				}
 				let orderInfo={
+					shopDetail:this.shopDetail,
 					shopId:this.shopId,
 					cart:this.cart,
 					cartKey:this.cartKey,
 					takeType:this.takeType,
 					address:this.address,
 					store:this.appProperties,
-					address:this.address
+					address:this.address,
+					seatNum:this.seatNum
 				}
 				this.$u.vuex('vuex_orderInfo',orderInfo)
 				uni.navigateTo({

+ 215 - 152
pagesD/pages/pay/pay.vue

@@ -1,164 +1,172 @@
 <template>
 	<view class="content">
 		<view class="">
-			<view>
-				<!-- 地址栏 -->
-				<view v-if="takeType==tykeTypeGloabl.delivery" class="bg-white"
-					@click="$jump('/pagesD/pages/address/address')">
-					<view class="add-address-box u-flex u-flex-1" v-if="$isEmpty(address)">
-						<view class="box-bg u-p-30 u-flex-1 u-flex u-row-between">
-							<text class="select-notice">请选择收货地址</text>
-							<text class="cuIcon-right" style="color: #bfbfbf;"></text>
-						</view>
-					</view>
-					<view class="add-address-box u-p-20" v-else>
-						<view class="flex">
-							<view class="center  margin-right-20">
-								<view class="cuIcon cu-btn round bg-base xl " style="width: 80rpx;height: 80rpx;">
-									<text>{{ address.consignee.substring(0,1)}}</text>
-								</view>
+			<u-navbar :isBack="isBack" :title="title"></u-navbar>
+		</view>
+		<view class=""  v-show="!payShow">
+			<view class="">
+				<view>
+					<!-- 地址栏 -->
+					<view v-if="takeType==tykeTypeGloabl.delivery" class="bg-white"
+						@click="$jump('/pagesD/pages/address/address')">
+						<view class="add-address-box u-flex u-flex-1" v-if="$isEmpty(address)">
+							<view class="box-bg u-p-30 u-flex-1 u-flex u-row-between">
+								<text class="select-notice">请选择收货地址</text>
+								<text class="cuIcon-right" style="color: #bfbfbf;"></text>
 							</view>
-
-							<view class="" style="width: 90%;">
-								<view class="top u-flex">
-									<text class="name">{{ address.consignee }}</text>
-									<text class="phone">{{ address.phone }}</text>
-									<text class="tag" v-show="address.isDefault == 1">默认</text>
+						</view>
+						<view class="add-address-box u-p-20" v-else>
+							<view class="flex">
+								<view class="center  margin-right-20">
+									<view class="cuIcon cu-btn round bg-base xl " style="width: 80rpx;height: 80rpx;">
+										<text>{{ address.consignee.substring(0,1)}}</text>
+									</view>
 								</view>
-								<view class="detail u-flex u-row-between" style="width: 100%;">
-									<view class="address text-cut-1" style="width: 90%;">
-										{{ address.provinceName }}{{ address.cityName }}{{ address.areaName }}{{ address.address }}
+			
+								<view class="" style="width: 90%;">
+									<view class="top u-flex">
+										<text class="name">{{ address.consignee }}</text>
+										<text class="phone">{{ address.phone }}</text>
+										<text class="tag" v-show="address.isDefault == 1">默认</text>
+									</view>
+									<view class="detail u-flex u-row-between" style="width: 100%;">
+										<view class="address text-cut-1" style="width: 90%;">
+											{{ address.provinceName }}{{ address.cityName }}{{ address.areaName }}{{ address.address }}
+										</view>
+										<text class="cuIcon-right margin-left-20" style="color: #bfbfbf;"></text>
 									</view>
-									<text class="cuIcon-right margin-left-20" style="color: #bfbfbf;"></text>
 								</view>
 							</view>
+			
 						</view>
-
 					</view>
-				</view>
-
-				<view class="card" style="justify-content: flex-start;">
-					<text class="cuIcon-shop center text-base" style="font-size: 34rpx;"></text>
-					<text class="text-lg margin-left-10">{{vuex_orderInfo.store.shopName}}</text>
-				</view>
-				<view class="card text-df" @click="takeTypeShow=true">
-					<text class="text-gray">取餐方式</text>
-					<view class="">
-						<text>{{takeType}}</text>
-						<text class="cuIcon-right"></text>
+			
+					<view class="card" style="justify-content: flex-start;">
+						<text class="cuIcon-shop center text-base" style="font-size: 34rpx;"></text>
+						<text class="text-lg margin-left-10">{{vuex_orderInfo.store.shopName}}</text>
 					</view>
-				</view>
-				<view v-if="takeType==tykeTypeGloabl.dine_in" class="card text-df">
-					<text class="text-gray">取餐时间</text>
-					<view class="">
-						<text>立即用餐</text>
-						<text class="cuIcon-right"></text>
+					<view class="card text-df" @click="takeTypeShow=true">
+						<text class="text-gray">取餐方式</text>
+						<view class="">
+							<text>{{takeType}}</text>
+							<text class="cuIcon-right"></text>
+						</view>
 					</view>
-				</view>
-				<view v-if="takeType==tykeTypeGloabl.package" class="card text-df" @click="timeShow=true">
-					<view class="">
-						<text class="text-gray">自取时间</text>
-						<view class='cu-tag light sm round margin-left-10 bg-orange'>可预约</view>
+					<view v-if="takeType==tykeTypeGloabl.dine_in" class="card text-df">
+						<text class="text-gray">取餐时间</text>
+						<view class="">
+							<text>立即用餐</text>
+							<text class="cuIcon-right"></text>
+						</view>
 					</view>
-					<view class="">
-						<text>{{takeTime?takeTime:'请选择自取时间'}}</text>
-						<text class="cuIcon-right"></text>
+					<view v-if="takeType==tykeTypeGloabl.package" class="card text-df" @click="timeShow=true">
+						<view class="">
+							<text class="text-gray">自取时间</text>
+							<view class='cu-tag light sm round margin-left-10 bg-orange'>可预约</view>
+						</view>
+						<view class="">
+							<text>{{takeTime?takeTime:'请选择自取时间'}}</text>
+							<text class="cuIcon-right"></text>
+						</view>
 					</view>
-				</view>
-				<view v-if="takeType==tykeTypeGloabl.dine_in" class="card text-df center"
-					style="padding-top: 15rpx;padding-bottom: 15rpx;">
-					<text class="text-gray">取餐座位</text>
-					<view class="flex justify-end" style="width: 50%;">
-						<u-input v-model="seatNum" input-align="right" style="width: 62%;" placeholder="请输入取餐座号"
-							class="center"></u-input>
-						<text class="cuIcon-right center"></text>
+					<view v-if="takeType==tykeTypeGloabl.dine_in" class="card text-df center"
+						style="padding-top: 15rpx;padding-bottom: 15rpx;">
+						<text class="text-gray">取餐座位</text>
+						<view class="flex justify-end" style="width: 50%;">
+							<text>{{seatNum}}</text>
+							<text class="cuIcon-right center"></text>
+						</view>
 					</view>
-				</view>
-				<view v-if="takeType==tykeTypeGloabl.package" class="card text-df" style="border: none;">
-					<text class="text-gray">联系电话</text>
-					<view class="">
-						<text>{{vuex_phone}}</text>
-						<text class="cuIcon-right"></text>
+					<view v-if="takeType==tykeTypeGloabl.package" class="card text-df" style="border: none;">
+						<text class="text-gray">联系电话</text>
+						<view class="">
+							<text>{{vuex_phone}}</text>
+							<text class="cuIcon-right"></text>
+						</view>
 					</view>
 				</view>
-			</view>
-
-			<view style="margin-top: 20rpx;">
-				<u-read-more ref="uReadMore" close-text="展开更多" show-height="500" color="#999">
-					<view v-for="(item,index) in cart" :key="index" class="cart">
-						<view class="flex" style="width: 70%;">
-							<image :src="item.image" mode=""></image>
-							<view class="item-content">
-								<text class="text-cut-1">{{item.name}}</text>
-								<text class="text-cut-1">{{item.propertyStr ? item.propertyStr : item.name}}</text>
+			
+				<view style="margin-top: 20rpx;">
+					<u-read-more ref="uReadMore" close-text="展开更多" show-height="500" color="#999">
+						<view v-for="(item,index) in cart" :key="index" class="cart">
+							<view class="flex" style="width: 70%;">
+								<image :src="item.image" mode=""></image>
+								<view class="item-content">
+									<text class="text-cut-1">{{item.name}}</text>
+									<text class="text-cut-1">{{item.propertyStr ? item.propertyStr : item.name}}</text>
+								</view>
 							</view>
-						</view>
-						<view class="item-data">
-							<view class="">
-								<text class="text-sm">x</text>
-								<text class="text-lg" style="margin-left: 6rpx;">{{item.number}}</text>
+							<view class="item-data">
+								<view class="">
+									<text class="text-sm">x</text>
+									<text class="text-lg" style="margin-left: 6rpx;">{{item.number}}</text>
+								</view>
+								<text class="text-price text-lg">{{item.realPrice / 100}}</text>
 							</view>
-							<text class="text-price text-lg">{{item.realPrice / 100}}</text>
+						</view>
+					</u-read-more>
+					<!-- 商家配送 -->
+					<block v-if="takeType==tykeTypeGloabl.delivery">
+						<view class="card text-df">
+							<text class="text-gray">包装费</text>
+							<text class="text-price">{{vuex_orderInfo.store.packingPrice / 100}}</text>
+						</view>
+						<view class="card text-df">
+							<text class="text-gray">配送费</text>
+							<text class="text-price">{{vuex_orderInfo.store.sendingPrice / 100}}</text>
+						</view>
+					</block>
+					<!-- 到店自取 -->
+					<block v-if="takeType==tykeTypeGloabl.package">
+						<view class="card text-df">
+							<text class="text-gray">包装费</text>
+							<text class="text-price">{{vuex_orderInfo.store.packingPrice / 100}}</text>
+						</view>
+					</block>
+			
+					<view class="card" style="justify-content: flex-end;flex-direction: column;text-align: right;">
+						<view class="">
+							<text>总计:</text>
+							<text class="text-price text-bold text-xl">{{total / 100}}</text>
+						</view>
+						<view class="text-base text-sm margin-top-20">
+							* 以实际付款为准
 						</view>
 					</view>
-				</u-read-more>
-				<!-- 商家配送 -->
-				<block v-if="takeType==tykeTypeGloabl.delivery">
-					<view class="card text-df">
-						<text class="text-gray">包装费</text>
-						<text class="text-price">{{vuex_orderInfo.store.packingPrice / 100}}</text>
-					</view>
-					<view class="card text-df">
-						<text class="text-gray">配送费</text>
-						<text class="text-price">{{vuex_orderInfo.store.sendingPrice / 100}}</text>
-					</view>
-				</block>
-				<!-- 到店自取 -->
-				<block v-if="takeType==tykeTypeGloabl.package">
-					<view class="card text-df">
-						<text class="text-gray">包装费</text>
-						<text class="text-price">{{vuex_orderInfo.store.packingPrice / 100}}</text>
-					</view>
-				</block>
-
-				<view class="card" style="justify-content: flex-end;flex-direction: column;text-align: right;">
-					<view class="">
-						<text>总计:</text>
-						<text class="text-price text-bold text-xl">{{total / 100}}</text>
-					</view>
-					<view class="text-base text-sm margin-top-20">
-						* 以实际付款为准
+				</view>
+			
+				<view class="card margin-top-20">
+					<text>备注</text>
+					<view style="width: 80%;" class="flex justify-end" @click="goRemark">
+						<text class="text-gray" v-if="!remark">点击填写备注</text>
+						<text v-else class="text-cut-1 text-gray">{{remark}}</text>
+						<text class="cuIcon-right margin-left-10 center"></text>
 					</view>
 				</view>
-			</view>
-
-			<view class="card margin-top-20">
-				<text>备注</text>
-				<view style="width: 80%;" class="flex justify-end" @click="goRemark">
-					<text class="text-gray" v-if="!remark">点击填写备注</text>
-					<text v-else class="text-cut-1 text-gray">{{remark}}</text>
-					<text class="cuIcon-right margin-left-10 center"></text>
+				
+				<view class="margin-top-20">
+					<channel-list ></channel-list>
 				</view>
 			</view>
 			
-			<view class="margin-top-20">
-				<channel-list ></channel-list>
+			<!-- 付款栏 begin -->
+			<view class="" style="height: 140rpx;"></view>
+			<view class="footer-fixed pay-bar" style="z-index: 99;">
+				<view class="center" style="justify-content: flex-start;margin-left: 40rpx;">
+					<text>总计:</text>
+					<text class="text-price text-bold text-xl">{{total / 100}}</text>
+				</view>
+				<view @click="order" class="bg-base center text-lg" style="width: 25%;">
+					付款
+				</view>
 			</view>
-		</view>
+			<!-- 付款栏 end -->
+			
 
-		<!-- 付款栏 begin -->
-		<view class="" style="height: 140rpx;"></view>
-		<view class="footer-fixed pay-bar" style="z-index: 99;">
-			<view class="center" style="justify-content: flex-start;margin-left: 40rpx;">
-				<text>总计:</text>
-				<text class="text-price text-bold text-xl">{{total / 100}}</text>
-			</view>
-			<view @click="order" class="bg-base center text-lg" style="width: 25%;">
-				付款
-			</view>
 		</view>
-		<!-- 付款栏 end -->
-
+		<pay-confirm v-show="payShow" :info="info" @confirm="doWxPay(bills.id)" @cancel="cancelPay"></pay-confirm>
+		
+		<toast ref="toast" ></toast>
 		<!-- 取餐方式 -->
 		<u-picker @confirm="pickConfirm" confirm-color="#FF9447" mode="selector" v-model="takeTypeShow"
 			:range="takeTypeList"></u-picker>
@@ -167,20 +175,33 @@
 			:rangeEndTime="vuex_orderInfo.store.businessEndTime" intervalTime="30" dayStartIntTime="15" rangeDay="1"
 			:isNow="true" :isShow="timeShow" @closeAlert="handelClose">
 		</h-time-alert>
+		
+		<u-modal :mask-close-able="true" 
+		confirm-text="查看订单" cancel-text="继续点餐" :show-cancel-button="true"
+		content="付款成功"
+		 @cancel="continueOrdre" confirm-color="#FF9447"
+		 @confirm="viewOrder" v-model="paySuccessShow" title="提示">
+		</u-modal>
 	</view>
 </template>
 
 <script>
+	import payConfirm from '@/components/pay-confirm.vue'
 	import channelList from '@/components/channel-list.vue'
 	import global from "@/assets/http/global.js"
 	import hTimeAlert from "../../comps/h-time-alert.vue"
 	export default {
 		components: {
+			payConfirm,
 			channelList,
 			hTimeAlert
 		},
 		data() {
 			return {
+				//navbar
+				title:"付款",
+				isBack:true,
+				
 				shopId: '',
 				//购物车
 				cartKey: '',
@@ -214,7 +235,12 @@
 					pointsNum: 0,
 					//消耗现金值
 					amountNum: 0,
-				}
+				},
+				//支付确认
+				bills:{},
+				payShow:false,
+				info:{},
+				paySuccessShow:false
 			};
 		},
 		onLoad() {
@@ -230,6 +256,7 @@
 		},
 		computed: {
 			total() {
+				
 				this.totalNum = 0
 				const sum = this.cart.reduce((pre, item) => {
 					this.totalNum += item.number
@@ -249,6 +276,7 @@
 		},
 		methods: {
 			init() {
+				this.seatNum=this.vuex_orderInfo.seatNum
 				this.address = this.vuex_orderInfo.address
 				this.takeType = this.vuex_orderInfo.takeType
 				this.cart = this.vuex_orderInfo.cart
@@ -279,8 +307,6 @@
 				}
 			},
 			async order() {
-				this.$dialog.showLoading('付款中...')
-				
 				let params = {
 					receiveId: this.shopId,
 					payId: this.vuex_userId,
@@ -306,7 +332,7 @@
 					params.packingPrice = this.vuex_orderInfo.store.packingPrice
 
 					if (this.$isEmpty(this.takeTime)) {
-						this.$u.toast('请选择取餐时间')
+						this.$refs.toast.error('请选择取餐时间')
 						return
 					}else{
 						params.takeTime=this.takeTime
@@ -315,7 +341,7 @@
 
 				if (this.takeType == this.$global.takeType.delivery) {
 					if (this.$isEmpty(this.address)) {
-						this.$u.toast('请选择配送地址')
+						this.$refs.toast.error('请选择配送地址')
 						return
 					}
 					//商家配送,包装费,配送费
@@ -332,13 +358,28 @@
 				if (this.successParams.status == '付款成功') {
 					this.handelResult(true)
 				} else if (this.successParams.status == '待付款') {
-					this.doWxPay(this.successParams.bills.id)
+					this.bills=this.successParams.bills
+					if (this.bills.discount==-1) {
+						this.bills.discount=0
+					}
+					if (this.bills.cost==this.bills.price) {
+						this.doWxPay(this.bills.id)
+					}else{
+						this.info={
+							shop:this.vuex_orderInfo.shopDetail,
+							bills:this.bills,
+						}
+						this.title="支付确认"
+						this.isBack=false
+						this.payShow=true
+					}
 				} else {
 					this.handelResult(false)
 				}
 				uni.hideLoading()
 			},
 			async doWxPay(orderId) {
+				this.$dialog.showLoading('付款中...')
 				let obj = {
 					orderType: this.$global.orderType.USER_PAY,
 					orderId,
@@ -351,28 +392,50 @@
 				}).catch(err => {
 					this.handelResult(false)
 				})
+				uni.hideLoading()
 			},
 			handelResult(flag) {
-				console.log(flag,"flag");
 				if (flag) {
-					this.payResult = {
-						goodsBillsId:this.payParams.goodsBills.id,
-						isSuccess: true,
-						msg: "交易成功",
-						totalPrice: this.successParams.totalPrice,
-						amountNum: this.successParams.bills.price,
-						pointsNum: this.$digital.floatSub(this.successParams.totalPrice, this.successParams.bills
-							.price),
-					}
-				} else {
-					this.payResult.msg = '交易失败'
-					this.payResult.isSuccess = false
+					//跳转到支付页再到订单页
+					// this.payResult = {
+					// 	goodsBillsId:this.payParams.goodsBills.id,
+					// 	isSuccess: true,
+					// 	msg: "交易成功",
+					// 	totalPrice: this.successParams.totalPrice,
+					// 	amountNum: this.successParams.bills.price,
+					// 	pointsNum: this.$digital.floatSub(this.successParams.totalPrice, this.successParams.bills
+					// 		.price),
+					// }
+					//直接跳转到订单页
+					this.$cache.clear('cartKey')
+					this.paySuccessShow=true
+					return
 				}
-				console.log(this.payResult,'this.payResult');
+				this.payResult.msg = '交易失败'
+				this.payResult.isSuccess = false
 				uni.navigateTo({
 					url: "/pagesC/pages/checkstand/pay-result?payResult=" + JSON.stringify(this.payResult)
 				})
 			},
+			viewOrder(){
+				uni.reLaunch({
+					url:"/pagesD/pages/take-order/take-order?id="+this.payParams.goodsBills.id
+				})
+			},
+			continueOrdre(){
+				let params={
+					shopId:this.shopId,
+					seatNum:this.seatNum
+				}
+				uni.redirectTo({
+					url:"/pagesD/pages/menu/menu"+this.$u.queryParams(params)
+				})
+			},
+			cancelPay(){
+				this.title="收银台"
+				this.isBack=true
+				this.payShow=false
+			},
 		}
 	};
 </script>

+ 11 - 14
pagesD/pages/take-order/take-order.vue

@@ -72,6 +72,14 @@
 		<view class="section"></view>
 		
 		<view class="">
+			<view class="card text-df" >
+				<text class="text-gray">取单号</text>
+				<text class="">{{order.verifyNum}}</text>
+			</view>
+			<view class="card text-df" v-if="$isNotEmpty(order.seatNum) && order.seatNum !=-1">
+				<text class="text-gray">座位号</text>
+				<text class="">{{order.seatNum}}</text>
+			</view>
 			<view class="card text-df" >
 				<text class="text-gray">下单时间</text>
 				<text class="">{{order.createTime}}</text>
@@ -82,11 +90,11 @@
 			</view>
 			<view class="card text-df" >
 				<text class="text-gray">付款状态</text>
-				<text class="">{{order.orderStatus}}</text>
+				<text class="">{{order.payStatus}}</text>
 			</view>
 			<view class="card text-df" >
 				<text class="text-gray">订单状态</text>
-				<text class="">制作中</text>
+				<text class="">{{order.orderStatus}}</text>
 			</view>
 			<view class="card text-df" >
 				<text class="text-gray">订单号</text>
@@ -95,10 +103,6 @@
 		</view>
 		
 		<view class="">
-			<view class="card text-df" >
-				<text class="text-gray">取单号</text>
-				<text class="">{{order.verifyNum}}</text>
-			</view>
 			<view class="card text-df" >
 				<text class="text-gray">下单手机号</text>
 				<text class="">{{order.userPhone}}</text>
@@ -111,14 +115,7 @@
 				<text class="text-gray">取餐时间</text>
 				<text class="">{{order.takeTime || '立即就餐'}}</text>
 			</view>
-			<view class="card text-df" >
-				<text class="text-gray">取单号</text>
-				<text class="">{{order.verifyNum}}</text>
-			</view>
-			<view class="card text-df" v-if="$isNotEmpty(order.seatNum) && order.seatNum !=-1">
-				<text class="text-gray">座位号</text>
-				<text class="">{{order.seatNum}}</text>
-			</view>
+		
 		</view>
 		
 		

BIN
static/icon/logout.png


BIN
static/icon/my-order.png


BIN
static/icon/order6.png


BIN
static/icon/setting2.png


BIN
static/icon/todayOrder1.png


+ 17 - 0
utils/util.js

@@ -151,4 +151,21 @@ util.getBackParams = (paramsName) => {
 }
 
 
+/**
+ * 获取url参数
+ */
+util.getUrlParams=(p)=>{
+	let url = decodeURIComponent(p);
+	let param = {};
+	// 把参数按&拆分成数组
+	let index = url.indexOf("?");
+	let query = url.substring(index + 1, index.length);
+	var param_arr = query.split("&");
+	for (var i = 0; i < param_arr.length; i++) {
+		var pair = param_arr[i].split("=");
+		param[pair[0]] = pair[1];
+	}
+	return param
+}
+
 export default util