hmp 4 жил өмнө
parent
commit
72e48c4fdd

+ 1 - 1
App.vue

@@ -61,7 +61,7 @@
 </script>
 
 <style lang="scss">
-	@import "uview-ui/index.scss";
+	 @import "uview-ui/index.scss";
 	 @import "assets/colorui/main.css";
 	 @import "assets/colorui/icon.css";
 	 @import "assets/colorui/app.scss"; /* 你的项目css */

+ 31 - 0
assets/colorui/theme.scss

@@ -0,0 +1,31 @@
+// 此自定义uView主题生成于2021-10-21 09:57
+// 地址:http://www.uviewui.com/guide/theme.html
+
+$u-type-primary: #ff9447;
+$u-type-error: #fa3534;
+$u-type-warning: #ff9900;
+$u-type-success: #19be6b;
+$u-type-info: #909399;
+$u-type-primary-light: #fff4ed;
+$u-type-error-light: #fef0f0;
+$u-type-warning-light: #fdf6ec;
+$u-type-success-light: #dbf1e1;
+$u-type-info-light: #f4f4f5;
+$u-type-primary-dark: #e47a2e;
+$u-type-error-dark: #dd6161;
+$u-type-warning-dark: #f29100;
+$u-type-success-dark: #18b566;
+$u-type-info-dark: #82848a;
+$u-type-primary-disabled: #ffc8a1;
+$u-type-error-disabled: #fab6b6;
+$u-type-warning-disabled: #fcbd71;
+$u-type-success-disabled: #71d5a1;
+$u-type-info-disabled: #c8c9cc;
+$u-main-color: #303133;
+$u-content-color: #606266;
+$u-tips-color: #909399;
+$u-light-color: #c0c4cc;
+$u-border-color: #e4e7ed;
+$u-bg-color: #f3f4f6;
+$u-form-item-border-color: #dcdfe6;
+$u-form-item-height: 70rpx;

+ 3 - 1
assets/http/api.js

