Commit ac602781 authored by 罗超's avatar 罗超

1

parent cfb1705a
......@@ -633,6 +633,8 @@
"path":"activitysignUp"//活动报名 相亲模式
},{
"path":"baomingorder"//报名订单
},{
"path":"identification"//身份识别
}] }
],
"globalStyle": {
......
<template>
<view class="page">
<view class="progressBox">
<view class="progressName">
<text class="cur">{{stepName}}</text>
<text class="nex">{{nextSepName}}</text>
</view>
<u-line-progress class="progress" :percent="percent" :show-percent="false" :height="10"
inactive-color="#DADCE6" active-color="#F70027"></u-line-progress>
</view>
<view class="stepBox">
<view class="stepItem" v-if="step==1">
<view v-for="(item,index) in stepOneList" :key="index">
<view class="itemBox">
<view class="name">
{{item.name}}
</view>
<view class="con1" v-if="item.type==1">
<input class="input" type="text" v-model="dataOne[item.file]" :placeholder="item.text"
placeholder-style="color: #CECECEFF" />
</view>
<view class="con2" v-if="item.type==2">
<image :src="businessLicense" class="conImage" mode="widthFix" @click="chooseImg"></image>
</view>
</view>
</view>
</view>
<view class="stepItem" v-if="step==2">
<view v-for="(item,index) in stepTwoList" :key="index">
<view class="itemBox">
<view class="name">
{{item.name}}
</view>
<view class="con1" v-if="item.type==1">
<input class="input" type="text" v-model="data[item.file]" :placeholder="item.text"
placeholder-style="color: #CECECEFF" />
</view>
<view class="con3" v-if="item.type==2">
<u-number-box :input-width="100" :input-height="60" bg-color="#F70027" input-width="480">
</u-number-box>
</view>
<view class="con3" v-if="item.type==3">
<u-slider class="slider" v-model="data[item.file]"></u-slider>
</view>
<view class="con4" v-if="item.type==4">
<view class="customTypeBox">
<view v-for="(item1,index1) in customList" :key="index1">
<view class="customName" @click="chooseType(item1)"
:class="{chooseType:item1.checked}">
{{item1.Name}}
</view>
</view>
</view>
<input type="text" v-model="addCustomType" placeholder="以上都不合适,可在此输入客户群体"
placeholder-style="color: #CECECEFF" />
</view>
</view>
</view>
</view>
<view class="stepItem" v-if="step==3">
<view v-for="(item,index) in stepThreeList" :key="index">
<view class="itemBox">
<view class="name">
{{item.name}}
</view>
<view class="con1" v-if="item.type==1">
<input class="input" type="text" v-model="data[item.file]" :placeholder="item.text"
placeholder-style="color: #CECECEFF" />
</view>
<view class="con2" v-if="item.type==2">
<u-radio-group v-model="goodsTypeValue">
<u-radio v-for="(item1, index1) in goodsType" :key="index1" :name="item1.Name">
{{item1.Name}}
</u-radio>
</u-radio-group>
</view>
</view>
</view>
</view>
<view class="butBox">
<image :src="nextIcon" class="next" mode="widthFix" @click="nextStep"></image>
</view>
<view class="skip" v-if="step==2">
<text @click="nextStep">跳过</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
step: 1,
nextIcon: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/next.png",
percent: 33.33,
stepName: "企业基础资料",
nextSepName: "第2步",
stepOneList: [{
name: "营业执照 (点击图片上传营业执照)",
src: "",
file: "",
type: 2
}, {
name: "企业名称",
text: "请输入企业名称",
file: "",
type: 1
}, {
name: "统一社会信用代码",
text: "输入18位社会信用代码",
file: "",
type: 1
}, {
name: "法人代表",
text: "请输入法人姓名",
file: "",
type: 1
}, {
name: "联系电话",
text: "请输入11位手机或者带区号座机号码",
file: "",
type: 1
}, ],
//type=1:输入框,2:步进器,3:多选
stepTwoList: [{
name: "品牌名称",
text: "请输入品牌全名",
file: "",
type: 1
}, {
name: "店铺数量",
text: "",
file: "",
type: 2
}, {
name: "店铺面积",
text: "",
file: "",
type: 3
}, {
name: "品牌定位",
text: "请输入品牌全名",
file: "",
type: 1
}, {
name: "客户群体",
text: "",
file: "",
type: 4,
}],
addCustomType: "", //添加客户群体
customList: [], //客户群体
stepThreeList: [{
name: "扩店区域",
text: "请输入品牌全名",
file: "",
type: 1
}, {
name: "商品性质",
text: "",
file: "",
type: 2
}, {
name: "面积要求",
text: "",
file: "",
type: 3
}],
goodsType: [], //商品性质
goodsTypeValue: "",
businessLicense: "", //营业执照
access_token: "",
dataOne: {
}
}
},
methods: {
// 获取客户群体枚举
getCustomerTypeEnumList() {
let parms = {
url: "/api/AppletTrade/GetCustomerTypeEnumList",
}
this.request2(parms, (res) => {
if (res.resultCode == 1) {
res.data.map((e) => {
e.checked = false
})
this.customList = res.data
}
})
},
// 获取商品性质
GetProjectTypeEnumList() {
let parms = {
url: "/api/AppletTrade/GetProjectTypeEnumList",
}
this.request2(parms, (res) => {
if (res.resultCode == 1) {
this.goodsType = res.data
}
})
},
// 新增企业资料
SetCompany(data) {
let parms = {
url: "/api/AppletTrade/SetCompany",
...data
}
this.request2(parms, (res) => {
if (res.resultCode == 1) {
console.log(res)
}
})
},
//选择营业执照照片
chooseImg() {
let that = this
uni.chooseImage({
count: 1, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: function(res) {
console.log(res)
that.businessLicense = res.tempFilePaths[0]
wx.getFileSystemManager().readFile({
filePath: res.tempFilePaths[0],
encoding: 'base64', //编码格式
success:(ans)=> {
console.log(ans)
}
})
that.getImgInfo(res.tempFilePaths[0])
}
});
},
//提取营业执照信息
getImgInfo(data) {
let that = this
uni.request({
url: 'https://aip.baidubce.com/rest/2.0/ocr/v1/business_license?access_token=' + that
.access_token,
method: 'POST',
header: {
'Content-Type': 'application/x-www-form-urlencoded'
},
data: {
image: data,
},
success(res) {
console.log(111, res)
},
fail(res) {
}
})
},
getAccess_token() {
let that = this;
uni.request({
url: 'https://aip.baidubce.com/oauth/2.0/token', // 百度获取token接口地址
data: {
'grant_type': 'client_credentials', // 固定写死
'client_id': 'QWTnMLORmrozodmfIyOjHGoB',
'client_secret': 'DcsUjSai1OnIHd61B2xIX4zlYqv8E1bP'
},
method: 'GET',
success(res) {
console.log(res)
that.access_token = res.data.access_token
console.log(that.access_token)
},
fail(e) {}
})
},
stepOne() {
},
nextStep() {
if (this.step < 3 && this.percent <= 100) {
this.step++
this.percent += this.percent
if (this.step == 1) {
this.stepName = "第1步 企业基础资料"
this.nextSepName = "第2步"
} else if (this.step == 2) {
this.stepName = "第2步 品牌信息"
this.nextSepName = "第3步"
} else if (this.step == 3) {
this.stepName = "第3步 扩店需求"
this.nextSepName = "完成"
}
}
},
chooseType(item) {
item.checked = !item.checked
}
},
mounted() {
this.getCustomerTypeEnumList()
this.GetProjectTypeEnumList()
this.getAccess_token()
}
}
</script>
<style lang="scss" scoped>
.page {
background-color: #F6F6F6;
min-height: 100vh;
height: 100%;
padding-bottom: 70rpx;
.progressBox {
width: 650rpx;
height: 120rpx;
margin: 0 auto;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-content: center;
.progressName {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
font-weight: bold;
.cur {
color: #F70027;
}
.nex {
color: #B9BCCA;
}
}
.progress {
width: 100%;
}
}
.stepBox {
width: 680rpx;
margin: 0 auto;
background-color: #FFFFFF;
box-shadow: 0rpx 10rpx 50rpx 0rpx rgba(218, 220, 230, 0.85);
border-radius: 30rpx;
padding: 53rpx 45rpx 70rpx;
.stepItem {
width: 100%;
padding-bottom: 100rpx;
.itemBox {
width: 100%;
margin-bottom: 55rpx;
.name {
font-size: 28rpx;
font-weight: bold;
color: #1F1F1F;
margin-bottom: 38rpx;
}
.con1 {
height: 60rpx;
border-bottom: 1rpx solid #DADCE6;
padding-bottom: 24rpx;
.input {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
}
}
.con2 {
.conImage {
width: 590rpx;
height: 367rpx;
background: linear-gradient(0deg, rgba(31, 31, 31, 0.92), rgba(31, 31, 31, 0));
}
}
.con3 {
border-bottom: 1rpx solid #DADCE6;
padding-bottom: 24rpx;
position: relative;
// display: flex;
// justify-content: space-between;
.slider {
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 9;
}
.slider1 {
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 8;
}
}
.con4 {
border-bottom: 1rpx solid #DADCE6;
padding-bottom: 24rpx;
.customTypeBox {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 40rpx;
.customName {
width: 110rpx;
height: 50rpx;
background-color: #FFFFFF;
border: 1rpx dashed #1F1F1F;
opacity: 0.3;
border-radius: 10rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 28rpx;
font-weight: bold;
color: #000000;
}
}
}
}
}
}
.butBox {
margin: 10rpx auto;
width: 100rpx;
height: 100rpx;
background-color: #F70027;
box-shadow: 0rpx 4rpx 40rpx 0rpx rgba(249, 54, 85, 0.58);
border-radius: 20rpx;
.next {
width: 100%;
}
}
.skip {
text-align: center;
font-size: 28rpx;
font-weight: 500;
color: #B7B7B7;
}
}
.chooseType {
background-color: #F95771FF !important;
color: #F70027 !important;
border: none !important;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment