hmp %!s(int64=4) %!d(string=hai) anos
pai
achega
077829bfcc

+ 104 - 0
assets/http/api-old.js

@@ -0,0 +1,104 @@
+import {http} from './service.js'
+
+
+//文件上传
+const uploadFile =(p)=> http.upload('blade-resource/oss/endpoint/put-file', {name:'file',filePath:p})
+
+
+//字典
+const dict={
+	list:p => http.get('/blade-system/dict-biz/dictionary', {params:p}),
+	parentList:p => http.get('/blade-system/dict-biz/parent-list', {params:p}),
+	dictionaryTree:p => http.get('/blade-system/dict-biz/dictionary-tree', {params:p}),
+}
+
+
+
+//手机验证码
+const sms={
+	send:p => http.post('/sms/sendSms'+p) //isdo
+}
+
+const mall={
+	//获取商场列表
+	list:p => http.get('ldt_mall/mall/list',{params:p}),//isdo
+	//获取商场区域
+	getMallAreaByMallId:p => http.get('cyzh-ldt/app/mall/getMallAreaByMallId?mallId='+p),
+	//获取标签
+	getShopLabelByMallId:p => http.get("cyzh-ldt/app/mall/getShopLabelByMallId?mallId="+p),
+	//全部标签
+	getShopLabelAll:p => http.get("cyzh-ldt/gxlabel/list",{params:p}),
+	
+}
+
+//商户管理
+const shop={
+	//获取商户列表
+	list:p => http.get('cyzh-ldt/shop/list',{params:p}),
+	detail:p => http.get('cyzh-ldt/shop/detail',{params:p}),
+	submit:(p)=> http.post('cyzh-ldt/shop/submit',p),
+	statistic:p => http.get('cyzh-ldt/app/shop/statistic?shopId='+p),
+	payBefore:p => http.post('cyzh-ldt/loginuser/payBeforeNew',p),
+	yingshouPage:p => http.get('cyzh-ldt/app/shop/getYingShouPage',{params:p}),
+	remainDetailPage:p => http.get('cyzh-ldt/app/shop/getRemainDetailPage',{params:p}),
+	//支付策略
+	getPointPayType:p => http.post('cyzh-ldt/loginuser/getPointPayType',p),
+}
+
+const memberCenter={
+	list:p => http.get('cyzh-ldt/app/shop/getMembersByShopId',{params:p}),
+	create:(p)=> http.post('cyzh-ldt/app/shop/createMemberCenter',p),
+	update:(p)=> http.post('cyzh-ldt/app/shop/updateMemberCenter',p),
+	billList:(p)=> http.get('cyzh-ldt/app/shop/getMemberBillRecord',{params:p})
+}
+
+
+const activity={
+	publish:(p)=> http.post('/cyzh-ldt/activity/submit',p),
+	list:p => http.get("cyzh-ldt/app/shop/getActivity", {params:p}),
+	//结束活动
+	stop:(p)=> http.post('/cyzh-ldt/activity/updateBatch',p),
+	//退出活动
+	exit:(p)=> http.post('cyzh-ldt/activityjoinrecord/exitBatch',p),
+	//参加活动
+	join:(p)=> http.post('cyzh-ldt/activityjoinrecord/submit',p),
+	//活动详情
+	detail:p => http.get("/cyzh-ldt/activity/detail", {params:p}),
+}
+
+
+//用户银行
+const userBank={
+	detail:p => http.get('cyzh-ldt/userbank/detail',{params:p}),
+	list:p => http.get('cyzh-ldt/userbank/list',{params:p}),
+	appList:p => http.get('cyzh-ldt/userbank/appList',{params:p}),
+	submit:p => http.post('cyzh-ldt/userbank/submit', p),
+	remove:p => http.post('cyzh-ldt/userbank/remove?ids='+p),
+}
+
+//accout
+const accout={
+	register:p => http.post('/shop/account/register',p),//isdo
+	login:p => http.post('shop/account/login',p),
+	modifPaw:p => http.post('cyzh-ldt/appaccount/setPassword',p),
+	forgetPaw:p => http.post('cyzh-ldt/appaccount/forgetPassword',p),
+}
+
+//webSocket
+const webSocket={
+	sendInfo:p => http.post('cyzh-ldt/webSocket/sendInfo',p),
+}
+
+
+export const api={
+	uploadFile,
+	dict,
+	sms,
+	mall,
+	shop,
+	memberCenter,
+	activity,
+	userBank,
+	accout,
+	webSocket
+}

+ 10 - 58
assets/http/api.js

@@ -12,61 +12,29 @@ const dict={
 	dictionaryTree:p => http.get('/blade-system/dict-biz/dictionary-tree', {params:p}),
 }
 