@@ -110,6 +110,9 @@ const mall = {
 
 //代理商
 const agenter = {
+	agentLevelList: p => http.get('ldt_agent/agent/list', {params: p}),
+	addAgentOrder: p => http.post('/app/agent/addAgentOrder', p),
+	
 	list: p => http.get('ldt_agent/agentrecord/list', {
 		params: p
 	}),
@@ -164,7 +167,6 @@ const pay = {
 }
 
 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

+ 4 - 1
components/channel-list.vue

@@ -54,8 +54,11 @@
 		methods:{
 			//获取用户渠道积分
 			getUserPonint(){
+				if (this.$isEmpty(this.vuex_userId)) {
+					return
+				}
 				let params={
-					userId:this.vuex_userId
+					userId:this.vuex_userId || '-1'
 				}
 				this.$api.userChannelPoint.list(params).then(res=>{
 					if (this.$isNotEmpty(res.data.records)) {

+ 6 - 1
components/login.vue

@@ -112,6 +112,11 @@
 						code: this.jscode
 					})
 					let openId = this.respLogin.data.openid
+					
+					if (this.$isEmpty(openId)) {
+						this.$u.toast('登录失败')
+						return
+					}
 					let unionid = this.respLogin.data.unionid || ''
 					this.sessionKey = this.respLogin.data.session_key
 					//通过openid查询数据库中该用户是否存在
@@ -284,7 +289,7 @@
 			}
 
 			button:last-child {
-				color: #2f7ff5;
+				color: $base-color;
 				border-radius: 0 0 18rpx 0;
 			}
 

+ 13 - 4
components/pay-confirm.vue

@@ -1,5 +1,5 @@
 <template>
-	<view style="background-color: #F1F1F1;min-height: 100vh">
+	<view >
 		<view class="center info" style="padding-bottom: 50rpx;">
 			<image v-if="paySuccess" src="/static/icon/pay-success.png" mode=""></image>
 			<image v-else :src="info.shop.cover" mode=""></image>
@@ -35,9 +35,13 @@
 					<text class="price reduce" :class="paySuccess?'text-color':'text-base'">{{info.bills.balanceNum || 0}}</text>
 				</view>
 			</view>
+			<view class="item">
+				<view class="left">平台交易服务费</view>
+				<view class="right"><text class="price reduce" >{{info.bills.fee || 0}}</text></view>
+			</view>
 			<view class="item">
 				<view class="left">积分交易手续费</view>
-				<view class="right"><text class="price" >{{info.bills.pointFee || 0}}</text></view>
+				<view class="right"><text class="price reduce" >{{info.bills.pointFee || 0}}</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;" v-text="paySuccess?'现金交易':'您仍需支付'"></view>
@@ -46,14 +50,14 @@
 			</view>
 		</view>
 
-		<view class="center flex-direction" style="margin-top: 150rpx;">
+		<view class="center flex-direction" style="padding: 100rpx;">
 			<text class="text-gray text-sm margin-bottom-20">感谢使用联兑通,越用越优惠</text>
 			<view @click="confirm" :class="paySuccess?'bg-green':'btn-bg-color'" class="cu-btn  flex  text-lg  round"
 				style="padding: 42rpx 0;width: 90%;">
 				<text v-text="paySuccess&&confirmText?confirmText:'确认支付'"></text>
 			</view>
 			<view @click="cancel" :class="paySuccess?'text-gray':'text-base'" class=" payConfirm"
-				style="margin-top: 50rpx;font-size: 28rpx;text-decoration: underline;">
+				style="margin-top: 50rpx;font-size: 30rpx;text-decoration: underline;">
 				<text v-text="paySuccess&&cancelText?cancelText:'暂不支付'"></text>
 			</view>
 		</view>
@@ -96,6 +100,11 @@
 </script>
 
 <style lang="scss">
+	.bg-green{
+		background-color: #19be6b;
+		color: #FFFFFF;
+	}
+	
 	.info {
 		display: flex;
 		justify-content: center;

+ 4 - 1
pages/consume/consume.vue

@@ -89,7 +89,10 @@
 				})
 			},
 			fetchMallList(){
-				this.$api.mall.list().then(res=>{
+				let params={
+					auditStatus:'PASS'
+				}
+				this.$api.mall.list(params).then(res=>{
 					this.mallList=res.data.records
 					this.$forceUpdate()
 					this.$refs.tabsSwiper.initSwiperHeight('.list1')

+ 1 - 1
pages/consume/detail/comps/shop-info.vue

@@ -24,7 +24,7 @@
 				<text class="right">{{detail.personName}}</text>
 			</view>
 			<view class="item">
-				<text class="left" style="width: 200rpx;">公司总类</text>
+				<text class="left" style="width: 200rpx;">经营类目</text>
 				<view class="right">
 					<u-tag color="#FF9447" style="margin-left: 10rpx;" :key="index1" v-for="(item1,index1) in tags"
 						:text="item1" size="mini" type="warning" mode="plain" />

+ 3 - 0
pages/gain/comps/card2.vue

@@ -116,6 +116,9 @@
 				}
 			}
 		},
+		created() {
+			this.fetchStatistics()
+		},
 		methods:{
 			login(){
 				this.$emit('login')

+ 31 - 4
pages/order/comps/card.vue

@@ -17,10 +17,21 @@
 			<view class="content">
 				<view class="flex flex-direction" style="line-height: 50rpx;">
 					<text>下单时间:{{item.createTime}}</text>
-					<text>点菜计数:{{item.goodsTotalNum}}</text>
+					<block>
+						<text>点菜计数:{{item.goodsTotalNum}}</text>
+						<view v-show="false">
+							<u-count-down v-if="item.payStatus=='待付款'&& item.orderStatus!='取消付款'" @end="timeup(item)"  :timestamp="getExpireTime(item)"></u-count-down>
+						</view>
+					</block>
 				</view>
-				<view class="">
-					<text class="price" style="color: #fd4908;font-size: 36rpx;">{{item.totalPrice / 100}}</text>
+				<view class="flex flex-direction">
+					<text class="price text-right" style="color: #fd4908;font-size: 36rpx;">{{item.totalPrice / 100}}</text>
+					<view class="center" v-if="item.payStatus=='待付款'">
+						<view class="cu-btn line-orange sm margin-top-10 round">
+							去支付
+							<text class="cuIcon-right"></text>
+						</view>
+					</view>
 				</view>
 			</view>
 		</view>
@@ -40,9 +51,24 @@ export default {
 	},
 	onLoad() {
 		
+	},
+	computed:{
+		 getExpireTime(){
+			return data=>{
+				let exTime = this.$dateTime.getTime(data.expireTime)
+				let nowTime = this.$dateTime.getTime()
+				let expireTime = (exTime - nowTime) / 1000
+				if (expireTime <= 0) {
+					expireTime = 0.1
+				}
+				return expireTime
+			}
+		},
 	},
 	methods:{
-		
+		timeup(item) {
+			this.$emit('timeup',item)
+		},
 	}
 };
 </script>
@@ -67,6 +93,7 @@ export default {
 			justify-content: space-between;
 			
 			image{
+				border-radius: 6rpx;
 				width: 50rpx;
 				height: 50rpx;
 				margin-right: 10rpx;

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

@@ -1,71 +0,0 @@
-<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.stop="$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>

+ 11 - 1
pages/order/comps/item.vue

@@ -1,6 +1,6 @@
 <template>
 	<MeScroll  :up="up" :down="down" @up="upFn" :fixed="false" @down="downFn" @init="initMeScroll">
-		<card :list="list" ></card>
+		<card :list="list" @timeup='timeup'></card>
 	</MeScroll>
 </template>
 <script>
@@ -52,6 +52,16 @@
 			}
 		},
 		methods: {
+			timeup(item){
+				let order = this.$u.deepClone(item)
+				order.payStatus = '取消付款'
+				order.orderStatus = '取消付款'
+				this.$api.goodsbills.submit(order).then(res => {
+					if (res.success) {
+						this.mescroll.resetUpScroll()
+					}
+				})
+			},
 			//初始化组件
 			initMeScroll(mescroll) {
 				this.mescroll = mescroll

+ 56 - 70
pages/order/order.vue

@@ -1,91 +1,77 @@
 <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>
+		<mescroll-body :height="height" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption"
+			:up="upOption">
+			<card :list="list" @timeup='timeup'></card>
+		</mescroll-body>
+		<toast ref="toast" ></toast>
 	</view>
 </template>
 <script>
-	import item from "./comps/item.vue"
+	import card from "./comps/card.vue"
+	import MescrollMixin from "@/components/mescroll-body/mescroll-mixins.js";
 	export default {
 		components:{
-			item
+			card
 		},
+		mixins: [MescrollMixin],
 		data() {
 			return {
-				current: 0,
-				swiperCurrent: 0,
-				tabs: [{
-						name: '今日订单',
-						value: 0
-					},
-					{
-						name: '全部订单',
-						value: 1
-					}
-				],
+				list: [],
+				downOption:{
+					auto:false
+				},
 			}
 		},
-		onLoad() {
-
+		onShow() {
+			if (this.canReset) {
+				this.mescroll.resetUpScroll()
+			}
+			this.canReset=true
 		},
 		methods: {
-			tabChange(index) {
-				this.current = index
-			},
-			swiperChange(e) {
-				uni.pageScrollTo({
-					scrollTop: 0,
-					duration: 0
-				});
-				this.current = e.detail.current
+			timeup(item){
+				let order = this.$u.deepClone(item)
+				order.payStatus = '取消付款'
+				order.orderStatus = '取消付款'
+				this.$api.goodsbills.submit(order).then(res => {
+					if (res.success) {
+						this.mescroll.resetUpScroll()
+					}
+				})
 			},
-			animationfinish({
-				detail: {
-					current
+			//上拉回调
+			upCallback(mescroll) {
+				let params={
+					payId:this.vuex_userId,
+					current:mescroll.num,
+					size:mescroll.size
+				}
+				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();
 				}
-			}) {
-				this.swiperCurrent = current;
-				this.current = current;
+			},
+			//下拉回调
+			downCallback(mescroll) {
+				setTimeout(()=>{
+					this.$refs.toast.info('刷新成功')
+					this.mescroll.resetUpScroll()
+				},500)
 			},
 		}
 	}
 </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 lang="scss">
+	
 </style>
+

+ 106 - 0
pages/order/ordre.vue

@@ -0,0 +1,106 @@
+<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 ref="mescrollItem" :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() {
+
+		},
+		onShow() {
+			if(this.canReset){
+				let curMescroll = this.getMescroll(this.current)
+				curMescroll && curMescroll.resetUpScroll()
+			}
+			this.canReset = true
+		},
+		methods: {
+			getMescroll(i){
+				let mescrollItems = this.$refs.mescrollItem;
+				if(mescrollItems){
+					let item = mescrollItems[i]
+					if(item) return item.mescroll
+				}
+				return null
+			},
+			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>

+ 4 - 11
pages/test/test.vue

@@ -1,29 +1,22 @@
 <template>
 	<view class="">
-		<u-count-down :timestamp="86400"></u-count-down>
-		<button @click="cityShow=!cityShow">打开</button>
-		<city-select v-model="cityShow" @city-change="cityChange"></city-select>
+		
 	</view>
 </template>
 
 <script>
-import citySelect from './u-city-select.vue';
 export default {
-	components: {
-		citySelect
-	},
+	name: '',
 	data() {
 		return {
-			cityShow:false
+			
 		};
 	},
 	onLoad() {
 		
 	},
 	methods:{
-		cityChange(e){
-			console.log(e);
-		}
+		
 	}
 };
 </script>

+ 2 - 2
pagesA/pages/bill/my-bills.vue

@@ -35,14 +35,14 @@
 					v-for="(item,index) in list" :key="index">
 					<view class="area1">
 						<view class="item-padding" v-if="item.type=='AGENT_CHARGE'">
-							<image  src="../../../static/logo.png" style="border-radius: 50%;" mode="aspectFit"></image>
+							<image  src="../../../static/logo.png" style="border-radius: 50%;" ></image>
 							<view class="">
 								<text>联兑通</text>
 								<text>{{item.createTime}}</text>
 							</view>
 						</view>
 						<view class="item-padding" v-else>
-							<image  :src="item.receiverLogo" style="border-radius: 50%;" mode="aspectFit"></image>
+							<image  :src="item.receiverLogo" style="border-radius: 50%;" ></image>
 							<view class="">
 								<text>{{item.receiverName}}</text>
 								<text>{{item.createTime}}</text>

+ 1 - 1
pagesA/pages/bill/statistics.vue

@@ -31,7 +31,7 @@
 				<view  class="item" hover-class="hoverClass" v-for="(item,index) in list" :key="index">
 					<view class="area1">
 						<view class="item-padding">
-							<image :src="item.receiverLogo" style="border-radius: 50%;" mode="aspectFit"></image>
+							<image :src="item.receiverLogo" style="border-radius: 50%;" ></image>
 							<view class="">
 								<text>{{item.receiverName}}</text>
 								<text>{{item.createTime}}</text>

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

@@ -38,7 +38,7 @@
 					v-for="(item,index) in list" :key="index">
 					<view class="area1">
 						<view class="item-padding">
-							<image  :src="item.logo?item.logo:'../../static/icon/shop_default.png'" style="border-radius: 50%;" mode="aspectFit"></image>
+							<image  :src="item.logo?item.logo:'../../static/icon/shop_default.png'" style="border-radius: 50%;" ></image>
 							<view class="">
 								<text>{{item.name || '暂无名称'}}</text>
 								<text>{{item.updateTime}}</text>

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

@@ -31,7 +31,7 @@
 				<view  class="item" hover-class="hoverClass" v-for="(item,index) in list" :key="index">
 					<view class="area1">
 						<view class="item-padding">
-							<image :src="item.logo" style="border-radius: 50%;" mode="aspectFit"></image>
+							<image :src="item.logo" style="border-radius: 50%;" ></image>
 							<view class="">
 								<text>{{item.name}}</text>
 								<text>{{item.updateTime}}</text>

+ 36 - 11
pagesA/pages/my-points/accredit.vue

@@ -19,9 +19,9 @@
 			</view>
 			
 			<view class="input">
-				<u-input :custom-style="customStyle" :height="90" v-model="value" type="text" :border="true" />
+				<u-input :custom-style="customStyle" placeholder="请输入来源平台账号" :height="80" v-model="value" type="text" :border="true" />
 				<view class="" style="height: 20rpx;"></view>
-				<u-input :height="90" v-model="value"  type="text" :border="true"/>
+				<u-input :height="80" v-model="value" placeholder="请输入验证码"  type="text" :border="true"/>
 				
 				<view class="margin-top-20">
 					<u-checkbox v-model="checked" name="同意">
@@ -30,7 +30,7 @@
 					</u-checkbox>
 				</view>
 				
-				<view class="flex justify-center align-center margin-top-50">
+				<view @click="submit" class="flex justify-center align-center margin-top-50">
 					<view class="cu-btn btn-bg-color round" style="padding: 40rpx 120rpx;">
 						提交授权
 					</view>
@@ -42,15 +42,15 @@
 		<view class="support">
 			<view class="padding-left-20 padding-bottom-50">
 				<text>支持平台</text>
-				<text style="color: #888888;padding-left: 10rpx;">(支持25家平台)</text>
+				<text style="color: #888888;padding-left: 10rpx;">(支持5家平台)</text>
 			</view>
 			
-			<view class="item" v-for="(item,index) in 10" :key="index">
+			<view class="item" v-for="(item,index) in list" :key="index">
 				<view class="left">
 					<view class="flex justify-center align-center">
-						<image src="@/static/icon/yidong.png" ></image>
+						<image :src="item.icon" ></image>
 					</view>
-					<text class="padding-left-10">中国移动</text>
+					<text class="padding-left-10">{{item.name}}</text>
 				</view>
 				
 				<view class="right">
@@ -61,6 +61,7 @@
 				</view>
 			</view>
 		</view>
+		<toast ref="toast" ></toast>
 	</view>
 </template>
 
@@ -69,11 +70,35 @@
 		data() {
 			return {
 				value:'',
-				checked:false
+				checked:false,
+				list:[
+					{
+						icon:'/pagesA/static/platform/yidong.png',
+						name:'中国移动'
+					},
+					{
+						icon:'/pagesA/static/platform/liantong.png',
+						name:'中国联通'
+					},
+					{
+						icon:'/pagesA/static/platform/dianxin.png',
+						name:'中国电信'
+					},
+					{
+						icon:'/pagesA/static/platform/gongshang.png',
+						name:'中国工商银行'
+					},
+					{
+						icon:'/pagesA/static/platform/guangfa.png',
+						name:'广发银行'
+					}
+				]
 			}
 		},
 		methods: {
-			
+			submit(){
+				this.$refs.toast.info('业务未开通')
+			}
 		}
 	}
 </script>
@@ -108,8 +133,8 @@
 			.top-right{
 				display: flex;
 				image{
-					width: 50rpx;
-					height: 50rpx;
+					width: 40rpx;
+					height: 40rpx;
 				}
 			}
 		}

+ 1 - 1
pagesA/pages/my-points/my-points.vue

@@ -43,7 +43,7 @@
 					v-for="(item,index) in list" :key="index">
 					<view class="area1">
 						<view class="item-padding">
-							<image :src="item.channelLogo" mode="aspectFit"></image>
+							<image :src="item.channelLogo" ></image>
 							<view class="">
 								<text>{{item.channelName}}</text>
 								<text>{{item.createTime}}</text>

+ 63 - 7
pagesB/pages/agent/agent.vue

@@ -1,10 +1,10 @@
 <template>
 	<view>
 		<view class="container">
-			<view class="title" style="padding: 50upx 0 30upx 30upx;">代理方式</view>
+			<view class="title" style="padding: 50upx 0 30upx 30upx;">推广员编号</view>
 			<view style="padding:0 10rpx 36rpx;">
 				<text class="cuIcon-title btn-color text-bold margin-left-10" style="font-size: 36rpx;"></text>
-				<text>渠道合伙人</text>
+				<text>{{salesmanId}}</text>
 			</view>
 			<view class="title padding">所在城市</view>
 			<u-picker mode="region" v-model="regionShow" :params="params" @confirm="getRegion"></u-picker>
@@ -54,13 +54,16 @@
 		<u-select v-model="bankTypeShow" :default-value="bankTypeDefaultValue" :list="bankTypeList" @confirm="bankTypeConfirm"></u-select>
 		<u-select v-model="bankAccountTypeShow" :default-value="bankAccountTypeDefaultValue" :list="bankAccountTypeList" @confirm="bankAccountTypeConfirm"></u-select>
 		<toast ref="toast" ></toast>
+		<login ref="login"  @signIn="signIn"></login>
 	</view>
 </template>
 
 <script>
+	import login from "@/components/login.vue"
 	import citySelect from '../../comps/u-city-select.vue';
 	export default {
 		components: {
+			login,
 			citySelect
 		},
 		data() {
@@ -83,10 +86,11 @@
 				originalBankModel:{},
 				model:{
 					accountId:'',
-					agentType:'渠道代理商',
+					agentType:'代理商',
 					agentArea:'',
 					areaCode:'',
 					enabled:0,//是否启用0
+					salesmanId:''
 				},
 				//银行对象
 				bankModel:{
@@ -105,8 +109,26 @@
 		onLoad() {
 			this.init()
 		},
+		onShow() {
+			this.login()
+		},
+		computed:{
+			salesmanId(){
+				if (this.$isNotEmpty(this.model.salesmanId)) {
+					return this.model.salesmanId
+				}
+				
+				if (this.$cache.get('salesmanId')) {
+					return this.$cache.get('salesmanId')
+				}
+				return '暂无'
+			}
+		},
 		methods: {
 			async init(){
+				if (this.$cache.get('salesmanId')) {
+					this.model.salesmanId=this.$cache.get('salesmanId')
+				}
 				this.model.accountId=this.vuex_userId
 				
 				this.bankModel.userId=this.vuex_userId
@@ -121,7 +143,7 @@
 			//回显 begin
 			fetchUserBank(){
 				let params={
-					userId:this.vuex_userId
+					userId:this.vuex_userId || '-1'
 				}
 				this.$api.userBank.list(params).then(res=>{
 					if (!this.$isEmpty(res.data.records)) {
@@ -132,10 +154,10 @@
 			},
 			fetchAgenter(){
 				let params={
-					userId:this.vuex_userId
+					accountId:this.vuex_userId || '-1'
 				}
 				this.$api.agenter.list(params).then(res=>{
-					if (!this.$isEmpty(res.data.records)) {
+					if (this.$isNotEmpty(res.data.records)) {
 						this.originalModel=res.data.records[0]
 						this.model=res.data.records[0]
 						this.region=this.model.province + '-' + this.model.city
@@ -187,6 +209,10 @@
 				this.model.areaCode=e.province.value+"0000,"+e.city.value+"00"
 			},
 			confirm() {
+				if (this.$isEmpty(this.vuex_userId)) {
+					this.showLogin()
+					return
+				}
 				if (this.$isEmpty(this.bankModel.phone)) {
 					this.$refs.toast.warn('请输入联系方式')
 					return
@@ -225,6 +251,36 @@
 					})
 				}
 			},
+			// 登录 begin
+			showLogin(){
+				this.$refs.login.show()
+			},
+			showPhoneModal(){
+				this.$refs.login.showPhoneModal()
+			},
+			signIn(resp){
+				//获取手机号
+				if (this.$isEmpty(this.vuex_phone)) {
+					this.showPhoneModal()
+				}else{
+					this.$refs.toast.info('登录成功')
+				}
+				//获取数据
+				this.init()
+			},
+			async login(e){
+				if (this.$isEmpty(this.vuex_userId)) {
+					this.showLogin()
+					return
+				}
+				//获取数据
+				this.init()
+				//获取手机号
+				if (this.$isEmpty(this.vuex_phone)) {
+					this.showPhoneModal()
+				}
+			},
+			// 登录 end
 		}
 	}
 </script>
@@ -233,7 +289,7 @@
 	.container {
 		background-color: #ffffff;
 		border-radius: 16upx;
-		margin: 30upx;
+		margin: 20upx;
 		.title {
 			font-size: 32upx;
 			font-weight: bold;

+ 2 - 2
pagesB/pages/agent/agentDetail.vue

@@ -21,8 +21,8 @@
 		},
 		onLoad(options) {
 			if (this.$isNotEmpty(options.scene)) {
-				let agenterId=decodeURIComponent(options.scene)
-				agenterId && this.$cache.put('agenterId',agenterId)
+				let salesmanId=decodeURIComponent(options.scene)
+				salesmanId && this.$cache.put('salesmanId',salesmanId)
 			}
 		},
 		methods: {

+ 38 - 37
pagesB/pages/agent/draw-poster.vue

@@ -1,19 +1,18 @@
 <template>
 	<view class="content">
 		<view style="display: flex;justify-content: center;align-items: center;margin: 10rpx;">
-			<image  @error="error" :show-menu-by-longpress="true" :src="posterUrl" 
-				style="margin: 10rpx;width: 100%;height: 1200rpx;" />
+			<image @error="draw" :show-menu-by-longpress="true" :src="posterUrl" style="margin: 10rpx;width: 100%;height: 1200rpx;" />
 		</view>
-		
+
 		<view v-if="posterUrl" @click="$mpi.savePhoto(posterUrl)" class="center" style="margin-top: 50rpx;">
 			<view class="cu-btn  flex  text-lg btn-bg-color radius" style="padding: 46rpx 0;width: 90%;">
 				保存图片
 			</view>
 		</view>
-		
+
 		<r-canvas ref="rCanvas"></r-canvas>
-		<view class="qrimg">
-			<tki-qrcode :size="300" ref="qrcode" :val="val" :show="false"  :showLoading="false" @result="qrR" />
+		<view class="qrimg" v-if="$isNotEmpty(val)">
+			<tki-qrcode :size="300" ref="qrcode" :val="val" :show="false" :showLoading="false" @result="qrR" />
 		</view>
 	</view>
 </template>
@@ -29,26 +28,28 @@
 		data() {
 			return {
 				//背景图
-				bgImg:'https://guosen-bucket-ldt.obs.cn-south-1.myhuaweicloud.com:443/aa85f1da8bd84ad2944fe88dd4ef7045-hyRO9DPsxdFr399bc3fe4c0fb52273af5c8f694e1356.png',
+				bgImg: 'https://guosen-bucket-ldt.obs.cn-south-1.myhuaweicloud.com:443/aa85f1da8bd84ad2944fe88dd4ef7045-hyRO9DPsxdFr399bc3fe4c0fb52273af5c8f694e1356.png',
 				//二维码内容
 				val: 'https://ldt.guosen-fumao.cn/wapp/qrcode?promotionCode=',
 				//二维码地址
 				qrUrl: '',
 				//海报地址
-				posterUrl:''
+				posterUrl: ''
 			}
 		},
-		onReady() {
-			this.val=this.val + this.vuex_userId
+		onLoad() {
 			if (this.$cache.get('posterUrl')) {
-				this.posterUrl=this.$cache.get('posterUrl')
-			}else{
-				this.$refs.qrcode._makeCode()
+				this.posterUrl = this.$cache.get('posterUrl')
+				return
 			}
+			this.draw()
 		},
 		methods: {
-			error(){
-				this.$refs.qrcode._makeCode()
+			draw(){
+				this.val=this.val + this.vuex_userId
+				this.$nextTick(function() {
+					this.$refs.qrcode._makeCode()
+				})
 			},
 			qrR(res) {
 				this.$dialog.showLoading('海报生成中')
@@ -60,19 +61,19 @@
 				let userInfo = (await this.$api.loginUser.detail({
 					id: this.vuex_userId
 				})).data
-				
-				let avatar= await this.$mpi.downloadFile(userInfo.avatar)
-				
+
+				let avatar = await this.$mpi.downloadFile(userInfo.avatar)
+
 				this.$nextTick(async () => {
-					const w=354
-					const h=600
+					const w = 354
+					const h = 600
 					// 初始化
 					await this.$refs.rCanvas.init({
 						canvas_id: "rCanvas",
-						canvas_width:w,
-						canvas_height:h,
-						background_color:"#fff",
-						hidden:true
+						canvas_width: w,
+						canvas_height: h,
+						background_color: "#fff",
+						hidden: true
 					})
 					// 画图
 					await this.$refs.rCanvas.drawImage({
@@ -87,7 +88,7 @@
 							icon: "none"
 						})
 					})
-					
+
 					//画二维码
 					await this.$refs.rCanvas.drawImage({
 						url: this.qrUrl,
@@ -101,7 +102,7 @@
 							icon: "none"
 						})
 					})
-					
+
 					//画头像
 					await this.$refs.rCanvas.drawImage({
 						url: avatar,
@@ -109,14 +110,14 @@
 						y: (h - 120),
 						w: 36,
 						h: 36,
-						border_radius:20
+						border_radius: 20
 					}).catch(err_msg => {
 						uni.showToast({
 							title: err_msg,
 							icon: "none"
 						})
 					})
-					
+
 					// 画文字
 					await this.$refs.rCanvas.drawText({
 						text: userInfo.nickName,
@@ -124,30 +125,30 @@
 						y: (h - 96),
 						font_color: "#000",
 						font_size: 16,
-						font_weight:800,
-						font_family:'PingFang-SC-Heavy'
+						font_weight: 800,
+						font_family: 'PingFang-SC-Heavy'
 					}).catch(err_msg => {
 						uni.showToast({
 							title: err_msg,
 							icon: "none"
 						})
 					})
-					
+
 					await this.$refs.rCanvas.drawText({
 						text: "我是联兑通合伙人",
 						max_width: 0,
 						x: 30,
-						y: (h -52),
+						y: (h - 52),
 						font_color: "#333333",
 						font_size: 14,
-						font_weight:300
+						font_weight: 300
 					}).catch(err_msg => {
 						uni.showToast({
 							title: err_msg,
 							icon: "none"
 						})
 					})
-					
+
 					await this.$refs.rCanvas.drawText({
 						text: "欢迎加入联兑通",
 						max_width: 0,
@@ -155,7 +156,7 @@
 						y: (h - 32),
 						font_color: "#333333",
 						font_size: 14,
-						font_weight:300
+						font_weight: 300
 					}).catch(err_msg => {
 						uni.showToast({
 							title: err_msg,
@@ -165,8 +166,8 @@
 
 					// 生成海报
 					await this.$refs.rCanvas.draw((res) => {
-						this.posterUrl=res.tempFilePath
-						this.$cache.put('posterUrl',this.posterUrl)
+						this.posterUrl = res.tempFilePath
+						this.$cache.put('posterUrl', this.posterUrl)
 						uni.hideLoading()
 					})
 				})

+ 49 - 53
pagesB/pages/agent/pay.vue

@@ -1,33 +1,26 @@
 <template>
 	<view>
 		<view class="text-center" style="margin-top: 120upx;">
-			<view class="text-gray  text-df padding">待支付</view>
+			<u-icon name="clock-fill" color="#FF9447" size="140"></u-icon>
+			<view class="text-gray  text-df padding-20">待支付</view>
 			<view class="theme-color ">
-				<text style="font-size: 48upx;">¥</text>
-				<text style="font-size: 72upx;">{{detail.cost}}</text>
+				<text style="font-size: 60upx;" class="price">{{agent.league}}</text>
 			</view>
-			<view class="text-black text-lg margin-top">渠道合伙人-保证金</view>
 		</view>
-		<view class="container">
-			<view style="padding: 40upx 0 30upx 30upx;font-size: 30upx;font-weight: bold;">支付方式</view>
-			<block v-for="(item, index) in ways" :key="index">
-				<view class="flex align-center justify-between padding" @click="change(index)">
-					<view class="flex align-center">
-						<image class="margin-right" :src="item.icon" style="width: 50upx;height: 50upx;"></image>
-						<view>{{item.name}}</view>
-					</view>
-					<view :class="current == index ? 'theme-color cuIcon-roundcheckfill' : 'cuIcon-round'" style="font-size: 40upx;"></view>
-				</view>
-			</block>
+		<view class="container" style="padding: 20rpx 30rpx;">
+			<u-form :label-style="{'fontWeight':800,'fontSize':'30rpx'}" :border-bottom="false" :model="form" ref="uForm" label-width="150">
+				<u-form-item label="代理级别"><u-input v-model="agent.level" type="select"  @click="levelsShow=true" :select-open="levelsShow"/></u-form-item>
+			</u-form>
 		</view>
-		
+
 		<view class="bottom-bar safe-area-inset-bottom " style="margin-top: 120rpx;">
 			<view @click="pay" class="bg-gradual-base cu-btn round" style="width: 100%;padding: 46rpx;">
 				确认支付
 			</view>
 		</view>
-	
-		<u-popup v-model="successShow" mode="center" :mask-close-able="false" width="550" height="500" border-radius="30">		
+
+		<u-popup v-model="successShow" mode="center" :mask-close-able="false" width="550" height="500"
+			border-radius="30">
 			<view class="text-center padding">
 				<image src="/pagesB/static/pic_agent.png" style="width: 109upx;height: 122upx;"></image>
 				<view style="font-size: 34upx;color: #FF9447;font-weight: bold;padding: 30upx 0 10upx 0;">恭喜您成为代理</view>
@@ -37,6 +30,8 @@
 				</view>
 			</view>
 		</u-popup>
+		
+		<u-picker mode="selector" @confirm="levelConfirm" v-model="levelsShow" :range="levels" range-key="level" :default-selector="[0]"></u-picker>
 	</view>
 </template>
 
@@ -45,62 +40,63 @@
 		data() {
 			return {
 				successShow: false,
-				ways: [
-					{name: '微信支付', icon: '/pagesB/static/icon_weixin.png'}
-				],
-				current: 0,
+				levelsShow:false,
+				levels: [],
+				
+				agent:{},
 				
-				detail:{}
 			}
 		},
 		onLoad() {
-			this.fetchDetail()
+			if (this.$isEmpty(this.vuex_userId)) {
+				this.$dialog.showModal('系统错误', false).then(res => {
+					uni.reLaunch({
+						url: "/pages/gain/gain?current=1"
+					})
+				})
+				return
+			}
+			this.fetchAgentLevelList()
 		},
 		methods: {
-			fetchDetail(){
-				this.$api.agenterType.detail({settingKey:this.$global.agenterTypeId}).then(res=>{
-					this.detail=JSON.parse(res.data.settingValue)
-				})
+			levelConfirm(e){
+				this.agent=this.levels[e[0]]
 			},
-			change(index) {
-				this.current = index;
+			fetchAgentLevelList(){
+				this.$api.agenter.agentLevelList().then(res=>{
+					this.levels=res.data.records
+					this.agent=this.levels[0]
+				})
 			},
 			async pay() {
-				let exTime= this.$dateTime.getExpireTime(5)
-				let billRecord={
-						appid:this.$global.wxParams.APPID,
-						openid:this.$cache.get('userInfo').openId,
-						payId:this.vuex_userId,
-						price:this.detail.cost,
-						channel: this.$global.paymentType.YEE_PAY,
-						payway: this.$global.paymentScene.MINI_PROGRAM,
-						cost:this.detail.cost,
-						discount: 1.00,
-						type:this.$global.orderType.AGENT_CHARGE,
-						// payAmount:this.detail.cost,
-						title:'渠道合伙人充值',
-						exTime
+				let agentLeague={
+					userId:this.vuex_userId,
+					agentId:this.agent.id,
+					league:this.agent.league,
+					payStatus:'待付款',
+					appid: this.$global.wxParams.APPID,
+					openid: this.$cache.get('userInfo').openId,
 				}
-				let resp=await this.$api.billRecord.addAgentOrder(billRecord)
+				let resp = await this.$api.agenter.addAgentOrder(agentLeague)
 				if (!resp.success) {
 					return
 				}
-				let params={
-					orderType:this.$global.orderType.AGENT_CHARGE,
+				let params = {
+					orderType: this.$global.orderType.AGENT_CHARGE,
 					orderId: resp.data.id,
-					payStatus:this.$global.payStatus.IS_WAIT
+					payStatus: this.$global.payStatus.IS_WAIT
 				}
-				let res=await this.$api.pay.payOrder(params)
-				let prePayTn= JSON.parse(res.data.prePayTn)
-				this.$mpi.requestPayment(prePayTn).then(()=>{
+				let res = await this.$api.pay.payOrder(params)
+				let prePayTn = JSON.parse(res.data.prePayTn)
+				this.$mpi.requestPayment(prePayTn).then(() => {
 					this.successShow = true;
 				})
 			},
 			confirm() {
 				this.successShow = false
-				this.$u.vuex('vuex_agenter_type',this.$global.userType.CHANNEL)
+				this.$u.vuex('vuex_agenter_type', this.$global.userType.CHANNEL)
 				uni.reLaunch({
-					url:"../../../pages/gain/gain?current=1",
+					url: "../../../pages/gain/gain?current=1",
 				})
 			}
 		}

BIN
pagesB/static/wait.png


+ 13 - 4
pagesC/pages/checkstand/index.vue

@@ -27,11 +27,10 @@
 				</view>
 			</view>
 			
+			<!-- #ifdef  MP-WEIXIN-->
 			<view style="margin-top: -20rpx;">
 				<channel-list ></channel-list>
 			</view>
-			<!-- #ifdef  MP-WEIXIN-->
-			
 			<!-- #endif -->
 			
 			<amountInput ref="amountInput" confirmText="付款" btnColor="#ff9900" placeholder="请输入交易金额" @change="change"
@@ -105,7 +104,7 @@
 			}
 
 			// #ifdef  MP-WEIXIN
-			//如果是新用户通过微信支付扫码进入此页面,跳回首页
+			//如果是新用户通过h5微信支付扫码进入此页面,跳回首页
 			if (this.$isEmpty(this.vuex_userId)) {
 				uni.reLaunch({
 					url: "/pages/mine/mine?query=" + this.shopId + ";" + this.orderAmount
@@ -134,6 +133,10 @@
 			console.log(this.orderAmount);
 		},
 		methods: {
+			isWxBrowser(){
+				let na = navigator.userAgent.toLowerCase()
+				return na.indexOf('micromessenger') !== -1
+			},
 			//防抖支付
 			debouncePay() {
 				if (this.isFirstPay) {
@@ -230,7 +233,13 @@
 					return
 				}
 				// #ifdef  H5
-				this.modalShow = true
+				if (this.$isWxBrowser()) {
+					//如果是微信浏览器打开
+					this.modalShow = true
+				}else{
+					//直接支付
+					this.payOfh5()
+				}
 				// #endif
 
 				// #ifdef MP-WEIXIN

+ 40 - 35
pagesC/pages/checkstand/pay-qrcode.vue

@@ -23,9 +23,11 @@
 		</view>
 		<view class="footer center flex-direction">
 			<text class="text-xl text-bold">{{nickName}}</text>
-			<view class="" style="width: 100%;padding: 0;">
-				<channel-list ></channel-list>
+			<!-- #ifdef  MP-WEIXIN-->
+			<view style="width: 100%;padding: 0;">
+				<channel-list></channel-list>
 			</view>
+			<!-- #endif -->
 		</view>
 	</view>
 </template>
@@ -45,7 +47,7 @@
 		computed: {
 			content() {
 				let transformStr = this.id
-				return transformStr + this.secret+";"+(this.vuex_channel?this.vuex_channel.id:0)
+				return transformStr + this.secret + ";" + (this.vuex_channel ? this.vuex_channel.id : 0)
 			}
 		},
 		data() {
@@ -70,9 +72,9 @@
 					//总价
 					totalPrice: 0,
 					//消耗积分值
-					pointsNum:0,
+					pointsNum: 0,
 					//消耗现金值
-					amountNum:0,
+					amountNum: 0,
 				}
 			}
 		},
@@ -124,14 +126,14 @@
 						this.receiveId = res.receiveId
 						this.payResult.totalPrice = res.cost
 						this.payResult.amountNum = res.price
-						this.payResult.pointsNum =this.$digital.floatSub(res.cost,res.price)
+						this.payResult.pointsNum = this.$digital.floatSub(res.cost, res.price)
 						//调起微信支付
 						this.toPay(res.id)
 					}
 					if (res.isSuccess) {
 						console.log(res);
-						this.payResult=res
-						this.payResult.pointsNum=res.totalPrice
+						this.payResult = res
+						this.payResult.pointsNum = res.totalPrice
 						this.payResult.amountNum = 0
 						uni.navigateTo({
 							url: "/pagesC/pages/checkstand/pay-result?payResult=" + JSON.stringify(res),
@@ -208,31 +210,32 @@
 	}
 </style>
 <style lang="scss" scoped>
-	.popup-content{
+	.popup-content {
 		display: flex;
 		flex-direction: column;
 		justify-content: space-between;
 		padding: 40rpx 0;
 		height: 100%;
-		
-		.channelbtn{
+
+		.channelbtn {
 			background-color: #18b566;
 			color: #FFFFFF;
 			padding: 36rpx 150rpx;
 		}
-		
-		.channel-item{
+
+		.channel-item {
 			position: relative;
 			display: flex;
 			padding: 30rpx;
 			border-bottom: 1rpx solid #eee;
-			image{
+
+			image {
 				width: 40rpx;
 				height: 40rpx;
 				margin-right: 10rpx;
 			}
-			
-			.checked{
+
+			.checked {
 				color: #18b566;
 				font-size: 34rpx;
 				position: absolute;
@@ -240,54 +243,56 @@
 				right: 40rpx;
 				bottom: 30rpx;
 			}
-			
+
 		}
 	}
-	
-	
-	
-	.channel{
+
+
+
+	.channel {
 		display: flex;
 		justify-content: space-between;
 		margin-top: 40rpx;
-		
-		.left{
+
+		.left {
 			display: flex;
-			image{
+
+			image {
 				width: 60rpx;
 				height: 60rpx;
 				display: flex;
 				justify-content: center;
 				align-items: center;
 			}
-			view{
+
+			view {
 				display: flex;
 				flex-direction: column;
 			}
-			
-			.content{
+
+			.content {
 				margin-left: 16rpx;
-				
-				text:first-child{
+
+				text:first-child {
 					font-size: 34rpx;
 					margin-bottom: 10rpx;
 				}
-				
-				text:last-child{
+
+				text:last-child {
 					font-size: 28rpx;
 					color: #989898;
 				}
 			}
 		}
-		
-		.right{
+
+		.right {
 			display: flex;
 			justify-content: center;
 			align-items: center;
 		}
-		
+
 	}
-	
+
 	.code-container {
 		background-color: #FFFFFF;
 		border-radius: 16rpx;

+ 3 - 3
pagesD/pages/menu/menu.vue

@@ -29,7 +29,7 @@
 									<text style="font-size: 36rpx;font-weight: 800;">{{appProperties.shopName}}</text>
 								</view>
 							</view>
-							<view @click="modalCheckedShow" class="cu-btn round bg-red sm" style="font-size: 24rpx;">
+							<view @click="modalCheckedShow" class="cu-btn round  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>
@@ -287,8 +287,8 @@
 				shopDetail: {},
 				appProperties: {
 					"shopName": "",
-					"sendingPrice": 100, // 商家配送费
-					"packingPrice": 100, // 包装费
+					"sendingPrice": 1, // 商家配送费
+					"packingPrice": 1, // 包装费
 					"sendingNeedLeastPrice": 2000, // 起送需要的最低价格
 					"businessStartTime": '09:00:00', // 营业开始时间, 开始的点必须在结束之前
 					"businessEndTime": '22:00:00', // 营业结束时间

+ 8 - 5
pagesD/pages/pay/pay.vue

@@ -143,10 +143,11 @@
 						<text class="cuIcon-right margin-left-10 center"></text>
 					</view>
 				</view>
-
+				<!-- #ifdef  MP-WEIXIN-->
 				<view class="margin-top-20">
 					<channel-list></channel-list>
 				</view>
+				<!-- #endif -->
 			</view>
 
 			<!-- 付款栏 begin -->
@@ -169,7 +170,7 @@
 
 		<toast ref="toast"></toast>
 		<!-- 取餐方式 -->
-		<u-picker @confirm="pickConfirm" confirm-color="#FF9447" mode="selector" v-model="takeTypeShow"
+		<u-picker @confirm="pickConfirm" confirm-color="#FF9447" :default-selector="defaultSelector" mode="selector" v-model="takeTypeShow"
 			:range="takeTypeList"></u-picker>
 		<!-- 自取时间 -->
 		<h-time-alert title="自取时间" :rangeStartTime="vuex_orderInfo.store.businessStartTime"
@@ -238,6 +239,7 @@
 			};
 		},
 		onLoad() {
+			
 			this.init()
 			uni.$on('REMARK', (remark) => {
 				this.remark = remark
@@ -250,7 +252,6 @@
 		},
 		computed: {
 			total() {
-
 				this.totalNum = 0
 				const sum = this.cart.reduce((pre, item) => {
 					this.totalNum += item.number
@@ -267,6 +268,9 @@
 				}
 				return sum
 			},
+			defaultSelector(){
+				return 	[this.takeTypeList.indexOf(this.takeType)]
+			}
 		},
 		methods: {
 			init() {
@@ -290,9 +294,8 @@
 					//商家配送,总价格低于配送费
 					this.modalShow = true
 					return
-				} else {
-					this.takeType = takeType
 				}
+				this.takeType = takeType
 			},
 			handelClose(data) {
 				this.timeShow = false;

+ 19 - 4
pagesD/pages/take-order/take-order.vue

@@ -160,7 +160,7 @@
 						</view>
 					</view>
 					<view class="right">
-						<view @click="toPay" v-if="order.payStatus=='待付款'&&order.orderStatus!='取消付款'"
+						<view @click="doWxPay" v-if="order.payStatus=='待付款'&&order.orderStatus!='取消付款'"
 							class="buy btn u-line-1">立即付款</view>
 						<view @click="againOrder" v-else class="buy btn u-line-1">再来一单</view>
 					</view>
@@ -241,7 +241,6 @@
 				if (this.expireTime <= 0) {
 					this.expireTime = 0.1
 				}
-
 			},
 			timeup() {
 				let order = this.$u.deepClone(this.order)
@@ -270,8 +269,24 @@
 				this.$cache.put(cartKey, cart)
 				this.continueOrdre()
 			},
-			toPay() {
-				this.$refs.toast.warn('业务未实现')
+			async doWxPay() {
+				let obj = {
+					orderType: this.$global.orderType.USER_PAY,
+					orderId:this.order.billsId,
+					payStatus: this.$global.payStatus.IS_WAIT
+				}
+				let res = await this.$api.pay.payOrder(obj)
+				if (res.data.message!='成功') {
+					this.$refs.toast.error(res.data.message)
+					return
+				}
+				let prePayTn = JSON.parse(res.data.prePayTn)
+				this.$mpi.requestPayment(prePayTn).then((res) => {
+					this.$refs.toast.info('支付成功')
+					this.fetchDetail()
+				}).catch(err => {
+					this.$refs.toast.error('支付失败')
+				})
 			},
 			goMap() {
 				let latitude = parseInt(this.shop.latitude)

BIN
static/icon/1634805315(1).jpg


+ 3 - 1
uni.scss

@@ -1,6 +1,8 @@
-@import 'uview-ui/theme.scss';
+// @import 'uview-ui/theme.scss';
+@import  'assets/colorui/theme.scss';
 /* 行为相关颜色 */
 $base-color:#FF9447;
+$color:#FF9447;
 $uni-color-primary: #007aff;
 $uni-color-success: #4cd964;
 $uni-color-warning: #f0ad4e;

+ 6 - 6
utils/mixin.js

@@ -34,12 +34,12 @@ let page = {
 				})
 				return
 			}
-			if (currentPage.indexOf('pages/agent/') != -1) {
-				uni.reLaunch({
-					url: "/pages/gain/gain?current=1"
-				})
-				return
-			}
+			// if (currentPage.indexOf('pages/agent/') != -1) {
+			// 	uni.reLaunch({
+			// 		url: "/pages/gain/gain?current=1"
+			// 	})
+			// 	return
+			// }
 		}
 	}
 }

+ 1 - 0
utils/util.js

@@ -105,6 +105,7 @@ util.isReloadAndBack = () => {
 		delta:1
 	})
 }
+
 //onshow方法通过刷新mescroll数据
 util.reload = (mescroll) => {
     let page= util.getPageCtx()