修改功能

This commit is contained in:
浅念
2025-03-24 11:13:13 +08:00
parent 0a0ab4d160
commit f7ff9d65a5
10 changed files with 65 additions and 29 deletions
+1
View File
@@ -130,6 +130,7 @@ export default {
times:'Time',
address:'Address',
emailerr:'Email cannot be empty',
emailerr1:'Email format error',
passworerr:'Password cannot be empty',
passworerr1:'Password inconsistency',
agreementarr:'Please first check and agree to the User Service Agreement and Privacy Policy',
+1
View File
@@ -129,6 +129,7 @@ export default {
times:'时间',
address:'地址',
emailerr:'邮箱不能为空',
emailerr1:'邮箱格式错误',
passworerr:'密码不能为空',
passworerr1:'密码不一致',
agreementarr:'请先勾选同意用户服务协议以及隐私政策',
+3 -10
View File
@@ -3,7 +3,7 @@
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.customerinfo')"></uni-nav-bar>
<view class="content">
<view class="cell">
<view class="item">{{$t('customer.CustomerChannel')}}</view>
<view class="item">{{$t('customer.CustomerChannel')}} <text class="red">*</text></view>
<view class="right select" @click="showchannel = true">
<view class="" :class="['content2', { placeholder: !channel_name }]">{{channel_name || $t('customer.CustomerChannelinput')}}</view>
<!-- <input :placeholder="$t('customer.CustomerChannelinput')" disabled v-model="channel_name" /> -->
@@ -60,7 +60,7 @@
</view>
<u-line></u-line>
<view class="cell">
<view class="item">{{$t('customer.Customerph')}}</view>
<view class="item">{{$t('customer.Customerph')}} <text class="red">*</text></view>
<view class="right select" @click="showcartype = true">
<view class="" :class="['content2', { placeholder: !car_type_name }]">{{car_type_name || $t('customer.Customerphinput')}}</view>
<!-- <input :placeholder="$t('customer.Customerphinput')" disabled v-model="car_type_name" /> -->
@@ -312,14 +312,7 @@
saveFn(){
if(this.form.contacts==''){
uni.showToast({
title:'客户名称不能为空',
icon: 'none'
});
return false
}
if(this.form.phone==''){
uni.showToast({
title:'联系方式不能为空',
title:this.$t('customer.CustomerNameinput'),
icon: 'none'
});
return false
+2 -2
View File
@@ -3,7 +3,7 @@
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.customerinfo')"></uni-nav-bar>
<view class="content">
<view class="cell">
<view class="item">{{$t('customer.CustomerChannel')}}</view>
<view class="item">{{$t('customer.CustomerChannel')}} <text class="red">*</text></view>
<view class="right select" @click="showchannel = true">
<!-- <input :placeholder="$t('customer.CustomerChannelinput')" disabled v-model="channel_name" /> -->
<view class="" :class="['content2', { placeholder: !channel_name }]">{{channel_name || $t('customer.CustomerChannelinput')}}</view>
@@ -60,7 +60,7 @@
</view>
<u-line></u-line>
<view class="cell">
<view class="item">{{$t('customer.Customerph')}}</view>
<view class="item">{{$t('customer.Customerph')}} <text class="red">*</text></view>
<view class="right select" @click="showcartype = true">
<!-- <input :placeholder="$t('customer.Customerphinput')" disabled v-model="car_type_name" /> -->
<view class="" :class="['content2', { placeholder: !car_type_name }]">{{car_type_name || $t('customer.Customerphinput')}}</view>
+1 -1
View File
@@ -435,7 +435,7 @@
url: 'http://219.157.255.213:9007/upload/uploadImage',
filePath: imgUrl,
name: 'files',
// header:{'content-type': 'application/x-www-form-urlencoded','Authorization': 'Bearer ' + uni.getStorageSync('token')},
header:{'Authorization': 'Bearer ' + uni.getStorageSync('token')},
success: (uploadFileRes) => {
const path=JSON.parse(uploadFileRes.data)
if(path.code==-1){
+1 -1
View File
@@ -7,7 +7,7 @@
<view class="content">
<view class="contop">
<view class="">
<image class="userimg" :src="userinfo.avatar==''||userinfo.avatar==null||userinfo.avatar=='null'?'/static/image/mine/user.png':userinfo.avatar" mode=""></image>
<image class="userimg" :src="userinfo.avatar" mode=""></image>
<!-- <image class="userimg" src="/static/image/mine/user.png" mode=""></image> -->
</view>
<view class="right">
+25 -12
View File
@@ -36,19 +36,32 @@
url:'feishu/getinfo',
method:'post',
}).then(res => {
var data = res.data.data;
this.datas = data
console.log(data)
code_url += 'https://open.feishu.cn/open-apis/authen/v1/authorize'
code_url += '?app_id=' + data.app_id
code_url += '&redirect_uri=' + data.redirect_uri
code_url += '&scope=' + data.scope
code_url += '&state=' + data.state;
uni.showToast({
title: res.data.message,
icon: 'none'
});
if(res.data.code ==0){
var data = res.data.data;
this.datas = data
console.log(data)
code_url += 'https://open.feishu.cn/open-apis/authen/v1/authorize'
code_url += '?app_id=' + data.app_id
code_url += '&redirect_uri=' + data.redirect_uri
code_url += '&scope=' + data.scope
code_url += '&state=' + data.state;
console.log(code_url)
// return;
window.location.href = code_url;
}else{
setTimeout(() => {
uni.reLaunch({
url: '/pages/index/mine',// 替换为你要跳转的页面路径
});
}, 1000);
}
console.log(code_url)
// return;
window.location.href = code_url;
})
} else {
this.getOpenId(code,state)
+14 -1
View File
@@ -78,7 +78,13 @@
},
methods: {
leftClick(){
uni.navigateBack({})
uni.reLaunch({
url: '/pages/login/index',// 替换为你要跳转的页面路径
});
},
validateEmail(email) {
const regex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
return regex.test(email);
},
login() {
if(this.email==''){
@@ -141,6 +147,13 @@
});
return false
}
if (!this.validateEmail(this.email)) {
uni.showToast({
title:this.$t('emailerr1'),
icon: 'none'
});
return false;
}
this.vcodeTime = 60
this.vcodeTimer = setInterval(() => {
if (this.vcodeTime > 0) {
+6 -2
View File
@@ -4,7 +4,7 @@
<view class="content">
<view class="topimg">
<uni-file-picker fileMediatype="image" limit="1" :list-styles="imageStyles" :del-icon="false" disable-preview @select="select" @delete="delfn('picture')">
<image class="user" :src="userinfo.avatar==''||userinfo.avatar==null||userinfo.avatar=='null'?'/static/image/mine/user.png':userinfo.avatar"mode=""></image>
<image class="user" :src="userinfo.avatar"mode=""></image>
<!-- <image class="xj" src="/static/image/mine/xiangji.png" mode=""></image> -->
</uni-file-picker>
<view>{{$t('mine.changeavatar')}}</view>
@@ -105,7 +105,11 @@
url:'user/getInfo',
method:'get',
}).then(res => {
if(res.data.data.position=='null'){
res.data.data.position=''
}
that.userinfo = res.data.data;
that.select1()
})
},
@@ -166,7 +170,7 @@
url: 'http://219.157.255.213:9007/upload/uploadImage',
filePath: imgUrl,
name: 'files',
// header:{'content-type': 'application/x-www-form-urlencoded','Authorization': 'Bearer ' + uni.getStorageSync('token')},
header:{'Authorization': 'Bearer ' + uni.getStorageSync('token')},
success: (uploadFileRes) => {
const path=JSON.parse(uploadFileRes.data)
if(path.code==-1){
+11
View File
@@ -80,6 +80,10 @@
leftClick(){
uni.navigateBack({})
},
validateEmail(email) {
const regex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
return regex.test(email);
},
login() {
if(this.email==''){
uni.showToast({
@@ -134,6 +138,13 @@
});
return false
}
if (!this.validateEmail(this.email)) {
uni.showToast({
title:this.$t('emailerr1'),
icon: 'none'
});
return false;
}
this.vcodeTime = 60
this.vcodeTimer = setInterval(() => {
if (this.vcodeTime > 0) {