-
-
 //手机验证码
 const sms={
-	send:p => http.post('/sms/sendSms'+p) //isdo
+	send:p => http.post('/sms/sendSms'+p)
 }
 
 const mall={
 	//获取商场列表
-	list:p => http.get('ldt_mall/mall/list',{params:p}),//isdo
-	//获取商场区域
-	getMallAreaByMallId:p => http.get('cyzh-ldt/app/mall/getMallAreaByMallId?mallId='+p),
-	//获取标签
-	getShopLabelByMallId:p => http.get("cyzh-ldt/app/mall/getShopLabelByMallId?mallId="+p),
-	//全部标签
-	getShopLabelAll:p => http.get("cyzh-ldt/gxlabel/list",{params:p}),
-	
+	list:p => http.get('ldt_mall/mall/list',{params:p}),
 }
 
 //商户管理
 const shop={
-	//获取商户列表
-	list:p => http.get('cyzh-ldt/shop/list',{params:p}),
-	detail:p => http.get('cyzh-ldt/shop/detail',{params:p}),
-	submit:(p)=> http.post('cyzh-ldt/shop/submit',p),
-	statistic:p => http.get('cyzh-ldt/app/shop/statistic?shopId='+p),
-	payBefore:p => http.post('cyzh-ldt/loginuser/payBeforeNew',p),
-	yingshouPage:p => http.get('cyzh-ldt/app/shop/getYingShouPage',{params:p}),
-	remainDetailPage:p => http.get('cyzh-ldt/app/shop/getRemainDetailPage',{params:p}),
-	//支付策略
-	getPointPayType:p => http.post('cyzh-ldt/loginuser/getPointPayType',p),
-}
-
-const memberCenter={
-	list:p => http.get('cyzh-ldt/app/shop/getMembersByShopId',{params:p}),
-	create:(p)=> http.post('cyzh-ldt/app/shop/createMemberCenter',p),
-	update:(p)=> http.post('cyzh-ldt/app/shop/updateMemberCenter',p),
-	billList:(p)=> http.get('cyzh-ldt/app/shop/getMemberBillRecord',{params:p})
+	submitAudit:p => http.post('/shop/submitAudit',p),
+	list:p => http.get('ldt_shop/shop/list',{params:p}),
+	detail:p => http.get('ldt_shop/shop/detail',{params:p}),
 }
 
-
-const activity={
-	publish:(p)=> http.post('/cyzh-ldt/activity/submit',p),
-	list:p => http.get("cyzh-ldt/app/shop/getActivity", {params:p}),
-	//结束活动
-	stop:(p)=> http.post('/cyzh-ldt/activity/updateBatch',p),
-	//退出活动
-	exit:(p)=> http.post('cyzh-ldt/activityjoinrecord/exitBatch',p),
-	//参加活动
-	join:(p)=> http.post('cyzh-ldt/activityjoinrecord/submit',p),
-	//活动详情
-	detail:p => http.get("/cyzh-ldt/activity/detail", {params:p}),
+//账号
+const accout={
+	register:p => http.post('/shop/account/register',p),
+	login:p => http.post('/shop/account/login',p),
 }
 
-
 //用户银行
 const userBank={
 	detail:p => http.get('cyzh-ldt/userbank/detail',{params:p}),
@@ -76,19 +44,6 @@ const userBank={
 	remove:p => http.post('cyzh-ldt/userbank/remove?ids='+p),
 }
 
-//accout
-const accout={
-	register:p => http.post('/shop/account/register',p),//isdo
-	login:p => http.post('shop/account/login',p),
-	modifPaw:p => http.post('cyzh-ldt/appaccount/setPassword',p),
-	forgetPaw:p => http.post('cyzh-ldt/appaccount/forgetPassword',p),
-}
-
-//webSocket
-const webSocket={
-	sendInfo:p => http.post('cyzh-ldt/webSocket/sendInfo',p),
-}
-
 
 export const api={
 	uploadFile,
@@ -96,9 +51,6 @@ export const api={
 	sms,
 	mall,
 	shop,
-	memberCenter,
-	activity,
-	userBank,
 	accout,
-	webSocket
+	userBank
 }

+ 1 - 0
assets/http/service.js

@@ -86,6 +86,7 @@ http.interceptors.response.use(async (response) => {
 			position: 'bottom',
 			title: err.data.msg
 		})
+		return err.data
 	}
 	
 	return Promise.reject(err)

+ 12 - 5
components/amountInput/amountInput.vue

@@ -31,7 +31,7 @@
 
 			<view class='key-confirm key-cell-num' :class="{big:isShow,frist:fristShow}" :style="{'background':btnColor}"
 				@click.stop="_handleKeyPress('confirm')">
-				{{confirmText}}
+				{{confirmText.substring(0,2)}}
 			</view>
 
 			<view v-if="!isShow">
@@ -60,7 +60,7 @@
 				type: String
 			},
 			placeholder: {
-				default: '请输入充值金额',
+				default: '请输入交易金额',
 				type: String
 			},
 			currency: {
@@ -82,12 +82,12 @@
 			isFilter: {
 				type: Boolean,
 				default: true
-			}
+			},
 		},
 		data() {
 			return {
 				fristShow: true,
-				isShow: true,
+				isShow: false,
 				size: 0,
 				height: 0,
 				allWidth: 0,
@@ -95,7 +95,7 @@
 			}
 		},
 		created() {
-
+			
 		},
 		computed: {
 			//ios底部安全区域
@@ -117,6 +117,9 @@
 			}
 		},
 		methods: {
+			initialMoney(data){
+				this.money=data.toString()
+			},
 			show() {
 				this.isShow = true;
 			},
@@ -167,6 +170,10 @@
 			//处理数字
 			_handleNumberKey(num) {
 				if (Number(this.money + num) > this.maxNumber) {
+					uni.showToast({
+						title:"不能超过最大交易金额",
+						icon:"none"
+					})
 					return
 				}
 				let S = this.money;

+ 4 - 0
components/mp-tree/code.js

@@ -92,6 +92,10 @@
 		methods: {
 			//多选
 			async checkboxChange(item, index, bx, qx) {
+				if (item.hasChildren) {
+					return
+				}
+				
 				var that = this;
 				if(!this.props.multiple) return;
 				let findIdex = that.newCheckList.findIndex(e=>{return item.id==e.id});

+ 28 - 0
pages.json

@@ -241,6 +241,34 @@
             }
             
         }
+        ,{
+            "path" : "pages/login/submit-success",
+            "style" :                                                                                    
+            {
+				"navigationStyle":"custom",
+                "navigationBarTitleText": "提交成功",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/withdraw/withdraw",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "提现",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/withdraw/select-bank",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "选择银行",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 6 - 6
pages/bill/bill.vue

@@ -18,7 +18,7 @@
 			<view style="display: flex;justify-content: flex-start;">
 				<view class="value">
 					<text>余额</text>
-					<text class="text-price">{{shopData.withdrawTotalPrice}}</text>
+					<text class="text-price">{{$digital.floatSub(shopData.withdrawTotalPrice,shopData.totalPointValue)}}</text>
 				</view>
 			</view>
 
@@ -84,11 +84,11 @@
 							<view class="item-padding">
 								<image style="width: 35rpx;height: 35rpx;margin-bottom: -5rpx;"
 									src="@/static/icon/points-value.png"></image>
-								<text style="font-size: 32rpx;margin-left: 10rpx;color: #F39248;">+{{item.point}}</text>
+								<text style="font-size: 32rpx;margin-left: 10rpx;color: #F39248;">+{{item.point  || 0}}</text>
 							</view>
 						</view>
 						<view class="area3 text-area ">
-							<view class="item-padding" style="font-size: 34rpx;color: #000;">¥{{item.pointValue}}</view>
+							<view class="item-padding" style="font-size: 34rpx;color: #000;">¥{{item.pointValue  || 0}}</view>
 						</view>
 					</block>
 					<block v-if="current==0">
@@ -111,7 +111,7 @@
 						<view class="area3 text-area u-p-r-20" style="width: 30%;">
 							<view class="item-padding"
 								style="flex:1;text-align: right;font-size: 34rpx;color: #F39248;">
-								+¥{{item.realPayAmount}}</view>
+								+¥{{item.realPayAmount || 0}}</view>
 						</view>
 					</block>
 				</view>
@@ -327,7 +327,7 @@
 
 		.area1 {
 			padding-left: 30rpx;
-			width: 55%;
+			width: 50%;
 
 			view:first-child {
 				display: flex;
@@ -358,7 +358,7 @@
 		}
 
 		.area2 {
-			width: 25%;
+			width: 30%;
 		}
 
 		.area3 {

+ 7 - 2
pages/chooseLable/chooseLable.vue

@@ -31,7 +31,10 @@
 				},
 			}
 		},
-		onLoad(option) {
+		onLoad(options) {
+			if (!this.$isEmpty(options.label)) {
+				this.checkList=JSON.parse(options.label)
+			}
 			this.getLabel()
 		},
 		methods: {
@@ -56,6 +59,7 @@
 						dictKey:item.dictKey,
 						dictValue:item.dictValue,
 						hasChildren:item.hasChildren,
+						parentId:item.parentId
 					}
 					checkList.push(obj)
 				})
@@ -64,10 +68,11 @@
 					//一级标签的ids,逗号分割
 					labelParentIds:Array.from(parentIds).join(","),
 					//二级标签的json数据
-					label:JSON.stringify(checkList),
+					labelJson:JSON.stringify(checkList),
 					//二级标签key,逗号分割
 					labelKey:labelKey.join(",")
 				}
+				console.log(labelData,"****");
 				uni.$emit('labelData',labelData)
 				this.$back()
 			},

+ 5 - 5
pages/index/index.vue

@@ -49,11 +49,11 @@
 					<view class="menu-bottom">
 						<view class="">
 							<text>今日营收</text>
-							<text>{{statistic.todayIncome}}</text>
+							<text>{{statistic.todayIncome || 0}}</text>
 						</view>
 						<view class="">
 							<text>总资产</text>
-							<text>{{statistic.totalAccount}}</text>
+							<text>{{statistic.totalAccount || 0}}</text>
 						</view>
 					</view>
 				</view>
@@ -67,11 +67,11 @@
 					<view class="menu-bottom" style="color: #FFFFFF;">
 						<view class="">
 							<text>新增会员</text>
-							<text>{{statistic.todayMemberIn}}</text>
+							<text>{{statistic.todayMemberIn || 0}}</text>
 						</view>
 						<view class="">
 							<text>会员总数</text>
-							<text>{{statistic.memberCount}}</text>
+							<text>{{statistic.memberCount || 0}}</text>
 						</view>
 					</view>
 				</view>
@@ -284,7 +284,7 @@
 				let phone = this.$cache.get('phone')
 				let params = {
 					personTel: phone,
-					auditStatus: 1 //审核通过
+					auditStatus: this.$global.SHOP_AUDIT.PASS //审核通过
 				}
 				let res = await this.$api.shop.list(params)
 				this.shopList = res.data.records

+ 8 - 5
pages/login/register.vue

@@ -35,7 +35,7 @@
 			
 			<view  style="width: 86%;margin-top: 100rpx;">
 				<view @click="next" class="btn cu-btn round" style="width:100%;height: 90rpx;font-size: 34rpx;">
-					下一步
+					确认
 				</view>
 				<!-- <view class="center" style="margin-top: 100rpx;">
 					<text style="color: #949494;">确认注册即代表已阅读并同意</text>
@@ -124,10 +124,13 @@
 					type:1
 				}
 				let res=await this.$api.accout.register(p)
