Browse Source

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

wangchao 3 years ago
parent
commit
4a26676e03

+ 1 - 1
App.vue

@@ -120,7 +120,7 @@
 
 
 <style lang='scss'>
 <style lang='scss'>
 	@import 'static/css/common.css';
 	@import 'static/css/common.css';
-	@import "static/css/font.css";
+	/* @import "static/css/font.css"; */
 	@import "static/iconfont/iconfont.css";
 	@import "static/iconfont/iconfont.css";
 	@import "components/colorui/main.css";
 	@import "components/colorui/main.css";
 	@import "components/colorui/icon.css";
 	@import "components/colorui/icon.css";

+ 14 - 1
pages.json

@@ -97,7 +97,20 @@
 			"path": "pages/grain_pulse/enter",
 			"path": "pages/grain_pulse/enter",
 			"style": {
 			"style": {
 				"enablePullDownRefresh": true,
 				"enablePullDownRefresh": true,
-				"navigationBarTitleText": "入驻"
+				"navigationBarTitleText": "入驻",
+				"navigationStyle": "custom",
+				"app-plus": {
+					"titleNView": false,
+					"animationType": "slide-in-bottom",
+					"softinputMode": "adjustPan"
+				}
+			}
+		},
+		{
+			"path": "pages/grain_pulse/perfect",
+			"style": {
+				"enablePullDownRefresh": true,
+				"navigationBarTitleText": "完善信息"
 			}
 			}
 		},
 		},
 		{
 		{

+ 1 - 1
pages/attestation/indexTwo.vue

@@ -402,7 +402,7 @@
 					showCancel: true,
 					showCancel: true,
 					confirmText: '确定',
 					confirmText: '确定',
 					success: (e) => {
 					success: (e) => {
-						if (res.confirm) {
+						if (e.confirm) {
 							this.$api.doRequest('post',
 							this.$api.doRequest('post',
 								'/identityAuthenticationInfo/api/deleteIdentityAuthenticationInfo', {
 								'/identityAuthenticationInfo/api/deleteIdentityAuthenticationInfo', {
 									id: item.id
 									id: item.id

+ 324 - 3
pages/grain_pulse/enter.vue

@@ -1,11 +1,332 @@
 <template>
 <template>
-	<view>
-		11111
+	<view class="center">
+		<!-- 	<view class=""> -->
+		<view class="back-btn cuIcon-back" @click="navBack"></view>
+		<!-- <view class='title1'>入驻</view> -->
+		<view class="titleUp">
+			请完善入驻信息
+		</view>
+		<u-form class="forList">
+			<view class="modular">
+				<u-form-item label="公司名称" label-width="30%" class="title Regular">
+					<u-input v-model="deptList.name" input-align="right" class="write Medium" placeholder="请输入公司名称" />
+				</u-form-item>
+				<view>
+					<view class="title Regular" style="margin-top: 15rpx;">主要类型(可多选,必须为真实经营类型)</view>
+					<view v-for="(item,index) in management" class="choice">
+						<!-- 	<u-tag :type="types[index] == null ? 'info' : types[index]" :text="item" show="show"
+							@click="singleClick(index)"></u-tag> -->
+						<view :class="anNiuCss[index] == null ? 'types' : anNiuCss[index]" @click="singleClick(index)">
+							{{item}}
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="modular">
+				<u-form-item label="标题" label-width="30%" class="title Regular">
+					<u-input v-model="deptList.name" input-align="right" class="write Regular"
+						placeholder="用于封面展示,2-16个字" />
+				</u-form-item>
+				<u-form-item label="公司简介" label-width="30%" class="title Regular">
+					<u-input v-model="deptList.name" input-align="right" class="write Regular" type="textarea"
+						placeholder="请输入企业简介,如经营项目、产品类型、企业规模等,10-60个字" />
+				</u-form-item>
+			</view>
+			<view class="modular">
+				<u-form-item label="上传坐标" label-width="30%" class="title Regular">
+					<text @click="upload"
+						class="con-list Regular">{{deptList.buyer == null ? "未上传":deptList.buyer}}<text
+							class='tip_text cuIcon-right'></text></text>
+				</u-form-item>
+				<u-form-item label="所在区域" label-width="30%" class="title Regular">
+					<u-input v-model="deptList.name" input-align="right" class="write Regular" disabled
+						placeholder="自动获取" />
+				</u-form-item>
+				<u-form-item label="详细地址" label-width="30%" class="title Regular">
+					<u-input v-model="deptList.name" input-align="right" class="write Regular"
+						placeholder="如街道和门牌号,2-12个字" maxlength="12" />
+				</u-form-item>
+				<view>
+					<view class="title Regular" style="margin-top: 15rpx;">上传图片</view>
+					<view v-if="license1 != ''">
+						<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
+							:size-type="['compressed']" @on-success="getImgUrl" @on-error="onError"
+							@on-remove="onRemove" @on-uploaded="isAdd = true" :before-upload="filterFileType"
+							:options="uploadOptions" :custom="uploadCustom" @on-progress="onProgress"></upload>
+					</view>
+					<view v-if="license2 != ''">
+						<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
+							:size-type="['compressed']" @on-success="getImgUrl" @on-error="onError"
+							@on-remove="onRemove" @on-uploaded="isAdd = true" :before-upload="filterFileType"
+							:options="uploadOptions1" :custom="uploadCustom" @on-progress="onProgress"></upload>
+					</view>
+				</view>
+			</view>
+			<!-- :disabled="true" -->
+			<u-button @click="submit" class="commit" type="success">提交</u-button>
+		</u-form>
+		<view v-if="show == true">
+			<u-popup v-model="show" mode="center" border-radius="20" width="560rpx" height="560rpx">
+				<view class="successImg">
+					<image src="../../static/img/liangmai/tijiaochenggong@3x.png" mode=""
+						style="width: 180rpx;height: 180rpx;"></image>
+				</view>
+
+				<view class="successText">提交成功,等待平台审核。</view>
+				<u-button type="success" style="width: 400rpx; margin: 20rpx auto; " shape="circle" @click="perfect">
+					完善更多信息</u-button>
+				<view style="color: #AFB3BF;text-align: center;" @click="navBack">返回</view>
+			</u-popup>
+
+		</view>
 	</view>
 	</view>
 </template>
 </template>
 
 
 <script>
 <script>
+	import upload from '@/components/upload.vue';
+	export default {
+		components: {
+			upload
+		},
+		name: "buy",
+		data() {
+			return {
+				action: this.$uploadUrl,
+				maxSize: 5 * 1024 * 1024,
+				btnLoading: false,
+				isAdd: true,
+				uploadOptions: {
+					"text": "上传封面图片",
+					"bgc": ""
+				},
+				uploadOptions1: {
+					"text": "上传营业执照",
+					"bgc": ""
+				},
+				uploadCustom: true,
+				deptList: {},
+				management: ["粮库", "加工厂", "烘干厂", "饲料厂", "养殖场", "粮贸", "期货"],
+				types: [],
+				show: false,
+				// anNiuCss:"types",
+				anNiuCss: [],
+				license1: "../../static/img/authentication/business@3x.png",
+				license2: "../../static/img/authentication/business@3x.png",
+
+			}
+		},
+		methods: {
+			singleClick(index) {
+				for (let i = 0; i < this.management.length; i++) {
+					this.anNiuCss[i] = "types"
+				}
+				if (this.anNiuCss[index] == null) {
+					this.anNiuCss[index] = "types1"
+				} else if (this.anNiuCss[index] == "types") {
+					this.anNiuCss[index] = "types1"
+				} else if (this.anNiuCss[index] == "types1") {
+					this.anNiuCss[index] = "types"
+				}
+			},
+			filterFileType(index, lists) {
+				if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
+					lists.splice(index, 1);
+					// 当前文件不支持
+					uni.showModal({
+						title: '暂不支持当前图片类型',
+						showCancel: false
+					});
+				} else {
+					this.isAdd = false;
+				}
+			},
+			navBack() {
+				uni.navigateBack(1)
+			},
+			upload() {
+				uni.navigateTo({
+					url: `/`
+				})
+			},
+			perfect() {
+				uni.navigateTo({
+					url: `/pages/grain_pulse/perfect`
+				})
+			},
+			submit() {
+				// if (!this.deptList.title) {
+				// 	this.$api.msg('标题不能为空')
+				// 	return
+				// }
+				this.show = true
+				return
+				uni.showModal({
+					content: "确定提交企业信息??",
+					showCancel: true,
+					confirmText: '确定',
+					success: function(res) {
+						if (res.confirm) {
+							//成功后
+							if (res.data.code == 200) {
+								uni.showToast({
+									title: '提交成功',
+									icon: 'none',
+									duration: 2000
+								})
+							}
+						}
+					},
+				})
+			}
+		}
+	}
 </script>
 </script>
 
 
-<style>
+<style lang='scss' scoped>
+	.center {
+		padding: 10rpx 20rpx;
+		width: 100vw;
+		height: 100vh;
+		overflow: scroll;
+		background: url(../../static/img/liangmai/bg@3x.png);
+		background-size: 100%;
+		background-repeat: no-repeat;
+	}
+
+	.c-row {
+		display: -webkit-box;
+		display: -webkit-flex;
+		display: flex;
+		-webkit-box-align: center;
+		-webkit-align-items: center;
+		align-items: center;
+		padding: 20rpx 30rpx;
+		position: relative;
+	}
+
+	.con-list {
+		-webkit-box-flex: 1;
+		-webkit-flex: 1;
+		flex: 1;
+		display: -webkit-box;
+		display: -webkit-flex;
+		display: flex;
+		-webkit-box-orient: vertical;
+		-webkit-box-direction: normal;
+		-webkit-flex-direction: column;
+		flex-direction: column;
+		line-height: 40rpx;
+		text-align: right;
+		padding-right: 20rpx;
+		font-size: 14px;
+	}
+
+	.con-list input {
+		font-size: 14px !important;
+	}
+
+	.back-btn {
+		position: absolute;
+		left: 40upx;
+		z-index: 9999;
+		padding-top: var(--status-bar-height);
+		top: 40upx;
+		font-size: 40upx;
+		color: #fff;
+	}
+
+	.title1 {
+		position: absolute;
+		left: 50%;
+		transform: translateX(-50%);
+		top: 40upx;
+		padding-top: var(--status-bar-height);
+		z-index: 9999;
+		color: #fff;
+		font-size: 36rpx;
+	}
+
+	.choice {
+		margin-top: 10px;
+		display: inline-block;
+		margin-bottom: 6px;
+	}
+
+	.title {
+		margin-left: 20rpx;
+		color: #71747C;
+	}
+
+	.types {
+		width: 55px;
+		height: 30px;
+		background-color: #F4FAF8;
+		text-align: center;
+		line-height: 32px;
+		border-radius: 20px;
+		margin-left: 14px;
+	}
+
+	.types1 {
+		width: 55px;
+		height: 30px;
+		background-color: #22C572;
+		text-align: center;
+		line-height: 32px;
+		border-radius: 20px;
+		margin-left: 14px;
+		color: #FFFFFF;
+	}
+
+	.write {
+		margin-right: 20px;
+		color: #71747C;
+	}
+
+	.commit {
+		margin-top: 20px;
+		border: 0px;
+		border-radius: 20px;
+	}
+
+	.modular {
+		background-color: #FFFFFF;
+		border-radius: 20px;
+		margin-top: 20px;
+	}
+
+	.forList {
+		margin-top: 40px;
+	}
+
+	.titleUp {
+		color: #FFFFFF;
+		font-size: 44rpx;
+		margin-top: 80px;
+		margin-left: 10px;
+	}
+
+	.upload {
+		text-align: center;
+		margin: 20px 0;
+		margin-bottom: 20px;
+	}
+
+	.popups {
+		width: 280px;
+		height: 290px;
+		border-radius: 20px;
+	}
+
+	.successImg {
+		width: 90px;
+		height: 90px;
+		margin: 30px auto;
+	}
+
+	.successText {
+		text-align: center;
+		margin: 0 auto;
+		font-size: 16px;
+	}
 </style>
 </style>

+ 7 - 1
pages/grain_pulse/home.vue

@@ -59,7 +59,7 @@
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
-		<view class="enter">
+		<view class="enter" @click="enter">
 			<image style='width:56.5px;height:28px;' src="../../static/img/liangmai/ruzhu.png" mode=""></image>
 			<image style='width:56.5px;height:28px;' src="../../static/img/liangmai/ruzhu.png" mode=""></image>
 			<view class='enter-content'>入驻</view>
 			<view class='enter-content'>入驻</view>
 		</view>
 		</view>
@@ -81,6 +81,12 @@
 			
 			
 		},
 		},
 		methods: {
 		methods: {
+			enter(){
+				//入驻
+				uni.navigateTo({
+					url:'/pages/grain_pulse/enter'
+				})
+			},
 			friendcircle(){
 			friendcircle(){
 				uni.navigateTo({
 				uni.navigateTo({
 					url:'/pages/grain_pulse/friendcircle'
 					url:'/pages/grain_pulse/friendcircle'

+ 263 - 0
pages/grain_pulse/perfect.vue

@@ -0,0 +1,263 @@
+<template>
+	<view class="center">
+		<u-form>
+			<view class="modular">
+				<u-form-item label="公司名称" label-width="30%" class="title Medium" :border-bottom="topBorder">
+					<u-input v-model="deptList.name" input-align="right" class="write Regular" placeholder="请输入公司名称" />
+				</u-form-item>
+			</view>
+			<view class="modular">
+				<view class="title Medium">企业概况</view>
+				<!-- <u-input v-model="value" :type="type"  :height="height" :auto-height="autoHeight" placeholder="请输入企业概况,如经营项目、产品类型、企业规模等,不超过300个字" /> -->
+				<textarea value="" placeholder="请输入企业概况,如经营项目、产品类型、企业规模等,不超过300个字" class="areaText Regular"
+					v-model="deptList.a" placeholder-style="color:#AFB3BF"/>
+				<view class="title Regular">添加标签(标签应突出企业特色,最多6个)</view>
+				<view class="flex" style="width: 100%;">
+					<view class="forLists" v-for="(item,index) in label" :Key="index">
+						<u-tag :text="item" mode="dark" class="forList Medium" shape="circle" :show="show"
+							:closeable="closeable" color="#22C572" @close="closeForList(index)" />
+					</view>
+					<u-tag text="+" mode="plain" shape="circle" :show="show1" color="#2E2E2D" bg-color="#FFFFFF"
+						border-color="#F9F9FA" class="add" @click="add"></u-tag>
+				</view>
+				<view class="addinput flex" v-if="inputShow">
+					<u-input v-model="value" type="type" border focus v-if="inputShow"
+						style="border-radius: 50rpx;line-height: 70rpx;font-size: 10px;" placeholder="请输入标签内容,不超过6个字" />
+					<u-button :type="types" class="inputOk" shape="circle" @click="addinput">确定</u-button>
+				</view>
+			</view>
+			<view class="modular">
+				<view class="title Regular">场地照片(图片清晰,最多9张)</view>
+				<u-upload :action="action" :file-list="fileList" @on-success="uploadSuccess" @on-remove="imgRemove"
+					:max-count="9"></u-upload>
+			</view>
+			<view class="modular">
+				<view class="title Medium">联系方式</view>
+				<view v-for="(item,index) in Persons">
+					<view class="information flex">
+						<view class="xinxi">
+							<u-form-item label="姓名" label-width="30%" class="Regular" label-position="top"
+								style="font-size: 28rpx; color: #71747C;" :border-bottom="topBorder">
+								<u-input v-model="item.name" class="Regular" placeholder="请输入姓名" />
+							</u-form-item>
+						</view>
+						<view class="xinxi">
+							<u-form-item label="电话" label-width="30%" class="Regular" label-position="top"
+								style="font-size: 28rpx; color: #71747C;" :border-bottom="topBorder">
+								<u-input v-model="item.phone" class="Regular" placeholder="请输入电话" />
+							</u-form-item>
+						</view>
+						<div class="del" @click="delPerson(index)">
+							<span style="font-size: 46rpx; color: #22C572;">×</span>
+						</div>
+					</view>
+				</view>
+				<view class="addPerson" @click="addPerson">
+					<image src="../../static/img/liangmai/jia@3x.png" mode=""
+						style="width: 26rpx;height: 26rpx;top: 2rpx;"></image>
+					添加联系人
+				</view>
+			</view>
+			<view class="modular">
+				<u-form-item label="邮箱" label-width="30%" class="title Regular">
+					<u-input v-model="deptList.name" input-align="right" class="write Regular" placeholder="请输入电子邮箱" />
+				</u-form-item>
+				<u-form-item label="传真" label-width="30%" class="title Regular" :border-bottom="topBorder">
+					<u-input v-model="deptList.name" input-align="right" class="write Regular" placeholder="请输入传真号" />
+				</u-form-item>
+			</view>
+		</u-form>
+		<u-button type="success" shape="circle" style="margin-top: 20rpx;" @click="submit">提交</u-button>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				deptList: {},
+				label: ["世界一流", "世界500强"],
+				closeable: true,
+				show: true,
+				show1: true,
+				types: "",
+				inputShow: false,
+				value: "", //临时标签内容字段 后期更换
+				action: 'https://www.zthymaoyi.com/upload/admin',
+				fileList: [],
+				imgList: [],
+				Persons: [{
+					name: "张良",
+					phone: "1365411111"
+				}],
+				topBorder: false,
+			}
+		},
+		methods: {
+			add() {
+				if (this.label.length >= 6) {
+					this.inputShow = false
+				} else {
+					this.inputShow = true
+				}
+			},
+			addinput() {
+				if (!this.value) {
+					this.$api.msg('标签内容不能为空')
+					return
+				}
+				if (this.value.length < 2 || this.value.length > 6) {
+					this.$api.msg('标签内容输入有误')
+					return
+				}
+				this.label.push(this.value)
+				this.value = ""
+				this.inputShow = false
+			},
+			addPerson() {
+				this.Persons.push({
+					name: "",
+					phone: "",
+				})
+			},
+			delPerson(index) {
+				this.Persons.splice(index, 1)
+			},
+			closeForList(index) {
+				this.label.splice(index, 1)
+			},
+			imgRemove(e) {
+				this.imgList.splice(e, 1)
+			},
+			uploadSuccess(e) {
+				this.imgList.push(e.url)
+			},
+			submit() {
+				uni.showModal({
+					content: "详细的企业信息有助于客户了解您的企业,是否确定提交?",
+					showCancel: true,
+					confirmText: '提交',
+					success: function(res) {
+						if (res.confirm) {
+
+						}
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.center {
+		padding: 10rpx 20rpx;
+	}
+
+	.title {
+		margin-left: 20rpx;
+		color: #333333;
+		line-height: 70rpx;
+	}
+
+	.write {
+		margin-right: 20px;
+		color: #71747C;
+	}
+
+	.modular {
+		background-color: #FFFFFF;
+		border-radius: 12px;
+		margin-top: 20px;
+	}
+
+	.areaText {
+		width: 90%;
+		padding: 30rpx;
+		border: 2rpx solid #F9F9FA;
+		background-color: #F9F9FA;
+		margin: 10rpx auto 20rpx;
+		border-radius: 20rpx;
+		color: #AFB3BF;
+		font-size: 28rpx;
+	}
+
+	.add {
+		padding: 15rpx 30rpx;
+		width: 120rpx;
+		height: 65rpx;
+		text-align: center;
+		margin-left: 24rpx;
+		font-size: 30rpx;
+		font-weight: 600;
+		margin-bottom: 10rpx;
+	}
+
+	.forLists {
+		margin-bottom: 10rpx;
+	}
+
+	.forList {
+		height: 64rpx;
+		background-color: #F4FAF8;
+		padding: 20rpx 30rpx;
+		color: #22C572;
+		margin-left: 24rpx;
+		text-align: center;
+	}
+
+	.addinput {
+		width: 70%;
+		margin: 20rpx auto;
+		border-radius: 50rpx;
+	}
+
+	.inputOk {
+		width: 100rpx;
+		border-radius: 40rpx;
+		background-color: #E9EAE9;
+		color: #FFFFFF;
+		border: none;
+	}
+
+	.picture {
+		width: 144rpx;
+		height: 144rpx;
+		border: 4rpx dashed #AFB3BF;
+	}
+
+	.upload {
+		height: 140rpx;
+		text-align: center;
+		margin: 20px 0;
+		margin-bottom: 20px;
+	}
+
+	.addPerson {
+		width: 230rpx;
+		height: 80rpx;
+		line-height: 80rpx;
+		text-align: center;
+		border: 2rpx solid #979797;
+		border-radius: 40rpx;
+		margin: 20rpx auto 20rpx;
+	}
+
+	.information {
+		background-color: #F4FAF8;
+		width: 96%;
+		height: 180rpx;
+		margin: 0 auto;
+		border: 1rpx dashed #22C572;
+		border-radius: 10rpx;
+		margin-top: 30rpx;
+	}
+
+	.xinxi {
+		margin-left: 70rpx;
+	}
+
+	.del {
+		justify-content: flex-end;
+		margin: 10rpx 20rpx 0 0;
+	}
+</style>

BIN
static/img/liangmai/bg@3x.png


BIN
static/img/liangmai/jia@3x.png


BIN
static/img/liangmai/tijiaochenggong@3x.png