初始化商家端

This commit is contained in:
wangxiaowei
2025-04-30 14:08:39 +08:00
commit 68b408b1e7
568 changed files with 118884 additions and 0 deletions

5
pages/dl/auth/api.js Normal file
View File

@ -0,0 +1,5 @@
export default {
// authInfoSubmit: '/v1/6000efc785e05', // 提交审核
// authInfoChecks: '/v1/6000eb07394a4', // 获取商家信息
// shopCategorys: '/v1/6000f79b614c4', // 获取商家分类
}

1165
pages/dl/auth/bindBank.vue Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,114 @@
<template>
<view class="warp">
<view class="flex flex-direction align-center justify-center">
<view v-for="(item,index) in list" :key="index"
class="btn flex align-center justify-center text-lg text-bold" :class="menutype==item.type?'active':''"
@tap="chooseTap(item.type)">{{item.name}}</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [{
name: "小微",
type: 0
},
{
name: "个体工商户",
type: 1
},
{
name: "企业",
type: 2
}
],
menutype: -1,
type: 0,
id: ""
}
},
onLoad(options) {
this.type = options.type ? options.type : 1
this.id = options.sid ? options.sid : ""
if (this.id) {
this.post66d2930b149ad()
}
},
methods: {
post66d2930b149ad(url) {
this.$api.post(global.apiUrls.post66d2930b149ad, {
id: this.id,
}).then(res => {
if (res.data.code == 1) {
let status = res.data.data.status
console.log(status)
//-1 未认证0=审核中 1=通过 2=驳回
if (status == 0) {
// this.$message.info('您申请的类目正在审核中')
uni.navigateTo({
url: '/pages/user/login/examine/jinindexdaili'
})
} else if (status == -1) {
uni.reLaunch({
url: "/pages/user/login/auth/dailijijian?merType=" + 2 + '&id=' + this.id
})
} else if (status == 1) {
uni.navigateTo({
url: "/pages/user/login/auth/dailijijian?merType=" + type + '&id=' + this
.id
})
} else if (status == 2) {
uni.navigateTo({
url: '/pages/user/login/examine/jinindexdaili?type=' + 'success' +
'&reason=' + res.data.data.reason + '&model=' + res.data.data.data
.type + '&id=' + this.id
})
}
} else {
uni.navigateTo({
url: url
})
}
})
},
chooseTap(type) {
this.menutype = type
uni.navigateTo({
url: "/pages/dl/auth/jinjian?merType=" + type
})
// if(this.type==2){
// uni.navigateTo({
// url:"/pages/user/login/auth/jinjian?merType=" + type
// })
// }else{
// uni.navigateTo({
// url:"/pages/user/login/auth/dailijijian?merType=" + type + '&id=' + this.id
// })
// }
}
}
}
</script>
<style lang="scss">
page {
background: #fff;
}
.btn {
width: 686rpx;
padding: 32rpx 0;
margin: 80rpx 0 0 0;
border: 1rpx solid #eee;
border-radius: 16rpx;
}
.active {
border: 1rpx solid #42AB4F;
color: #42AB4F;
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

164
pages/dl/auth/index.scss Normal file
View File

@ -0,0 +1,164 @@
page {
// padding-bottom: 240rpx;
background-color: #fff;
}
.auth-pic{
width: 686rpx;
height: 240rpx;
margin: 24rpx auto;
image{
width: 686rpx;
height: 240rpx;
}
}
.page-wapper {
display: flex;
justify-content: space-between;
flex-direction: column;
min-height: 100vh;
box-sizing: border-box;
}
.public-text-area-wapper {
background-color: #fff;
}
.border-bottom{
width: 686rpx;
margin: 24rpx auto 0;
border-bottom: 1rpx solid #EEEEEE;
}
.public-text-area-wapper textarea {
height: auto;
width: 100%;
height: 161upx;
margin-bottom: 40rpx;
background-color: #F6F7F9;
padding: 24rpx;
border-radius: 16rpx;
}
.public-text-area-wapper .item {
display: flex;
align-items: center;
justify-content: space-between;
view{
display: flex;
flex-direction: column;
align-items: center;
font-weight: bold;
}
image{
width: 314rpx;
height: 204rpx;
margin-bottom: 26rpx;
// margin-top: 48rpx;
}
.active{
font-weight: normal;
color: #666;
}
}
.explain{
margin: 56rpx 0 80rpx 0;
font-size: 24rpx;
color: #666;
}
.fotter-bottom{
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0;
background-color: #fff;
}
.login-btn {
display: block;
line-height: 90upx;
text-align: center;
width: 700upx;
height: 90upx;
font-size: 32upx;
color: #fff;
background: $bgtheme;
background-blend-mode: normal, normal;
border-radius: 45px;
&:after {
border: 0;
}
}
.fotter{
width: 100%;
padding-bottom: 40rpx;
margin-top: 48rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 20rpx;
color: #666;
image{
width: 24rpx;
height: 24rpx;
margin-right: 16rpx;
}
text{
color: #1D8DFB;
}
}
.public-input-wapper {
background-color: #fff;
}
.feedback-content {
.feedback_content_top {
height: 80upx;
line-height: 80upx;
}
.content {
padding: 0 32upx;
.row-textarea {
color: #666666;
width: 100%;
height: 140upx;
font-size: 26upx;
}
}
.files-pic {
padding: 30upx 0;
display: flex;
flex-wrap: wrap;
.img-item {
margin-right: 20upx;
position: relative;
text {
display: block;
position: absolute;
right: -10upx;
top: -10upx;
width: 34upx;
height: 34upx;
border-radius: 50%;
background: rgba(227, 59, 45, 1);
font-size: 24upx;
text-align: center;
line-height: 34upx;
color: #fff;
z-index: 10;
}
}
image {
width: 144upx;
height: 144upx;
border-radius: 10upx;
}
}
}

899
pages/dl/auth/index.vue Normal file
View File

@ -0,0 +1,899 @@
<template>
<view class="page-wapper">
<view class="page-box">
<view class="auth-pic">
<image src="../../static/auth1.png"></image>
</view>
<view class="public-input-wapper active">
<view class="input-container border">
<view class="lside"> <text style="color: #FC501E;">*</text>注册手机号</view>
<view class="rside">
<input type="number" style="color: #333;" maxlength="11" class="text-right" v-model="mobile"
:placeholder=" i18n['请输入手机号']" placeholder-class="placeholder" disabled="disabled">
</view>
</view>
</view>
<!-- @tap="accountTypeTap" -->
<view class="public-input-wapper active">
<view class="input-container border">
<view class="lside"> <text style="color: #FC501E;">*</text>商户性质</view>
<view class="rside">
<view :class="{'rside-text': true, gray: !accountTypename}">
{{accountTypename ? accountTypename : i18n['请选择']}}</view>
</view>
</view>
</view>
<view class="" v-if="accountType==2">
<view class="public-text-area-wapper">
<view class="text-area-title"> <text style="color: #FC501E;">*</text>请上传营业执照</view>
</view>
<view class="public-text-area-wapper">
<view class="item">
<view class="">
<image @tap="shopLogo('BUSINESS_LICENCE',2)"
:src="BUSINESS_LICENCE?BUSINESS_LICENCE:'../../static/file.png'" mode="aspectFill"></image>
<text> {{ i18n['营业执照'] }}</text>
</view>
<!-- <view class="">
<image src="../../static/auth4.png" mode="aspectFill"></image>
<text> {{ i18n['(示例)'] }}</text>
</view> -->
</view>
</view>
<view class="public-input-wapper active">
<view class="input-container border">
<view class="lside"><text style="color: #FC501E;">*</text> 营业执照名称 </view>
<view class="rside">
<input type="text" style="color: #333;" maxlength="12" class="text-right" v-model="licenseName"
placeholder="请输入营业执照名称" placeholder-class="placeholder">
</view>
</view>
</view>
</view>
<view class="public-input-wapper active">
<view class="input-container border">
<view class="lside"> <text style="color: #FC501E;">*</text>店铺经营名称</view>
<view class="rside">
<input type="text" style="color: #333;" maxlength="35" class="text-right" v-model="name"
:placeholder="'请输入店铺经营名称'" placeholder-class="placeholder">
</view>
</view>
</view>
<view class="" v-if="accountType==2">
<view class="public-input-wapper active">
<view class="input-container border">
<view class="lside"><text style="color: #FC501E;">*</text> 营业执照号码</view>
<view class="rside">
<input type="text" style="color: #333;" maxlength="18" class="text-right" v-model="licenseNo"
:placeholder="'请输入营业执照号码'" placeholder-class="placeholder">
</view>
</view>
</view>
<view class="public-input-wapper active">
<view class="input-container border">
<view class="lside"><text style="color: #FC501E;">*</text> 营业执照开始时间</view>
<view class="rside">
<input type="text" style="color: #333;" maxlength="-1" class="text-right" v-model="licenseDtStart"
:placeholder="'请输入营业执照开始时间'" placeholder-class="placeholder">
</view>
</view>
</view>
<view class="public-input-wapper active">
<view class="input-container border">
<view class="lside"><text style="color: #FC501E;">*</text> 营业执照过期时间</view>
<view class="rside">
<input type="text" style="color: #333;" maxlength="-1" class="text-right" v-model="licenseDtEnd"
:placeholder="'请输入营业执照过期时间'" placeholder-class="placeholder">
</view>
</view>
</view>
</view>
<view class="public-text-area-wapper">
<view class="text-area-title"> <text style="color: #FC501E;">*</text>商户经营内容</view>
<textarea :placeholder=" i18n['请输入']" maxlength="-1" v-model="business_scope"
placeholder-class="placeholder"></textarea>
</view>
<view class="public_bottom" style="height: 2rpx;background: #eee;"></view>
<view class="public-input-wapper active" @click="showMulLinkageThreePicker">
<view class="input-container border">
<view class="lside"> <text style="color: #FC501E;">*</text>{{ i18n['店铺地址'] }}</view>
<view :class="{'rside-text': true, gray: !lat}">{{lat ? address : i18n['请选择']}}</view>
<image style="width: 14rpx;height: 26rpx;margin-left: 16rpx;" src="../../../../static/my/right-arrow.png">
</image>
</view>
</view>
<view class="public-text-area-wapper">
<view class="text-area-title"> <text style="color: #FC501E;">*</text>{{ i18n['详细地址'] }}</view>
<textarea :placeholder=" i18n['请输入']" v-model="address_desc" placeholder-class="placeholder"></textarea>
</view>
<!-- <view class="public_bottom" style="height: 20rpx;background: #eee;"></view> -->
<view class="public-input-wapper">
<view class="input-container border">
<view class="lside"><text style="color: #FC501E;">*</text> 店铺LOGO </view>
<view class="rside-text gray flex align-center justify-end" style="padding-right: 0;">
<image @tap="shopLogo('logo',1)" :src="logo?logo:'../../../../static/logo.png'" mode="aspectFill"
class="avatar"></image>
<image style="width: 14rpx;height: 26rpx;margin-left: 16rpx;" src="../../../../static/my/right-arrow.png">
</image>
</view>
</view>
</view>
<view class="public-input-wapper active" @tap="menuTap">
<view class="input-container border">
<view class="lside"> <text style="color: #FC501E;">*</text>店铺类型</view>
<view :class="{'rside-text': true, gray: !app_menu_name}">{{app_menu_name ? app_menu_name : i18n['请选择']}}
</view>
<image style="width: 14rpx;height: 26rpx;margin-left: 16rpx;" src="../../../../static/my/right-arrow.png">
</image>
</view>
</view>
<view class="public-input-wapper active" @tap="menuShopTap">
<view class="input-container border">
<view class="lside"> <text style="color: #FC501E;">*</text>经营商品类目</view>
<view :class="{'rside-text': true, gray: !goods_typename}">{{goods_typename ? goods_typename : i18n['请选择']}}
</view>
<image style="width: 14rpx;height: 26rpx;margin-left: 16rpx;" src="../../../../static/my/right-arrow.png">
</image>
</view>
</view>
<!-- <view class="public-input-wapper active" @tap="handleShowlinkage('linkage')">
<view class="input-container border">
<view class="lside">{{LANGUAGE_DATA['所在城市'][LANGUAGE]}}</view>
<view :class="{'rside-text': true, gray: !city_name}">{{city_name ? city_name : LANGUAGE_DATA['请选择'][LANGUAGE]}}</view>
<text class="iconfont">&#xe839;</text>
</view>
</view> -->
<!-- <view class="public_bottom" style="height: 20rpx;background: #eee;"></view> -->
<view class="public-text-area-wapper">
<view class="text-area-title"> <text style="color: #FC501E;">*</text>请上传法人身份证</view>
</view>
<view class="public-text-area-wapper ">
<view class="item">
<view class="">
<image style="margin-top: 48rpx;" @tap="shopLogo('ID_CARD_FRONT',2)"
:src="ID_CARD_FRONT?ID_CARD_FRONT:'../../static/file.png'" mode="aspectFill"></image>
<text> {{ i18n['身份证人像面'] }}</text>
</view>
<!-- <view class="">
<image src="../../static/auth3.png" mode="aspectFill"></image>
<text> {{ i18n['(示例)'] }}</text>
</view> -->
</view>
<view class="item">
<view class="">
<image @tap="shopLogo('ID_CARD_BEHIND',2)" :src="ID_CARD_BEHIND?ID_CARD_BEHIND:'../../static/file.png'"
mode="aspectFill"></image>
<text> {{ i18n['身份证国徽面'] }}</text>
</view>
<!-- <view class="">
<image src="../../static/auth2.png" mode="aspectFill"></image>
<text> {{ i18n['(示例)'] }}</text>
</view> -->
</view>
</view>
<view class="border-bottom"></view>
<view class="public-input-wapper active">
<view class="input-container border">
<view class="lside"><text style="color: #FC501E;">*</text> 法人姓名 </view>
<view class="rside">
<input type="text" style="color: #333;" maxlength="12" class="text-right" v-model="real_name"
:placeholder=" i18n['请输入负责人姓名']" placeholder-class="placeholder">
</view>
</view>
</view>
<view class="public-input-wapper active">
<view class="input-container border">
<view class="lside"><text style="color: #FC501E;">*</text> 法人身份证</view>
<view class="rside">
<input type="text" style="color: #333;" maxlength="18" class="text-right" v-model="id_no"
:placeholder=" i18n['请输入18位身份证号码']" placeholder-class="placeholder">
</view>
</view>
</view>
<view class="public-input-wapper active">
<view class="input-container border">
<view class="lside"><text style="color: #FC501E;">*</text> 法人身份证开始日期</view>
<view class="rside">
<input type="text" style="color: #333;" maxlength="-1" class="text-right" v-model="larIdCardStart"
placeholder="请输入法人身份证开始日期" placeholder-class="placeholder">
</view>
</view>
</view>
<view class="public-input-wapper active">
<view class="input-container border">
<view class="lside"><text style="color: #FC501E;">*</text> 法人身份证过期日期</view>
<view class="rside">
<input type="text" style="color: #333;" maxlength="-1" class="text-right" v-model="larIdCardEnd"
placeholder="请输入法人身份证过期日期" placeholder-class="placeholder">
</view>
</view>
</view>
<!-- -->
<!-- <view class="border-bottom"></view>
<view class="public-text-area-wapper">
<view class="text-area-title"> 请上传经营许可证</view>
</view>
<view class="public-text-area-wapper">
<view class="item">
<view class="">
<image @tap="shopLogo('food_image',1)" :src="food_image?food_image:'../../static/file.png'" mode="aspectFill"></image>
<text> {{ i18n['食品经营许可证'] }}</text>
</view>
</view>
</view> -->
<view class="border-bottom"></view>
<view class="public-text-area-wapper">
<view class="text-area-title"> <text style="color: #FC501E;">*</text>请上传门头照</view>
</view>
<view class="public-text-area-wapper">
<view class="item">
<view class="">
<image @tap="shopLogo('SHOP_OUTSIDE_IMG',1)"
:src="SHOP_OUTSIDE_IMG?SHOP_OUTSIDE_IMG:'../../static/file.png'" mode="aspectFill"></image>
<text> 门头照</text>
</view>
<!-- <view class="">
<image src="../../static/auth4.png" mode="aspectFill"></image>
<text> {{ i18n['(示例)'] }}</text>
</view> -->
</view>
</view>
<view class="border-bottom"></view>
<view class="public-text-area-wapper">
<view class="text-area-title"> <text style="color: #FC501E;">*</text>商户内部照片</view>
</view>
<view class="public-text-area-wapper">
<view class="item">
<view class="">
<image @tap="shopLogo('SHOP_INSIDE_IMG',1)" :src="SHOP_INSIDE_IMG?SHOP_INSIDE_IMG:'../../static/file.png'"
mode="aspectFill"></image>
<text> 商户内部照片</text>
</view>
<!-- <view class="">
<image src="../../static/auth4.png" mode="aspectFill"></image>
<text> {{ i18n['(示例)'] }}</text>
</view> -->
</view>
</view>
<view class="border-bottom"></view>
<view class="public-text-area-wapper">
<view class="text-area-title"> <text style="color: #FC501E;">*</text>商户收银台照片</view>
</view>
<view class="public-text-area-wapper">
<view class="item">
<view class="">
<image @tap="shopLogo('CHECKSTAND_IMG',1)" :src="CHECKSTAND_IMG?CHECKSTAND_IMG:'../../static/file.png'"
mode="aspectFill"></image>
<text> 商户收银台照片</text>
</view>
<!-- <view class="">
<image src="../../static/auth4.png" mode="aspectFill"></image>
<text> {{ i18n['(示例)'] }}</text>
</view> -->
</view>
</view>
<view class="border-bottom"></view>
<view class="public-text-area-wapper">
<view class="text-area-title">其他资质照片</view>
</view>
<view class="public-text-area-wapper">
<view class="item">
<view class="">
<image @tap="shopLogo('store_images',1)" :src="store_images?store_images:'../../static/file.png'"
mode="aspectFill"></image>
<text> 其他资质照片</text>
</view>
<!-- <view class="">
<image src="../../static/auth4.png" mode="aspectFill"></image>
<text> {{ i18n['(示例)'] }}</text>
</view> -->
</view>
</view>
<view class="border-bottom"></view>
<view class="public-text-area-wapper explain">
<view class="">{{ i18n['注'] }}</view>
{{ i18n['为保证平台用户安全性,需要您进行实名认证,实名认证通过之后即可登录并在平台进行营业'] }}
</view>
</view>
<view>
<view class="fotter-bottom">
<button :loading="submitLoading" @tap="onTapSaveBtn" type="primary" class="login-btn">{{ i18n['提交'] }}</button>
<view class="fotter flex align-center">
<image class="image" @click="handle_select" v-if="checked" src="../../static/select.png"></image>
<image class="image" @click="handle_select" v-else src="../../static/noselect.png"></image>
{{ i18n['提交即默认同意'] }}
<text class="flex align-center" @tap="handleJump" data-url="/pages/user/login/user-agreement/index?id=7">{{ i18n['商家认证协议'] }} </text>
</view>
</view>
<w-picker mode="selector" :options="shopCategorys" @confirm="handleSelect($event)" ref="selector"></w-picker>
<w-picker mode="linkage" :value="defaultRegion1" :options="cityList" :level="2" default-type="id"
@confirm="onConfirm($event,'linkage')" @cancel="onCancel" ref="linkage"></w-picker>
<w-picker mode="selector" value="" default-type="name" :options="accountTypeList"
@confirm="accountTypeSure($event)" @cancel="onCancelTap" ref="accountType"></w-picker>
</view>
</view>
</template>
<script>
import {
validate,
UploadImage,
UploadImageLakala
} from '@/common/utils/index';
import {
GAODE_KEY
} from '@/common/config.js';
// 高德地图sdk
import amapFile from '../../../../libs/amap-wx.js';
// import cityData from '@/components/mpvue-citypicker/city-data/citydata.js';
// import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue';
import wPicker from '../../components/w-picker/w-picker.vue';
import ImageCropper from "./invinbg-image-cropper.vue";
export default {
data() {
return {
accountTypename: "企业(我有营业执照)",
accountType: "2", //结算账户类型 1小微 2企业
accountTypeList: [{
label: "小微个人(我仅有身份证)",
value: "1"
},
{
label: "企业(我有营业执照)",
value: "2"
}
],
myAmapFun: null, // 高德地图实例
submitLoading: false,
real_name: '', //负责人
id_number: '', //负责人ID
logo: '', //店铺logo
name: '', //店铺名称
address_desc: '', //详细地址
category_id: '', //店铺分类ID
address: '', //店铺地址
mobile: '', //用户电话
telephone: '', //店铺电话
id_no: '', //身份证
ID_CARD_BEHIND: '', //ID_正面
ID_CARD_FRONT: '', //ID_反面
BUSINESS_LICENCE: '', //营业执照
food_image: '', //食品经营许可证
SHOP_INSIDE_IMG: "",
CHECKSTAND_IMG: "",
store_images: "",
lng:'',//经度
lat:'',//纬度
// lng: '113.56565', //经度
// lat: '34.6565', //纬度
is_afresh: '0', //是否重新认证 0=否 1=是
city_id: '', //所属城市id
city_name: '', //所属城市名称
app_menu_name: '', //店铺分类
shopCategorys: [], //店铺分类数组
goods_type: '', //商品类目
goods_typename: '', //商品类目名称
cityList: [],
defaultRegion1: '',
checked: false,
SHOP_OUTSIDE_IMG: "", //门头照
longitude: "",
latitude: "",
validity_period: "",
larIdCardEnd: "",
larIdCardStart: "",
licenseName: "",
licenseNo: "",
licenseDtStart: "",
licenseDtEnd: "",
business_scope: ""
}
},
onLoad(options) {
this.is_afresh = options.type;
this.mobile = options.phone ? options.phone : "";
this.authInfoCheck()
this.getShopCategorys();
this.getcityList()
// 初始化高德地图SDK,记得换成自己的key
this.myAmapFun = new amapFile.AMapWX({
key: GAODE_KEY
});
uni.$on('customChooseLocation', res => {
console.log(res)
let location = res.name == res.address ? res.address : res.name == '我的位置' ? res.address : res.name + res
.address
this.address_desc = location
// this.address =location;
this.lat = res.latitude
this.lng = res.longitude
// if(res.citys){
// this.address = `${res.citys.areap}${res.citys.areac}${res.citys.areax}`;
// }
})
//选择分类
uni.$on('CHOOSEMENU', res => {
console.log(res)
this.category_id = res.id
this.app_menu_name = res.name
})
//选择商品类目
uni.$on('CHOOSEMENUSHOP', res => {
console.log(res)
this.goods_type = res.id
this.goods_typename = res.name
})
this.location()
},
onUnload() {
uni.$off('customChooseLocation')
uni.$off('CHOOSEMENU')
},
components: {
// mpvueCityPicker,
ImageCropper,
wPicker
},
onNavigationBarButtonTap(options) {
if (options.index == 0) {
this.handleSave()
}
},
methods: {
accountTypeTap() {
this.$refs.accountType.show()
},
accountTypeSure(e) {
console.log(e)
this.accountType = e.value
this.accountTypename = e.result
},
location() {
uni.getLocation({
geocode: true,
type: "gcj02",
success: adr => {
this.longitude = adr.longitude
this.latitude = adr.latitude
}
});
},
//选择地址
showMulLinkageThreePicker() {
uni.chooseLocation({
latitude: this.latitude,
longitude: this.longitude,
success: res => {
console.log(res, '地图');
this.latitude = res.latitude; // 区
this.longitude = res.longitude; // 详细地址
this.myAmapFun.getRegeo({
location: res.longitude + ',' + res.latitude,
success: data => {
//成功回调
console.log('sdk回调', data);
let regeoData = data[0].regeocodeData.addressComponent;
this.province = regeoData.province;
this.city = Array.isArray(regeoData.city) && regeoData.city.length == 0 ? regeoData
.province : regeoData.city;
this.district = regeoData.district;
// 详细地址是否含有省市区
let addr = this.province + this.city + this.district;
// 直辖市
if (this.province == this.city) addr = this.province + this.district;
let addrInfo = res.address;
if (addrInfo.startsWith(addr)) addrInfo = addrInfo.replace(addr, '');
if (addrInfo != res.name) this.addressDesc = addrInfo + res.name;
else this.addressDesc = addrInfo;
this.provinceCode = regeoData.adcode.substr(0, 2) + '0000';
this.cityCode = regeoData.adcode.substr(0, 4) + '00';
this.districtCode = regeoData.adcode + '';
console.log(this.province + this.city + this.district + this.addressDesc);
this.address = this.province + '-' + this.city + '-' + this.district
this.address_desc = this.addressDesc
// this.address =location;
this.lat = data[0].latitude
this.lng = data[0].longitude
},
fail: info => {
//失败回调
console.log(info);
}
});
}
});
},
//选择分类
menuTap() {
uni.navigateTo({
url: '/pages/user/login/cart/cart-page/index'
})
},
//选择分类
menuShopTap() {
uni.navigateTo({
url: '/pages/user/login/cart/cart-page/shopmenu?type=' + 1
})
},
/**
* @param 是否选择同意协议
*/
handle_select() {
this.checked = !this.checked;
},
getcityList() {
this.$api.get(global.apiUrls.getcityList).then(res => {
this.cityList = res.data.data;
console.log(this.cityList)
})
},
//获取商家信息
authInfoCheck() {
this.$api.post(global.apiUrls.authInfoCheck).then(res => {
if (res.data.code == 1) {
this.real_name = res.data.data.real_name;
this.id_number = res.data.data.id_number;
this.logo = res.data.data.logo;
this.name = res.data.data.name;
this.category_id = res.data.data.category_id;
this.app_menu_name = res.data.data.category_name;
this.address = res.data.data.address;
this.address_desc = res.data.data.address_desc;
this.mobile = res.data.data.mobile;
this.id_no = res.data.data.id_no;
this.validity_period = res.data.data.validity_period;
this.ID_CARD_BEHIND = res.data.data.id_front;
this.ID_CARD_FRONT = res.data.data.id_back;
this.BUSINESS_LICENCE = res.data.data.business_image;
this.food_image = res.data.data.food_image;
this.SHOP_OUTSIDE_IMG = res.data.data.door_header_image;
this.business_scope = res.data.data.business_scope;
this.city_id = res.data.data.city_id;
this.city_name = res.data.data.city_name;
this.lng = res.data.data.lng;
this.lat = res.data.data.lat;
this.accountType = res.data.data.accountType
this.accountTypename = res.data.data.accountType == 1 ? '小微个人(我仅有身份证)' : '企业(我有营业执照)'
this.store_images = res.data.data.store_images
this.licenseName = res.data.data.licenseName
this.licenseNo = res.data.data.licenseNo
this.licenseDtStart = res.data.data.licenseDtStart
this.licenseDtEnd = res.data.data.licenseDtEnd
this.larIdCardStart = res.data.data.larIdCardStart
this.larIdCardEnd = res.data.data.larIdCardEnd
this.SHOP_INSIDE_IMG = res.data.data.SHOP_INSIDE_IMG
this.CHECKSTAND_IMG = res.data.data.CHECKSTAND_IMG
let goods_list = res.data.data.goods_type_name
let goods_type = []
let goods_type_name = []
goods_list.forEach(item => {
goods_type.push(item.id)
goods_type_name.push(item.name)
})
this.goods_type = goods_type.join(',')
this.goods_typename = goods_type_name.join(',')
}
})
},
// 获取店铺分类
getShopCategorys() {
console.log(this.category_id)
this.$api.get(global.apiUrls.shopCategorys).then(res => {
if (res.data.code == 1) {
this.shopCategorys = res.data.data.map(item => ({
value: item.id,
label: item.name
}))
if (this.category_id) {
this.shopCategorys.forEach(res => {
if (res.value == this.category_id) {
this.app_menu_name = res.label
}
})
}
}
})
},
// 删除logo
handleDeleteFacadeImage() {
this.postData.facade_image = ''
},
// 选择上传图片
shopLogo(type, imgtype) {
let self = this
uni.chooseImage({
count: 1, //默认9
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
success: function(res) {
const tempFilePaths = res.tempFilePaths;
console.log(tempFilePaths)
new UploadImage(tempFilePaths, {
complete: function(res) {
console.log(res)
self[type] = res[0].path
if (imgtype == 2) {
self.post669b65f5ba7f8(type, res[0].path)
}
}
})
return
if (imgtype == 1) {
new UploadImage(tempFilePaths, {
complete: function(res) {
console.log(res)
self[type] = res[0].path
}
})
} else {
new UploadImageLakala(tempFilePaths, type, {
complete: function(res) {
console.log(res)
self[type] = res[0]
self.post669b65f5ba7f8(type, res[0])
}
})
}
}
});
},
post669b65f5ba7f8(imgtype, img) {
let type = imgtype == 'ID_CARD_BEHIND' ? 11 : imgtype == 'ID_CARD_FRONT' ? 1 : 7
this.$api.post(global.apiUrls.post669b65f5ba7f8, {
img: img,
type: type
}).then(res => {
if (res.data.code == 1) {
if (type == 1) {
//人像面
this.id_no = res.data.data.idNumber
this.real_name = res.data.data.name
} else if (type == 11) {
//国徽面
this.validity_period = res.data.data.validity_period
let larIdCardStart = res.data.data.start
let larIdCardEnd = res.data.data.end
// this.validity_period = res.data.data.validity_period
this.larIdCardStart = larIdCardStart
this.larIdCardEnd = larIdCardEnd
} else {
this.licenseDtStart = res.data.data.found_time
this.licenseDtEnd = res.data.data.end_time
this.licenseNo = res.data.data.social_credit_code
// this.businessContent = res.data.data.business_scope
this.business_scope = res.data.data.business_scope
}
}
})
},
cancel() {
console.log('canceled')
},
// 弹出城市选择框
handleShowlinkage(type) {
this.$refs[type].show();
},
onConfirm(e) {
console.log(e)
this.city_id = e.value[1];
console.log(this.city_id)
this.city_name = e.result;
},
onCancel() {},
// 弹出店铺分类选择框
handleShowSelector(type) {
this.$refs[type].show();
},
// 选择店铺分类
handleSelect(e) {
console.log(e)
this.app_menu_name = e.result;
this.category_id = e.value
},
// 保存用户信息
onTapSaveBtn() {
if (this.submitLoading) return false;
let {
real_name,
id_number,
logo,
name,
category_id,
address,
address_desc,
mobile,
ID_CARD_BEHIND,
ID_CARD_FRONT,
BUSINESS_LICENCE,
food_image,
city_id,
lng,
lat,
is_afresh,
telephone,
checked,
id_no,
goods_type,
SHOP_OUTSIDE_IMG,
validity_period,
licenseName,
licenseNo,
licenseDtStart,
licenseDtEnd,
business_scope,
accountType,
CHECKSTAND_IMG,
SHOP_INSIDE_IMG,
larIdCardStart,
password,
larIdCardEnd,
store_images
} = this
if (!validate(mobile, 'require')) return this.$message.info('请输入注册手机号');
if (!validate(mobile, 'phone')) return this.$message.info('请输入正确注册手机号');
// if (!validate(password, 'password')) {
// this.$message.info('请输入字母加数字6-12位密码');
// return false;
// }
if (accountType > 2) return this.$message.info('请输入商户性质');
if (accountType == 2) {
if (!BUSINESS_LICENCE) return this.$message.info(this.i18n['请上传营业执照']);
if (!licenseName) return this.$message.info('请输入营业执照名称');
}
if (!name) return this.$message.info('请输入店铺经营名称');
if (accountType == 2) {
if (!licenseNo) return this.$message.info('请输入营业执照号码');
if (!licenseDtStart) return this.$message.info('请输入营业执照开始时间');
if (!licenseDtEnd) return this.$message.info('请输入营业执照结束时间');
}
if (!business_scope) return this.$message.info('请输入商户经营内容');
if (!lat) return this.$message.info(this.i18n['请选择店铺地址']);
if (!address_desc) return this.$message.info(this.i18n['请输入详细地址']);
// if (!id_number) return this.$message.info( this.i18n['请输入ID号']);
if (!logo) return this.$message.info(this.i18n['请上传店铺logo']);
// if (!city_id) return this.$message.info(this.i18n['请选择城市']);
if (!category_id) return this.$message.info("请选择店铺类型");
if (!goods_type) return this.$message.info('请选择经营商品类目');
if (!ID_CARD_BEHIND) return this.$message.info("请上传身份证人像面");
if (!ID_CARD_FRONT) return this.$message.info('请上传身份证国徽面');
if (!real_name) return this.$message.info(this.i18n['请输入姓名']);
if (!validate(id_no, 'require')) return this.$message.info("请输入身份证号");
if (!validate(id_no, 'idcard')) return this.$message.info("请输入正确身份证号");
if (!larIdCardStart) return this.$message.info('请输入法人身份证开始日期');
if (!larIdCardEnd) return this.$message.info('请输入法人身份证过期日期');
// if (!food_image) return this.$message.info(this.i18n['请上传食品经营许可证']);
if (!SHOP_OUTSIDE_IMG) return this.$message.info('请上传店铺门头照');
if (!SHOP_INSIDE_IMG) return this.$message.info('请上传商铺内部照片');
if (!CHECKSTAND_IMG) return this.$message.info('请上传收银台照片');
if (!checked) return this.$message.info(this.i18n['请同意商家认证协议']);
this.submitLoading = true
this.$api.post(global.apiUrls.authInfoSubmit, {
real_name: real_name,
logo: logo,
name: name,
licenseName: licenseName,
category_id: category_id,
address: address,
address_desc: address_desc,
mobile: mobile,
id_front: ID_CARD_BEHIND,
id_back: ID_CARD_FRONT,
business_image: BUSINESS_LICENCE,
// city_id:city_id,
lng: lng,
lat: lat,
food_image: food_image,
id_no: id_no,
goods_type: goods_type,
door_header_image: SHOP_OUTSIDE_IMG,
CHECKSTAND_IMG: CHECKSTAND_IMG,
SHOP_INSIDE_IMG: SHOP_INSIDE_IMG,
validity_period: validity_period,
business_scope: business_scope,
licenseNo: licenseNo,
licenseDtStart: licenseDtStart,
licenseDtEnd: licenseDtEnd,
store_images: store_images,
accountType:accountType,
larIdCardStart:larIdCardStart,
larIdCardEnd:larIdCardEnd
}).then(res => {
console.log(res)
this.submitLoading = false
this.$message.info(res.data.msg)
if (res.data.code == 1) {
setTimeout(() => {
uni.redirectTo({
url: '/pages/user/login/examine/index'
})
}, 1000)
}
}).catch(err => {
this.$message.info('保存失败')
this.submitLoading = false
})
},
}
}
</script>
<style lang="scss">
@import './index.scss';
</style>

270
pages/dl/auth/indexmcc.vue Normal file
View File

@ -0,0 +1,270 @@
<template>
<view class="remark bg-white">
<!-- 自定义头部 start -->
<view class="cu-custom" :style="[{ height: CustomBar + 'px' }]">
<view class="cu-bar fixed"
:style="{height: CustomBar + 'px', paddingTop: StatusBar + 'px', overflow: 'hidden', }">
<view class="action position-relative" :style="{ zIndex: 1, marginLeft: '30rpx' }" @tap="back()"><text
class="cuIcon-back"></text></view>
<view class="content font-00"
:style="[{ top: StatusBar + 'px', fontSize: '36rpx', fontWeight: 500 }, ]">
选择银行
</view>
<view class="action position-relative" :style="{ zIndex: 1, marginLeft: '30rpx' }" >
</view>
</view>
</view>
<view class="newadress flex align-center">
<view style="margin: 0 30upx 0 30upx !important" class="search-form radius-34 flex justify-between">
<view class="flex align-center" style="padding: 0 24rpx;">
<!-- <image class="" style="width: 28upx;height: 28upx;margin-left: 24upx;margin-right: 16upx;"
src="/static/image/search.png" mode=""></image> -->
<input type="search" confirm-type="search" v-model="keyword" @input="inputTap" value="" @confirm="handleSearch"
placeholder="搜索银行名称" style="font-size: 28rpx;" />
</view>
</view>
</view>
<view class="">
<view class="adresslist" v-for="(item1, index1) in keylist" :key="index1"
@click="checksearch(item1)">
<view class="name">
{{item1.name}}
</view>
</view>
<fu-empty-ui v-if="keylist.length==0"></fu-empty-ui>
</view>
<view class="hp">
</view>
</view>
</template>
<script>
// 高德地图sdk
export default {
data() {
return {
keyword: '',
keylist: [],
settleCityCode:""
};
},
onLoad(option) {
console.log(option)
this.settleCityCode = option.settleCityCode
this.post667a7503c9762()
},
onUnload() {
},
methods: {
post667a7503c9762(){
this.$api.post(global.apiUrls.post671358ea7dda0, {
name: this.keyword
}).then(res => {
this.keylist = res.data.data
})
},
checksearch(item) {
uni.$emit('MCCNAME', {
code: item.code,
name:item.name
});
uni.navigateBack({
delta: 1
})
},
inputTap(e){
console.log(this.keyword)
this.post667a7503c9762()
},
handleSearch() {
console.log(this.keyword)
this.post667a7503c9762()
},
back(delta) {
uni.navigateBack({
delta: delta || 1,
});
},
},
};
</script>
<style lang="scss" scoped>
.adddizhi {
width: 686upx;
position: fixed;
bottom: 32upx;
left: 32upx;
line-height: 88upx;
font-size: 24upx;
z-index: 999;
text-align: center;
color: #FFFFFF;
border-radius: 32upx;
background-color: $theme;
}
.hp {
width: 750upx;
height: 130upx;
}
.all {
width: 750upx;
padding: 0 32upx;
position: relative;
line-height: 100upx;
&:after {
@include bottom-line(#eee)
}
}
.search-form {
width: 686upx;
border-radius: 32upx;
background-color: #F6F7F9;
line-height: 64rpx;
height: 64rpx;
}
.newadress {
margin-top: 32upx;
width: 750upx;
padding: 0 32upx;
.name {
width: 120upx;
}
image {
width: 38upx;
height: 38upx;
}
}
.remark {
min-height: 100vh;
width: 100vw;
overflow: hidden;
.cu-custom {
.cu-bar{
background: #fff;
}
.content {
font-weight: 500;
}
.save {
font-size: 28rpx;
font-weight: 500;
z-index: 1;
}
}
.adresslist {
padding: 24rpx 32upx;
width: 100%;
// display: flex;
align-items: center;
line-height: 45upx;
.xian {
margin-right: 20upx;
width: 6upx;
height: 32upx;
background: #3994D8;
opacity: 1;
}
.title {
font-size: 28upx;
font-family: PingFang SC;
font-weight: 400;
color: #666666;
margin-left: 16upx;
}
}
.aditem {
margin: 0 32upx;
margin-top: 32upx;
font-size: 32upx;
font-family: PingFang SC;
font-weight: 400;
line-height: 45upx;
color: #333333;
}
.bottom-status {
height: 156rpx;
height: calc(156rpx + constant(safe-area-inset-bottom));
height: calc(156rpx + env(safe-area-inset-bottom));
}
.bottom-action {
position: fixed;
right: 32rpx;
left: 32rpx;
bottom: 56rpx;
bottom: calc(56rpx + constant(safe-area-inset-bottom));
bottom: calc(56rpx + env(safe-area-inset-bottom));
display: flex;
view {
height: 88rpx;
flex: 1;
line-height: 88rpx;
text-align: center;
border-radius: 88rpx;
color: #ffffff;
}
.btn1 {
margin-right: 32rpx;
background: linear-gradient(126deg, #39b54a 0%, #8dc63f 100%);
}
.btn2 {
background: #3994D8;
font-size: 32rpx;
color: #fff;
}
}
.active {
color: #3994D8;
}
.bg-orange2 {
background: #ff9d00;
color: #fff;
margin-right: 14rpx;
}
.address-icon {
width: 30rpx;
height: 30rpx;
}
}
.margin-bottom-20 {
border-bottom: 1px solid #EEEEEE;
margin-bottom: 20rpx;
}
</style>

View File

@ -0,0 +1,759 @@
<template>
<view class="vue-cropper" ref="cropper" :style="{ top : `${containerTop}px` }" v-show="show">
<view class="cropper-box">
<view class="cropper-box-canvas" @touchstart.stop.prevent="imgTouchStart" @touchmove.stop.prevent="imgMoveing" @touchend.stop.prevent="imgMoveEnd" :style="{
'width': imageWidth + 'px',
'height': imageHeight + 'px',
'transform': 'scale(' + scale + ',' + scale + ') ' + 'translate3d('+ x / scale + 'px,' + y / scale + 'px,' + '0)'
+ 'rotateZ('+ rotate * 90 +'deg)'
}">
<image :src="src" alt="cropper-img" ref="cropperImg" mode="scaleToFill" class="uni-image"></image>
</view>
</view>
<view class="cropper-drag-box cropper-modal cropper-move pointer-events"></view>
<view class="cropper-crop-box" :class="{'pointer-events': cropFixed}" :style="{'width': cropW + 'px','height': cropH + 'px','transform': 'translate3d('+ cropOffsertX + 'px,' + cropOffsertY + 'px,' + '0)'}">
<view class="cropper-view-box">
<image :style="{'width': imageWidth + 'px','height': imageHeight + 'px','transform': 'scale(' + scale + ',' + scale + ') ' + 'translate3d('+ (x - cropOffsertX) / scale + 'px,' + (y - cropOffsertY) / scale + 'px,' + '0)' + 'rotateZ('+ rotate * 90 +'deg)'}" mode="scaleToFill" :src="src" alt="cropper-img"></image>
</view>
<view v-if="!cropFixed" class="cropper-face cropper-move" @touchstart.stop.prevent="touchStart" @touchmove.stop.prevent="cropMoveing"></view>
<view class="crop-line line-w"></view>
<view class="crop-line line-a"></view>
<view class="crop-line line-s"></view>
<view class="crop-line line-d"></view>
<block v-if="!cropFixed">
<view class="crop-point point-lt" @touchstart.stop.prevent="touchStart" @touchmove.stop.prevent="dragMove($event, 'left-top')"></view>
<view class="crop-point point-mt" @touchstart.stop.prevent="touchStart" @touchmove.stop.prevent="dragMove($event, 'middle-top')"></view>
<view class="crop-point point-rt" @touchstart.stop.prevent="touchStart" @touchmove.stop.prevent="dragMove($event, 'right-top')"></view>
<view class="crop-point point-ml" @touchstart.stop.prevent="touchStart" @touchmove.stop.prevent="dragMove($event, 'middle-left')"></view>
<view class="crop-point point-mr" @touchstart.stop.prevent="touchStart" @touchmove.stop.prevent="dragMove($event, 'middle-right')"></view>
<view class="crop-point point-lb" @touchstart.stop.prevent="touchStart" @touchmove.stop.prevent="dragMove($event, 'left-bottom')"></view>
<view class="crop-point point-mb" @touchstart.stop.prevent="touchStart" @touchmove.stop.prevent="dragMove($event, 'middle-bottom')"></view>
<view class="crop-point point-rb" @touchstart.stop.prevent="touchStart" @touchmove.stop.prevent="dragMove($event, 'right-bottom')"></view>
</block>
</view>
<canvas canvas-id="myCanvas" class="cropper-canvas" :style="{ 'width': cropW + 'px','height': cropH + 'px' }"></canvas>
<view class="btn-group">
<view class="btn-item reset-btn" v-show="showResetBtn" @tap="init"></view>
<view class="btn-item rotate-btn" v-show="showRotateBtn" @tap="rotateHandler"></view>
</view>
<view class="uni-info__ft">
<view class="uni-modal__btn uni-modal__btn_default" style="color: rgb(0, 0, 0);" @tap="cancel">取消</view>
<view class="uni-modal__btn uni-modal__btn_primary" style="color: rgb(0, 122, 255);" @tap="confirm">确定</view>
</view>
</view>
</template>
<script>
export default {
name: 'image-cropper',
props: {
cropWidth: {
type: Number,
default: 200,
},
cropHeight: {
type: Number,
default: 200
},
cropFixed: {
type: Boolean,
default: false,
},
src: {
type: String,
},
showResetBtn: {
type: Boolean,
default: true,
},
showRotateBtn: {
type: Boolean,
default: true,
}
},
data() {
const sysInfo = uni.getSystemInfoSync();
const pixelRatio = sysInfo.pixelRatio
return {
show: false,
scale: 1,
rotate: 0,
cropW: 0,
cropH: 0,
cropOldW: 0,
cropOldH: 0,
sysInfo: sysInfo,
pixelRatio: pixelRatio,
imageRealWidth: 0,
imageRealHeight: 0,
cropOffsertX: 0,
cropOffsertY: 0,
startX: 0,
startY: 0,
// 裁剪框与边界间距
border: 5,
x: 0,
y: 0,
startL: 0,
oldScale: 1,
}
},
watch: {
src(val) {
if(val.length > 0) {
this.init()
}
},
show(val) {
if(!val) {
this.src = ''
}
}
},
computed: {
containerTop() {
let top = 0
// #ifdef H5
top = 44
// #endif
return top;
},
// 容器高度
containerHeight() {
return this.windowHeight - 48;
},
// 屏幕宽度
windowWidth() {
return this.sysInfo.windowWidth;
},
windowHeight() {
return this.sysInfo.windowHeight;
},
// 图片宽高比
imageRatio() {
if (this.imageRealHeight > 0) {
return this.imageRealWidth / this.imageRealHeight
}
return 0
},
// 等比缩放后的宽度
imageWidth() {
if (this.imageRatio >= 1) {
return this.windowWidth
}
return this.windowWidth * this.imageRatio
},
// 等比缩放后的高度
imageHeight() {
if (this.imageRatio >= 1) {
return this.windowWidth / this.imageRatio
}
return this.windowWidth
},
},
methods: {
rotateHandler() {
if(this.rotate == 3) {
this.rotate = 0;
} else {
++this.rotate
}
},
init() {
this.rotate = 0;
this.scale = 1;
this.cropW = this.cropWidth
this.cropH = this.cropHeight
uni.showLoading({
title: '图片加载中...',
})
this.loadImage(this.src).then((e) => {
uni.hideLoading()
}).catch((e) => {
uni.hideLoading()
uni.showModal({
title: '标题',
content: '图片加载失败'
})
})
},
loadImage(src) {
const _this = this
return new Promise((resolve, reject) => {
uni.getImageInfo({
src: src,
success: (res) => {
_this.imageRealWidth = res.width
_this.imageRealHeight = res.height
_this.cropOffsertX = _this.windowWidth / 2 - _this.cropW / 2
_this.cropOffsertY = _this.windowHeight / 2 - _this.cropH / 2
_this.show = true
_this.$nextTick(() => {
_this.x = _this.windowWidth / 2 - _this.imageWidth / 2
_this.y = _this.containerHeight / 2 - _this.imageHeight / 2
});
resolve(res)
},
fail: (e) => {
_this.show = false
reject(e)
}
})
});
},
cancel() {
this.show = false
this.$emit('cancel')
},
confirm(event) {
uni.showLoading({
title: '裁剪中...',
})
const _this = this
const ctx = uni.createCanvasContext('myCanvas', _this);
const pixelRatio = _this.pixelRatio
const imgage = _this.src
const imgW = _this.imageWidth * _this.scale;
const imgH = _this.imageHeight * _this.scale
const rotate = _this.rotate
let dx = _this.cropOffsertX - _this.x - (_this.imageWidth - imgW) / 2;
let dy = _this.cropOffsertY - _this.y - (_this.imageHeight - imgH) / 2;
ctx.setFillStyle('white')
ctx.fillRect(0, 0, imgW, imgH)
ctx.save()
ctx.rotate((rotate * 90 * Math.PI) / 180);
switch (rotate) {
case 1:
dx += (imgH-imgW) / 2
dy -= (imgH-imgW) / 2
ctx.drawImage(imgage, -dy, dx, imgW, -imgH);
break;
case 2:
ctx.drawImage(imgage, dx, dy, -imgW, -imgH);
break;
case 3:
dx += (imgH-imgW) / 2
dy -= (imgH-imgW) / 2
ctx.drawImage(imgage, dy, -dx, -imgW, imgH);
break;
default:
ctx.drawImage(imgage, -dx, -dy, imgW, imgH);
break;
}
ctx.restore()
ctx.draw(false, () => {
uni.canvasToTempFilePath({
canvasId: 'myCanvas',
destWidth: _this.cropW * pixelRatio,
destHeight: _this.cropH * pixelRatio,
success: (res) => {
uni.hideLoading()
event.detail.tempFilePath = res.tempFilePath
_this.show = false
_this.$emit('confirm', event)
},
fail: (e) => {
uni.hideLoading()
uni.showModal({
title: '提示',
content: '裁剪失败'
})
}
}, _this);
})
},
imgTouchStart(e) {
if(e.touches.length == 2) {
this.oldScale = this.scale
this.scaling = true
const x = e.touches[0].pageX - e.touches[1].pageX
const y = e.touches[0].pageY - e.touches[1].pageY
const hypotenuse = Math.sqrt(
Math.pow(x, 2) +
Math.pow(y, 2)
)
this.startL = Math.max(x, y, hypotenuse)
uni.showModal({
content: this.startL
})
} else {
this.startX = e.touches[0].pageX - this.x
this.startY = e.touches[0].pageY - this.y
}
},
imgMoveing(e) {
if(this.scaling) {
let scale = this.oldScale
const x = e.touches[0].pageX - e.touches[1].pageX
const y = e.touches[0].pageY - e.touches[1].pageY
const hypotenuse = Math.sqrt(
Math.pow(x, 2) +
Math.pow(y, 2)
)
const newL = Math.max(x, y, hypotenuse)
const cha = newL - this.startL;
// 根据图片本身大小 决定每次改变大小的系数, 图片越大系数越小
// 1px - 0.2
let coe = 1;
coe =
coe / this.imageWidth > coe / this.imageHeight
? coe / this.imageHeight
: coe / this.imageWidth;
coe = coe > 0.1 ? 0.1 : coe;
const num = coe * cha;
if (cha > 0) {
scale += Math.abs(num);
} else if (cha < 0) {
scale > Math.abs(num) ? (scale -= Math.abs(num)) : scale;
}
this.scale = scale;
} else {
const moveX = e.touches[0].pageX - this.startX
const moveY = e.touches[0].pageY - this.startY
this.x = moveX
this.y = moveY
}
},
imgMoveEnd() {
setTimeout(() => {
this.scaling = false
}, 100)
},
touchStart(e) {
this.startX = e.touches[0].pageX - this.cropOffsertX;
this.startY = e.touches[0].pageY - this.cropOffsertY;
this.cropOldW = this.cropW
this.cropOldH = this.cropH
},
cropMoveing(e) {
const moveX = this._cropX(e.touches[0].pageX - this.startX)
const moveY = this._cropY(e.touches[0].pageY - this.startY)
this.cropOffsertX = moveX
this.cropOffsertY = moveY
},
dragMove(e, type) {
if(this.cropFixed) {
return false
}
const moveX = e.touches[0].pageX - this.startX
const moveY = e.touches[0].pageY - this.startY
switch (type) {
case 'left-top':
this._cropMoveLeft(moveX)
this._cropMoveTop(moveY)
break;
case 'middle-top':
this._cropMoveTop(moveY)
break;
case 'right-top':
this._cropMoveTop(moveY)
this._cropMoveRight(moveX)
break;
case 'middle-right':
this._cropMoveRight(moveX)
break;
case 'right-bottom':
this._cropMoveRight(moveX)
this._cropMoveBottom(moveY)
break;
case 'middle-bottom':
this._cropMoveBottom(moveY)
break;
case 'left-bottom':
this._cropMoveBottom(moveY)
this._cropMoveLeft(moveX)
break;
case 'middle-left':
this._cropMoveLeft(moveX)
break;
default:
break;
}
},
_cropMoveTop(y) {
const topY = this._cropY(y)
this.cropH += this.cropOffsertY - topY
this.cropOffsertY = topY
},
_cropMoveRight(x) {
if(this.cropOldW + x >= this.windowWidth - this.border) {
return false;
}
this.cropW = this.cropOldW + (x - this.cropOffsertX)
},
_cropMoveBottom(y) {
if(this.cropOldH + y >= this.windowHeight - this.containerTop - this.border) {
return false;
}
this.cropH = this.cropOldH + (y - this.cropOffsertY)
},
_cropMoveLeft(x) {
const leftX = this._cropY(x)
this.cropW += this.cropOffsertX - leftX
this.cropOffsertX = leftX
},
_cropX(x) {
if(x <= this.border) {
return this.border
}
if(x + this.cropW >= this.windowWidth - this.border) {
return this.windowWidth - this.cropW - this.border
}
return x
},
_cropY(y) {
if(y <= this.border) {
return this.border
}
if(y + this.cropH >= this.windowHeight - this.containerTop - this.border) {
return this.windowHeight - this.cropH - this.containerTop - this.border
}
return y
}
}
}
</script>
<style scoped lang="css">
@font-face {
font-family: "iconfont";
src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAR4AAsAAAAACKgAAAQsAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqEfIRGATYCJAMMCwgABCAFhG0HShugB8gOJUHBwAAAAAFEBNmwzd4dtatSmmpFoVAEhUThEAYkCozFKDCqCVO6RfH/89v869awDnTR1qrSANFt4GG4SNxreBn91fmV9f3+53J613ieHba+N1zmGM8PA7oXTaCAxpjei8IoLWFsGLu4jPME6vWJJdovqmgAO4U2LRBnep0K7GJmpYQWanXVOWuLuAFrtenK4haAa/f38QnKsCOpyrRFh6eFWsh5KXnfYcn958BGQNKfE8wmMmaAQpzkuo9Z+ukZluoltVV5abUipL5i/ysArlhWVut/eCRBVNPUjYg6oUo7JTHFoaYDSvdacnKTq9GAB4AY5y2dtL3qpFh1DENdnJC6Hq+xYb7pyRMDMzc/fYoJjY8flwO3m98rMucF+IZHj6Cagw5UeKpxyFbt2rHGY/8jpa7CYMvLfcIesLjY3bdqhaf+nqgQs2qT/+rjCH/VfA0VFGuAC3iE8NEr/Vau8vZsXiUy7+V3c3tQQXMAuNjDCC89KDIHH0OFhnUi81GEPwyc7wZUaN7DnUf4g+ZLQsMKYV/94NjK7R7TEM4niTY1oJ5zEU62aNVaasUub08YLUEam5EnT6a61/I17dNk+vTu9jpJjXhsTFwjqTtpCBxBIIgS6iQnc/Zod1YGKp0rAwsD8kkyP6AwcK0hcAwkiQmBhWvxPZWKDu86aUH2nLEdi9rGX1eXq5P6A1SrnAucMVMdZH/GKi/jyfCqJyucfK3mXpVujXOPfFf5LC4Dvx0X/943JyOq4HuCTZ8KiIPPAb6ro8akpT6ufiq39BQrNlk5mp8pO0JlJLk8f5QalRjoP60IMx0N8n7wGhSD3n6/F1zlcTVz/cR+Ev0lkLSTd7UiPbD/wCxGRMA2Krwro2O0bTQtImbwhjAJc0S3N4ROx15/PH60IzaIOjCbEelqkDOfETNxb/FMixnWNzeJp2KPQw9A5d76jGUOQOUvH7RE/o2RfkNatd3OGf9q0QKbnq8WB7qy+hVqJRjJn1BQgP/iErks0yy5iGJTrOayW7C/z0IoZH0qNH+7N+31XXc7G2p1hZDU6IWs1ghaqDNQpcEKVKu1BfWmFW9u0IFhKUodpswCEFodgqTZHWStbqOF+hqqdPsG1VrDEuodhfueDcZCj+QzuIrFtZh6BNNraIowbCzi1dbhOlOfionKXHoTzgzoY5hCKk/minEKZ/pYMDCoU7IsgREM3Y8Vgcvwvj4aMzK0AdewUpJljWkyGZH3IKmG7gfEHgZOhYXTwqiNwOhp0CiE3ZiFpL5fB6dj0keFKcGV+JvgGAP0vWMUpOQ10GI1VQt3LoMHDNJRYrEIPInAoPXDFEEnrk9P0zDG/FEGOA2WFNkiaZRGhuoRddXS8bX917cL6mn9c6TIUXSekybKHKQfJXFq2KSiRklLYU8dNKWDIX0cAA==') format('woff2');
}
.vue-cropper {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 998;
box-sizing: border-box;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
direction: ltr;
touch-action: none;
text-align: left;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC");
}
.cropper-canvas {
position: absolute;
top: -9999px;
left:-9999px;
z-index: -998;
}
.vue-cropper .uni-info__ft {
position: absolute;
line-height: 48px;
font-size: 18px;
display: -webkit-box;
display: -webkit-flex;
display: flex;
bottom: 0;
left: 0;
right: 0;
z-index: 998;
}
.btn-group {
position: absolute;
right: 30px;
bottom: 78px;
z-index: 998;
}
.btn-item {
position: relative;
width: 40px;
height: 40px;
background: #fff;
border-radius: 20px;
padding: 10px;
display: inline-block;
margin-left: 10px;
}
.btn-item:active {
background: #ccc;
}
.rotate-btn {
font-family: "iconfont" !important;
font-size: 24px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
line-height: 20px;
}
.rotate-btn:before {
content: "\e65c";
margin-left: -2px;
}
.reset-btn {
font-family: "iconfont" !important;
font-size: 24px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
line-height: 20px;
}
.reset-btn:before {
content: "\e648";
margin-left: -2px;
}
.vue-cropper .uni-info__ft:after {
content: " ";
position: absolute;
left: 0;
top: 0;
right: 0;
height: 1px;
border-top: 1px solid #d5d5d6;
color: #d5d5d6;
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
-webkit-transform: scaleY(.5);
transform: scaleY(.5);
z-index: 998;
}
.vue-cropper .uni-modal__btn {
display: block;
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
color: #3cc51f;
text-decoration: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
position: relative;
text-align: center;
background-color: #fff;
z-index: 998;
}
.vue-cropper .uni-modal__btn:first-child:after { display: none }
.vue-cropper .uni-modal__btn:after {
content: " ";
position: absolute;
left: 0;
top: 0;
width: 1px;
bottom: 0;
border-left: 1px solid #d5d5d6;
color: #d5d5d6;
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
-webkit-transform: scaleX(.5);
transform: scaleX(.5);
z-index: 998;
}
.vue-cropper .uni-modal__btn:active {
background-color: #eee;
}
.cropper-box,
.cropper-box-canvas,
.cropper-drag-box,
.cropper-crop-box,
.cropper-face {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
user-select: none;
z-index: 998;
}
.uni-image {
width: 100%;
height: 100%;
}
.cropper-box-canvas image {
position: relative;
text-align: left;
user-select: none;
transform: none;
max-width: none;
max-height: none;
z-index: 998;
}
.cropper-box {
overflow: hidden;
}
.cropper-move {
cursor: move;
}
.cropper-crop {
cursor: crosshair;
}
.cropper-modal {
background: rgba(0, 0, 0, 0.5);
}
.pointer-events {
pointer-events:none;
}
.cropper-crop-box {
/*border: 2px solid #39f;*/
}
.cropper-view-box {
display: block;
overflow: hidden;
width: 100%;
height: 100%;
outline: 1px solid #39f;
outline-color: rgba(51, 153, 255, 0.75);
user-select: none;
}
.cropper-view-box image {
user-select: none;
text-align: left;
max-width: none;
max-height: none;
}
.cropper-face {
top: 0;
left: 0;
background-color: #fff;
opacity: 0.1;
}
.crop-line {
position: absolute;
display: block;
width: 100%;
height: 100%;
opacity: 0.1;
z-index: 998;
}
.line-w {
top: -3px;
left: 0;
height: 5px;
cursor: n-resize;
}
.line-a {
top: 0;
left: -3px;
width: 5px;
cursor: w-resize;
}
.line-s {
bottom: -3px;
left: 0;
height: 5px;
cursor: s-resize;
}
.line-d {
top: 0;
right: -3px;
width: 5px;
cursor: e-resize;
}
.crop-point {
position: absolute;
width: 8px;
height: 8px;
opacity: 0.75;
background-color: #39f;
border-radius: 100%;
z-index: 998;
}
.point-lt {
top: -4px;
left: -4px;
cursor: nw-resize;
}
.point-mt {
top: -5px;
left: 50%;
margin-left: -3px;
cursor: n-resize;
}
.point-rt {
top: -4px;
right: -4px;
cursor: ne-resize;
}
.point-ml {
top: 50%;
left: -4px;
margin-top: -3px;
cursor: w-resize;
}
.point-mr {
top: 50%;
right: -4px;
margin-top: -3px;
cursor: e-resize;
}
.point-lb {
bottom: -5px;
left: -4px;
cursor: sw-resize;
}
.point-mb {
bottom: -5px;
left: 50%;
margin-left: -3px;
cursor: s-resize;
}
.point-rb {
bottom: -5px;
right: -4px;
cursor: se-resize;
}
</style>

1365
pages/dl/auth/jinjian.vue Normal file

File diff suppressed because it is too large Load Diff

2029
pages/dl/auth/jinjian001.vue Normal file

File diff suppressed because it is too large Load Diff

1708
pages/dl/auth/jinjianbak.vue Normal file

File diff suppressed because it is too large Load Diff

64
pages/dl/auth/lang.js Normal file
View File

@ -0,0 +1,64 @@
export default {
"zh": {
"负责人": "负责人",
"请输入负责人姓名": "请输入负责人姓名",
"手机号": "手机号",
"请输入手机号": "请输入手机号",
"店铺名称": "店铺名称",
"请输入店铺名称": "请输入店铺名称",
"店铺": "店铺",
"店铺分类": "店铺分类",
"请选择": "请选择",
"店铺地址": "店铺地址",
"已选择": "已选择",
"详细地址": "详细地址",
"店铺电话": "店铺电话",
"请输入店铺电话": "请输入店铺电话",
"身份证信息": "身份证信息",
"身份证正面": "身份证正面",
"身份证反面": "身份证反面",
"营业执照信息": "营业执照信息",
"注": "注",
"为保证平台用户安全性,需要您进行实名认证,实名认证通过之后即可登录并在平台进行营业": "为保证平台用户安全性,需要您进行实名认证,实名认证通过之后即可登录并在平台进行营业",
"提交": "提交",
"提交即默认同意": "提交即默认同意",
"商家认证协议": "商家认证协议",
"我的位置": "我的位置",
"请输入姓名": "请输入姓名",
"请输入ID号": "请输入ID号",
"请上传店铺logo": "请上传店铺logo",
"请输入店铺名称": "请输入店铺名称",
"请选择城市": "请选择城市",
"请选择店铺分类": "请选择店铺分类",
"请选择店铺地址": "请选择店铺地址",
"请输入详细地址": "请输入详细地址",
"请输入店铺电话": "请输入店铺电话",
"请输入正确店铺电话": "请输入正确店铺电话",
"请上传ID照正面": "请上传ID照正面",
"请上传ID照背面": "请上传ID照背面",
"请上传营业执照": "请上传营业执照",
"请输入联系电话": "请输入联系电话",
"请输入正确联系电话": "请输入正确联系电话",
"请同意商家认证协议": "请同意商家认证协议",
"身份证": "身份证",
"请输入18位身份证号码": "请输入18位身份证号码",
"重新提交": "重新提交",
"(示例)": "(示例)",
"请上传身份证正反面": "请上传身份证正反面",
"失败原原因": "失败原原因",
"提交成功": "提交成功",
"您的入驻申请正在等待后台审核": "您的入驻申请正在等待后台审核",
"我们会在": "我们会在",
"个工作日对您提交的资料进行审核": "个工作日对您提交的资料进行审核",
"审核通过您即可正常使用": "审核通过您即可正常使用",
"退出": "退出",
"您的资质认证已提交,平台审核失败": "您的资质认证已提交,平台审核失败",
"身份证人像面": "身份证人像面",
"身份证国徽面": "身份证国徽面",
"营业执照": "营业执照",
"食品经营许可证": "食品经营许可证",
"请上传食品经营许可证": "请上传食品经营许可证",
"请输入正确身份证号": "请输入正确身份证号",
}
}