-				console.log(res);
-				uni.navigateTo({
-					url:"/pages/shop-info/shop-info?phone="+this.form.phone
-				})
+				if (res.success) {
+					this.$dialog.showModal('注册成功,请填写店铺资料',false).then(()=>{
+						uni.navigateTo({
+							url:"/pages/shop-info/shop-info?phone="+this.form.phone
+						})
+					})
+				}
 			}, 
 			// 获取验证码
 			getCode() {

+ 59 - 0
pages/login/submit-success.vue

@@ -0,0 +1,59 @@
+<template>
+	<view>
+		<u-navbar  :is-back="false" title="提交成功"></u-navbar>
+		<view class="content">
+			<image src="@/static/icon/success.png" mode=""></image>
+			<text class="tips">资料提交成功,请耐心等待审核</text>
+			<view  class="cu-btn round btn" @click="$jump('/pages/login/account-login')">
+				确认
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+	page{
+		background-color: #FFFFFF;
+	}
+</style>
+<style lang="scss" scoped>
+	.content{
+		margin-top: 140rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-direction: column;
+		
+		image{
+			width: 200rpx;
+			height: 200rpx;
+		}
+		
+		.tips{
+			margin-top: 50rpx;
+			color: #313131;
+			font-size: 28rpx;
+		}
+		
+		.btn{
+			margin-top: 150rpx;
+			background-color: #D18C42;
+			color: #FFFFFF;
+			width: 74%;
+			padding: 46rpx;
+		}
+	}
+</style>

+ 1 - 1
pages/pay/pay.vue

@@ -36,7 +36,7 @@
 			}
 		},
 		onLoad(options) {
-
+			this.show()
 		},
 		methods: {
 			scanCode(){

+ 97 - 91
pages/shop-info/shop-info.vue

@@ -15,11 +15,6 @@
 							<u-input :border="false" placeholder="比如名杨国福麻辣烫(时尚天河2店)" v-model="form.name"></u-input>
 						</u-form-item>
 					</view>
-					<view class="border">
-						<u-form-item label="店铺全称" prop="fullName">
-							<u-input :border="false" placeholder="请输入店铺全称(非必填项)" v-model="form.fullName"></u-input>
-						</u-form-item>
-					</view>
 					<view class="border">
 						<u-form-item label="业务联系人" prop="personName">
 							<u-input :disabled="isEdit" :border="false" placeholder="请输入业务联系人"
@@ -34,6 +29,11 @@
 							<u-input disabled placeholder="请输入联系方式" v-model="form.personTel" type="number"></u-input>
 						</u-form-item>
 					</view>
+					<view class="border">
+						<u-form-item label="邮箱" prop="email">
+							<u-input :border="false" placeholder="请输入邮箱(非必填项)" v-model="form.email"></u-input>
+						</u-form-item>
+					</view>
 					<view class="border">
 						<u-form-item label="所在商场" prop="phone">
 							<u-input @click="mallShow=true" :border="false" placeholder="请选择所在商场(非必填项)"
@@ -57,7 +57,7 @@
 					</view>
 					<view class="border">
 						<u-form-item  label-width="200" label="公司种类" left-icon="grid">
-							<view class="flex justify-between " @click="$jump('/pages/chooseLable/chooseLable')">
+							<view class="flex justify-between " @click="chooseLabel">
 								<view class="u-flex u-flex-wrap">
 									<text v-if="form.labelKey" class="text-cut-1">{{form.labelKey}}</text>
 									<text v-else style="color: #c0c4cc;">请选择</text>
@@ -68,6 +68,11 @@
 							</view>
 						</u-form-item>
 					</view>
+					<view class="border">
+						<u-form-item label="所在地区"  prop="address">
+							<u-input :disabled="true" :border="false" placeholder="请选择所在地区" @click="regionShow=true" v-model="form.location"></u-input>
+						</u-form-item>
+					</view>
 					<view class="border">
 						<u-form-item label="具体地址" label-position="top" prop="address">
 							<u-input :border="false" placeholder="请详细写到门店编号" v-model="form.address"></u-input>
@@ -81,13 +86,13 @@
 				<block v-else-if="step==2">
 					<view class="border">
 						<u-form-item label="上传店铺封面" prop="cover" label-position="top">
-							<upload-img title="请上传店铺封面" @click="chooseImage" :model="form.cover"
+							<upload-img title="请上传店铺封面" @click="chooseImageShop" :model="form.cover"
 								dataName="cover" ></upload-img>
 						</u-form-item>
 					</view>
 					<view class="border">
 						<u-form-item label="上传营业执照" prop="businessLicense" label-position="top">
-							<upload-img title="请上传营业执照" @click="chooseImage" :model="form.businessLicense"
+							<upload-img title="请上传营业执照" @click="chooseImageAudit" :model="auditForm.businessLicense"
 								dataName="businessLicense" ></upload-img>
 						</u-form-item>
 					</view>
@@ -104,21 +109,15 @@
 				</block>
 				<block v-else>
 					<view class="border">
-						<u-form-item label="公司法人姓名" prop="legalPersonName" label-position="top">
-							<u-input :border="false" placeholder="请输入公司法人姓名(非必填项)" v-model="form.legalPersonName">
+						<u-form-item label="公司法人姓名" prop="legalPerson" label-position="top">
+							<u-input :border="false" placeholder="请输入公司法人姓名(非必填项)" v-model="auditForm.legalPerson">
 							</u-input>
 						</u-form-item>
 					</view>
-
-					<view class="border">
-						<u-form-item label="邮箱" prop="email">
-							<u-input :border="false" placeholder="请输入邮箱(非必填项)" v-model="form.email"></u-input>
-						</u-form-item>
-					</view>
 					<view class="border">
 						<u-form-item label="身份证号码" prop="personIdCard">
 							<u-input :disabled="isEdit" :border="false" placeholder="请输入身份证号码"
-								v-model="form.personIdCard"></u-input>
+								v-model="auditForm.idCard"></u-input>
 						</u-form-item>
 					</view>
 					<view class="tips">
@@ -127,14 +126,14 @@
 					<view class="photo border">
 						<text>请拿出本人有效二代身份证件准备拍摄</text>
 						<view class="box">
-							<upload-img title="上传人像面照片" @click="chooseImage" :model="form.idCardFront"
+							<upload-img title="上传人像面照片" @click="chooseImageAudit" :model="auditForm.idCardFront"
 								dataName="idCardFront" :enableImg="true"></upload-img>
 						</view>
 						<view class="tips">
 							<text>*认证通过后,身份证人像面将不可修改</text>
 						</view>
 						<view class="box" style="margin-top: 0;">
-							<upload-img title="上传国徽面照片" @click="chooseImage" :model="form.idCardContrary"
+							<upload-img title="上传国徽面照片" @click="chooseImageAudit" :model="auditForm.idCardContrary"
 								dataName="idCardContrary" :enableImg="true" :bgImg="idCardContraryBgImg"></upload-img>
 						</view>
 						<view class="tips">
@@ -183,6 +182,7 @@
 
 		<u-select v-model="mallAreaShow" label-name="name" value-name="id" mode="single-column" :list="mallAreaList"
 			@confirm="mallAreaConfirm"></u-select>
+		<u-picker @confirm="regionConfirm" v-model="regionShow" mode="region"></u-picker>
 	</view>
 </template>
 
@@ -205,36 +205,35 @@
 					backgroundColor: '#D18C42',
 				},
 				labelWidth: 170,
+				//商户实体
 				form: {
 					id: '',
 					mallId: '',
-					mallAreaId: '',
-					name: '',
 					personName: '',
-					personIdCard: '',
-					idCardFront: '',
-					idCardContrary: '',
 					personTel: '',
-					address: '',
-					fullName: '',
-					webUrl: '',
-					legalPersonName: '',
-					businessLicense: '',
-					shopPic: '',
-					slogan: '',
-					email: '',
-
-					province: '',
-					city: '',
-					area: '',
-					provinceCode: '',
-					cityCode: '',
-					areaCode: '',
-
-					auditStatus: 0,
+					locationCode:'',
+					location:'',
 					cover: '',
-					
-					
+					name: '',
+					labelParentIds:'',
+					labelJson:"",
+					labelKey:"",
+					shopPic:"",
+					email: '',
+					slogan: '',
+					longitude:'',
+					latitude:'',
+					address:'',
+					auditStatus: this.$global.SHOP_AUDIT.WAITING,//待审核
+				},
+				auditForm:{
+					address:"",
+					entity:'',
+					idCard:'',
+					idCardFront:'',
+					idCardContrary:'',
+					businessLicense:'',
+					legalPerson:"",
 				},
 				//商场
 				mallShow: false,
@@ -245,6 +244,8 @@
 				mallAreaShow: false,
 				mallAreaList: [],
 				mallAreaLabel: '',
+				//所在地区
+				regionShow:false,
 				//门店地址
 				shopAddress: '',
 				step: 1,
@@ -278,10 +279,12 @@
 				return
 			}
 			uni.$on('labelData',(labelData)=>{
-				this.$set(this.form,Object.assign(this.form,labelData))
+				this.form.labelJson=labelData.labelJson
+				this.form.labelKey=labelData.labelKey
+				this.form.labelParentIds=labelData.labelParentIds
+				this.$forceUpdate()
 			})
 			this.form.personTel = options.phone
