hmp 4 éve
szülő
commit
43550c2686

+ 2 - 3
assets/colorui/app.css

@@ -22,7 +22,7 @@
 
 .btn-line-color{
 	border: 1rpx solid #D18C42;
-	color: #DA3F33;
+	color: #D18C42;
 }
 
 .text-base{
@@ -30,10 +30,9 @@
 }
 
 .bg-gradual-base {
-	background-image: linear-gradient(45deg, #F67A53, #dc311c);
+	background-image: linear-gradient(to right, #FFC368, #FF8327);
 	color: #ffffff;
 }
-
 .line-base{
 	border: 1rpx solid #D18C42;
 	color: #D18C42;

+ 17 - 1
assets/http/api.js

@@ -4,6 +4,10 @@ import {http} from './service.js'
 //文件上传
 const uploadFile =(p)=> http.upload('blade-resource/oss/endpoint/put-file', {name:'file',filePath:p})
 
+
+//字典
+const dict=p => http.get('/blade-system/dict-biz/dictionary', {params:p})
+
 //手机验证码
 const sms={
 	send:p => http.post('huawei/sms/sendSms'+p),
@@ -47,11 +51,23 @@ const activity={
 	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),
+}
+
 export const api={
 	uploadFile,
+	dict,
 	sms,
 	mall,
 	shop,
 	memberCenter,
-	activity
+	activity,
+	userBank
 }

+ 3 - 2
assets/http/service.js

@@ -1,9 +1,10 @@
 import Request from 'luch-request'
 
-let baseURL = 'http://localhost:2539/'
+let baseURL = 'https://ldt.guosen-fumao.cn/api/'
+// let baseURL = 'http://localhost:2539/'
 
 let tokenUrl = baseURL +
-	"blade-auth/oauth/token?tenantId=000000&password=21232f297a57a5a743894a0e4a801fc3&username=admin"
+	"blade-auth/oauth/token?tenantId=000000&password=f67e0b29283bb804f96e28f43ddce79f&username=admin"
 
 //获取token
 const getTokenStorage = () => {

+ 36 - 0
pages.json

@@ -123,6 +123,42 @@
             }
             
         }
+        ,{
+            "path" : "pages/webView/webView",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+		,{
+		    "path" : "pages/userBank/userBank",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "银行卡",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+		,{
+		    "path" : "pages/userBank/add",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "添加银行卡",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+        ,{
+            "path" : "pages/login/updatePassworf",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "修改密码",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 2 - 2
pages/card/card.vue

@@ -22,12 +22,12 @@
 					{
 						icon:'/static/icon/shangjia.png',
 						name:'商家认证',
-						path:'/pages/mine/card/pay-setting'
+						path:''
 					},
 					{
 						icon:'/static/icon/bank.png',
 						name:'银行卡',
-						path:'/pages/mine/card/pay-setting'
+						path:'/pages/userBank/userBank'
 					},
 					{
 						icon:'/static/icon/xiazai.png',

+ 9 - 2
pages/index/index.vue

@@ -182,13 +182,20 @@
 			this.init()
 		},
 		methods: {
-			init() {
-				this.shopList = this.$cache.get('shopList')
+			async init(){
+				let phone=this.$cache.get('phone')
+				let params={
+					personTel:phone,
+					auditStatus:1 //审核通过
+				}
+				let res=await this.$api.shop.list(params)
+				this.shopList=res.data.records
 				let item=this.shopList[0]
 				this.shopId = item.id
 				this.shopLable = item.name
 				this.mallId=item.mallId
 				this.cacheSelectedShop()
+				//获取统计数据
 				this.getStatistic()
 			},
 			getStatistic(){

+ 7 - 6
pages/login/account-login.vue

@@ -76,7 +76,7 @@
 			this.$refs.uForm.setRules(this.rules);
 		},
 		onLoad() {
-			 if (this.$cache.get('shopList')) {
+			 if (this.$cache.get('phone')) {
 			 	uni.reLaunch({
 			 		url:"/pages/index/index"
 			 	})
@@ -89,25 +89,26 @@
 						this.$dialog.showLoading('登录中..')
 						setTimeout(()=>{
 							this.doLogin()
-						},500)
+						},80)
 					}
 				});
 			},
 			async doLogin(){
 				let params={
-					personTel:this.form.phone
+					personTel:this.form.phone,
+					auditStatus:1 //审核通过
 				}
 				let res=await this.$api.shop.list(params)
+				uni.hideLoading()
 				if (this.$isEmpty(res.data.records)){
-					this.$u.toast('账号或者密码错误!')
+					this.$dialog.showModal('账号密码错误,或店铺处于审核状态!',false)
 					return
 				}else{
-					this.$cache.put('shopList',res.data.records)
+					this.$cache.put('phone',this.form.phone)
 					uni.reLaunch({
 						url:"/pages/index/index"
 					})
 				}
-				uni.hideLoading()
 			}
 		}
 	}

+ 10 - 5
pages/login/login.vue

@@ -1,7 +1,7 @@
 <template>
 	<view style="position: relative;">
-		<view class="bg"></view>
-		<view class="bg1"></view>
+		<!-- <view class="bg"></view>
+		<view class="bg1"></view> -->
 		<view class="back" @click="$back">
 			<u-icon name="arrow-left" size="50" color="#919191"></u-icon>
 		</view>
@@ -42,7 +42,7 @@
 				</view>
 				<view class="center" style="margin-top: 100rpx;">
 					<text style="color: #949494;">登录即代表已阅读并同意</text>
-					<text style="color: #0000ff;">《软件服务协议》</text>
+					<text style="color: #0000ff;" @click="protocol">《软件服务协议》</text>
 				</view>
 			</view>
 		</view>
@@ -82,6 +82,11 @@
 			this.$refs.uForm.setRules(this.rules);
 		},
 		methods: {
+			protocol(){
+				uni.navigateTo({
+					url:"/pages/webView/webView?url="+this.$global.protocol
+				})
+			},
 			login() {
 				this.$refs.uForm.validate(valid => {
 					if (valid) {
@@ -103,10 +108,10 @@
 				}
 				let res=await this.$api.shop.list(params)
 				if (this.$isEmpty(res.data.records)){
-					this.$u.toast('账号未注册!')
+					this.$dialog.showModal('账号未注册,或店铺处于审核状态!',false)
 					return
 				}else{
-					this.$cache.put('shopList',res.data.records)
+					this.$cache.put('phone',this.form.phone)
 					uni.reLaunch({
 						url:"/pages/index/index"
 					})

+ 3 - 3
pages/login/register.vue

@@ -33,14 +33,14 @@
 				</u-form>
 			</view>
 			
-			<view  style="width: 86%;margin-top: 80rpx;">
+			<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;">
+				<!-- <view class="center" style="margin-top: 100rpx;">
 					<text style="color: #949494;">确认注册即代表已阅读并同意</text>
 					<text style="color: #0000ff;">《软件服务协议》</text>
-				</view>
+				</view> -->
 			</view>
 		</view>
 		

+ 24 - 21
pages/member/member.vue

@@ -4,7 +4,7 @@
 			<image src="../../static/icon/vip.png" mode=""></image>
 			<text>没有会员中心信息</text>
 
-			<view class="cu-btn btn-bg-color round" style="width: 48%;height: 80rpx;position: fixed;bottom: 20%;">
+			<view @click="$jump('/pages/member/add')" class="cu-btn btn-bg-color round" style="width: 48%;height: 80rpx;position: fixed;bottom: 20%;">
 				<u-icon name="plus-circle" size="40"></u-icon>
 				<text class="margin-left-10 text-lg">创建会员中心</text>
 			</view>
@@ -27,7 +27,7 @@
 			</view>
 
 			<view class="card">
-				<view class="flex">
+				<view class="flex tableTitle">
 					<view class="area1 title">
 						会员名称
 					</view>
@@ -39,7 +39,7 @@
 					</view>
 				</view>
 
-				<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
+				<mescroll-body :height="height" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
 					:down="downOption" :up="upOption">
 					<view class="item" v-for="(item,index) in dataList" :key="index">
 						<view class="area1 flex text-bold">
@@ -76,20 +76,35 @@
 				detail: {},
 				dataList: [],
 				
-				downOption:{
-					use:false,
-					auto:false // 不自动加载
+				height:'300px',
+				downOption: {
+					use: true,
+					auto: false // 不自动加载
 				},
-				upOption:{
-					use:false,
-					auto:false // 不自动加载
+				upOption: {
+					use: true,
+					auto: false // 不自动加载
 				},
 			}
 		},
+		watch:{
+			mescroll(){
+				if (this.isOpenMember) {
+					this.mescroll.resetUpScroll();
+				}
+			}
+		},
+		onReady() {
+			this.getElInfo()
+		},
 		onLoad() {
 			this.fetchShopDetail()
 		},
 		methods: {
+			async getElInfo() {
+				let rectInfo = await this.$u.getRect('.tableTitle');
+				this.height=this.$u.sys().windowHeight - rectInfo.top + 'px'
+			},
 			fetchShopDetail() {
 				let params = {
 					id: this.vuex_shopId
@@ -98,8 +113,6 @@
 					if (res.data.isOpenMember == 1) {
 						this.isOpenMember = true
 						this.detail = res.data
-						//加载会员中心
-						this.useOption()
 					}
 				})
 			},
@@ -108,16 +121,6 @@
 					this.mescroll.resetUpScroll();
 				},800)
 			},
-			useOption(){
-				this.downOption={
-					use:true,
-					auto:true
-				}
-				this.upOption={
-					use:true,
-					auto:true 
-				}
-			},
 			upCallback(mescroll) {
 				let params = {
 					shopId: this.vuex_shopId,

+ 46 - 10
pages/shop-info/shop-info.vue

@@ -16,7 +16,7 @@
 							type="select"></u-input>
 					</u-form-item>
 				</view>
-				<view class="border" v-if="form.mallId">
+				<view class="border" v-if="form.mallId&&!$isEmpty(mallAreaList)">
 					<u-form-item label="所在区域" prop="phone">
 						<u-input @click="mallAreaShow=true" :border="false" placeholder="请选择所在区域"  v-model="mallAreaLabel"
 							type="select"></u-input>
@@ -24,12 +24,17 @@
 				</view>
 				<view class="border">
 					<u-form-item label="店铺名" prop="name">
-						<u-input :border="false" placeholder="请输入店铺名" v-model="form.name" type="number"></u-input>
+						<u-input :border="false" placeholder="请输入店铺名" v-model="form.name" ></u-input>
+					</u-form-item>
+				</view>
+				<view class="border">
+					<u-form-item label="店铺标语" prop="name">
+						<u-input :border="false" placeholder="请输入店铺标语" v-model="form.slogan" ></u-input>
 					</u-form-item>
 				</view>
 				<view class="border">
 					<u-form-item label="业务联系人" prop="personName">
-						<u-input :border="false" placeholder="请输入业务联系人" v-model="form.personName" type="number"></u-input>
+						<u-input :border="false" placeholder="请输入业务联系人" v-model="form.personName" ></u-input>
 					</u-form-item>
 				</view>
 				<view class="tips">
@@ -83,22 +88,22 @@
 				</view>
 				<view class="border">
 					<u-form-item label="具体地址" prop="adderess">
-						<u-input :border="false" placeholder="请输入具体地址" v-model="form.adderess" type="number"></u-input>
+						<u-input :border="false" placeholder="请输入具体地址" v-model="form.address"></u-input>
 					</u-form-item>
 				</view>
 				<view class="border">
 					<u-form-item label="单位全称" prop="fullName">
-						<u-input :border="false" placeholder="请输入单位全称" v-model="form.fullName" type="number"></u-input>
+						<u-input :border="false" placeholder="请输入单位全称" v-model="form.fullName"></u-input>
 					</u-form-item>
 				</view>
 				<view class="border">
 					<u-form-item label="公司网址" prop="webUrl">
-						<u-input :border="false" placeholder="请输入公司网址" v-model="form.webUrl" type="number"></u-input>
+						<u-input :border="false" placeholder="请输入公司网址" v-model="form.webUrl"></u-input>
 					</u-form-item>
 				</view>
 				<view class="border">
 					<u-form-item label="公司法人姓名" prop="legalPersonName" label-position="top">
-						<u-input :border="false" placeholder="请输入公司法人姓名" v-model="form.legalPersonName" type="number"></u-input>
+						<u-input :border="false" placeholder="请输入公司法人姓名" v-model="form.legalPersonName"></u-input>
 					</u-form-item>
 				</view>
 				<view class="border">
@@ -118,6 +123,20 @@
 						</view>
 					</u-form-item>
 				</view>
+				<view class="border">
+					<u-form-item label="上传店铺封面" prop="cover" label-position="top">
+						<view @click="chooseImage('cover')" class="flex-direction center margin-top-30">
+							<upload-img width="480" height="300"
+								:currentImage="form.cover" bgsrc="/static/icon/upload.png">
+							</upload-img>
+							<view class="text-center  padding-top-20 btn-color">
+								<text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
+								<text v-if="$isEmpty(form.cover)">请上传店铺封面</text>
+								<text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
+							</view>
+						</view>
+					</u-form-item>
+				</view>
 				<view class="border">
 					<u-form-item label="上传营业执照" prop="businessLicense" label-position="top">
 						<view @click="chooseImage('businessLicense')" class="flex-direction center margin-top-30">
@@ -151,7 +170,7 @@
 		<view class="center flex-direction " style="margin-top: -100rpx;margin-bottom: 120rpx;">
 			<view class="center margin-bottom-20">
 				<text style="color: #949494;">确认注册即代表已阅读并同意</text>
-				<text style="color: #104DFF;">《软件服务协议》</text>
+				<text style="color: #104DFF;" @click="protocol">《软件服务协议》</text>
 			</view>
 			<view @click="submit" class="btn cu-btn round" style="width:90%;height: 90rpx;font-size: 34rpx;">
 				提交资料
@@ -219,6 +238,7 @@
 					legalPersonName:'',
 					businessLicense:'',
 					shopPic:'',
+					slogan:'',
 					
 					province:'',
 					city:'',
@@ -228,7 +248,8 @@
 					areaCode:'',
 					
 					auditStatus:0,
-					labelIds:''
+					labelIds:'',
+					cover:'',
 				},
 				regionShow: false,
 				
@@ -273,6 +294,11 @@
 						message: '请选择门店地址',
 						trigger: ['change', 'blur'],
 					}],
+					cover:[{
+						required: true,
+						message: '请上传店铺封面',
+						trigger: ['change', 'blur'],
+					}],
 				}
 			}
 		},