-			this.getLabel()
 			if (options.edit) {
 				this.isEdit = true
 				this.fetchShopDetail()
@@ -289,19 +292,32 @@
 			this.fetchMallList()
 		},
 		methods: {
-			getLabel(){
-				this.$api.dict.dictionaryTree({code:'business_label'}).then(res=>{
-					console.log(res);
+			//所在地区
+			regionConfirm(e){
+				this.form.location=e.province.label+"-"+e.city.label+"-"+e.area.label
+				this.form.locationCode=e.province.value+"0000,"+e.city.value+"00,"+e.area.value
+			},
+			//具体地址
+			chooseAddress() {
+				var _this = this
+				uni.chooseLocation({
+					success(res) {
+						console.log(res);
+						_this.form.address = res.address
+						_this.form.longitude = res.longitude
+						_this.form.latitude = res.latitude
+					}
+				})
+			},
+			//选择标签
+			chooseLabel(){
+				uni.navigateTo({
+					url:"../chooseLable/chooseLable?label="+this.form.labelJson
 				})
 			},
 			uploadShopPics(data) {
 				this.imgList=data
 			},
-			delImg(index) {
-				this.$dialog.showModal('确定删除?').then(res => {
-					this.imgList.splice(index, 1)
-				})
-			},
 			async fetchShopDetail() {
 				let params = {
 					id: this.vuex_shopId
@@ -327,19 +343,21 @@
 						this.$u.toast('请输入业务联系人')
 						return
 					}
-					// labelIds labelNames
-					if (this.$isEmpty(this.form.labelIds)) {
+					if (this.$isEmpty(this.form.labelKey)) {
 						this.$u.toast('请选择公司种类')
 						return
 					}
+					if (this.$isEmpty(this.form.location)) {
+						this.$u.toast('请选择所在地区')
+						return
+					}
 					if (this.$isEmpty(this.form.address)) {
 						this.$u.toast('请选择具体地址')
 						return
 					}
 				}
-
 				if (this.step == 2) {
-					if (this.$isEmpty(this.form.businessLicense)) {
+					if (this.$isEmpty(this.auditForm.businessLicense)) {
 						this.$u.toast('请上传营业执照')
 						return
 					}
@@ -348,17 +366,7 @@
 					this.step++
 				}
 			},
-			chooseAddress() {
-				var _this = this
-				uni.chooseLocation({
-					success(res) {
-						console.log(res);
-						_this.form.address = res.address
-						_this.form.longitude = res.longitude
-						_this.form.latitude = res.latitude
-					}
-				})
-			},
+			
 			clear(t) {
 				if (t == 'mallAreaLabel') {
 					this.mallAreaLabel = ''
@@ -366,14 +374,21 @@
 					this.mallLabel = ''
 				}
 			},
-			async chooseImage(name) {
-				if (this.isEdit && (name == 'businessLicense' || name == 'idCardFront' || name == 'idCardContrary')) {
+			async chooseImageShop(name) {
+				let res = await this.$mpi.chooseImage()
+				this.$api.uploadFile(res[0]).then(res => {
+					this.form[name] = res.data.link
+				})
+			},
+			async chooseImageAudit(name) {
+				if (this.isEdit) {
 					this.$u.toast('不可修改')
 					return
 				}
 				let res = await this.$mpi.chooseImage()
 				this.$api.uploadFile(res[0]).then(res => {
-					this.form[name] = res.data.link
+					this.auditForm[name] = res.data.link
+					console.log(this.auditForm[name]);
 				})
 			},
 			fetchMallList() {
@@ -394,7 +409,7 @@
 				this.mallLabel = item.name
 				this.form.mallId = item.id
 				this.mallShow = false
-				this.fetchMallAreaList()
+				// this.fetchMallAreaList()
 				//重新获取标签
 				this.getShopLabelByMallId()
 			},
@@ -403,36 +418,27 @@
 				this.form.mallAreaId = e[0].value
 			},
 			submit() {
-				if (this.$isEmpty(this.form.personIdCard)) {
+				if (this.$isEmpty(this.auditForm.idCard)) {
 					this.$u.toast('请输入身份证号码')
 					return
 				}
-				if (this.$isEmpty(this.form.idCardFront)) {
+				if (this.$isEmpty(this.auditForm.idCardFront)) {
 					this.$u.toast('请上传身份证正面照')
 					return
 				}
-				if (this.$isEmpty(this.form.idCardContrary)) {
+				if (this.$isEmpty(this.auditForm.idCardContrary)) {
 					this.$u.toast('请上传身份证反面照')
 					return
 				}
-
-
-				let content = '提交成功,请耐心等待商场管理员审核'
-				let url = '/pages/login/account-login'
-				if (this.isEdit) {
-					content = '修改成功'
-					url = '/pages/index/index'
-				} else {
-					if (this.$isEmpty(this.form.mallId)) {
-						content = '提交成功,请耐心等待平台审核'
-					}
+				
+				let params={
+					shop:this.form,
+					audit:this.auditForm
 				}
-				this.$api.shop.submit(this.form).then(res => {
+				this.$api.shop.submitAudit(params).then(res=>{
 					if (res.success == true) {
-						this.$dialog.showModal(content, false).then(() => {
-							uni.reLaunch({
-								url
-							})
+						uni.navigateTo({
+							url:"/pages/login/submit-success"
 						})
 					}
 				})

+ 1 - 1
pages/userBank/userBank.vue

@@ -43,7 +43,7 @@
 			fetchCardList(){
 				let params={
 					userId:this.vuex_shopId,
-					size:20
+					size:10
 				}
 				this.$api.userBank.appList(params).then(res=>{
 					this.bankList=res.data.records

+ 112 - 0
pages/withdraw/select-bank.vue

@@ -0,0 +1,112 @@
+<template>
+	<view class="margin-20">
+
+		<u-radio-group v-model="radio" active-color="#ff9447" size="40">
+			<view @click="radio=item.id" v-for="(item,index) in bankList" :key="index" class="bank" v-if="!$isEmpty(bankList)">
+				<view class="left center">
+					<image :src="'/static/bank/'+item.bankType+'.png'" mode=""></image>
+					<view class="content">
+						<text>{{item.bankTypeLabel}}</text>
+						<text>{{item.cardNo}}</text>
+					</view>
+				</view>
+				<view class="center">
+					<u-radio :name="item.id"></u-radio>
+				</view>
+			</view>
+		</u-radio-group>
+			
+		<view class="">
+			<view class="" style="height: 120rpx;"></view>
+			<view style="background-color: #FFFFFF ;height: 120rpx;" class="footer-fixed center">
+				<view @click="confirm" class="cu-btn df btn-bg-color  radius " style="width: 86%;height: 80rpx;">
+					<text>确认</text>
+				</view>
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	export default {
+		name: '',
+		data() {
+			return {
+				bankList: [],
+				radio: ''
+			};
+		},
+		onLoad() {
+			this.fetchCardList()
+		},
+		methods: {
+			fetchCardList() {
+				let params = {
+					userId:this.vuex_shopId || '-1',
+					size: 10
+				}
+				this.$api.userBank.appList(params).then(res => {
+					if (!this.$isEmpty(res.data.records)) {
+						this.bankList = res.data.records
+						this.radio = this.bankList[0].id
+					}
+				})
+			},
+			confirm(){
+				let bank= this.bankList.filter(item=>item.id==this.radio)[0]
+				let params={
+					bank
+				}
+				this.$util.backWithParams(params)
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.bank {
+		margin-bottom: 20rpx;
+		border-radius: 20rpx;
+		background-color: #FFFFFF;
+		padding: 44rpx;
+		display: flex;
+		justify-content: space-between;
+
+		.left {
+			display: flex;
+
+			image {
+				width: 90rpx;
+				height: 90rpx;
+				margin-right: 20rpx;
+			}
+
+			.content {
+				display: flex;
+				flex-direction: column;
+
+				text:first-child {
+					color: #252525;
+					font-weight: 800;
+					font-size: 34rpx;
+				}
+
+				text:last-child {
+					margin-top: 15rpx;
+					color: #888888;
+					font-size: 26rpx;
+				}
+			}
+		}
+	}
+
+	.card_add {}
+
+
+	.submit-btn {
+		background-color: #EE9230;
+		color: #FFFFFF;
+		border-radius: 10rpx;
+	}
+</style>

+ 301 - 0
pages/withdraw/withdraw.vue

@@ -0,0 +1,301 @@
+<template>
+	<view class="margin-30">
+		<navigator v-if="$isEmpty(bank)" url="/pages/userBank/add" class="card_add" hover-class="none">
+			<view class="margin-bottom-10">
+				<u-icon name="plus-circle-fill" color="#F5A85B" size="70"></u-icon>
+			</view>
+			<view class="" style="color: #666666;">
+				添加银行卡
+			</view>
+		</navigator>
+
+		<navigator url="select-bank" class="bank" v-else hover-class="none">
+			<view class="left center">
+				<image :src="bank.bankType?'/static/bank/'+bank.bankType+'.png':''" mode=""></image>
+				<view class="content">
+					<text>{{bank.bankTypeLabel}}</text>
+					<text>{{bank.cardNo}}</text>
+				</view>
+			</view>
+
+			<view class="center">
+				<text class="cuIcon-right" style="font-size: 36rpx;color: #888888;"></text>
+			</view>
+		</navigator>
+		<view class="card">
+			<text class="title">提现金额</text>
+
+			<view class="input">
+				<text class="text-price center  text-bold" style="font-size: 60rpx;"></text>
+				<view @click="show" class="margin-left-20 center"
+					style="width: 60%;justify-content: flex-start;color: #ff9900;">
+					<text class="text-xl" v-text="withdrawAmount"></text>
+					<view class="cusor"></view>
+				</view>
+				<view @click="allWithdraw" class="center margin-bottom-10 margin-left-20">
+					<view class="cu-btn withdraw-btn sm round center">
+						<text>全部提现</text>
+					</view>
+				</view>
+			</view>
+
+			<view class="canWithdraw">
+				可提现金额
+				<text class="text-price margin-left-20" style="font-size: 34rpx;">{{canWithDraw}}</text>
+			</view>
+			<view class="rate">
+				<view class="item">
+					<text>服务费</text>
+					<text class="text-price">0.10</text>
+				</view>
+				<view class="item">
+					<view class="">
+						<text>费率</text>
+						<text @click="rateShow=true" class="cuIcon-question margin-left-10 text-lg"></text>
+					</view>
+					<text class="">0.05%</text>
+				</view>
+			</view>
+		</view>
+
+		<u-popup v-model="rateShow" :mask-close-able="false" mode="center" height="40%" width="76%" borderRadius="20"
+			negative-top="100">
+			<view class="popup-content" style="height: 98%;">
+				<view class="">
+					<text class="popup-title">费率说明</text>
+					<view class="popup-desc">
+						<text>累计营收0-1000元,费率为0.5%;</text>
+						<text>1001-10000元,费率为0.38%;</text>
+						<text>10000-100000元,费率0.3%;</text>
+						<text>100000元起申请更低费率。</text>
+					</view>
+				</view>
+				<view class="center">
+					<view class="cu-btn btn-bg-color round" style="height: 80rpx;font-size: 30rpx;width: 80%;"
+						@click="rateShow=false">
+						确认
+					</view>
+				</view>
+
+			</view>
+		</u-popup>
+
+		<amountInput :maxNumber="canWithDraw" ref="amountInput" confirmText="确认提现" btnColor="#ff9900" @change="change"
+			@confirm="withdrawConfirm"></amountInput>
+	</view>
+</template>
+
+<script>
+	import amountInput from '@/components/amountInput/amountInput.vue';
+	export default {
+		components: {
+			amountInput
+		},
+		data() {
+			return {
+				rateShow: false,
+				bank: {},
+				//可提现
+				canWithDraw: '',
+				//提现金额
+				withdrawAmount: 0,
+			};
+		},
+		onLoad() {
+			this.fetchCardList()
+			this.fetchShopDetail()
+		},
+		onShow() {
+			if (this.canReset) {
+				this.bank = this.$util.getBackParams('bank')
+			}
+			this.canReset = true
+		},
+		methods: {
+			async fetchShopDetail() {
+				let params = {
+					id: this.vuex_shopId || '6625'
+				}
+				let data = (await this.$api.shop.detail(params)).data
+				let originalData = this.$digital.floatSub(data.withdrawTotalPrice, data.totalPointValue)
+				this.canWithDraw = this.$digital.keepTwoDecimal(originalData)
+			},
+			fetchCardList() {
+				let params = {
+					userId: this.vuex_shopId || '6625',
+					size: 10
+				}
+				this.$api.userBank.appList(params).then(res => {
+					this.bank = res.data.records[0]
+				})
+			},
+			change(e) {
+				if (!e) {
+					this.withdrawAmount = 0
+				} else {
+					this.withdrawAmount = e
+				}
+			},
+			show() {
+				this.$refs.amountInput.show()
+			},
+			//全部提现
+			allWithdraw(){
+				this.withdrawAmount=this.canWithDraw
+				this.$refs.amountInput.initialMoney(this.withdrawAmount)
+			},
+			withdrawConfirm(){
+				
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.bank {
+		border-radius: 20rpx;
+		background-color: #FFFFFF;
+		padding: 44rpx;
+		display: flex;
+		justify-content: space-between;
+
+		.left {
+			display: flex;
+
+			image {
+				width: 90rpx;
+				height: 90rpx;
+				margin-right: 20rpx;
+			}
+
+			.content {
+				display: flex;
+				flex-direction: column;
+
+				text:first-child {
+					color: #252525;
+					font-weight: 800;
+					font-size: 34rpx;
+				}
+
+				text:last-child {
+					margin-top: 15rpx;
+					color: #888888;
+					font-size: 26rpx;
+				}
+			}
+		}
+	}
+
+	.card_add {
+		border-radius: 20rpx;
+		padding: 40rpx 0;
+		background-color: #FFFFFF;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-direction: column;
+	}
+
+	.card {
+		border-radius: 20rpx;
+		margin-top: 30rpx;
+		padding: 40rpx;
+		background-color: #FFFFFF;
+		display: flex;
+		flex-direction: column;
+
+		.title {
+			font-size: 36rpx;
+			font-weight: 800;
+			margin-bottom: 30rpx;
+		}
+
+		.input {
+			display: flex;
+			border-bottom: 1rpx solid #DFDFDF;
+
+			.withdraw-btn {
+				background-color: #FFFFFF;
+				color: #EE9230;
+				border: 1rpx solid #EE9230;
+				height: 54rpx;
+				width: 180rpx;
+				font-size: 28rpx;
+				line-height: 54rpx;
+			}
+		}
+
+		.canWithdraw {
+			margin-top: 24rpx;
+			color: #252525;
+		}
+
+		.rate {
+			margin-top: 40rpx;
+
+			.item {
+				margin-bottom: 20rpx;
+				display: flex;
+				justify-content: space-between;
+
+				text:first-child {
+					color: #252525;
+				}
+
+				text:last-child {
+					color: #999999;
+				}
+			}
+		}
+
+
+	}
+
+	.submit-btn {
+		background-color: #EE9230;
+		color: #FFFFFF;
+		border-radius: 10rpx;
+	}
+
+	.popup-content {
+		height: 100%;
+		padding: 50rpx 60rpx;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+
+
+		.popup-title {
+			font-size: 38rpx;
+			font-weight: 800;
+		}
+
+		.popup-desc {
+			margin-top: 50rpx;
+			color: #666666;
+			display: flex;
+			flex-direction: column;
+
+			text {
+				line-height: 40rpx;
+				margin-bottom: 10rpx;
+			}
+		}
+	}
+
+	.cusor {
+		margin-left: 10rpx;
+		width: 6rpx;
+		border-radius: 20rpx;
+		height: 60%;
+		background-color: #ff9900;
+		animation: blink 1200ms infinite ease-in-out;
+	}
+
+	@keyframes blink {
+		from {
+			opacity: 0;
+		}
+	}
+</style>

BIN=BIN
static/icon/success.png


+ 5 - 0
utils/digital.js

@@ -72,4 +72,9 @@ digital.keepTwoDecimalFull = num => {
   return s_x
 }
 
+//保留两位小数,不四舍五入
+digital.keepTwoDecimal=(num)=>{
+	return Math.floor(num * 100) / 100
+}
+
 export default digital

+ 7 - 0
utils/global.js

@@ -23,6 +23,13 @@ let global = {
 		APPID: 'wx2db9c41e85d5a4fc', //appid
 	},
 	
+	SHOP_AUDIT:{
+		WAITING:'WAITING',
+		PASS:'PASS',
+		FAIL:'FAIL',
+		STOP:'STOP'
+	}
+	
 	
 }
 

+ 5 - 1
utils/mixin.js

@@ -33,13 +33,17 @@ let page = {
 			'pages/login/account-login',
 			'pages/shop-info/shop-info',
 			'pages/webView/webView',
+			'pages/login/submit-success',
 			'pages/test/test',
 			'pages/chooseLable/chooseLable',
+			'pages/withdraw/withdraw',
+			'pages/withdraw/select-bank',
+			'pages/pay/pay',
 		]
 		if (!WHiTE_LIST.includes(currentPage)) {
 			if (!this.$cache.get('phone')) {
 				uni.reLaunch({
-					url: "/pages/login/login"
+					url: "/pages/login/account-login"
 				})
 				return
 			}

+ 24 - 0
utils/util.js

@@ -115,5 +115,29 @@ util.reload = (mescroll) => {
     }
 }
 
+/**
+ * 携带参数
+ * data:{}
+ */
+util.backWithParams=(data)=>{
+	let prePage=util.getPageCtx(1)
+	prePage.setData(data)
+	uni.navigateBack({
+		delta:1
+	})
+}
+/**
+ * 获取参数 
+ * paramsName:参数名
+ */
+util.getBackParams = (paramsName) => {
+    let page= util.getPageCtx()
+    if (page.data[paramsName]) {
+    	return page.data[paramsName]
+    }
+	return null
+}
+
+
 
 export default util