@@ -311,6 +337,9 @@
 			this.getShopLabelByMallId()
 		},
 		methods: {
+			fetchData(){
+				
+			},
 			async chooseImage(name) {
 				let res = await this.$mpi.chooseImage()
 				this.$api.uploadFile(res[0]).then(res => {
@@ -382,12 +411,19 @@
 						this.$api.shop.submit(this.form).then(res=>{
 							if (res.success==true) {
 								this.$dialog.showModal('提交成功,请耐心等待商场管理员审核!',false).then(()=>{
-									this.$back()
+									uni.reLaunch({
+										url:"../login/account-login"
+									})
 								})
 							}
 						})
 					}
 				});
+			},
+			protocol(){
+				uni.navigateTo({
+					url:"../webView/webView?url="+this.$global.protocol
+				})
 			}
 		}
 	}

+ 6 - 5
utils/global.js

@@ -1,9 +1,10 @@
 let global = {
 
-  wxParams:{
-	  APPID:'wx5d30bdd3d0f579af',//appid
-	  SECRET:"3e3a7793022808fcb63e215bfa1e1f93"
-  },
+	protocol: 'https://ldt.guosen-fumao.cn/shop_protocol.html',
+	
+	wxParams: {
+		APPID: 'wx2db9c41e85d5a4fc', //appid
+	},
 }
 
-export default global 
+export default global

+ 2 - 1
utils/mixin.js

@@ -32,10 +32,11 @@ let page = {
 			'pages/login/register',
 			'pages/login/account-login',
 			'pages/shop-info/shop-info',
+			'pages/webView/webView',
 			'pages/test/test',
 		]
 		if (!WHiTE_LIST.includes(currentPage)) {
-			if (!this.$cache.get('shopList')) {
+			if (!this.$cache.get('phone')) {
 				uni.reLaunch({
 					url: "/pages/login/login"
 				})