14 Commits

Author SHA1 Message Date
浅念 f9e9899e0e 设置默认语言为英语 2025-03-28 11:10:56 +08:00
浅念 303121ba81 调用接口调整 2025-03-28 11:00:05 +08:00
浅念 37e0e55d96 线上接口地址 2025-03-28 10:33:48 +08:00
浅念 11dd7de521 修改样式 2025-03-27 16:54:52 +08:00
浅念 8ceb98b321 隐藏我的名片 2025-03-27 16:47:04 +08:00
浅念 f58e712684 样式调整 2025-03-27 16:44:43 +08:00
浅念 54ad6c9e37 修改语言包 2025-03-27 16:35:21 +08:00
浅念 526f934a75 标签功能 2025-03-27 16:13:47 +08:00
浅念 8583ff2543 标签管理页面 2025-03-26 17:02:04 +08:00
浅念 be8674fd51 样式调整 2025-03-25 17:29:37 +08:00
浅念 a5d5ce4e7c 倒计时组件 2025-03-25 17:23:40 +08:00
浅念 f88048b876 首页添加跟进提醒 2025-03-25 17:19:43 +08:00
浅念 f9a39d5aaa 提交 2025-03-25 13:13:39 +08:00
浅念 e3abe0bf18 名片部分页面。地图定位。国家下拉搜索 回收站 2025-03-25 13:12:24 +08:00
46 changed files with 419 additions and 2133 deletions
+11 -21
View File
@@ -12,9 +12,15 @@
export default { export default {
onLaunch: function() { onLaunch: function() {
// #ifdef H5 // #ifdef H5
console.log(
`%c hello uniapp %c v${version} `,
'background:#35495e ; padding: 1px; border-radius: 3px 0 0 3px; color: #fff',
'background:#007aff ;padding: 1px; border-radius: 0 3px 3px 0; color: #fff; font-weight: bold;'
)
// #endif // #endif
// 线上示例使用 // 线上示例使用
// console.log('%c uni-app官方团队诚邀优秀前 端工程师加盟,一起打造更卓越的uni-app & uniCloud,欢迎投递简历到 hr2013@dcloud.io', 'color: red'); // console.log('%c uni-app官方团队诚邀优秀前 端工程师加盟,一起打造更卓越的uni-app & uniCloud,欢迎投递简历到 hr2013@dcloud.io', 'color: red');
console.log('App Launch');
// #ifdef APP-PLUS // #ifdef APP-PLUS
// App平台检测升级,服务端代码是通过uniCloud的云函数实现的,详情可参考:https://ext.dcloud.net.cn/plugin?id=4542 // App平台检测升级,服务端代码是通过uniCloud的云函数实现的,详情可参考:https://ext.dcloud.net.cn/plugin?id=4542
if (plus.runtime.appid !== 'HBuilder') { // 真机运行不需要检查更新,真机运行时appid固定为'HBuilder',这是调试基座的appid if (plus.runtime.appid !== 'HBuilder') { // 真机运行不需要检查更新,真机运行时appid固定为'HBuilder',这是调试基座的appid
@@ -27,27 +33,22 @@
success: (res) => { success: (res) => {
// 成功 // 成功
this.setUniverifyErrorMsg(); this.setUniverifyErrorMsg();
// console.log("preLogin success: ", res); console.log("preLogin success: ", res);
}, },
fail: (res) => { fail: (res) => {
this.setUniverifyLogin(false); this.setUniverifyLogin(false);
this.setUniverifyErrorMsg(res.errMsg); this.setUniverifyErrorMsg(res.errMsg);
// 失败 // 失败
// console.log("preLogin fail res: ", res); console.log("preLogin fail res: ", res);
} }
}) })
// #endif // #endif
}, },
onShow: function() { onShow: function() {
console.log('App Show') console.log('App Show')
if(window.location.host=='219.157.255.213:8085'){
window.location.href="https://crm.x.hnxinyouhe.com"
}
// console.log(window.location.host)
// console.log(window.location.href)
}, },
onHide: function() { onHide: function() {
// console.log('App Hide') console.log('App Hide')
}, },
globalData: { globalData: {
test: '' test: ''
@@ -101,21 +102,10 @@
page { page {
background-color:#F9F9F9; background-color:#F9F9F9;
height: 100%; height: 100%;
font-size: 24rpx; font-size: 28rpx;
/* line-height: 1.8; */ /* line-height: 1.8; */
} }
uni-input{
font-size: 24rpx;
}
textarea {
font-size: 24rpx;
}
.select{
font-size: 24rpx;
}
.u-radio-group--row{
font-size: 24rpx;
}
.fix-pc-padding { .fix-pc-padding {
padding: 0 50px; padding: 0 50px;
} }
+6 -17
View File
@@ -1,31 +1,21 @@
// const baseUrl = "http://219.157.255.213:9006/"; //这里放置url域名32044 const baseUrl = "http://219.157.255.213:9007/"; //这里放置url域名32044
// const baseUrl = "http://api.crm.hnxinyouhe.com/"; //这里放置url域名32044 // const baseUrl = "http://api.crm.hnxinyouhe.com/"; //这里放置url域名32044
// const baseUrl = "http://192.168.50.9:8787/"; //这里放置url域名32044
// const baseUrl = "http://219.157.255.213:25329/"; //这里放置url域名32044 // const baseUrl = "http://219.157.255.213:25329/"; //这里放置url域名32044
const baseUrl = "https://crm-server.x.hnxinyouhe.com/"; //这里放置url域名32044
// const baseUrl = "https://api.fcrm.hnxinyouhe.com/"; //这里放置url域名32044
// const baseUrl = "https://crm-server.smt.hnxinyouhe.com/"; //这里放置url域名32044
// const baseUrl = "/api/"; //这里放置url域名32044 // const baseUrl = "/api/"; //这里放置url域名32044
export function request(options){//封装的requset export function request(options){//封装的requset
let { url,data,method } = options; let { url,data,method } = options;
data = data || {}, data = data || {},
uni.showLoading({ uni.showLoading({
title: '' title: '加载中'
}); });
var lang = uni.getStorageSync('i18locale')?uni.getStorageSync('i18locale'):uni.getLocale()
if(lang=='zh-Hans'){
lang='zh_CN'
}
console.log(lang)
return new Promise((resolve,rejext)=>{ return new Promise((resolve,rejext)=>{
uni.request({//这里是uniapp网络请求的api uni.request({//这里是uniapp网络请求的api
url: baseUrl + url, //仅为示例,并非真实接口地址。 url: baseUrl + url, //仅为示例,并非真实接口地址。
data, data,
header:{ header:{'content-type': 'application/x-www-form-urlencoded','Authorization': 'Bearer ' + uni.getStorageSync('token')},
'content-type': 'application/x-www-form-urlencoded',
'Authorization': 'Bearer ' + uni.getStorageSync('token'),
'fdesk-language':lang
},
method:method||"GET",//默认请求方式是get method:method||"GET",//默认请求方式是get
success: (res) => { success: (res) => {
if(res.data.code==401){ if(res.data.code==401){
@@ -33,7 +23,6 @@ export function request(options){//封装的requset
title: res.data.message, title: res.data.message,
icon: 'none' icon: 'none'
}); });
uni.clearStorageSync();
setTimeout(() => { setTimeout(() => {
uni.reLaunch({ uni.reLaunch({
url: '/pages/login/index',// 替换为你要跳转的页面路径 url: '/pages/login/index',// 替换为你要跳转的页面路径
@@ -45,7 +34,7 @@ export function request(options){//封装的requset
}, },
complete: (data)=>{ complete: (data)=>{
// console.log(data.code) console.log(data.code)
uni.hideLoading(); uni.hideLoading();
} }
}); });
+7 -27
View File
@@ -2,7 +2,6 @@ export default {
// 可以以页面为单位来写,比如首页的内容,写在index字段,个人中心写在center,共同部分写在common部分 // 可以以页面为单位来写,比如首页的内容,写在index字段,个人中心写在center,共同部分写在common部分
tabbar: { tabbar: {
home: 'home', home: 'home',
highseas: 'HighSeas',
customer: 'customer', customer: 'customer',
mine: 'mine' mine: 'mine'
}, },
@@ -10,8 +9,6 @@ export default {
customerinfo:'Customer Information', customerinfo:'Customer Information',
addfollowup:'Add follow-up', addfollowup:'Add follow-up',
userList:'Customer Management', userList:'Customer Management',
tagselect:'Tag filtering',
highseas:'Customer High Seas',
persondata:'Personal Data', persondata:'Personal Data',
businesscard:'Business card' businesscard:'Business card'
@@ -54,24 +51,22 @@ export default {
WhatsAppinput:'Please enter WhatsApp', WhatsAppinput:'Please enter WhatsApp',
Emailinput:'Please enter your email address', Emailinput:'Please enter your email address',
Customerph:'Preferences', Customerph:'Preferences',
Cstomerfj:'Follow-up Stage', Cstomerfj:'Classification',
Cstomerfjinput:'Select Follow-up Stage',
Country:'Country', Country:'Country',
Customerphinput:'Please select customer preferences', Customerphinput:'Please select customer preferences',
Cstomerfjinput:'Please select customer rating',
Countryinput:'Please select a country', Countryinput:'Please select a country',
Cstomertag:'Label', Cstomertag:'Label',
Cstomertaginput:'Please select', Cstomertaginput:'Please select',
Company:'Company', Company:'Company',
Companyinput:'Go locate it', Companyinput:'Go locate it',
CustomerScreening:'Customer Screening', CustomerScreening:'Customer Screening',
flRemarks:'Follow-up description',
flRemarksinputhd:'Please enter the follow-up description~'
}, },
mine: { mine: {
desc: 'This is template page', desc: 'This is template page',
title:'Account', title:'Account',
msg:'Message Notification', msg:'Message Notification',
workreport:'daily work report',
cpassword:'Change Password', cpassword:'Change Password',
contact:'Contact Service', contact:'Contact Service',
feedback:'Work order', feedback:'Work order',
@@ -88,7 +83,7 @@ export default {
Versionup:'Version Update', Versionup:'Version Update',
Privacy:'Privacy Policy', Privacy:'Privacy Policy',
UserAgreement:'User Agreement', UserAgreement:'User Agreement',
copyright:'© 2024 powered by Henan Jinhai Technology Environmental Protection Co., Ltd', copyright:'© Henan Xinyouhe Technology Co., Ltd. All rights reserved',
logoff:'Account cancellation', logoff:'Account cancellation',
logoffmsg:'The following information will be cleared and cannot be retrieved', logoffmsg:'The following information will be cleared and cannot be retrieved',
logoffts1:'Ldentity and account information', logoffts1:'Ldentity and account information',
@@ -99,14 +94,7 @@ export default {
recyclebin:'Recycle bin', recyclebin:'Recycle bin',
restore:'Restore', restore:'Restore',
position:'Position', position:'Position',
positioninput:'Please fill in the position', positioninput:'Please fill in the position'
QRcode:'QR code',
WeChat:'WeChat',
UploadQRcode:'Upload QR code',
Reportdate:'Report date',
Presenter:'Presenter',
newcustomernum:"Today's new customer count",
workcontent:"Today's job responsibilities"
}, },
call:'Call', call:'Call',
delete:'Delete', delete:'Delete',
@@ -121,7 +109,6 @@ export default {
confirm:'confirm', confirm:'confirm',
prompt:'prompt', prompt:'prompt',
deletemsg:'Are you sure you want to delete this customer?', deletemsg:'Are you sure you want to delete this customer?',
receivemsg:'Are you sure you want to claim this customer?',
submit:'Submit', submit:'Submit',
gender:'Gender', gender:'Gender',
gender0:'unknown', gender0:'unknown',
@@ -160,7 +147,7 @@ export default {
Confirmpassword:'Confirm password', Confirmpassword:'Confirm password',
Confirmbtn:'Confirm modification', Confirmbtn:'Confirm modification',
edtbtn:'edit', edtbtn:'edit',
zh:'中文', zh:'Chinese',
en:'English', en:'English',
ru:'Russian', ru:'Russian',
subsuccess:'Successful', subsuccess:'Successful',
@@ -197,12 +184,5 @@ export default {
remarks:'Remarks', remarks:'Remarks',
channel:'Channel', channel:'Channel',
Nodata:'No data available at the moment!', Nodata:'No data available at the moment!',
versionmsg:'It is already the latest version!', versionmsg:'It is already the latest version!'
receiveOrder:'Collect Order',
loading:'loading',
imgloading:'Image uploading in progress!',
downmp:'Download business card',
downmpmsg:'Are you sure to download the current business card image?',
callmsg:'Are you sure you want to make the call?',
transfer:"Transfer"
} }
+4 -194
View File
@@ -2,206 +2,16 @@ export default {
// 可以以页面为单位来写,比如首页的内容,写在index字段,个人中心写在center,共同部分写在common部分 // 可以以页面为单位来写,比如首页的内容,写在index字段,个人中心写在center,共同部分写在common部分
tabbar: { tabbar: {
home: 'начало', home: 'начало',
highseas: 'открытое море',
customer: 'клиент', customer: 'клиент',
mine: 'мой' mine: 'мой'
}, },
navbar: {
customerinfo: "Информация о клиенте",
addfollowup: "Добавить последующие ",
highseas: "Открытое море клиентов",
userList: "Управление клиентами",
tagselect: "Фильтр по меткам",
persondata: "Личные данные",
businesscard: "Моя визитка"
},
home: { home: {
desc: "начало", desc: 'начало'
langbtn: "Сменить язык",
title: "Вы сопровождаете линке",
day: "день",
databf: "Данные Брифинги",
addxs: "Новые Подсказка",
addkh: "Новые клиенты",
addbf: "Новые посещения",
addgj: "Новые последующие "
}, },
customer: { customer: {
desc: "клиент", desc: 'клиент'
title: "Управление клиентами",
inputhd: "Введите имя клиента или номер телефона",
followtype: "Способ последующие ",
Online: "Линия",
Visit: "Посещение",
addfollow: "Добавить последующие",
followtime: "Время последующие ",
updataimg: "Загрузить скриншот последнего чата",
followrecord: "Запись последующие ",
followlocation: "Текущее местоположение",
locationimg: "Сфотографировать текущее местоположение",
Visitcontent: "Содержание посещения",
Visiinputhd: "Введите содержание посещения~",
Remarks: "Примечание (необязательно)",
Remarksinputhd: "Введите примечание~",
NextReminder: "Следующее напоминание о последующие ",
CustomerChannel: "Канал клиента",
CustomerChannelinput: "Выберите канал клиента",
Medal: "Коммерческая возможность",
Medalinput: "Выберите коммерческую возможность",
CustomerName: "Имя клиента",
CustomerNameinput: "Введите имя клиента",
WhatsAppinput: "Введите WhatsApp",
Emailinput: "Введите Email",
Customerph: "Предпочтения клиента",
Customerphinput: "Выберите предпочтения клиента",
Cstomerfj:'Этап сопровождения',
Cstomerfjinput:'Выберите этап сопровождения',
Cstomertag: "Метка клиента",
Cstomertaginput: "Выберите",
Country: "Страна",
Countryinput: "Выберите страну",
Company: "Компания",
Companyinput: "Определить местоположение",
CustomerScreening: "Фильтрация клиентов",
flRemarks:'Описание последующих действий',
flRemarksinputhd:'Пожалуйста, введите описание последующих действий~'
}, },
mine: { mine: {
desc: "мой", desc: 'мой'
title: "мой", }
msg: "Уведомления",
workreport:'Дневник',
cpassword: "Изменить пароль",
contact: "Связаться с поддержкой",
feedback: "Отправить заявку",
about: "О нас",
logoff: "Удалить аккаунт",
logout: "Выйти",
kfphone: "Телефон поддержки",
lxcall: "Контакт",
lxcallinputhd: "Введите ваш номер",
feedbackinputhd: "Введите ваши ценные предложения~",
nickname: "Никнейм",
nicknameinputhd: "Введите никнейм",
idinputhd: "Введите ID",
Versionup: "Обновление версии",
Privacy: "Политика конфиденциальности",
UserAgreement: "Пользовательское соглашение",
copyright:'© 2024 powered by Henan Jinhai Technology Environmental Protection Co., Ltd',
logoff:'Списание счетов',
logoffmsg: "Следующая информация будет удалена без возможности восстановления",
logoffts1: "Идентификационные и учетные данные",
logoffts2: "Вся информация о клиентах",
logoffts3: "Личная информация",
logoffbtn: "Подтвердить удаление",
changeavatar: "Нажмите, чтобы сменить аватар",
recyclebin: "Корзина",
restore: "Восстановить клиента",
position: "Должность",
positioninput: "Введите должность",
QRcode: "QR-код",
WeChat: "Микросхема",
UploadQRcode: "Загрузить QR-код",
Reportdate:'Дата представления доклада',
Presenter:'Докладчик',
newcustomernum:"Количество новых клиентов сегодня",
workcontent:"Содержание работы"
},
call: "Позвонить",
delete: "Удалить",
all: "Все",
tday: "Сегодня",
threeday: "Последние 3 дня",
sevenday: "Последние 7 дней",
followup: "Последующие",
deal: "Завершено",
lost: "Потеряно",
cancel: "Отмена",
confirm: "Подтвердить",
prompt: "Подсказка",
deletemsg: "Вы уверены, что хотите удалить этого клиента?",
receivemsg: "Вы уверены, что хотите принять этого клиента?",
submit: "Отправить",
gender: "Пол",
gender0: "Неизвестно",
gender1: "Мужской",
gender2: "Женский",
Region: "Страна/регион",
Regioninputhd: "Выбрать",
login: "Войти",
threelogin: "Вход через Третья сторона",
account: "Аккаунт",
password: "Пароль",
fgpassword: "Забыли пароль",
Facebook: "Feishu",
email: "Email",
emailinput: "Введите email",
phone: "Телефон",
agreeMsg: "Я прочитал и согласен с",
Privacy:'《Политика конфиденциальности》',
UserAgreement:'《Пользовательское соглашение》',
and: "и",
empty: "Нет записей~",
times: "Время",
address: "Адрес",
emailerr: "Email не может быть пустым",
emailerr1: "Неверный формат email",
passworerr: "Пароль не может быть пустым",
passworerr1: "Пароли не совпадают",
agreementarr: "Пожалуйста, сначала согласитесь с пользовательским соглашением и политикой конфиденциальности",
reg: "Регистрация",
codeerr: "Код подтверждения не может быть пустым",
getcode: "Получить код",
code: "Код подтверждения",
save: "Сохранить",
resetpassword: "Сбросить пароль",
newpassword: "Новый пароль",
Confirmpassword: "Подтвердите пароль",
Confirmbtn: "Подтвердить изменение",
edtbtn: "Редактировать данные",
zh:'中文',
en:'English',
ru:'Russian',
subsuccess: "Успешно отправлено",
onedaygj: "Через 1 день",
threedaygj: "Через 3 дня",
sevendaygj: "Через 7 дней",
autodaygj: "Настроить",
nexttime: "Настройка напоминания о следующем последующие ",
details: "Детали",
auth: "Авторизация Feishu",
inputnl: "Выберите",
noresults: "Нет результатов",
keyword: "Ключевые слова поиска",
prompt:'Подсказка',
restoremsg: "Подтвердите восстановление данных клиента?",
onedayn: "В течение 1 дня",
threedayn: "В течение 3 дней",
sevendayn: "В течение 7 дней",
follow: " последующие",
timeout: "Просрочено",
day:'Боже.',
hour: "час",
minute: "мин",
second: "сек",
nextgjtime: "Время следующего последующие ",
Remindergj: "Напоминание о последующие ",
callPhonemsg: "Ошибка номера!",
download: "Скачать",
addtag: "Добавить метку",
CustomerProfile: "Профиль клиента",
CustomerProfilemag: "Нет меток профиля!",
retract: "Свернуть",
expand: "Развернуть",
remarks: "Примечание",
channel: "Канал",
Nodata: "Нет данных!",
versionmsg: "Уже последняя версия!",
receiveOrder: "Принять заказ",
loading: "Загрузка",
imgloading:'Идёт загрузка изображения!',
downmp:'Скачать визитку',
downmpmsg:'Вы уверены в загрузке текущей карты?',
callmsg:'Вы уверены, что хотите совершить звонок?',
transfer:"Перевести"
} }
+9 -28
View File
@@ -2,16 +2,13 @@ export default {
// 可以以页面为单位来写,比如首页的内容,写在index字段,个人中心写在center,共同部分写在common部分 // 可以以页面为单位来写,比如首页的内容,写在index字段,个人中心写在center,共同部分写在common部分
tabbar: { tabbar: {
home: '首页', home: '首页',
highseas: '公海',
customer: '客户', customer: '客户',
mine: '我的' mine: '我的'
}, },
navbar:{ navbar:{
customerinfo:'客户资料', customerinfo:'客户资料',
addfollowup:'添加跟进', addfollowup:'添加跟进',
highseas:'客户公海',
userList:'客户管理', userList:'客户管理',
tagselect:'标签筛选',
persondata:'个人资料', persondata:'个人资料',
businesscard:'我的名片' businesscard:'我的名片'
}, },
@@ -54,23 +51,21 @@ export default {
Emailinput:'请输入Email', Emailinput:'请输入Email',
Customerph:'客户偏好', Customerph:'客户偏好',
Customerphinput:'请选择客户偏好', Customerphinput:'请选择客户偏好',
Cstomerfj:'跟进阶段', Cstomerfj:'客户分级',
Cstomerfjinput:'请选择跟进阶段', Cstomerfjinput:'请选择客户分级',
Cstomertag:'客户标签', Cstomertag:'客户标签',
Cstomertaginput:'请选择', Cstomertaginput:'请选择',
Country:'国家', Country:'国家',
Countryinput:'请选择国家', Countryinput:'请选择国家',
Company:'公司', Company:'公司',
Companyinput:'去定位', Companyinput:'去定位',
CustomerScreening:'客户筛选' , CustomerScreening:'客户筛选'
flRemarks:'跟进描述',
flRemarksinputhd:'请输入跟进描述~'
}, },
mine: { mine: {
desc: '我的', desc: '我的',
title:'我的', title:'我的',
msg:'消息通知', msg:'消息通知',
workreport:'工作日报',
cpassword:'修改密码', cpassword:'修改密码',
contact:'联系客服', contact:'联系客服',
feedback:'提交工单', feedback:'提交工单',
@@ -87,7 +82,7 @@ export default {
Versionup:'版本更新', Versionup:'版本更新',
Privacy:'隐私政策', Privacy:'隐私政策',
UserAgreement:'用户协议', UserAgreement:'用户协议',
copyright:'© 2024 powered by 河南新友合科技有限公司', copyright:'©河南新友合科技有限公司 版权所有',
logoff:'账户注销', logoff:'账户注销',
logoffmsg:'以下信息将被清空无法找回', logoffmsg:'以下信息将被清空无法找回',
logoffts1:'身份、账号信息', logoffts1:'身份、账号信息',
@@ -99,13 +94,6 @@ export default {
restore:'恢复客户', restore:'恢复客户',
position:'职位', position:'职位',
positioninput:'请填写职位', positioninput:'请填写职位',
QRcode:'二维码',
WeChat:'微信',
UploadQRcode:'上传二维码',
Reportdate:'汇报日期',
Presenter:'汇报人',
newcustomernum:'今日新客户开发数量',
workcontent:'今日工作内容'
}, },
call:'呼叫', call:'呼叫',
delete:'删除', delete:'删除',
@@ -120,7 +108,6 @@ export default {
confirm:'确定', confirm:'确定',
prompt:'提示', prompt:'提示',
deletemsg:'确定要删除此客户吗?', deletemsg:'确定要删除此客户吗?',
receivemsg:'确定要领取此客户吗?',
submit:'提交', submit:'提交',
gender:'性别', gender:'性别',
gender0:'未知', gender0:'未知',
@@ -160,8 +147,8 @@ export default {
Confirmbtn:'确认修改', Confirmbtn:'确认修改',
edtbtn:'编辑资料', edtbtn:'编辑资料',
zh:'中文', zh:'中文',
en:'English', en:'英语',
ru:'Russian', ru:'俄语',
subsuccess:'提交成功', subsuccess:'提交成功',
onedaygj:'1天后', onedaygj:'1天后',
threedaygj:'3天后', threedaygj:'3天后',
@@ -196,12 +183,6 @@ export default {
remarks:'备注', remarks:'备注',
channel:'渠道', channel:'渠道',
Nodata:'暂无数据!', Nodata:'暂无数据!',
versionmsg:'已是最新版本!', versionmsg:'已是最新版本!'
receiveOrder:'领单',
loading:'加载中',
imgloading:'图片上传中!',
downmp:'下载名片',
downmpmsg:'确定下载当前名片图吗?',
callmsg:'确定拨打电话吗?',
transfer:"转移"
} }
-114
View File
@@ -1,114 +0,0 @@
<template>
<view class="countdown">
<view class="time green">
<image src="/static/image/gtime.png" mode=""></image>
<text>{{ timeObj.days }}{{$t('day')}} </text>
<text> {{ timeObj.hours | padZero }} : </text>
<text> {{ timeObj.minutes | padZero }} : </text>
<text> {{ timeObj.seconds | padZero }}</text>
</view>
</view>
</template>
<script>
export default {
props: {
// 起始时间
totalSeconds: {
type: '',
required: true
},
// 是否显示天数
showDays: {
type: Boolean,
default: true
}
},
data() {
return {
startTime: this.totalSeconds, // 开始时间(Date对象)
elapsedTime: 0, // 已过时间(毫秒)
timer: null, // 计时器对象
isRunning: false, // 是否运行中
startTimeStr: '' ,// 显示用的开始时间字符串
timeObj: {
days: 0,
hours: 0,
minutes: 0,
seconds: 0
},
}
},
mounted() {
this.runCountdown();
},
filters: {
padZero(value) {
return value.toString().padStart(2, '0');
}
},
methods: {
// 计算已过时间
calculateElapsed() {
if (this.startTime) {
// 计算差值(毫秒)
let diff = this.startTime
const dateStr = diff;
const timestamp = new Date(dateStr).getTime();
// 处理iOS兼容性问题(推荐写法)
const iosFriendlyTimestamp = new Date(dateStr.replace(/-/g, '/')).getTime();
// 当前时间戳(毫秒)
const now = Date.now()
// 计算差值(毫秒)
let diff1 = Math.abs(now - iosFriendlyTimestamp)
// 计算各个单位
const seconds = Math.floor(diff1 / 1000)
this.timeObj.days = Math.floor(seconds / (24 * 3600));
const remaining = seconds % (24 * 3600);
this.timeObj.hours = Math.floor(remaining / 3600);
this.timeObj.minutes = Math.floor((remaining % 3600) / 60);
this.timeObj.seconds = remaining % 60;
}
},
runCountdown() {
if (!this.isRunning && this.startTime) {
this.isRunning = true
this.timer = setInterval(() => {
this.calculateElapsed()
}, 1000)
}
},
},
beforeDestroy() {
clearInterval(this.timer);
}
}
</script>
<style lang="scss">
.countdown {
.time {
display: flex;
align-items: center;
text {
margin: 0px 2px;
}
}
image {
width: 18px;
height: 18px;
margin-right: 5px;
}
}
.green {
color: #27C89C;
}
.timered {
color: #FF4040;
}
</style>
-1
View File
@@ -12,7 +12,6 @@
<title></title> <title></title>
<script src="/static/image-resize-3.0.1.min.js"></script> <script src="/static/image-resize-3.0.1.min.js"></script>
<script src="/static/quill-1.3.7.min.js"></script> <script src="/static/quill-1.3.7.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBGvV-vX7C72PEbcYrTdmUj3qrubejWzNw&callback=initMap"></script>
<!--preload-links--> <!--preload-links-->
<!--app-context--> <!--app-context-->
</head> </head>
+2 -3
View File
@@ -23,9 +23,8 @@ import Eyu from '@/common/locales/ru.js';
// 引入并使用vue-i18n // 引入并使用vue-i18n
import VueI18n from 'vue-i18n' import VueI18n from 'vue-i18n'
Vue.use(VueI18n) Vue.use(VueI18n)
// console.log(uni.getLocale())
let i18nConfig = { let i18nConfig = {
locale: uni.getStorageSync('i18locale')?uni.getStorageSync('i18locale'):uni.getLocale(),// 获取已设置的语言 locale: uni.getLocale(),// 获取已设置的语言
messages: { messages: {
// 这里的属性名是任意的,您也可以把zh设置为cn等,只是后续切换语言时 // 这里的属性名是任意的,您也可以把zh设置为cn等,只是后续切换语言时
// 要标识这里的语言属性,如:this.$i18n.locale = zh|en|cn|xxx // 要标识这里的语言属性,如:this.$i18n.locale = zh|en|cn|xxx
@@ -37,7 +36,7 @@ let i18nConfig = {
// 构造i18n对象 // 构造i18n对象
const i18n = new VueI18n({ const i18n = new VueI18n({
// 默认语言,这里的local属性,对应message中的cn、en属性 // 默认语言,这里的local属性,对应message中的cn、en属性
locale:uni.getStorageSync('i18locale')?uni.getStorageSync('i18locale'):uni.getLocale(), locale:uni.getLocale(),
// 引入语言文件 // 引入语言文件
messages: { messages: {
// 这里的属性名是任意的,您也可以把zh设置为cn等,只是后续切换语言时 // 这里的属性名是任意的,您也可以把zh设置为cn等,只是后续切换语言时
-44
View File
@@ -266,14 +266,6 @@
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
}, },
"node_modules/base64-arraybuffer": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
"integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==",
"engines": {
"node": ">= 0.6.0"
}
},
"node_modules/base64-js": { "node_modules/base64-js": {
"version": "1.5.1", "version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
@@ -387,14 +379,6 @@
"node": ">=4.8" "node": ">=4.8"
} }
}, },
"node_modules/css-line-break": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz",
"integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==",
"dependencies": {
"utrie": "^1.0.2"
}
},
"node_modules/csstype": { "node_modules/csstype": {
"version": "3.1.3", "version": "3.1.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
@@ -493,18 +477,6 @@
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="
}, },
"node_modules/html2canvas": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz",
"integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==",
"dependencies": {
"css-line-break": "^2.1.0",
"text-segmentation": "^1.0.3"
},
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/inflight": { "node_modules/inflight": {
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
@@ -719,14 +691,6 @@
"node": ">=4" "node": ">=4"
} }
}, },
"node_modules/text-segmentation": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz",
"integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==",
"dependencies": {
"utrie": "^1.0.2"
}
},
"node_modules/underscore": { "node_modules/underscore": {
"version": "1.13.7", "version": "1.13.7",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz",
@@ -740,14 +704,6 @@
"node": ">= 4.0.0" "node": ">= 4.0.0"
} }
}, },
"node_modules/utrie": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz",
"integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==",
"dependencies": {
"base64-arraybuffer": "^1.0.2"
}
},
"node_modules/vue": { "node_modules/vue": {
"version": "3.5.13", "version": "3.5.13",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.5.13.tgz", "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.13.tgz",
-45
View File
@@ -11,7 +11,6 @@
"dependencies": { "dependencies": {
"@googlemaps/js-api-loader": "^1.16.8", "@googlemaps/js-api-loader": "^1.16.8",
"cordova-plugin-googlemaps": "^2.7.1", "cordova-plugin-googlemaps": "^2.7.1",
"html2canvas": "^1.4.1",
"vue-i18n": "^9.1.9" "vue-i18n": "^9.1.9"
} }
}, },
@@ -277,14 +276,6 @@
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
}, },
"node_modules/base64-arraybuffer": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
"integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==",
"engines": {
"node": ">= 0.6.0"
}
},
"node_modules/base64-js": { "node_modules/base64-js": {
"version": "1.5.1", "version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
@@ -398,14 +389,6 @@
"node": ">=4.8" "node": ">=4.8"
} }
}, },
"node_modules/css-line-break": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz",
"integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==",
"dependencies": {
"utrie": "^1.0.2"
}
},
"node_modules/csstype": { "node_modules/csstype": {
"version": "3.1.3", "version": "3.1.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
@@ -504,18 +487,6 @@
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="
}, },
"node_modules/html2canvas": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz",
"integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==",
"dependencies": {
"css-line-break": "^2.1.0",
"text-segmentation": "^1.0.3"
},
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/inflight": { "node_modules/inflight": {
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
@@ -730,14 +701,6 @@
"node": ">=4" "node": ">=4"
} }
}, },
"node_modules/text-segmentation": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz",
"integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==",
"dependencies": {
"utrie": "^1.0.2"
}
},
"node_modules/underscore": { "node_modules/underscore": {
"version": "1.13.7", "version": "1.13.7",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz",
@@ -751,14 +714,6 @@
"node": ">= 4.0.0" "node": ">= 4.0.0"
} }
}, },
"node_modules/utrie": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz",
"integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==",
"dependencies": {
"base64-arraybuffer": "^1.0.2"
}
},
"node_modules/vue": { "node_modules/vue": {
"version": "3.5.13", "version": "3.5.13",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.5.13.tgz", "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.13.tgz",
-42
View File
@@ -86,15 +86,6 @@
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle":"custom"// 去掉微信小程序顶部导航 "navigationStyle":"custom"// 去掉微信小程序顶部导航
} }
},
{
"path" : "pages/index/highseas",//客户公海
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh": false,
"navigationStyle":"custom"// 去掉微信小程序顶部导航
}
} }
], ],
"subPackages":[ "subPackages":[
@@ -163,15 +154,6 @@
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle":"custom"// 去掉微信小程序顶部导航 "navigationStyle":"custom"// 去掉微信小程序顶部导航
} }
},
{
"path" : "tagcustomer",//标签筛选
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh": false,
"navigationStyle":"custom"// 去掉微信小程序顶部导航
}
} }
] ]
},{ },{
@@ -248,24 +230,6 @@
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle":"custom"// 去掉微信小程序顶部导航 "navigationStyle":"custom"// 去掉微信小程序顶部导航
} }
},
{
"path" : "workreport",
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh": false,
"navigationStyle":"custom"// 去掉微信小程序顶部导航
}
},
{
"path" : "workreportdetil",
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh": false,
"navigationStyle":"custom"// 去掉微信小程序顶部导航
}
} }
] ]
} }
@@ -298,12 +262,6 @@
"selectedIconPath": "/static/image/home-s.png", "selectedIconPath": "/static/image/home-s.png",
"text": "首页" "text": "首页"
}, },
{
"pagePath": "pages/index/highseas",
"iconPath": "/static/image/highseas.png",
"selectedIconPath": "/static/image/highseas-s.png",
"text": "公海"
},
{ {
"pagePath": "pages/index/customer", "pagePath": "pages/index/customer",
"iconPath": "/static/image/user.png", "iconPath": "/static/image/user.png",
+19 -8
View File
@@ -39,7 +39,7 @@
</view> </view>
<u-line></u-line> <u-line></u-line>
<view class="cell"> <view class="cell">
<view class="item">{{$t('mine.lxcall')}}</view> <view class="item">{{$t('mine.lxcall')}} <text class="red">*</text></view>
<view class="right"> <view class="right">
<input :placeholder="$t('mine.lxcallinputhd')" v-model="form.phone" /> <input :placeholder="$t('mine.lxcallinputhd')" v-model="form.phone" />
</view> </view>
@@ -58,14 +58,15 @@
<input :placeholder="$t('customer.WhatsAppinput')" v-model="form.WhatsApp" /> <input :placeholder="$t('customer.WhatsAppinput')" v-model="form.WhatsApp" />
</view> </view>
</view> </view>
<!-- <u-line></u-line> <u-line></u-line>
<view class="cell"> <view class="cell">
<view class="item">{{$t('customer.Customerph')}} <text class="red">*</text></view> <view class="item">{{$t('customer.Customerph')}} <text class="red">*</text></view>
<view class="right select" @click="showcartype = true"> <view class="right select" @click="showcartype = true">
<view class="" :class="['content2', { placeholder: !car_type_name }]">{{car_type_name || $t('customer.Customerphinput')}}</view> <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" /> -->
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon> <u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
</view> </view>
</view> --> </view>
<u-line></u-line> <u-line></u-line>
<view class="cell"> <view class="cell">
<view class="item">{{$t('customer.Cstomerfj')}}</view> <view class="item">{{$t('customer.Cstomerfj')}}</view>
@@ -187,7 +188,7 @@
describe: '', describe: '',
grade:'', grade:'',
country_id:'', country_id:'',
// car_type_id:'', car_type_id:'',
channel_id:'', channel_id:'',
magnitude:'', magnitude:'',
address:'', address:'',
@@ -203,15 +204,17 @@
this.getChannel() this.getChannel()
this.getMagnitude() this.getMagnitude()
this.getGrade() this.getGrade()
// this.carType() this.carType()
this.area() this.area()
}, },
onShow() { onShow() {
console.log(uni.getStorageSync('location'))
if(uni.getStorageSync('location')){ if(uni.getStorageSync('location')){
this.location = JSON.parse(uni.getStorageSync('location')) this.location = JSON.parse(uni.getStorageSync('location'))
this.form.address = this.location.address this.form.address = this.location.address
this.form.lng = this.location.lng this.form.lng = this.location.lng
this.form.lat = this.location.lat this.form.lat = this.location.lat
console.log(this.location)
} }
}, },
mounted() { mounted() {
@@ -328,9 +331,11 @@
// 国家搜索处理函数 // 国家搜索处理函数
handleSearch() { handleSearch() {
if (this.searchKeyword) { if (this.searchKeyword) {
console.log(this.searchKeyword)
this.filteredOptions = this.areaList.filter((item) => this.filteredOptions = this.areaList.filter((item) =>
item.name.includes(this.searchKeyword) item.name.includes(this.searchKeyword)
); );
console.log(this.filteredOptions)
} else { } else {
// 如果搜索框为空,显示全部数据 // 如果搜索框为空,显示全部数据
this.filteredOptions = this.areaList; this.filteredOptions = this.areaList;
@@ -340,6 +345,8 @@
handleSelect(item) { handleSelect(item) {
this.selectedLabel = item.name; // 回显选中的值 this.selectedLabel = item.name; // 回显选中的值
this.actives = item.id this.actives = item.id
console.log("选中的值:", item.id);
console.log("选中的值:", item.name);
}, },
arerfn(){ arerfn(){
this.showarea = false; // 关闭弹窗 this.showarea = false; // 关闭弹窗
@@ -361,6 +368,7 @@
}); });
return false return false
} }
console.log(this.form)
request({ request({
url:'customer/save', url:'customer/save',
method:'post', method:'post',
@@ -413,8 +421,9 @@
justify-content:space-between; justify-content:space-between;
padding: 18px 20px; padding: 18px 20px;
align-items: center; align-items: center;
font-size: 32rpx;
font-weight: 500; font-weight: 500;
font-size: 24rpx; font-size: 32rpx;
color: #666666; color: #666666;
.item{ .item{
width: 90px; width: 90px;
@@ -424,11 +433,14 @@
margin-right: -15px; margin-right: -15px;
} }
.cell1{ .cell1{
font-size: 24rpx; font-size: 32rpx;
padding: 18px 20px; padding: 18px 20px;
align-items: center; align-items: center;
font-weight: 500; font-weight: 500;
color: #666666; color: #666666;
.item{
width: 100px;
}
} }
.right{ .right{
text-align: right; text-align: right;
@@ -454,7 +466,6 @@
width: 92%; width: 92%;
margin-bottom: 40px; margin-bottom: 40px;
margin: 15px 4%; margin: 15px 4%;
font-size: 28rpx;
} }
.mapcont{ .mapcont{
.header{ .header{
+30 -31
View File
@@ -7,31 +7,19 @@
<view class="name">{{datas.contacts}}</view> <view class="name">{{datas.contacts}}</view>
<view class="right"> <view class="right">
<text class="medal" :style="{color:(datas.magnitude == 0 ?'#F5AB00' : datas.magnitude == 1 ?'#8495B8': '#9B7200')}">{{datas.magnitude_txt}}</text> <text class="medal" :style="{color:(datas.magnitude == 0 ?'#F5AB00' : datas.magnitude == 1 ?'#8495B8': '#9B7200')}">{{datas.magnitude_txt}}</text>
<text class="tag" :style="{background:(datas.follow == 0 ?'#3471FF' : datas.follow == 1 ?'#27C89C': '#FF4040')}">{{datas.follow==0?$t('followup'):datas.follow==1?$t('deal'):$t('lost')}}</text> <text class="tag" :style="{background:(datas.follow == 0 ?'#3471FF' : datas.follow == 1 ?'#27C89C': '#FF4040')}">{{datas.follow_txt}}</text>
</view> </view>
</view> </view>
<u-line margin="20rpx 0px" color="#fff" :hairline="false"></u-line> <u-line margin="20rpx 0px" color="#fff" :hairline="false"></u-line>
<view class="cont"> <view class="cont">
<view class="title"> <view class="title">
<view class=""> <view class=""><text class="name">{{datas.phone}}</text></view>
<u-tooltip :text="datas.phone" :copyText="datas.phone" :showCopy="true">
<text class="name" @click.stop>{{datas.phone}}</text>
</u-tooltip>
</view>
<view class="ststus" v-if="datas.channel_name!=''">{{$t('channel')}}:{{datas.channel_name}}</view> <view class="ststus" v-if="datas.channel_name!=''">{{$t('channel')}}:{{datas.channel_name}}</view>
</view> </view>
<view class="info"><text class="sex">{{datas.sex_txt}}</text> | <text class="addr">{{datas.country_name}}</text><text class="type">{{datas.car_type_name}}</text> <view class="info"><text class="sex">{{datas.sex_txt}}</text> | <text class="addr">{{datas.country_name}}</text><text class="type">{{datas.car_type_name}}</text>
</view> </view>
<view v-if="datas.email!=''"> <view v-if="datas.email!=''">Email: {{datas.email}}</view>
<u-tooltip :text="datas.email" :copyText="datas.email" :showCopy="true"> <view v-if="datas.WhatsApp!=''">WhatsAPP: {{datas.WhatsApp}}</view>
<text @click.stop>Email: {{datas.email}}</text>
</u-tooltip>
</view>
<view v-if="datas.WhatsApp!=''">
<u-tooltip :text="datas.WhatsApp" :copyText="datas.WhatsApp" :showCopy="true">
<text @click.stop>WhatsAPP: {{datas.WhatsApp}}</text>
</u-tooltip>
</view>
<view v-if="datas.address!=''">{{$t('customer.Company')}}: {{datas.address}}</view> <view v-if="datas.address!=''">{{$t('customer.Company')}}: {{datas.address}}</view>
<view v-if="datas.describe!=''">{{$t('remarks')}}: {{datas.describe}}</view> <view v-if="datas.describe!=''">{{$t('remarks')}}: {{datas.describe}}</view>
</view> </view>
@@ -49,7 +37,7 @@
</view> </view>
<view v-if="datas.tags.length>0"> <view v-if="datas.tags.length>0">
<view class="conts" :class="{'expandeds':!expanded}"> <view class="conts" :class="{'expandeds':!expanded}">
<view class="tags" @click="tagselects(item)" v-for="(item, index) in datas.tags" :key="index">{{item.name}}</view> <view class="tags" v-for="(item, index) in datas.tags" :key="index">{{item.name}}</view>
</view> </view>
<view class="toggle" @click="expanded = !expanded"> <view class="toggle" @click="expanded = !expanded">
<text > <text >
@@ -76,7 +64,7 @@
<view class="steps"> <view class="steps">
<view class="title"> <view class="title">
<view class=""> <view class="">
{{$t('customer.followrecord')}} <text class="status" :style="{color:(datas.follow == 0 ?'#3471FF' : datas.follow == 1 ?'#27C89C': '#FF4040')}">{{datas.follow==0?$t('followup'):datas.follow==1?$t('deal'):$t('lost')}}</text> {{$t('customer.followrecord')}} <text class="status" :style="{color:(datas.follow == 0 ?'#3471FF' : datas.follow == 1 ?'#27C89C': '#FF4040')}">{{datas.follow_txt}}</text>
</view> </view>
<view class="btnjl" @click="followupFn"> <view class="btnjl" @click="followupFn">
{{$t('navbar.addfollowup')}} {{$t('navbar.addfollowup')}}
@@ -85,14 +73,13 @@
<u-steps v-if="followList.length>0" :current="followList.length" direction="column" dot> <u-steps v-if="followList.length>0" :current="followList.length" direction="column" dot>
<u-steps-item :title="item.type==1? $t('customer.Online') : $t('customer.Visit') " v-for="(item, index) in followList" :key="index"> <u-steps-item :title="item.type==1? $t('customer.Online') : $t('customer.Visit') " v-for="(item, index) in followList" :key="index">
<view slot="desc" class="desc"> <view slot="desc" class="desc">
<view class="flex"> <view class="flex" v-if="item.type==0">
<view class=""> <view class="">
<view class="lingh"> <view class="lingh">
{{$t('times')}} :{{item.created_at}} {{$t('times')}} :{{item.created_at}}
</view> </view>
<view class="" v-if="item.type==0">{{$t('address')}}:{{item.address}}</view> <view class="">{{$t('address')}}:{{item.address}}</view>
<view class="lingh" v-if="item.type==0">{{$t('customer.Visitcontent')}}:{{item.audio_text}}</view> <view class="lingh">{{$t('customer.Visitcontent')}}:{{item.audio_text}}</view>
<view class="lingh" v-if="item.type==1">{{$t('customer.flRemarks')}}:{{item.audio_text}}</view>
</view> </view>
<view class=""> <view class="">
<!-- <image :src="item.oss_picture" mode=""></image> --> <!-- <image :src="item.oss_picture" mode=""></image> -->
@@ -103,6 +90,19 @@
></u-album> ></u-album>
</view> </view>
</view> </view>
<view class="" v-else>
<view class="lingh">
{{$t('times')}}:{{item.created_at}}
</view>
<view class="">
<u-album
:urls="isurls(item.oss_picture)"
keyName="src"
:singleSize="80"
></u-album>
<!-- <image :src="item.oss_picture" mode=""></image> -->
</view>
</view>
</view> </view>
</u-steps-item> </u-steps-item>
</u-steps> </u-steps>
@@ -162,6 +162,7 @@
} }
}, },
onLoad(options) { onLoad(options) {
console.log(options);
this.id = options.id; this.id = options.id;
var that = this var that = this
this.getGrade() this.getGrade()
@@ -175,6 +176,7 @@
this.form.address = this.location.address this.form.address = this.location.address
this.form.lng = this.location.lng this.form.lng = this.location.lng
this.form.lat = this.location.lat this.form.lat = this.location.lat
console.log(this.location)
} }
this.followlistfn() this.followlistfn()
}, },
@@ -232,6 +234,7 @@
} }
}).then(res => { }).then(res => {
this.followList = res.data.data this.followList = res.data.data
console.log(res.data.data)
}) })
}, },
//添加跟进 //添加跟进
@@ -311,6 +314,7 @@
tagSelect(item) { tagSelect(item) {
// 如果已选中则取消,否则设置选中 // 如果已选中则取消,否则设置选中
this.$set(this.activeMap, item.group_id, this.activeMap[item.group_id] === item.id ? '' : item.id); this.$set(this.activeMap, item.group_id, this.activeMap[item.group_id] === item.id ? '' : item.id);
console.log(this.activeMap)
request({ request({
url:'tagGroup/updatePivot', url:'tagGroup/updatePivot',
method:'post', method:'post',
@@ -328,11 +332,6 @@
} }
}) })
}, },
tagselects(item){ //标签筛选
uni.navigateTo({
url: '/pages/customer/tagcustomer?tag_id='+item.id+'&name='+item.name
});
},
isActive(parentId, childId) { isActive(parentId, childId) {
return this.activeMap[parentId] === childId; return this.activeMap[parentId] === childId;
}, },
@@ -524,7 +523,7 @@
} }
} }
.name{ .name{
font-size: 30rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
margin-right: 10px; margin-right: 10px;
} }
@@ -595,7 +594,7 @@
color: white; color: white;
padding: 4px 10px; padding: 4px 10px;
border-radius: 20px; border-radius: 20px;
font-size: 24rpx; font-size: 28rpx;
} }
} }
} }
@@ -618,7 +617,7 @@
border-radius: 8px; border-radius: 8px;
color: #3471FF; color: #3471FF;
text-align: center; text-align: center;
padding: 5px 13px; padding: 5px 0px;
} }
.row{ .row{
width: 100%; width: 100%;
@@ -626,7 +625,7 @@
.col4{ .col4{
display: inline-block; display: inline-block;
margin: 4px 3px; margin: 4px 3px;
// width: 30%; width: 30%;
} }
} }
.tagactive{ .tagactive{
+23 -13
View File
@@ -39,7 +39,7 @@
</view> </view>
<u-line></u-line> <u-line></u-line>
<view class="cell"> <view class="cell">
<view class="item">{{$t('mine.lxcall')}}</view> <view class="item">{{$t('mine.lxcall')}} <text class="red">*</text></view>
<view class="right"> <view class="right">
<input :placeholder="$t('mine.lxcallinputhd')" v-model="form.phone" /> <input :placeholder="$t('mine.lxcallinputhd')" v-model="form.phone" />
</view> </view>
@@ -59,13 +59,14 @@
</view> </view>
</view> </view>
<u-line></u-line> <u-line></u-line>
<!-- <view class="cell"> <view class="cell">
<view class="item">{{$t('customer.Customerph')}} <text class="red">*</text></view> <view class="item">{{$t('customer.Customerph')}} <text class="red">*</text></view>
<view class="right select" @click="showcartype = true"> <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> <view class="" :class="['content2', { placeholder: !car_type_name }]">{{car_type_name || $t('customer.Customerphinput')}}</view>
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon> <u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
</view> </view>
</view> --> </view>
<u-line></u-line> <u-line></u-line>
<view class="cell"> <view class="cell">
<view class="item">{{$t('customer.Country')}}</view> <view class="item">{{$t('customer.Country')}}</view>
@@ -179,7 +180,7 @@
describe: '', describe: '',
grade:'', grade:'',
country_id:'', country_id:'',
// car_type_id:'', car_type_id:'',
channel_id:'', channel_id:'',
magnitude:'', magnitude:'',
address:'', address:'',
@@ -191,11 +192,12 @@
} }
}, },
onLoad(options) { onLoad(options) {
console.log(options);
this.id = options.id; this.id = options.id;
var that = this var that = this
this.getChannel() this.getChannel()
this.getMagnitude() this.getMagnitude()
// this.carType() this.carType()
this.area() this.area()
this.customerdetailfn() this.customerdetailfn()
@@ -206,6 +208,7 @@
this.form.address = this.location.address this.form.address = this.location.address
this.form.lng = this.location.lng this.form.lng = this.location.lng
this.form.lat = this.location.lat this.form.lat = this.location.lat
console.log(this.location)
} }
this.followlistfn() this.followlistfn()
}, },
@@ -233,12 +236,12 @@
that.defaultIndexqd=[index] that.defaultIndexqd=[index]
} }
}) })
// that.carTypeList1.forEach((item,index) => { that.carTypeList1.forEach((item,index) => {
// if(item.id == that.form.car_type_id){ if(item.id == that.form.car_type_id){
// that.car_type_name = item.name that.car_type_name = item.name
// that.defaultIndexph=[index] that.defaultIndexph=[index]
// } }
// }) })
that.magnitudeList1.forEach((item,index) => { that.magnitudeList1.forEach((item,index) => {
if(item.id == that.form.magnitude){ if(item.id == that.form.magnitude){
that.magnitude_name = item.name that.magnitude_name = item.name
@@ -273,6 +276,7 @@
} }
}).then(res => { }).then(res => {
this.followList = res.data.data this.followList = res.data.data
console.log(res.data.data)
}) })
}, },
//添加跟进 //添加跟进
@@ -377,9 +381,11 @@
// 搜索处理函数 // 搜索处理函数
handleSearch() { handleSearch() {
if (this.searchKeyword) { if (this.searchKeyword) {
console.log(this.searchKeyword)
this.filteredOptions = this.areaList1.filter((item) => this.filteredOptions = this.areaList1.filter((item) =>
item.name.includes(this.searchKeyword) item.name.includes(this.searchKeyword)
); );
console.log(this.filteredOptions)
} else { } else {
// 如果搜索框为空,显示全部数据 // 如果搜索框为空,显示全部数据
this.filteredOptions = this.areaList1; this.filteredOptions = this.areaList1;
@@ -391,6 +397,8 @@
// this.searchKeyword = item.name // this.searchKeyword = item.name
this.actives = item.id this.actives = item.id
// this.showPicker = false; // 关闭弹窗 // this.showPicker = false; // 关闭弹窗
console.log("选中的值:", item.id);
console.log("选中的值:", item.name);
}, },
arerfn(){ arerfn(){
this.showarea = false; // 关闭弹窗 this.showarea = false; // 关闭弹窗
@@ -470,10 +478,13 @@
margin-right: -15px; margin-right: -15px;
} }
.cell1{ .cell1{
font-size: 24rpx; font-size: 32rpx;
padding: 18px 20px; padding: 18px 20px;
align-items: center; align-items: center;
font-weight: 500; font-weight: 500;
.item{
width: 100px;
}
} }
.right{ .right{
text-align: right; text-align: right;
@@ -499,7 +510,6 @@
width: 92%; width: 92%;
margin-bottom: 40px; margin-bottom: 40px;
margin: 15px 4%; margin: 15px 4%;
font-size: 32rpx;
} }
+4 -2
View File
@@ -42,8 +42,6 @@
closeOnClickOverlay closeOnClickOverlay
v-model="nexttime" v-model="nexttime"
mode="datetime" mode="datetime"
:cancel-text="$t('cancel')"
:confirm-text="$t('confirm')"
@confirm="confirmnext" @confirm="confirmnext"
@cancel="cancelnext" @cancel="cancelnext"
@close="close('shownexttime')" @close="close('shownexttime')"
@@ -64,6 +62,7 @@
} }
}, },
onLoad(options) { onLoad(options) {
console.log(options);
this.id = options.id; this.id = options.id;
}, },
methods: { methods: {
@@ -71,6 +70,7 @@
uni.navigateBack({}) uni.navigateBack({})
}, },
active(item){ active(item){
console.log(item)
if(item=='auto'){ if(item=='auto'){
this.shownexttime = true this.shownexttime = true
} }
@@ -98,6 +98,7 @@
this.shownexttime = false this.shownexttime = false
this.nexttime = e.value this.nexttime = e.value
this.time = this.result(e.value, e.mode) this.time = this.result(e.value, e.mode)
console.log(this.nexttime)
}, },
getLaterDate(dayNum, dateTime = null) { getLaterDate(dayNum, dateTime = null) {
// 如果为null,则格式化当前时间为时间戳 // 如果为null,则格式化当前时间为时间戳
@@ -135,6 +136,7 @@
if(this.actives==7){ if(this.actives==7){
nexttime = this.getLaterDate(7) nexttime = this.getLaterDate(7)
} }
console.log(nexttime)
request({ request({
url:'customer/followNext', url:'customer/followNext',
method:'post', method:'post',
+67 -46
View File
@@ -6,7 +6,7 @@
<view class="name">{{userdatas.contacts}}</view> <view class="name">{{userdatas.contacts}}</view>
<view class="right"> <view class="right">
<text class="medal" :style="{color:(userdatas.magnitude == 0 ?'#F5AB00' : userdatas.magnitude == 1 ?'#8495B8': '#9B7200')}">{{userdatas.magnitude_txt}}</text> <text class="medal" :style="{color:(userdatas.magnitude == 0 ?'#F5AB00' : userdatas.magnitude == 1 ?'#8495B8': '#9B7200')}">{{userdatas.magnitude_txt}}</text>
<text class="tag" :style="{background:(userdatas.follow == 0 ?'#3471FF' : userdatas.follow == 1 ?'#27C89C': '#FF4040')}">{{userdatas.follow==0?$t('followup'):userdatas.follow==1?$t('deal'):$t('lost')}}</text> <text class="tag" :style="{background:(userdatas.follow == 0 ?'#3471FF' : userdatas.follow == 1 ?'#27C89C': '#FF4040')}">{{userdatas.follow_txt}}</text>
</view> </view>
</view> </view>
<u-line margin="20rpx 0px" color="#fff" :hairline="false"></u-line> <u-line margin="20rpx 0px" color="#fff" :hairline="false"></u-line>
@@ -74,17 +74,16 @@
</uni-file-picker> </uni-file-picker>
</view> </view>
</view> </view>
<u-line></u-line> <u-line v-if="form.type==0"></u-line>
<view class="cell1"> <view class="cell1" v-if="form.type==0">
<view v-if="form.type==0">{{$t('customer.Visitcontent')}}</view> <view>{{$t('customer.Visitcontent')}}</view>
<view v-if="form.type==1">{{$t('customer.flRemarks')}}</view>
<view class="yuyin"> <view class="yuyin">
<textarea v-if="form.type==0" auto-height v-model="form.audio_text" :placeholder="$t('customer.Visiinputhd')"/> <textarea auto-height v-model="form.audio_text" :placeholder="$t('customer.Visiinputhd')"/>
<textarea v-if="form.type==1" auto-height v-model="form.audio_text" :placeholder="$t('customer.flRemarksinputhd')"/> <!-- <image src="/static/image/customer/yuyin.png" mode="" @tap="startRecognizebd"></image> -->
</view> </view>
</view> </view>
<u-line></u-line> <u-line v-if="form.type==0"></u-line>
<view class="cell1"> <view class="cell1" v-if="form.type==0">
<view>{{$t('customer.Remarks')}}</view> <view>{{$t('customer.Remarks')}}</view>
<view class="yuyin"> <view class="yuyin">
<textarea auto-height v-model="form.remark" :placeholder="$t('customer.Remarksinputhd')"/> <textarea auto-height v-model="form.remark" :placeholder="$t('customer.Remarksinputhd')"/>
@@ -95,19 +94,31 @@
<u-gap height="10" bgColor="#F6F6F6"></u-gap> <u-gap height="10" bgColor="#F6F6F6"></u-gap>
<view class="steps"> <view class="steps">
<view class="title"> <view class="title">
{{$t('customer.followrecord')}} <text class="status" :style="{color:(userdatas.follow == 0 ?'#3471FF' : userdatas.follow == 1 ?'#27C89C': '#FF4040')}">{{userdatas.follow==0?$t('followup'):userdatas.follow==1?$t('deal'):$t('lost')}}</text> {{$t('customer.followrecord')}} <text class="status" :style="{color:(datas.follow == 0 ?'#3471FF' : datas.follow == 1 ?'#27C89C': '#FF4040')}">{{datas.follow_txt}}</text>
</view> </view>
<u-steps v-if="followList.length>0" :current="followList.length" direction="column" dot> <u-steps v-if="followList.length>0" :current="followList.length" direction="column" dot>
<u-steps-item :title="item.type==1? $t('customer.Online') : $t('customer.Visit') " v-for="(item, index) in followList" :key="index"> <u-steps-item :title="item.type==1? $t('customer.Online') : $t('customer.Visit') " v-for="(item, index) in followList" :key="index">
<view slot="desc" class="desc"> <view slot="desc" class="desc">
<view class="flex" > <view class="flex" v-if="item.type==0">
<view class=""> <view class="">
<view class="lingh"> <view class="lingh">
{{$t('times')}} :{{item.created_at}} {{$t('times')}} :{{item.created_at}}
</view> </view>
<view class="" v-if="item.type==0">{{$t('address')}}:{{item.address}}</view> <view class="">{{$t('address')}}:{{item.address}}</view>
<view class="lingh" v-if="item.type==0">{{$t('customer.Visitcontent')}}:{{item.audio_text}}</view> <view class="lingh">{{$t('customer.Visitcontent')}}:{{item.audio_text}}</view>
<view class="lingh" v-if="item.type==1">{{$t('customer.flRemarks')}}:{{item.audio_text}}</view> </view>
<view class="">
<!-- <image :src="item.oss_picture" mode=""></image> -->
<u-album
:urls="isurls(item.oss_picture)"
:singleSize="80"
keyName="src"
></u-album>
</view>
</view>
<view class="" v-else>
<view class="lingh">
{{$t('times')}}:{{item.created_at}}
</view> </view>
<view class=""> <view class="">
<!-- <image :src="item.oss_picture" mode=""></image> --> <!-- <image :src="item.oss_picture" mode=""></image> -->
@@ -125,6 +136,7 @@
</view> </view>
<u-gap height="100" bgColor="#fff"></u-gap> <u-gap height="100" bgColor="#fff"></u-gap>
<view class="foot"> <view class="foot">
<!-- <button class="btn1" @click="shownexttime=true">{{$t('customer.NextReminder')}}</button> -->
<button class="btn" @click="nextFn">{{$t('submit')}}</button> <button class="btn" @click="nextFn">{{$t('submit')}}</button>
</view> </view>
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :defaultIndex="defaultIndexfj" :show="showgrade" @cancel="cancel('showgrade')" @close="close('showgrade')" :columns="getGradeList" keyName="name" @confirm="gradeHandler"></u-picker> <u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :defaultIndex="defaultIndexfj" :show="showgrade" @cancel="cancel('showgrade')" @close="close('showgrade')" :columns="getGradeList" keyName="name" @confirm="gradeHandler"></u-picker>
@@ -134,8 +146,6 @@
closeOnClickOverlay closeOnClickOverlay
v-model="firstFollow" v-model="firstFollow"
mode="datetime" mode="datetime"
:cancel-text="$t('cancel')"
:confirm-text="$t('confirm')"
@confirm="confirm" @confirm="confirm"
@change="change" @change="change"
@cancel="cancel('show')" @cancel="cancel('show')"
@@ -146,8 +156,6 @@
closeOnClickOverlay closeOnClickOverlay
v-model="nexttime" v-model="nexttime"
mode="datetime" mode="datetime"
:cancel-text="$t('cancel')"
:confirm-text="$t('confirm')"
@confirm="confirmnext" @confirm="confirmnext"
@cancel="cancelnext" @cancel="cancelnext"
@close="close('shownexttime')" @close="close('shownexttime')"
@@ -188,6 +196,7 @@
} }
}, },
onLoad(options) { onLoad(options) {
console.log(options);
this.getlocahost() this.getlocahost()
this.id = options.id; this.id = options.id;
this.form.customer_id = options.id; this.form.customer_id = options.id;
@@ -280,13 +289,13 @@
success: (res) => { success: (res) => {
if (res.data.results && res.data.results.length > 0) { if (res.data.results && res.data.results.length > 0) {
this.form.address = res.data.results[0].formatted_address; // 获取格式化地址 this.form.address = res.data.results[0].formatted_address; // 获取格式化地址
// console.log(res.data.results[0].formatted_address) console.log(res.data.results[0].formatted_address)
} else { } else {
// console.error('未找到地址'); console.error('未找到地址');
} }
}, },
fail: (err) => { fail: (err) => {
// console.error('请求失败:', err); console.error('请求失败:', err);
}, },
}); });
}, },
@@ -295,15 +304,17 @@
uni.getLocation({ uni.getLocation({
type: 'wgs84', // 默认为 wgs84 坐标系,可选 gcj02 type: 'wgs84', // 默认为 wgs84 坐标系,可选 gcj02
success: function (res) { success: function (res) {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
that.getarrd(res.longitude,res.latitude) that.getarrd(res.longitude,res.latitude)
// 如果需要将经纬度转换为具体地址,可以使用逆地理编码 // 如果需要将经纬度转换为具体地址,可以使用逆地理编码
// 这里调用 uni.chooseLocation 或第三方地图服务(如高德、腾讯地图) // 这里调用 uni.chooseLocation 或第三方地图服务(如高德、腾讯地图)
}, },
fail: function (err) { fail: function (err) {
// console.log('获取位置失败:', err); console.log('获取位置失败:', err);
}, },
complete: function () { complete: function () {
// console.log('获取位置完成'); console.log('获取位置完成');
} }
}); });
}, },
@@ -311,11 +322,11 @@
if (navigator.geolocation) { if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition( navigator.geolocation.getCurrentPosition(
(position) => { (position) => {
// console.log('当前位置的经度:' + position.coords.longitude); console.log('当前位置的经度:' + position.coords.longitude);
// console.log('当前位置的纬度:' + position.coords.latitude); console.log('当前位置的纬度:' + position.coords.latitude);
this.getarrd(position.coords.longitude,position.coords.latitude) this.getarrd(position.coords.longitude,position.coords.latitude)
this.error = ''; this.error = '';
// console.log("获取位置成功:", position); console.log("获取位置成功:", position);
}, },
(error) => { (error) => {
this.unigetLocation() this.unigetLocation()
@@ -324,7 +335,7 @@
// title: this.error, // title: this.error,
// icon: 'none' // icon: 'none'
// }); // });
// console.error("获取位置失败:", error); console.error("获取位置失败:", error);
}, },
{ {
enableHighAccuracy: true, enableHighAccuracy: true,
@@ -339,7 +350,7 @@
// title: this.error, // title: this.error,
// icon: 'none' // icon: 'none'
// }); // });
// console.error("浏览器不支持 Geolocation API"); console.error("浏览器不支持 Geolocation API");
} }
}, },
getErrorMessage(error) { getErrorMessage(error) {
@@ -365,7 +376,7 @@
}).then(res => { }).then(res => {
this.datas = res.data.data this.datas = res.data.data
this.followList = res.data.data this.followList = res.data.data
// console.log(res.data.data) console.log(res.data.data)
}) })
}, },
//保存跟进 //保存跟进
@@ -407,6 +418,7 @@
confirm(e) { confirm(e) {
this.show = false this.show = false
this.form.firstFollowtime = this.result(e.value, e.mode) this.form.firstFollowtime = this.result(e.value, e.mode)
console.log(this.result(e.value, e.mode))
}, },
cancelnext() { cancelnext() {
this.shownexttime = false this.shownexttime = false
@@ -414,6 +426,7 @@
confirmnext(e) { confirmnext(e) {
this.shownexttime = false this.shownexttime = false
this.nexttime = this.result(e.value, e.mode) this.nexttime = this.result(e.value, e.mode)
console.log(this.nexttime)
request({ request({
url:'customer/followNext', url:'customer/followNext',
method:'post', method:'post',
@@ -435,30 +448,26 @@
}, },
change(e) { change(e) {
// console.log('change', e)
}, },
delfn(name){ delfn(name){
console.log(name)
that.carinfo[name] ='' that.carinfo[name] =''
}, },
uploadfn(imgUrl,name){ uploadfn(imgUrl,name){
var that = this; var that = this;
uni.showLoading({
title:this.$t('imgloading')
});
uni.uploadFile({ uni.uploadFile({
// url: 'http://api.crm.hnxinyouhe.com/upload', // url: 'http://api.crm.hnxinyouhe.com/upload',
// url: 'https://api.fcrm.hnxinyouhe.com/upload/uploadImage', url: 'http://219.157.255.213:9007/upload/uploadImage',
// url: 'https://crm-server.smt.hnxinyouhe.com/upload/uploadImage',
// url: 'http://219.157.255.213:9006/upload/uploadImage',
url: 'https://crm-server.x.hnxinyouhe.com/upload/uploadImage',
filePath: imgUrl, filePath: imgUrl,
name: 'files', name: 'files',
header:{'Authorization': 'Bearer ' + uni.getStorageSync('token')}, header:{'Authorization': 'Bearer ' + uni.getStorageSync('token')},
success: (uploadFileRes) => { success: (uploadFileRes) => {
const path=JSON.parse(uploadFileRes.data) const path=JSON.parse(uploadFileRes.data)
uni.hideLoading();
if(path.code==0){ if(path.code==0){
that.form[name] = path.data.path that.form[name] = path.data.path
console.log(that.form)
}else{ }else{
uni.showToast({ uni.showToast({
title: path.message, title: path.message,
@@ -491,10 +500,10 @@
options.engine = 'baidu'; options.engine = 'baidu';
that.form.audio_text = ""; that.form.audio_text = "";
plus.speech.startRecognize(options, function (s) { plus.speech.startRecognize(options, function (s) {
// console.log(s); console.log(s);
that.form.audio_text += s; that.form.audio_text += s;
}, function (e) { }, function (e) {
// console.log("语音识别失败:" + e.message); console.log("语音识别失败:" + e.message);
}); });
}, },
async startRecognize () { async startRecognize () {
@@ -512,12 +521,12 @@
options.punctuation = false; // 是否需要标点符号 options.punctuation = false; // 是否需要标点符号
options.timeout = 10 * 1000; //语音录入持续时长 options.timeout = 10 * 1000; //语音录入持续时长
plus.speech.startRecognize(options, function(s) { plus.speech.startRecognize(options, function(s) {
// console.log(s); console.log(s);
that.form.remark += s; that.form.remark += s;
// 关闭语音 // 关闭语音
plus.speech.stopRecognize(); plus.speech.stopRecognize();
}, function (e) { }, function (e) {
// console.log("语音识别失败:" + e.message); console.log("语音识别失败:" + e.message);
}); });
}, },
// #ifdef APP-PLUS // #ifdef APP-PLUS
@@ -604,7 +613,7 @@
} }
} }
.name{ .name{
font-size: 30rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
margin-right: 10px; margin-right: 10px;
} }
@@ -672,8 +681,9 @@
justify-content:space-between; justify-content:space-between;
padding: 18px 20px; padding: 18px 20px;
align-items: center; align-items: center;
font-size: 32rpx;
font-weight: 500; font-weight: 500;
font-size: 24rpx; font-size: 32rpx;
color: #666666; color: #666666;
.item{ .item{
width: 90px; width: 90px;
@@ -683,7 +693,7 @@
margin-right: -15px; margin-right: -15px;
} }
.cell1{ .cell1{
font-size: 24rpx; font-size: 32rpx;
padding: 18px 20px; padding: 18px 20px;
align-items: center; align-items: center;
font-weight: 500; font-weight: 500;
@@ -709,8 +719,19 @@
color: white; color: white;
border-radius: 50px; border-radius: 50px;
width: 93%; width: 93%;
height:88rpx; height: 96rpx;
line-height: 88rpx; line-height: 96rpx;
margin-top: 20px;
}
.btn1{
font-size: 28rpx;
border: 1px solid #3471FF;
background: #fff;
color: #3471FF;
border-radius: 50px;
width: 45%;
height: 96rpx;
line-height: 96rpx;
margin-top: 20px; margin-top: 20px;
} }
.addimg{ .addimg{
+4 -4
View File
@@ -21,7 +21,7 @@ export default {
postMessagefn(e){ postMessagefn(e){
uni.setStorageSync('location', e.detail.data); uni.setStorageSync('location', e.detail.data);
uni.navigateBack({}) uni.navigateBack({})
// console.log(JSON.parse(e.detail.data)) console.log(JSON.parse(e.detail.data))
}, },
leftClick(){ leftClick(){
uni.navigateBack({}) uni.navigateBack({})
@@ -37,16 +37,16 @@ export default {
obj.lat=res.latitude obj.lat=res.latitude
var arr=[] var arr=[]
arr.push(obj) arr.push(obj)
// console.log(arr) console.log(arr)
// that.src = 'http://dap?arr='+encodeURIComponent(JSON.stringify(arr)) // that.src = 'http://dap?arr='+encodeURIComponent(JSON.stringify(arr))
that.src = 'http://219.157.255.213:8082?arr='+encodeURIComponent(JSON.stringify(arr)) that.src = 'http://219.157.255.213:8082?arr='+encodeURIComponent(JSON.stringify(arr))
}, },
fail: function (err) { fail: function (err) {
// console.log('获取位置失败:', err); console.log('获取位置失败:', err);
}, },
complete: function () { complete: function () {
// console.log('获取位置完成'); console.log('获取位置完成');
} }
}) })
}, },
+19 -19
View File
@@ -3,8 +3,8 @@
<view id="map" style="height: 100vh;"></view> <view id="map" style="height: 100vh;"></view>
<!-- 输入框事件 --> <!-- 输入框事件 -->
<view style="display: flex; padding: 30rpx; position: fixed;width: 93%; background: white; top: 0px;"> <view style="display: flex; padding: 30rpx; position: fixed;width: 93%; background: white; top: 0px;">
<input v-model="value" type="text" id="search-box" :placeholder="$t('keyword')" class="search" @input="getPlacesList" /> <input v-model="value" type="text" id="search-box" placeholder="请输入" class="search" @input="getPlacesList" />
<view class="btn" @click="nextfn">{{$t('confirm')}}</view> <view class="btn" @click="nextfn">确定</view>
</view> </view>
<view class="card" v-if="list.length > 0"> <view class="card" v-if="list.length > 0">
<view class="item" v-for="(item, index) in list" :key="index"> <view class="item" v-for="(item, index) in list" :key="index">
@@ -50,7 +50,7 @@ export default {
this.center.lat = e.lat this.center.lat = e.lat
this.center.lng = e.lng this.center.lng = e.lng
} }
// console.log(e) console.log(e)
this.initMap() this.initMap()
}, },
methods:{ methods:{
@@ -76,15 +76,15 @@ export default {
confirm(item){ confirm(item){
var that = this var that = this
// var latlng = JSON.parse(JSON.stringify(place.geometry.location)) // var latlng = JSON.parse(JSON.stringify(place.geometry.location))
// console.log("place===", item.description) console.log("place===", item.description)
that.value = item.description that.value = item.description
that.cityInfo.address=item.description that.cityInfo.address=item.description
var geocoder = new google.maps.Geocoder(); var geocoder = new google.maps.Geocoder();
// var address = document.getElementById("address").value; // var address = document.getElementById("address").value;
geocoder.geocode( { 'address': item.description}, function(results, status) { geocoder.geocode( { 'address': item.description}, function(results, status) {
// console.log(results) console.log(results)
var latlng = JSON.parse(JSON.stringify(results[0].geometry.location)) var latlng = JSON.parse(JSON.stringify(results[0].geometry.location))
// console.log(latlng) console.log(latlng)
// // 将地图中心点指向用户所选位置,并设置标记 // // 将地图中心点指向用户所选位置,并设置标记
that.map.setCenter(latlng); that.map.setCenter(latlng);
that.cityInfo.lat=latlng.lat that.cityInfo.lat=latlng.lat
@@ -140,13 +140,13 @@ export default {
const geocoder = new google.maps.Geocoder(); const geocoder = new google.maps.Geocoder();
geocoder.geocode({ location: position }, (results, status) => { geocoder.geocode({ location: position }, (results, status) => {
if (status === 'OK' && results[0]) { if (status === 'OK' && results[0]) {
// console.log(results) console.log(results)
// console.log(position) console.log(position)
that.cityInfo.address = results[0].formatted_address; that.cityInfo.address = results[0].formatted_address;
that.cityInfo.lat = position.lat(); that.cityInfo.lat = position.lat();
that.cityInfo.lng = position.lng(); that.cityInfo.lng = position.lng();
that.value = results[0].formatted_address; that.value = results[0].formatted_address;
// console.log(that.cityInfo) console.log(that.cityInfo)
} else { } else {
alert('无法获取地址信息'); alert('无法获取地址信息');
} }
@@ -158,17 +158,17 @@ export default {
uni.getLocation({ uni.getLocation({
type: 'wgs84', // 默认为 wgs84 坐标系,可选 gcj02 type: 'wgs84', // 默认为 wgs84 坐标系,可选 gcj02
success: function (res) { success: function (res) {
// console.log('当前位置的经度:' + res.longitude); console.log('当前位置的经度:' + res.longitude);
// console.log('当前位置的纬度:' + res.latitude); console.log('当前位置的纬度:' + res.latitude);
that.addmapmarkfn(res.latitude,res.longitude) that.addmapmarkfn(res.latitude,res.longitude)
// 如果需要将经纬度转换为具体地址,可以使用逆地理编码 // 如果需要将经纬度转换为具体地址,可以使用逆地理编码
// 这里调用 uni.chooseLocation 或第三方地图服务(如高德、腾讯地图) // 这里调用 uni.chooseLocation 或第三方地图服务(如高德、腾讯地图)
}, },
fail: function (err) { fail: function (err) {
// console.log('获取位置失败:', err); console.log('获取位置失败:', err);
}, },
complete: function () { complete: function () {
// console.log('获取位置完成'); console.log('获取位置完成');
} }
}); });
}, },
@@ -183,11 +183,11 @@ export default {
if (navigator.geolocation) { if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition( navigator.geolocation.getCurrentPosition(
(position) => { (position) => {
// console.log('当前位置的经度:' + position.coords.longitude); console.log('当前位置的经度:' + position.coords.longitude);
// console.log('当前位置的纬度:' + position.coords.latitude); console.log('当前位置的纬度:' + position.coords.latitude);
that.addmapmarkfn(position.coords.latitude,position.coords.longitude) that.addmapmarkfn(position.coords.latitude,position.coords.longitude)
this.error = ''; this.error = '';
// console.log("获取位置成功:", position); console.log("获取位置成功:", position);
}, },
(error) => { (error) => {
that.unigetLocation() that.unigetLocation()
@@ -196,7 +196,7 @@ export default {
// title: this.error, // title: this.error,
// icon: 'none' // icon: 'none'
// }); // });
// console.error("获取位置失败:", error); console.error("获取位置失败:", error);
}, },
{ {
enableHighAccuracy: true, enableHighAccuracy: true,
@@ -211,14 +211,14 @@ export default {
// title: this.error, // title: this.error,
// icon: 'none' // icon: 'none'
// }); // });
// console.error("浏览器不支持 Geolocation API"); console.error("浏览器不支持 Geolocation API");
} }
} }
}) })
.catch((e) => { .catch((e) => {
// console.log(e) console.log(e)
}) })
} }
}, },
-210
View File
@@ -1,210 +0,0 @@
<template>
<view>
<z-paging ref="paging" v-model="datalist" @query="queryList" :empty-view-text="$t('Nodata')">
<template #top>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.tagselect')"></uni-nav-bar>
</template>
<view class="list">
<view class="contents" v-for="(item, index) in datalist" :key="index" >
<view class="" @click="godetile(item)">
<view class="top">
<view class="">{{item.created_at}}</view>
<view class="right">
<text class="medal" :style="{color:(item.magnitude == 0 ?'#F5AB00' : item.magnitude == 1 ?'#8495B8': '#9B7200')}">{{item.magnitude_txt}}</text>
<text class="tag" :style="{background:(item.follow == 0 ?'#3471FF' : item.follow == 1 ?'#27C89C': '#FF4040')}">{{item.follow==0?$t('followup'):item.follow==1?$t('deal'):$t('lost')}}</text>
</view>
</view>
<u-line margin="20rpx 0px"></u-line>
<view class="cont">
<view class="title">
<view class=""><text class="name">{{item.contacts}}</text><text class="phone">{{item.phone}}</text></view>
<view class="ststus">{{item.grade_txt}}</view>
</view>
<view class="info"><text class="sex">{{item.sex_txt}}</text> | <text class="addr">{{item.country_name}}</text><text class="type">{{item.car_type_name}}</text>
</view>
<view class="tags">
<text>#</text> {{tag_name}}
</view>
</view>
</view>
<view class="desc1">
<view class="" @click="callPhone(item)"><image src="/static/image/customer/phone.png" mode=""></image> {{$t('call')}}</view>
<view class="" @click="editClick(item)"><image src="/static/image/customer/edit.png" mode=""></image> {{$t('customer.addfollow')}}</view>
<!-- <view class="" @click="delClick(item)"><image src="/static/image/customer/trash.png" mode=""></image> {{$t('delete')}}</view> -->
</view>
</view>
</view>
</z-paging>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
export default {
data() {
return {
datalist:[],
tag_id:'',
tag_name:''
}
},
onLoad(e) {
this.tag_id = e.tag_id
this.tag_name = e.name
},
methods: {
leftClick(){
uni.navigateBack({})
},
//客户列表数据
queryList(pageNo, pageSize) {
var that = this;
request({
url:'customer/list',
method:'get',
data: {
tag_id:this.tag_id,
page:pageNo,
per_page:10,
}
}).then(res => {
if(res.data.code ==0){
var datas = res.data.data.list;
this.$refs.paging.complete(datas);
}else{
// this.$refs.paging.complete(null);
// that.listlength=0
}
uni.stopPullDownRefresh();
})
},
godetile(item){
uni.navigateTo({
url: '/pages/customer/detile?id='+item.id
});
},
// 拨打电话
callPhone(item) {
var phoneNumber= item.phone
if (!phoneNumber) {
uni.showToast({
title: this.$t('callPhonemsg'),
icon: 'none',
});
return;
}
uni.showModal ({
title: this.$t('prompt'),
content: this.$t('callmsg'),
cancelText: this.$t('cancel'),
confirmText: this.$t('confirm'),
success: function (res) {
if (res.confirm) {
uni.makePhoneCall({
phoneNumber: phoneNumber,
success: () => {
// console.log('拨打电话成功');
},
fail: (err) => {
// console.log('拨打电话失败', err);
},
});
} else if (res.cancel) {
// console.log('用户点击取消');
}
}
});
},
editClick(item){
uni.navigateTo({
url: '/pages/customer/followup?id='+item.id
});
},
}
}
</script>
<style lang="scss">
.tags{
color: #726CFF;
font-size: 24rpx;
}
.list{
padding: 15px;
overflow: auto;
.contents{
background-color: #F6F6F6;
border-radius: 10px;
margin-bottom: 10px;
.top{
padding: 10px 15px 0px;
display: flex;
align-items: center;
justify-content: space-between;
.tag{
color: white;
border-radius: 20px 0px 0px 20px;
padding: 3px 10px;
margin-right: -15px;
}
.right{
display: flex;
align-items: center;
.medal{
margin-right: 10px;
}
}
}
.cont{
padding: 0px 15px 10px;
font-size: 24rpx;
.title{
display: flex;
align-items: center;
justify-content: space-between;
color: #222222;
.name{
font-size: 32rpx;
font-weight: bold;
margin-right: 10px;
}
.phone{
font-size: 28rpx;
}
}
.ststus{
color: #666666;
}
.info,.desc{
color: #78758E;
line-height: 26px;
}
.sex{
margin-right: 5px;
}
.addr{
margin-left: 5px;
}
.type{
margin-left: 5px;
color: #3471FF;
}
}
}
.desc1{
padding: 0px 15px 10px;
color: #3471FF;
display: flex;
justify-content: flex-end;
view{
margin-left:15px;
}
image{
width: 14px;
height: 14px;
// vertical-align: sub;
margin-right: 5px;
}
}
}
</style>
+48 -370
View File
@@ -4,33 +4,30 @@
<template #top> <template #top>
<view class="top"> <view class="top">
<!-- <view class="navbar">{{$t('customer.title')}}</view> --> <!-- <view class="navbar">{{$t('customer.title')}}</view> -->
<uni-nav-bar leftText=" " :fixed="true" :border="false" @clickLeft="leftClick" color="#fff" backgroundColor="rgba(52,113,255,0)" :statusBar="true" :title="$t('customer.title')"></uni-nav-bar> <uni-nav-bar leftText=" " :fixed="true" :border="false" @clickLeft="leftClick" color="#fff" backgroundColor="#3471ff" :statusBar="true" :title="$t('customer.title')"></uni-nav-bar>
<view class="topSearch"> <view class="topSearch">
<view class="left"> <view class="left">
<view @click="showPicker = true" class="searchl">
{{country_name || $t('customer.Country')}}
</view>
<u-search v-model="keyword" bgColor="#fff" search-icon=" " :show-action="false" :placeholder="$t('customer.inputhd')"></u-search> <u-search v-model="keyword" bgColor="#fff" search-icon=" " :show-action="false" :placeholder="$t('customer.inputhd')"></u-search>
<view @click="searchCli" class="search"> <view @click="searchCli" class="search">
<image src="/static/image/customer/search1.png" mode=""></image> <image src="/static/image/customer/search1.png" mode=""></image>
</view> </view>
</view> </view>
<view class="right"> <view class="right">
<image src="/static/image/customer/search.png" @click="showtagfn()" mode=""></image> <image src="/static/image/customer/search.png" @click="show = true" mode=""></image>
</view> </view>
</view> </view>
</view> </view>
<view class="tabsbg"> <view class="tabsbg">
<u-tabs :list="list1" :current="current" lineColor="#fff" :scrollable="isey" @click="tabclick" :inactiveStyle="{color: '#fff'}" :activeStyle="{color: '#fff',fontWeight: '500',transform: 'scale(1.05)'}"></u-tabs> <u-tabs :list="list1" :current="current" lineColor="#fff" :scrollable="false" @click="tabclick" :inactiveStyle="{color: '#fff'}" :activeStyle="{color: '#fff',fontWeight: '500',transform: 'scale(1.05)'}"></u-tabs>
</view> </view>
</template> </template>
<view class="list"> <view class="list">
<u-swipe-action> <u-swipe-action>
<u-swipe-action-item :options="options1" v-for="(item, index) in datalist" :key="index" @click="delClick(item)"> <u-swipe-action-item :options="options1" v-for="(item, index) in datalist" :key="index" @click="delClick(item)">
<view class="contents" > <view class="contents" >
<view class="" > <view class="" @click="godetile(item)">
<view class="top" @click="godetile(item)"> <view class="top">
<view class="">{{item.created_at}}</view> <view class="">{{item.created_at}}</view>
<view class="right"> <view class="right">
<text class="medal" :style="{color:(item.magnitude == 0 ?'#F5AB00' : item.magnitude == 1 ?'#8495B8': '#9B7200')}">{{item.magnitude_txt}}</text> <text class="medal" :style="{color:(item.magnitude == 0 ?'#F5AB00' : item.magnitude == 1 ?'#8495B8': '#9B7200')}">{{item.magnitude_txt}}</text>
@@ -40,21 +37,14 @@
<u-line margin="20rpx 0px"></u-line> <u-line margin="20rpx 0px"></u-line>
<view class="cont"> <view class="cont">
<view class="title"> <view class="title">
<view class=""> <view class=""><text class="name">{{item.contacts}}</text><text class="phone">{{item.phone}}</text></view>
<text class="name">{{item.contacts}}</text> <view class="ststus">{{item.grade_txt}}</view>
<u-tooltip :text="item.phone" :copyText="item.phone" :showCopy="true">
<text class="phone" @click.stop>{{item.phone}}</text>
</u-tooltip>
</view>
<view class="ststus" @click="godetile(item)">{{item.grade_txt}}</view>
</view> </view>
<view class="info" @click="godetile(item)"> <view class="info"><text class="sex">{{item.sex_txt}}</text> | <text class="addr">{{item.country_name}}</text><text class="type">{{item.car_type_name}}</text>
<text class="sex">{{item.sex_txt}}</text> | <text class="addr">{{item.country_name}}</text><text class="type">{{item.car_type_name}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="desc1"> <view class="desc1">
<!-- <view class="userzy" @click="cede(item)"><image src="/static/image/customer/zhuany.png" mode=""></image> {{$t('transfer')}}</view> -->
<view class="" @click="callPhone(item)"><image src="/static/image/customer/phone.png" mode=""></image> {{$t('call')}}</view> <view class="" @click="callPhone(item)"><image src="/static/image/customer/phone.png" mode=""></image> {{$t('call')}}</view>
<view class="" @click="editClick(item)"><image src="/static/image/customer/edit.png" mode=""></image> {{$t('customer.addfollow')}}</view> <view class="" @click="editClick(item)"><image src="/static/image/customer/edit.png" mode=""></image> {{$t('customer.addfollow')}}</view>
<!-- <view class="" @click="delClick(item)"><image src="/static/image/customer/trash.png" mode=""></image> {{$t('delete')}}</view> --> <!-- <view class="" @click="delClick(item)"><image src="/static/image/customer/trash.png" mode=""></image> {{$t('delete')}}</view> -->
@@ -64,8 +54,7 @@
</u-swipe-action> </u-swipe-action>
</view> </view>
</z-paging> </z-paging>
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="show" :columns="alluserlist" @cancel="cancel" @close="cancel" @confirm="confirm" :title="$t('transfer')" keyName="name"></u-picker> <u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="show" :columns="columns" @cancel="cancel" @close="cancel" @confirm="confirm" :title="$t('customer.CustomerScreening')" keyName="label"></u-picker>
<!-- <u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="show" :columns="columns" @cancel="cancel" @close="cancel" @confirm="confirm" :title="$t('customer.CustomerScreening')" keyName="label"></u-picker> -->
<u-popup :show="showts" :closeOnClickOverlay="false" :round="20" mode="center"> <u-popup :show="showts" :closeOnClickOverlay="false" :round="20" mode="center">
<view class="popupcontent"> <view class="popupcontent">
<view class="title">{{$t('prompt')}}</view> <view class="title">{{$t('prompt')}}</view>
@@ -85,70 +74,7 @@
</view> </view>
</movable-view> </movable-view>
</movable-area> </movable-area>
<u-popup closeOnClickOverlay :show="showPicker" mode="bottom" :round="10" @close="close('showPicker')">
<view class="text">
<view class="qx" @click="closearer('showPicker') ">{{$t('cancel')}}</view>
<view class="qd" @click="arerfn">{{$t('confirm')}}</view>
</view>
<view class="popup-content">
<!-- 搜索框 -->
<u-input
v-model="searchKeyword"
:placeholder="$t('keyword')"
@input="handleSearch"
></u-input>
<!-- 选项列表 -->
<scroll-view scroll-y class="option-list">
<view
v-for="(item, index) in filteredOptions"
:key="index"
class="option-item"
@click="handleSelect(item)"
:class="actives==item.id?'actives':''"
>
{{ item.name }}
</view>
<view v-if="filteredOptions.length === 0" class="no-data">
{{$t('noresults')}}
</view>
</scroll-view>
</view>
</u-popup>
<!-- 客户标签 -->
<u-popup closeOnClickOverlay :show="showtag" mode="bottom" :round="10" @close="closetag('showtag')" :closeable="false" >
<view class="text">
<view class="qx" @click="close('showtag') ">{{$t('cancel')}}</view>
<view class="qd" @click="showtagqd">{{$t('confirm')}}</view>
</view>
<view class="popup-content">
<view>
<view class="name">{{$t('customer.CustomerScreening')}}</view>
<view class="row">
<view class="col4 tagitem" v-for="(items, indexs) in columns" :class="{ 'tagactive': isActivetime(items.id) }" @click="tagSelecttime(items)" :key="indexs">
{{ items.label }}
</view>
</view>
</view>
<scroll-view scroll-y class="tag-list">
<view
v-for="(item, index) in taglist"
:key="index"
class="tags"
>
<view class="name">{{ item.name }}</view>
<view class="row">
<view class="col4 tagitem" v-for="(item1, index1) in item.tags" :class="{ 'tagactive': isActive(item1.group_id, item1.id) }" @click="tagSelect(item1)" :key="index1">
{{ item1.name }}
</view>
</view>
</view>
</scroll-view>
</view>
</u-popup>
</view> </view>
</template> </template>
<script> <script>
@@ -156,15 +82,6 @@
export default { export default {
data() { data() {
return { return {
showtag: false,
actives:'',
showPicker: false, // 控制选择器显示
searchKeyword: "", // 搜索关键词
selectedLabel: "", // 选中的值(显示在输入框中)
filteredOptions: [], // 过滤后的数据
country_name:'',
country_id:'',
tag_id:[],
current:0, current:0,
options1: [], options1: [],
x: 300, //x坐标 x: 300, //x坐标
@@ -178,14 +95,10 @@
columns:[], columns:[],
list1: [], list1: [],
datalist:[], datalist:[],
isey:false,
activeMap: {}, // 存储每个父级下选中的子项 { 父ID: 子ID }
taglist:[],
alluserlist:[],
customer_id:''
} }
}, },
onLoad(e) { onLoad(e) {
console.log(e)
if(e.tab){ if(e.tab){
this.follow=e.tab - 1 this.follow=e.tab - 1
this.current = e.tab this.current = e.tab
@@ -196,15 +109,8 @@
this.x = windowWidth-70 this.x = windowWidth-70
this.y = windowHeight-55 this.y = windowHeight-55
uni.removeStorageSync('location') uni.removeStorageSync('location')
this.area()
}, },
onShow() { onShow() {
// var location = uni.getStorageSync('i18locale')?uni.getStorageSync('i18locale'):uni.getLocale()
// if(location=='ru'){
// this.isey=true
// }else{
// this.isey=false
// }
this.queryList(1, 10) this.queryList(1, 10)
this.options1=[{ this.options1=[{
text: this.$t('delete'), text: this.$t('delete'),
@@ -225,157 +131,53 @@
name: this.$t('lost'), name: this.$t('lost'),
id:'lost' id:'lost'
}] }]
this.columns=[{ this.columns=[
label: this.$t('all'), [{
id:'' label: this.$t('all'),
},{ id:''
label:this.$t('tday'), },{
id: 0 label:this.$t('tday'),
}, { id: 0
label: this.$t('threeday'), }, {
id: 1 label: this.$t('threeday'),
}, { id: 1
label: this.$t('sevenday'), }, {
id: 2 label: this.$t('sevenday'),
}] id: 2
}]
]
uni.setTabBarItem({ uni.setTabBarItem({
index: 0, index: 0,
text: this.$t('tabbar.home') text: this.$t('tabbar.home')
}) })
uni.setTabBarItem({ uni.setTabBarItem({
index: 1, index: 1,
text: this.$t('tabbar.highseas')
})
uni.setTabBarItem({
index: 2,
text: this.$t('tabbar.customer') text: this.$t('tabbar.customer')
}) })
uni.setTabBarItem({ uni.setTabBarItem({
index: 3, index: 2,
text: this.$t('tabbar.mine') text: this.$t('tabbar.mine')
}) })
}, },
methods: { methods: {
//获取转移用户
getalluser(){
request({
url:'user/getUsers?abbr=xinyouhe',
method:'get',
}).then(res => {
var list = res.data.data
this.alluserlist = [list]
})
},
// 搜索处理函数
handleSearch() {
var that = this
if (this.searchKeyword) {
this.filteredOptions = this.areaList1.filter((item) => item.name.includes(this.searchKeyword));
} else {
// 如果搜索框为空,显示全部数据
this.filteredOptions = this.areaList1;
}
},
// 选择选项
handleSelect(item) {
this.selectedLabel = item.name; // 回显选中的值
// this.searchKeyword = item.name
this.actives = item.id
// this.showPicker = false; // 关闭弹窗
},
arerfn(){
this.showPicker = false; // 关闭弹窗
this.country_name = this.selectedLabel
this.country_id = this.actives
this.queryList(1, 10)
},
closearer(){
this.showPicker = false; // 关闭弹窗
this.country_name =''
this.country_id = ''
this.queryList(1, 10)
},
//国家
area(){
request({
url:'area/getCountry',
method:'get',
}).then(res => {
var list = res.data.data
this.areaList1 = list
this.filteredOptions = list;
})
},
//标签
tagGroup(){
request({
url:'tagGroup/list',
method:'get',
}).then(res => {
this.taglist = res.data.data
})
},
//标签点击
tagSelect(item) {
// 如果已选中则取消,否则设置选中
this.$set(this.activeMap, item.group_id, this.activeMap[item.group_id] === item.id ? '' : item.id);
},
isActive(parentId, childId) {
return this.activeMap[parentId] === childId;
},
tagSelecttime(item) {
this.follow_last = item.id;
},
isActivetime(id) {
return this.follow_last === id;
},
showtagqd(){
const selectedIds = Object.values(this.activeMap).filter(id => id !== '')
this.tag_id = selectedIds
this.queryList(1, 10)
this.showtag = false
},
showtagfn(){
console.log(this.columns)
this.tagGroup()
this.showtag = true
},
searchCli(){ searchCli(){
this.queryList(1, 10) this.queryList(1, 10)
}, },
close(val){ close() {
this[val] = false this.show= false
}, },
//转移客户
confirm(e) { confirm(e) {
console.log(e)
this.follow_last = e.value[0].id
this.show = false this.show = false
request({ this.queryList(1, 10)
url:'customer/cede',
method:'post',
data: {
user_id: e.value[0].id,
customer_id:this.customer_id
}
}).then(res => {
uni.showToast({
title: res.data.message,
icon: 'none'
});
if(res.data.code ==0){
setTimeout(() => {
uni.reLaunch({
url: '/pages/index/customer',// 替换为你要跳转的页面路径
});
}, 1000);
}
})
}, },
cancel() { cancel() {
this.show = false this.show = false
}, },
//tab标签切换 //tab标签切换
tabclick(e){ tabclick(e){
console.log(e)
if(e.id=='all'){ if(e.id=='all'){
this.follow='' this.follow=''
}else{ }else{
@@ -396,10 +198,9 @@
per_page:10, per_page:10,
keyword:this.keyword, keyword:this.keyword,
follow_last:this.follow_last, follow_last:this.follow_last,
country_id:this.country_id,
tag_id:this.tag_id,
} }
}).then(res => { }).then(res => {
console.log(res.data)
if(res.data.code ==0){ if(res.data.code ==0){
var datas = res.data.data.list; var datas = res.data.data.list;
this.$refs.paging.complete(datas); this.$refs.paging.complete(datas);
@@ -411,6 +212,7 @@
}) })
}, },
godetile(item){ godetile(item){
console.log(item)
uni.navigateTo({ uni.navigateTo({
url: '/pages/customer/detile?id='+item.id url: '/pages/customer/detile?id='+item.id
}); });
@@ -425,28 +227,16 @@
}); });
return; return;
} }
uni.showModal ({
title: this.$t('prompt'),
content: this.$t('callmsg'),
cancelText: this.$t('cancel'),
confirmText: this.$t('confirm'),
success: function (res) {
if (res.confirm) {
uni.makePhoneCall({
phoneNumber: phoneNumber,
success: () => {
// console.log('拨打电话成功');
},
fail: (err) => {
// console.log('拨打电话失败', err);
},
});
} else if (res.cancel) {
// console.log('用户点击取消');
}
}
});
uni.makePhoneCall({
phoneNumber: phoneNumber,
success: () => {
console.log('拨打电话成功');
},
fail: (err) => {
console.log('拨打电话失败', err);
},
});
}, },
editClick(item){ editClick(item){
uni.navigateTo({ uni.navigateTo({
@@ -455,6 +245,7 @@
}, },
delClick(item){ delClick(item){
this.del_id = item.id this.del_id = item.id
this.showts=true
}, },
delfn(){ delfn(){
this.showts=false this.showts=false
@@ -483,12 +274,6 @@
url: '/pages/customer/add' url: '/pages/customer/add'
}); });
}, },
//转移客户
cede(item){
this.customer_id = item.id
this.getalluser()
this.show = true
}
} }
} }
</script> </script>
@@ -497,15 +282,6 @@
uni-page-body { uni-page-body {
background-color: #F6F6F6 !important; background-color: #F6F6F6 !important;
} }
::v-deep .u-search__content{
padding: 0 56px 0px 70px;
}
::v-deep .u-search__content__input{
font-size: 24rpx !important;
}
::v-deep .u-tabs__wrapper__nav__item__text{
font-size: 28rpx !important;
}
.u-swipe-action-item { .u-swipe-action-item {
margin-bottom: 10px; margin-bottom: 10px;
border-radius: 10px; border-radius: 10px;
@@ -532,42 +308,18 @@
padding: 10px 15px 5px; padding: 10px 15px 5px;
.left { .left {
position: relative; position: relative;
flex: 1; width: 88%;
} }
.right { .right {
flex: 1;
text-align: right; text-align: right;
margin-left: 5px;
image{ image{
width: 24px; width: 24px;
height: 20px; height: 20px;
margin-top: 5px; margin-top: 5px;
} }
} }
.searchl{
background: linear-gradient(to right, #3471FF, #6776FF);
color: white;
border-radius: 20px;
padding: 4px 12px;
text-align: center;
position: absolute;
/* #ifdef APP-PLUS */
top: 3px;
/* #endif */
top: 2px;
left:5px;
font-size: 12px;
width: 46px; /* 你可以根据需要调整宽度 */
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
display: inline-block;
image{
width: 16px;
height: 16px;
}
}
.search{ .search{
background: linear-gradient(to right, #3471FF, #6776FF); background: linear-gradient(to right, #3471FF, #6776FF);
color: white; color: white;
@@ -606,7 +358,6 @@
border-radius: 20px 0px 0px 20px; border-radius: 20px 0px 0px 20px;
padding: 3px 10px; padding: 3px 10px;
margin-right: -15px; margin-right: -15px;
text-align: right;
} }
.right{ .right{
display: flex; display: flex;
@@ -625,7 +376,7 @@
justify-content: space-between; justify-content: space-between;
color: #222222; color: #222222;
.name{ .name{
font-size: 30rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
margin-right: 10px; margin-right: 10px;
} }
@@ -635,7 +386,6 @@
} }
.ststus{ .ststus{
color: #666666; color: #666666;
text-align: right;
} }
.info,.desc{ .info,.desc{
color: #78758E; color: #78758E;
@@ -658,20 +408,15 @@
color: #3471FF; color: #3471FF;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center;
view{ view{
margin-left:15px; margin-left:15px;
} }
image{ image{
width: 14px; width: 14px;
height: 14px; height: 14px;
vertical-align: sub; // vertical-align: sub;
margin-right: 5px; margin-right: 5px;
} }
.userzy image{
width: 18px;
height: 18px;
}
} }
} }
.popupcontent{ .popupcontent{
@@ -713,72 +458,5 @@
line-height: 40px; line-height: 40px;
} }
} }
.actives{
background-color: #dfdfdf;
}
.text{
display: flex;
align-items: center;
justify-content: space-between;
line-height: 30px;
padding: 10px 15px 0px;
.qd{
color: #3471FF;
}
}
.popup-content {
padding: 20px;
background-color: #fff;
}
.option-list {
max-height: 400rpx;
margin-top: 20rpx;
}
.option-item {
padding: 20rpx;
border-bottom: 1rpx solid #eee;
}
.option-item:last-child {
border-bottom: none;
}
.no-data {
text-align: center;
padding: 20rpx;
color: #999;
}
//标签
.tag-list{
max-height: 900rpx;
margin-top: 20rpx;
}
.tags{
margin-top: 10px;
}
.name{
margin: 10px 0px;
}
.tagitem{
background: #ECF2FF;
border-radius: 8px;
color: #3471FF;
text-align: center;
padding: 5px 13px;
}
.row{
width: 100%;
}
.col4{
display: inline-block;
margin: 4px 3px;
// width: 30%;
}
.tagactive{
background: #3471FF !important;
color: #fff !important;
}
</style> </style>
-303
View File
@@ -1,303 +0,0 @@
<template>
<view class="conts">
<z-paging ref="paging" v-model="datalist" @query="queryList" :empty-view-text="$t('Nodata')">
<template #top>
<view class="top">
<uni-nav-bar leftText=" " :fixed="true" :border="false" @clickLeft="leftClick" color="#fff" backgroundColor="rgba(52,113,255,0)" :statusBar="true" :title="$t('navbar.highseas')"></uni-nav-bar>
</view>
</template>
<view class="list">
<view class="contents" v-for="(item, index) in datalist" :key="index">
<view class="top">
<view class=""><text :style="{color:(item.magnitude == 0 ?'#F5AB00' : item.magnitude == 1 ?'#8495B8': '#9B7200')}">{{item.magnitude_txt}}</text></view>
<view class="right">
<TimeCounter :total-seconds="item.deleted_at" :show-days="true" @end="onCountdownEnd" />
</view>
</view>
<u-line margin="20rpx 0px"></u-line>
<view class="cont">
<view class="left">
<view class=""><text class="name">{{item.contacts}}</text></view>
<view class="info"><text class="addr">{{item.country_name}}</text></view>
</view>
<view class="right">
<view class="btnxq" @click="detailsfn(item)">{{$t('details')}}</view>
<view class="btnld" @click="receiveClick(item)">{{$t('receiveOrder')}}</view>
</view>
</view>
</view>
</view>
</z-paging>
<u-popup :show="showts" :closeOnClickOverlay="false" :round="20" mode="center">
<view class="popupcontent">
<view class="title">{{$t('prompt')}}</view>
<view class="text">
{{$t('receivemsg')}}
</view>
</view>
<view class="cent">
<view class="btn1" @click="showts = !showts">{{$t('cancel')}}</view>
<view class="btn" @click="receivefn()">{{$t('confirm')}}</view>
</view>
</u-popup>
<u-popup :show="showxq" :round="20" mode="center" @close="showxq=false" bgColor="transparent">
<view class="popupcontent1">
<view class="title">{{$t('details')}}</view>
<view class="text" v-html="html">
</view>
</view>
<view class="upopupqx" @click="showxq=false">
<image src="/static/image/mine/chaprop.png" mode=""></image>
</view>
</u-popup>
</view>
</template>
<script>
import TimeCounter from '@/components/Countdown/time-counter.vue';
import { request,showToast } from '@/api/apiT.js'
export default {
components: { TimeCounter },
data() {
return {
current:0,
options1: [],
keyword:'',
follow_last:'',
follow:'',
showxq:false,
showts:false,
del_id:'',
columns:[],
list1: [],
datalist:[],
html:''
}
},
onLoad(e) {
},
onShow() {
this.queryList(1, 10)
uni.setTabBarItem({
index: 0,
text: this.$t('tabbar.home')
})
uni.setTabBarItem({
index: 1,
text: this.$t('tabbar.highseas')
})
uni.setTabBarItem({
index: 2,
text: this.$t('tabbar.customer')
})
uni.setTabBarItem({
index: 3,
text: this.$t('tabbar.mine')
})
},
methods: {
//客户列表数据
queryList(pageNo, pageSize) {
var that = this;
request({
url:'customer/list',
method:'get',
data: {
seas:'seas',
page:pageNo,
per_page:10,
}
}).then(res => {
if(res.data.code ==0){
var datas = res.data.data.list;
this.$refs.paging.complete(datas);
}else{
// this.$refs.paging.complete(null);
// that.listlength=0
}
uni.stopPullDownRefresh();
})
},
detailsfn(item){
this.html = item.desc_collect
this.showxq=true
},
receiveClick(item){
this.del_id = item.id
this.showts=true
},
receivefn(){
this.showts=false
request({
url:'customer/claim',
method:'post',
data: {
customer_id:this.del_id,
}
}).then(res => {
uni.showToast({
title: res.data.message,
icon: 'none'
});
if(res.data.code ==0){
setTimeout(() => {
uni.reLaunch({
url: '/pages/index/customer',// 替换为你要跳转的页面路径
});
}, 1000);
}
})
},
}
}
</script>
<style lang="scss" scoped>
uni-page-body {
background-color: #F6F6F6 !important;
}
::v-deep .u-popup__content{
width: 85% !important;
}
.u-swipe-action-item {
margin-bottom: 10px;
border-radius: 10px;
}
.conts{
background-image: url("/static/image/customer/bg.png");
background-size: 100%;
background-repeat: no-repeat;
height: calc(100vh - 50px);
}
.list{
padding: 15px;
overflow: auto;
// height: calc(100vh - 350rpx);
.contents{
background-color: #FFFFFF;
border-radius: 10px;
margin-bottom: 10px;
.top{
padding: 10px 15px 0px;
display: flex;
align-items: center;
justify-content: space-between;
.tag{
color: white;
border-radius: 20px 0px 0px 20px;
padding: 3px 10px;
margin-right: -15px;
}
.right{
display: flex;
align-items: center;
}
}
.cont{
padding: 0px 15px 10px;
font-size: 24rpx;
display: flex;
align-items: center;
justify-content: space-between;
.name{
color: #222222;
font-size: 32rpx;
font-weight: bold;
margin-right: 10px;
}
.info{
color: #78758E;
line-height: 26px;
}
.right{
display: flex;
align-items: center;
.btnxq{
background: #ECF2FF;
color: #3471FF;
border-radius: 20px;
padding: 6rpx 34rpx;
text-align: center;
margin-right: 10px;
}
.btnld{
background: linear-gradient(to right, #3471FF, #6776FF);
color: white;
border-radius: 20px;
padding: 6rpx 34rpx;
text-align: center;
}
}
}
}
}
.popupcontent{
text-align: center;
padding: 10px 40px 20px;
.title{
font-size: 18px;
color: #333333;
line-height: 60px;
}
.text{
color: #666666;
font-size: 16px;
}
}
.popupcontent1{
padding: 10px 20px 20px;
border-radius: 10px;
background: linear-gradient(to bottom, #B1C8FF, #ffffff);
height: 800rpx;
.title{
text-align: center;
font-size: 18px;
color: #333333;
line-height: 44px;
}
.text{
color: #666666;
font-size: 16px;
height: 89%;
overflow-y: scroll;
}
}
.upopupqx{
margin-top: 20px;
text-align: center;
image{
width: 80rpx;
height: 80rpx;
}
}
.cent{
display: flex;
align-items: center;
justify-content: space-around;
padding: 0px 10px 20px;
text-align: center;
.btn1{
background-color: #F6F6F6;
border: 1px solid #F6F6F6;
color: #333333;
border-radius: 50px;
width: 46%;
margin: 10px 0px 20px;
height: 40px;
line-height: 40px;
}
.btn{
background-color: #3471FF;
color: white;
border-radius: 50px;
width: 46%;
margin: 10px 0px 20px;
height: 40px;
line-height: 40px;
}
}
</style>
+32 -67
View File
@@ -68,11 +68,7 @@
<view class=""><text class="name">{{item.contacts}}</text></view> <view class=""><text class="name">{{item.contacts}}</text></view>
<countdown :total-seconds="item.follow_remaining" :show-days="true" @end="onCountdownEnd" /> <countdown :total-seconds="item.follow_remaining" :show-days="true" @end="onCountdownEnd" />
</view> </view>
<view class=""> <view class=""><text class="phone">{{item.phone}}</text></view>
<u-tooltip :text="item.phone" :copyText="item.phone" :showCopy="true">
<text class="phone" @click.stop>{{item.phone}}</text>
</u-tooltip>
</view>
<view class="">{{$t('nextgjtime')}}:<text>{{item.follow_next}}</text></view> <view class="">{{$t('nextgjtime')}}:<text>{{item.follow_next}}</text></view>
</view> </view>
</view> </view>
@@ -124,11 +120,7 @@
}, { }, {
label: this.$t('en'), label: this.$t('en'),
id: 'en' id: 'en'
},{ }]
label: this.$t('ru'),
id: 'ru'
}
]
], ],
columnstime:[ columnstime:[
[{ [{
@@ -159,14 +151,10 @@
}) })
uni.setTabBarItem({ uni.setTabBarItem({
index: 1, index: 1,
text: this.$t('tabbar.highseas')
})
uni.setTabBarItem({
index: 2,
text: this.$t('tabbar.customer') text: this.$t('tabbar.customer')
}) })
uni.setTabBarItem({ uni.setTabBarItem({
index: 3, index: 2,
text: this.$t('tabbar.mine') text: this.$t('tabbar.mine')
}) })
this.getstatistics() this.getstatistics()
@@ -201,7 +189,7 @@
var that = this var that = this
uni.setLocale(e.value[0].id) uni.setLocale(e.value[0].id)
this.$i18n.locale = e.value[0].id this.$i18n.locale = e.value[0].id
uni.setStorageSync('i18locale', e.value[0].id); // uni.setStorageSync('i18locale', e.value[0].id);
this.showlang = false this.showlang = false
this.columns =[ this.columns =[
[{ [{
@@ -210,11 +198,7 @@
}, { }, {
label: this.$t('en'), label: this.$t('en'),
id: 'en' id: 'en'
},{ }]
label: this.$t('ru'),
id: 'ru'
}
]
]; ];
this.columnstime =[ this.columnstime =[
[{ [{
@@ -242,32 +226,28 @@
}) })
uni.setTabBarItem({ uni.setTabBarItem({
index: 1, index: 1,
text: this.$t('tabbar.highseas')
})
uni.setTabBarItem({
index: 2,
text: this.$t('tabbar.customer') text: this.$t('tabbar.customer')
}) })
uni.setTabBarItem({ uni.setTabBarItem({
index: 3, index: 2,
text: this.$t('tabbar.mine') text: this.$t('tabbar.mine')
}) })
// var language = e.value[0].id var language = e.value[0].id
// if(e.value[0].id=='zh-Hans'){ if(e.value[0].id=='zh-Hans'){
// language= 'zh_CN' language= 'zh_CN'
// } }
// request({ request({
// url:'user/language', url:'user/language',
// method:'POST', method:'POST',
// data:{ data:{
// language: language, language: language,
// } }
// }).then(res => { }).then(res => {
// uni.showToast({ uni.showToast({
// title: res.data.message, title: res.data.message,
// icon: 'none' icon: 'none'
// }); });
// }) })
}, },
//日期选择组件 //日期选择组件
confirm(e) { confirm(e) {
@@ -329,27 +309,16 @@
}); });
return; return;
} }
uni.showModal ({
title: this.$t('prompt'), uni.makePhoneCall({
content: this.$t('callmsg'), phoneNumber: phoneNumber,
cancelText: this.$t('cancel'), success: () => {
confirmText: this.$t('confirm'), console.log('拨打电话成功');
success: function (res) { },
if (res.confirm) { fail: (err) => {
uni.makePhoneCall({ console.log('拨打电话失败', err);
phoneNumber: phoneNumber, },
success: () => { });
// console.log('拨打电话成功');
},
fail: (err) => {
// console.log('拨打电话失败', err);
},
});
} else if (res.cancel) {
// console.log('用户点击取消');
}
}
});
}, },
editClick(item){ editClick(item){
uni.navigateTo({ uni.navigateTo({
@@ -465,10 +434,6 @@
.grid-text { .grid-text {
color: #222222; color: #222222;
font-size: 24rpx; font-size: 24rpx;
white-space: nowrap;
width: 95%;
overflow-x: scroll;
text-align: center;
} }
} }
+14 -35
View File
@@ -7,7 +7,7 @@
<view class="content"> <view class="content">
<view class="contop"> <view class="contop">
<view class=""> <view class="">
<image class="userimg" :src="userinfo.avatar_url" mode=""></image> <image class="userimg" :src="userinfo.avatar" mode=""></image>
<!-- <image class="userimg" src="/static/image/mine/user.png" mode=""></image> --> <!-- <image class="userimg" src="/static/image/mine/user.png" mode=""></image> -->
</view> </view>
<view class="right"> <view class="right">
@@ -18,7 +18,7 @@
</view> </view>
<view class="minemp"> <view class="minemp">
<view class="mineid">ID:{{userinfo.sn}}</view> <view class="mineid">ID:{{userinfo.sn}}</view>
<view class="mp" @click="gomymp">{{$t('navbar.businesscard')}}</view> <!-- <view class="mp" @click="gomymp">{{$t('navbar.businesscard')}}</view> -->
</view> </view>
</view> </view>
</view> </view>
@@ -33,11 +33,6 @@
<uni-icons type="right" class="icon" size="18"></uni-icons> <uni-icons type="right" class="icon" size="18"></uni-icons>
</view> </view>
</view> --> </view> -->
<!-- <view class="sonContent" @click="navTo('/pages/mine/workreport')">
<image class="son-img-bg" src="/static/image/mine/icon10.png"></image>
<span>{{$t('mine.workreport')}}</span>
<uni-icons type="right" class="icon" size="18"></uni-icons>
</view> -->
<view class="sonContent" @click="navTo('/pages/mine/resetPwd')"> <view class="sonContent" @click="navTo('/pages/mine/resetPwd')">
<image class="son-img-bg" src="/static/image/mine/icon2.png"></image> <image class="son-img-bg" src="/static/image/mine/icon2.png"></image>
<span>{{$t('mine.cpassword')}}</span> <span>{{$t('mine.cpassword')}}</span>
@@ -53,11 +48,11 @@
<span>{{$t('mine.feedback')}}</span> <span>{{$t('mine.feedback')}}</span>
<uni-icons type="right" class="icon" size="18"></uni-icons> <uni-icons type="right" class="icon" size="18"></uni-icons>
</view> --> </view> -->
<!-- <view class="sonContent" v-if="!isopenid" @click="gomyauth"> <view class="sonContent" v-if="!isopenid" @click="gomyauth">
<image class="son-img-bg" src="/static/image/mine/icon9.png"></image> <image class="son-img-bg" src="/static/image/mine/icon9.png"></image>
<span>{{$t('auth')}}</span> <span>{{$t('auth')}}</span>
<uni-icons type="right" class="icon" size="18"></uni-icons> <uni-icons type="right" class="icon" size="18"></uni-icons>
</view> --> </view>
<view class="sonContent" @click="navTo('/pages/mine/about')"> <view class="sonContent" @click="navTo('/pages/mine/about')">
<image class="son-img-bg" src="/static/image/mine/icon5.png"></image> <image class="son-img-bg" src="/static/image/mine/icon5.png"></image>
<span>{{$t('mine.about')}}</span> <span>{{$t('mine.about')}}</span>
@@ -118,14 +113,10 @@
}) })
uni.setTabBarItem({ uni.setTabBarItem({
index: 1, index: 1,
text: this.$t('tabbar.highseas')
})
uni.setTabBarItem({
index: 2,
text: this.$t('tabbar.customer') text: this.$t('tabbar.customer')
}) })
uni.setTabBarItem({ uni.setTabBarItem({
index: 3, index: 2,
text: this.$t('tabbar.mine') text: this.$t('tabbar.mine')
}) })
this.getuserinfo() this.getuserinfo()
@@ -178,27 +169,15 @@
}); });
return; return;
} }
uni.showModal ({ uni.makePhoneCall({
title: this.$t('prompt'), phoneNumber: phoneNumber,
content: this.$t('callmsg'), success: () => {
cancelText: this.$t('cancel'), console.log('拨打电话成功');
confirmText: this.$t('confirm'), },
success: function (res) { fail: (err) => {
if (res.confirm) { console.log('拨打电话失败', err);
uni.makePhoneCall({ },
phoneNumber: phoneNumber, });
success: () => {
// console.log('拨打电话成功');
},
fail: (err) => {
// console.log('拨打电话失败', err);
},
});
} else if (res.cancel) {
// console.log('用户点击取消');
}
}
});
}, },
//退出登录 //退出登录
logout(){ logout(){
+8 -5
View File
@@ -14,6 +14,7 @@
} }
}, },
onLoad(options) { onLoad(options) {
console.log(options)
this.getCode(options.code,options.state) this.getCode(options.code,options.state)
}, },
methods: { methods: {
@@ -27,8 +28,10 @@
}, },
getCode(code,state) { getCode(code,state) {
// var code = this.getUrlParam('code'); // var code = this.getUrlParam('code');
console.log(code)
var code_url = ''; var code_url = '';
if (code == null || code == '' || !code) { if (code == null || code == '' || !code) {
console.log(2222222)
request({ request({
url:'feishu/getinfo', url:'feishu/getinfo',
method:'post', method:'post',
@@ -40,7 +43,7 @@
if(res.data.code ==0){ if(res.data.code ==0){
var data = res.data.data; var data = res.data.data;
this.datas = data this.datas = data
// console.log(data) console.log(data)
code_url += 'https://open.feishu.cn/open-apis/authen/v1/authorize' code_url += 'https://open.feishu.cn/open-apis/authen/v1/authorize'
code_url += '?app_id=' + data.app_id code_url += '?app_id=' + data.app_id
@@ -48,7 +51,7 @@
code_url += '&scope=' + data.scope code_url += '&scope=' + data.scope
code_url += '&state=' + data.state; code_url += '&state=' + data.state;
// console.log(code_url) console.log(code_url)
// return; // return;
window.location.href = code_url; window.location.href = code_url;
}else{ }else{
@@ -93,16 +96,16 @@
const route = currentPage.route; // 页面路径 const route = currentPage.route; // 页面路径
const options = currentPage.options; // 页面参数 const options = currentPage.options; // 页面参数
const fullUrl = `${route}?${Object.keys(options).map(key => `${key}=${options[key]}`).join('&')}`; const fullUrl = `${route}?${Object.keys(options).map(key => `${key}=${options[key]}`).join('&')}`;
// console.log('当前页面完整 URL:', fullUrl); console.log('当前页面完整 URL:', fullUrl);
request({ request({
url:'feishu/getinfo', url:'feishu/getinfo',
method:'post', method:'post',
}).then(res => { }).then(res => {
var data = res.data.data; var data = res.data.data;
var urls = data.url+fullUrl var urls = data.url+fullUrl
// console.log(data) console.log(data)
this.webUrl = 'https://open.feishu.cn/open-apis/authen/v1/authorize?app_id='+data.app_id+'&redirect_uri='+urls+'&scope='+data.scope+'&state='+data.state this.webUrl = 'https://open.feishu.cn/open-apis/authen/v1/authorize?app_id='+data.app_id+'&redirect_uri='+urls+'&scope='+data.scope+'&state='+data.state
// console.log(this.webUrl) console.log(this.webUrl)
}) })
}, },
} }
+1 -4
View File
@@ -1,9 +1,6 @@
<template> <template>
<view> <view>
<!-- <web-view src="https://api.fcrm.hnxinyouhe.com/index/userAgreement" style="width: 100%; height: 100%;"></web-view> --> <web-view src="http://219.157.255.213:9007/index/userAgreement" style="width: 100%; height: 100%;"></web-view>
<!-- <web-view src="https://crm-server.smt.hnxinyouhe.com/index/userAgreement" style="width: 100%; height: 100%;"></web-view> -->
<!-- <web-view src="http://219.157.255.213:9006/index/userAgreement" style="width: 100%; height: 100%;"></web-view> -->
<web-view src="https://crm-server.x.hnxinyouhe.com/index/userAgreement" style="width: 100%; height: 100%;"></web-view>
</view> </view>
</template> </template>
+1 -4
View File
@@ -1,9 +1,6 @@
<template> <template>
<view> <view>
<!-- <web-view src="https://api.fcrm.hnxinyouhe.com/index/privacyAgreement" style="width: 100%; height: 100%;"></web-view> --> <web-view src="http://219.157.255.213:9007/index/privacyAgreement" style="width: 100%; height: 100%;"></web-view>
<!-- <web-view src="https://crm-server.smt.hnxinyouhe.com/index/privacyAgreement" style="width: 100%; height: 100%;"></web-view> -->
<!-- <web-view src="http://219.157.255.213:9006/index/privacyAgreement" style="width: 100%; height: 100%;"></web-view> -->
<web-view src="https://crm-server.x.hnxinyouhe.com/index/privacyAgreement" style="width: 100%; height: 100%;"></web-view>
</view> </view>
</template> </template>
+3 -23
View File
@@ -61,9 +61,6 @@
borderColor="#3264ed" color="#fff" @click="pactChange" /> borderColor="#3264ed" color="#fff" @click="pactChange" />
<view>{{$t('agreeMsg')}}<text @click="navigateToAgreement">{{$t('UserAgreement')}}</text>{{$t('and')}}<text @click="navigateToPrivacy">{{$t('Privacy')}}</text></view> <view>{{$t('agreeMsg')}}<text @click="navigateToAgreement">{{$t('UserAgreement')}}</text>{{$t('and')}}<text @click="navigateToPrivacy">{{$t('Privacy')}}</text></view>
</view> </view>
<view class="footer">
<text class="copyright">© 2024 powered by 河南新友合科技有限公司</text>
</view>
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" @close="close" :show="showlang" :columns="columns" <u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" @close="close" :show="showlang" :columns="columns"
@cancel="cancellang" @confirm="confirmlang" :title="$t('home.langbtn')" keyName="label"></u-picker> @cancel="cancellang" @confirm="confirmlang" :title="$t('home.langbtn')" keyName="label"></u-picker>
</view> </view>
@@ -85,12 +82,9 @@
}, { }, {
label: this.$t('en'), label: this.$t('en'),
id: 'en' id: 'en'
},{
label: this.$t('ru'),
id: 'ru'
}] }]
], ],
language:uni.getLocale() language:'zh-Hans'
} }
}, },
onLoad() { onLoad() {
@@ -111,7 +105,7 @@
confirmlang(e) { confirmlang(e) {
uni.setLocale(e.value[0].id) uni.setLocale(e.value[0].id)
this.$i18n.locale = e.value[0].id this.$i18n.locale = e.value[0].id
uni.setStorageSync('i18locale', e.value[0].id); // uni.setStorageSync('i18locale', e.value[0].id);
this.language = e.value[0].id this.language = e.value[0].id
this.showlang = false this.showlang = false
this.columns =[ this.columns =[
@@ -121,9 +115,6 @@
}, { }, {
label: this.$t('en'), label: this.$t('en'),
id: 'en' id: 'en'
},{
label: this.$t('ru'),
id: 'ru'
}] }]
]; ];
this.list1 = [{ this.list1 = [{
@@ -193,10 +184,9 @@
email: this.email, email: this.email,
password: this.password, password: this.password,
language: this.language, language: this.language,
abbr:'hesu'
} }
}).then(res => { }).then(res => {
uni.setStorageSync('i18locale',this.language); console.log(res.data.data)
if (res.data.code == -1) { if (res.data.code == -1) {
uni.showToast({ uni.showToast({
title: res.data.message, title: res.data.message,
@@ -338,14 +328,4 @@
} }
} }
} }
.footer {
width: 100%;
text-align: center;
position: fixed;
bottom: 15px;
.copyright {
font-size: 12px;
color:#3471FF;
}
}
</style> </style>
+2 -3
View File
@@ -122,10 +122,9 @@
email: this.email, email: this.email,
password: this.password, password: this.password,
code: this.code, code: this.code,
abbr:'hesu'
} }
}).then(res => { }).then(res => {
// console.log(res.data.data) console.log(res.data.data)
uni.showToast({ uni.showToast({
title: res.data.message, title: res.data.message,
icon: 'none' icon: 'none'
@@ -171,7 +170,7 @@
email: this.email, email: this.email,
} }
}).then(res => { }).then(res => {
// console.log(res.data.data) console.log(res.data.data)
uni.showToast({ uni.showToast({
title:res.data.message, title:res.data.message,
icon: 'none' icon: 'none'
+1 -1
View File
@@ -20,7 +20,7 @@
</view> </view>
<view class="footer"> <view class="footer">
<text class="copyright">© 2024 powered by 河南新友合科技有限公司</text> <text class="copyright">{{$t('mine.copyright')}}</text>
</view> </view>
</view> </view>
</template> </template>
+83 -106
View File
@@ -13,7 +13,7 @@
<view class="ftitle">{{userinfo.position}}</view> <view class="ftitle">{{userinfo.position}}</view>
</view> </view>
<view> <view>
<image :src="imageSrc" mode="" crossOrigin="anonymous" ></image> <image :src="userinfo.avatar" mode=""></image>
</view> </view>
</view> </view>
<view class="conts"> <view class="conts">
@@ -29,17 +29,10 @@
<image src="/static/image/mine/addr.png" style="height:18px;width: 14px;" mode=""></image> <image src="/static/image/mine/addr.png" style="height:18px;width: 14px;" mode=""></image>
<view class="">{{userinfo.country_name}}</view> <view class="">{{userinfo.country_name}}</view>
</view> </view>
<view class="coles">
<image src="/static/image/mine/word.png" style="height:16px;width: 16px;" mode=""></image>
<view class="">HTTPS://HESUCAR.COM</view>
</view>
<view class="coles">
<view class="">{{userinfo.company}}</view>
</view>
</view> </view>
<view class="code"> <view class="code">
<image :src="imageSrcewm" mode="" crossOrigin="anonymous" ></image> <image src="/static/image/mine/ewm.png" mode=""></image>
<view>{{userinfo.socialize==null||userinfo.socialize=='null'?'':userinfo.socialize}}</view> <text>微信</text>
</view> </view>
<!-- <view class="code" :class=" activeImg === share_one ? 'code_one' : activeImg === share_two ? 'code_two' : activeImg === share_three ? 'code_three' : 'code_one'"> <!-- <view class="code" :class=" activeImg === share_one ? 'code_one' : activeImg === share_two ? 'code_two' : activeImg === share_three ? 'code_three' : 'code_one'">
<qrcode-vue :value="codeUrl" :size="70"></qrcode-vue> <qrcode-vue :value="codeUrl" :size="70"></qrcode-vue>
@@ -50,10 +43,6 @@
<view class="foot"> <view class="foot">
<button class="btn" @click="goDown">{{$t('download')}}</button> <button class="btn" @click="goDown">{{$t('download')}}</button>
</view> </view>
<!-- 手机端预览容器 -->
<view v-if="showPreview" class="preview-mask" @click="showPreview = false">
<image :src="previewUrl" mode="aspectFit"></image>
</view>
</view> </view>
</template> </template>
@@ -63,11 +52,7 @@
export default { export default {
data() { data() {
return { return {
userinfo:{}, userinfo:{}
showPreview: false,
previewUrl: '',
imageSrc:'',
imageSrcewm:'',
} }
}, },
onLoad() { onLoad() {
@@ -84,79 +69,82 @@
method:'get', method:'get',
}).then(res => { }).then(res => {
that.userinfo = res.data.data; that.userinfo = res.data.data;
that.downloadImageToLocal(res.data.data.avatar_url,'imageSrc')
that.downloadImageToLocal(res.data.data.socialize_pic_url,'imageSrcewm')
}) })
}, },
async downloadImageToLocal(imageUrl,item) { saveImgFile(baseImg){
try { const bitmap = new plus.nativeObj.Bitmap('test')
// 1. 下载图片到临时路径 bitmap.loadBase64Data(
const { tempFilePath } = await new Promise((resolve, reject) => { baseImg,
uni.downloadFile({ function () {
url: imageUrl, const url = '_doc/' + new Date().getTime() + '.png' // url为时间戳命名方式
success: resolve, bitmap.save(
fail: reject, url,
}); {
}); overwrite: true // 是否覆盖
},
// 2. 返回临时路径(可直接用于 <image> 显示) i => {
// console.log('下载成功,临时路径:', tempFilePath); plus.gallery.save(
if(item =='imageSrc'){ i.target,
this.imageSrc = tempFilePath; function () {
}else{ uni.showToast({
this.imageSrcewm = tempFilePath; title: '图片保存至相册成功',
} icon: 'none'
});
} catch (err) { bitmap.clear()
// console.error('下载失败:', err); },
throw new Error('图片下载失败'); function (e) {
} uni.showToast({
title: '图片保存至相册失败',
icon: 'none'
});
// console.log('图片保存至相册失败:' + JSON.stringify(e))
bitmap.clear()
}
)
},
e => {
uni.showToast({
title: '图片保存失败1',
icon: 'none'
});
bitmap.clear()
}
)
},
e => {
uni.showToast({
title: '图片保存失败2',
icon: 'none'
});
bitmap.clear()
}
)
}, },
downloadImage(url, canvas) { downloadImage(url, filename) {
const filename1 = '_doc/' + new Date().getTime() + '.png' // url为时间戳命名方式 // 创建一个隐藏的 <a> 标签
if (uni.getSystemInfoSync().platform === 'h5') { const link = document.createElement('a');
// 创建一个隐藏的 <a> 标签 link.href = url;
const link = document.createElement('a'); link.download = filename;
link.href = url; // 触发点击事件
link.download = filename1; link.click();
// 触发点击事件
link.click();
}else {
canvas.toBlob((blob) => {
const blobUrl = URL.createObjectURL(blob);
const link = document.createElement('a');
link.href = blobUrl;
link.download = filename1;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
URL.revokeObjectURL(blobUrl); // 释放内存
}, 'image/png');
}
}, },
goDown(){ goDown(){
const element = document.getElementById('poster'); const element = document.getElementById('poster');
var that= this var that= this
html2canvas(element, { html2canvas(element, {
backgroundColor: '#f5f5f5', //海报的背景颜色 backgroundColor: '#f5f5f5', //海报的背景颜色
useCORS: true ,// 允许跨域 useCORS: true // 允许跨域
allowTaint: true, // 允许污染画布
scale: 2, // 提高清晰度
logging: false // 关闭日志(可选)
}).then(canvas => { }).then(canvas => {
// canvas 其实就是我们所讲的res 的意思 返回报文的意思 // canvas 其实就是我们所讲的res 的意思 返回报文的意思
let baseImg = canvas.toDataURL('image/png') let baseImg = canvas.toDataURL('image/png')
uni.showModal ({ uni.showModal ({
title: this.$t('downmp'), title: '下载名片',
content: this.$t('downmpmsg'), content: '确定下载当前名片图吗?',
cancelText: this.$t('cancel'),
confirmText: this.$t('confirm'),
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
that.downloadImage(baseImg,canvas); that.downloadImage(baseImg, 'screenshot.png');
} else if (res.cancel) { } else if (res.cancel) {
// console.log('用户点击取消'); console.log('用户点击取消');
} }
} }
}); });
@@ -168,8 +156,7 @@
<style lang="scss"> <style lang="scss">
.card{ .card{
padding:0px 15px; padding: 15px;
margin-bottom: 75px;
} }
.img_top{ .img_top{
background-image: url('/static/image/mine/cardbg.png'); background-image: url('/static/image/mine/cardbg.png');
@@ -177,13 +164,13 @@
background-repeat: no-repeat; background-repeat: no-repeat;
text-align: center; text-align: center;
position: relative; position: relative;
width:100%; width:690rpx;
height:1080rpx; height:1060rpx;
padding-top: 40rpx; padding-top: 60rpx;
.leftbg{ .leftbg{
width: 8px; width: 10px;
height: 34px; height: 34px;
background: #3C4169; background: linear-gradient(to bottom, #3471FF, #BD67FF);
margin-right: 15px; margin-right: 15px;
} }
.name{ .name{
@@ -192,9 +179,6 @@
justify-content: space-between; justify-content: space-between;
flex: 1; flex: 1;
margin: 0px 25px 0px 0px; margin: 0px 25px 0px 0px;
.left{
text-align: left;
}
.title{ .title{
color: #3C4169; color: #3C4169;
font-size: 28px; font-size: 28px;
@@ -203,15 +187,10 @@
align-items: center; align-items: center;
} }
.ftitle{ .ftitle{
color: #fff; color: #222222;
font-size: 14px; font-size: 16px;
font-weight: bold; font-weight: bold;
margin-top: 20px; margin-top: 20px;
background: #3C4169;
border-radius: 18px;
margin-left: 20px;
padding: 3px 15px;
display: inline-block;
} }
image{ image{
width: 100px; width: 100px;
@@ -220,9 +199,9 @@
} }
} }
.conts{ .conts{
padding: 15px 25px 10px; padding: 15px 25px;
line-height: 32px; line-height: 32px;
color: #3C4169; margin-bottom: 20px;
.coles{ .coles{
display: flex; display: flex;
align-items: center; align-items: center;
@@ -235,14 +214,15 @@
} }
} }
.code{ .code{
// text-align: center; background-color: rgba(255,255,255,50%);
padding:0px 15px; border-radius: 10px;
width: 26%; text-align: center;
color: #3C4169; width: 340rpx;
font-size: 14px; margin: auto;
padding: 15px;
image{ image{
width: 70px; width: 160px;
height: 70px; height: 160px;
} }
} }
} }
@@ -250,7 +230,7 @@
position: fixed; position: fixed;
bottom: 0px; bottom: 0px;
width: 100%; width: 100%;
height: 75px; height: 90px;
background: #FFFFFF; background: #FFFFFF;
z-index: 1; z-index: 1;
} }
@@ -261,8 +241,5 @@
width: 92%; width: 92%;
margin-bottom: 40px; margin-bottom: 40px;
margin: 15px 4%; margin: 15px 4%;
font-size: 28rpx;
height: 88rpx;
line-height:88rpx;
} }
</style> </style>
+13 -43
View File
@@ -4,7 +4,7 @@
<view class="content"> <view class="content">
<view class="topimg"> <view class="topimg">
<uni-file-picker fileMediatype="image" limit="1" :list-styles="imageStyles" :del-icon="false" disable-preview @select="select" @delete="delfn('picture')"> <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_url"mode=""></image> <image class="user" :src="userinfo.avatar"mode=""></image>
<!-- <image class="xj" src="/static/image/mine/xiangji.png" mode=""></image> --> <!-- <image class="xj" src="/static/image/mine/xiangji.png" mode=""></image> -->
</uni-file-picker> </uni-file-picker>
<view>{{$t('mine.changeavatar')}}</view> <view>{{$t('mine.changeavatar')}}</view>
@@ -62,24 +62,6 @@
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon> <u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
</view> </view>
</view> </view>
<u-divider text=""></u-divider>
<view class="cell1">
<view class="item">{{$t('mine.QRcode')}}</view>
<view class="right">
<u-radio-group v-model="userinfo.socialize">
<u-radio :name="$t('mine.WeChat')" class="m-r-10">{{$t('mine.WeChat')}}</u-radio>
<u-radio name="WhatsApp">WhatsApp</u-radio>
</u-radio-group>
</view>
</view>
<view class="cell">
<view class="item">上传二维码</view>
<view class="right">
<uni-file-picker style="margin: 10px 0px;" fileMediatype="image" limit="1" :list-styles="imageStyles" :del-icon="false" disable-preview @select="selectewm" >
<image class="user" :src="userinfo.socialize_pic_url==null?'/static/image/mine/erwm.png':userinfo.socialize_pic_url " mode=""></image>
</uni-file-picker>
</view>
</view>
</view> </view>
<view class="foot"> <view class="foot">
<button class="btn" @click="bcFn">{{$t('save')}}</button> <button class="btn" @click="bcFn">{{$t('save')}}</button>
@@ -155,7 +137,10 @@
handleSearch() { handleSearch() {
var that = this var that = this
if (this.searchKeyword) { if (this.searchKeyword) {
console.log(this.searchKeyword)
this.filteredOptions = this.areaList1.filter((item) => item.name.includes(this.searchKeyword)); this.filteredOptions = this.areaList1.filter((item) => item.name.includes(this.searchKeyword));
console.log(this.filteredOptions)
} else { } else {
// 如果搜索框为空,显示全部数据 // 如果搜索框为空,显示全部数据
this.filteredOptions = this.areaList1; this.filteredOptions = this.areaList1;
@@ -167,6 +152,8 @@
// this.searchKeyword = item.name // this.searchKeyword = item.name
this.actives = item.id this.actives = item.id
// this.showPicker = false; // 关闭弹窗 // this.showPicker = false; // 关闭弹窗
console.log("选中的值:", item.id);
console.log("选中的值:", item.name);
}, },
arerfn(){ arerfn(){
this.showPicker = false; // 关闭弹窗 this.showPicker = false; // 关闭弹窗
@@ -227,13 +214,10 @@
this.company_name = val.value[0].name this.company_name = val.value[0].name
this.showcomp = false this.showcomp = false
}, },
uploadfn(imgUrl,name,name1){ uploadfn(imgUrl){
var that = this; var that = this;
uni.uploadFile({ uni.uploadFile({
// url: 'https://api.fcrm.hnxinyouhe.com/upload/uploadImage', url: 'http://219.157.255.213:9007/upload/uploadImage',
// url: 'https://crm-server.smt.hnxinyouhe.com/upload/uploadImage',
// url: 'http://219.157.255.213:9006/upload/uploadImage',
url: 'https://crm-server.x.hnxinyouhe.com/upload/uploadImage',
filePath: imgUrl, filePath: imgUrl,
name: 'files', name: 'files',
header:{'Authorization': 'Bearer ' + uni.getStorageSync('token')}, header:{'Authorization': 'Bearer ' + uni.getStorageSync('token')},
@@ -245,8 +229,9 @@
icon: 'none' icon: 'none'
}); });
}else{ }else{
that.userinfo[name1] = path.data.image_url that.userinfo.avatar = path.data.image_url
that.userinfo[name] = path.data.path that.userinfo.avatar_url = path.data.path
console.log(that.form)
} }
} }
}); });
@@ -263,17 +248,13 @@
select(e){ select(e){
const tempFilePaths = e.tempFilePaths; const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0] const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'avatar','avatar_url') this.uploadfn(imgUrl)
},
selectewm(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'socialize_pic','socialize_pic_url')
}, },
leftClick(){ leftClick(){
uni.navigateBack({}) uni.navigateBack({})
}, },
bcFn(){ bcFn(){
console.log(this.userinfo)
request({ request({
url:'user/save', url:'user/save',
method:'POST', method:'POST',
@@ -286,9 +267,6 @@
position:this.userinfo.position, position:this.userinfo.position,
country_id:this.userinfo.country_id, country_id:this.userinfo.country_id,
sign:this.userinfo.sign, sign:this.userinfo.sign,
socialize:this.userinfo.socialize,
socialize_pic:this.userinfo.socialize_pic,
socialize_pic_url:this.userinfo.socialize_pic_url,
} }
}).then(res => { }).then(res => {
uni.showToast({ uni.showToast({
@@ -328,7 +306,6 @@
} }
.content{ .content{
background: #FFFFFF; background: #FFFFFF;
padding-bottom: 100px;
.topimg{ .topimg{
text-align: center; text-align: center;
position: relative; position: relative;
@@ -357,13 +334,6 @@
width: 90px; width: 90px;
} }
} }
.cell{
padding: 18px 20px;
font-weight: 500;
.item{
width: 90px;
}
}
.right{ .right{
text-align: right; text-align: right;
} }
+1
View File
@@ -41,6 +41,7 @@
recycle:'recycle' recycle:'recycle'
} }
}).then(res => { }).then(res => {
console.log(res.data)
if(res.data.code ==0){ if(res.data.code ==0){
var datas = res.data.data.list; var datas = res.data.data.list;
this.$refs.paging.complete(datas); this.$refs.paging.complete(datas);
+2
View File
@@ -130,6 +130,7 @@
}) })
}, },
getVcode() { getVcode() {
console.log(this.email)
if(this.email==''){ if(this.email==''){
uni.showToast({ uni.showToast({
title:this.$t('emailerr'), title:this.$t('emailerr'),
@@ -160,6 +161,7 @@
email: this.email, email: this.email,
} }
}).then(res => { }).then(res => {
console.log(res.data.data)
uni.showToast({ uni.showToast({
title:res.data.message, title:res.data.message,
icon: 'none' icon: 'none'
-99
View File
@@ -1,99 +0,0 @@
<template>
<view>
<z-paging ref="paging" v-model="datalist" @query="queryList" :empty-view-text="$t('Nodata')">
<template #top>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000"
backgroundColor="#fff" :statusBar="true" :title="$t('mine.workreport')"></uni-nav-bar>
</template>
<view class="contents" >
<view class="colls" v-for="(item, index) in datalist" :key="index" @click="godetilfn(item)">
<view class="cont">
<view class=""><text class="name">{{item.user.name}}的工作日报</text></view>
<view class="time">{{item.updated_at}}</view>
<view class="dynamic-ellipsis">今日工作内容:<text>{{item.text}}</text></view>
</view>
</view>
</view>
</z-paging>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
export default {
data() {
return {
datalist:[]
}
},
methods: {
leftClick(){
uni.navigateBack({})
},
//客户列表数据
queryList(pageNo, pageSize) {
var that = this;
request({
url:'daily/list',
method:'get',
data: {
page:pageNo,
per_page:10,
}
}).then(res => {
if(res.data.code ==0){
var datas = res.data.data.data;
this.$refs.paging.complete(datas);
}else{
}
uni.stopPullDownRefresh();
})
},
godetilfn(item){
var that=this
uni.navigateTo({
url: '/pages/mine/workreportdetil?id='+item.id
});
}
}
}
</script>
<style lang="scss">
.contents{
background-color: #FFFFFF;
padding: 15px;
.colls{
background: #F6F6F6;
border-radius: 10px;
margin-bottom: 10px;
}
.top{
padding: 10px 15px 0px;
display: flex;
align-items: center;
justify-content: space-between;
}
.name{
font-size: 32rpx;
font-weight: bold;
margin-right: 10px;
}
.cont{
padding: 15px 12px;
font-size: 28rpx;
.time{
color: #999999;
font-size: 24rpx;
}
}
.dynamic-ellipsis {
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
}
}
</style>
-168
View File
@@ -1,168 +0,0 @@
<template>
<view>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('mine.workreport')"></uni-nav-bar>
<view class="content">
<view class="cell1">
<view >{{$t('mine.Reportdate')}}</view>
<view class="right">
<input :placeholder="$t('mine.nicknameinputhd')" v-model="time" disabled></input>
</view>
</view>
<u-divider text=""></u-divider>
<view class="cell1">
<view >{{$t('mine.Presenter')}}</view>
<view class="right">
<input type="text" v-model="username" disabled></input>
</view>
</view>
<!-- <u-divider text=""></u-divider>
<view class="cell1">
<view >{{$t('mine.newcustomernum')}}</view>
<view class="right">
<input type="number" v-model="userinfo.follow"></input>
</view>
</view> -->
<u-divider text=""></u-divider>
<view class="cell">
<view>{{$t('mine.workcontent')}}</view>
<view class="yuyin">
<textarea auto-height :placeholder="$t('mine.workcontent')" v-model="userinfo.text"/>
</view>
</view>
<view class="cell">
<view>{{$t('customer.Remarks')}}</view>
<view class="yuyin">
<textarea auto-height :placeholder="$t('customer.Remarksinputhd')" v-model="userinfo.remark"/>
</view>
</view>
</view>
<view class="foot" v-if="userinfo.self==0">
<button class="btn" @click="bcFn">{{$t('submit')}}</button>
</view>
</view>
</template>
<script>
import { nextTick } from "vue"
import { request,showToast } from '@/api/apiT.js'
export default {
data() {
return {
id:'',
userinfo:{},
time:'',
username:''
}
},
onLoad(options) {
this.id = options.id;
this.getinfo()
},
methods: {
// 搜索处理函数
getinfo(){
var that= this;
request({
url:'daily/detail',
method:'get',
data: {
id:this.id,
}
}).then(res => {
that.userinfo = res.data.data
that.username = res.data.data.user.name
that.time = res.data.data.updated_at.split(' ')[0];
})
},
leftClick(){
uni.navigateBack({})
},
bcFn(){
request({
url:'daily/save',
method:'POST',
data:{
id:this.id,
text:this.userinfo.text,
remark:this.userinfo.remark,
}
}).then(res => {
uni.showToast({
title: res.data.message,
icon: 'none'
});
if(res.data.code ==0){
setTimeout(() => {
uni.reLaunch({
url: '/pages/index/mine',// 替换为你要跳转的页面路径
});
}, 1000);
}
})
}
}
}
</script>
<style lang="scss">
textarea {
min-height: 200rpx;// 设置默认高度 ,解决设置自适应高度之后高度无效问题
margin-top: 15px;
background-color: #F6F6F6;
padding: 15px;
border-radius: 10px;
}
.m-r-10{
margin-right: 10px;
}
.u-divider{
margin: 0px 0px !important;
}
.content{
background: #FFFFFF;
padding-bottom: 100px;
.user{
width: 200rpx;
height: 200rpx;
}
.xj{
width: 60rpx;
height: 52rpx;
position: absolute;
right: 46%;
top: 33%;
}
}
.cell1{
display: flex;
justify-content:space-between;
padding: 18px 20px;
align-items: center;
font-weight: 500;
.item{
width: 90px;
}
}
.cell{
padding: 18px 20px;
font-weight: 500;
}
.right{
text-align: right;
}
.foot{
position: fixed;
bottom: 0px;
width: 100%;
height: 160rpx;
background: #FFFFFF;
}
.btn{
background: linear-gradient(to right, #3471FF, #6776FF);
color: white;
border-radius: 50px;
width: 84%;
margin: 20px 8%;
font-size: 32rpx;
}
</style>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 KiB

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 533 B

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

@@ -1,9 +1,7 @@
import ru from './ru.json'
import en from './en.json' import en from './en.json'
import zhHans from './zh-Hans.json' import zhHans from './zh-Hans.json'
import zhHant from './zh-Hant.json' import zhHant from './zh-Hant.json'
export default { export default {
ru,
en, en,
'zh-Hans': zhHans, 'zh-Hans': zhHans,
'zh-Hant': zhHant 'zh-Hant': zhHant
@@ -1,23 +0,0 @@
{
"zp.refresher.default": "Потяните для обновления",
"zp.refresher.pulling": "Отпустите для обновления",
"zp.refresher.refreshing": "Обновление...",
"zp.refresher.complete": "Успешно обновлено",
"zp.refresher.f2": "Отпустите для перехода на второй этаж",
"zp.loadingMore.default": "Нажмите чтобы загрузить ещё",
"zp.loadingMore.loading": "Загрузка...",
"zp.loadingMore.noMore": "Больше нет данных",
"zp.loadingMore.fail": "Ошибка загрузки, нажмите чтобы повторить",
"zp.emptyView.title": "Нет данных",
"zp.emptyView.reload": "Обновить",
"zp.emptyView.error": "Ошибка загрузки",
"zp.refresherUpdateTime.title": "Последнее обновление: ",
"zp.refresherUpdateTime.none": "Нет данных",
"zp.refresherUpdateTime.today": "Сегодня",
"zp.refresherUpdateTime.yesterday": "Вчера",
"zp.systemLoading.title": "Загрузка..."
}
@@ -7,8 +7,7 @@ import u from '.././z-paging-utils'
import c from '.././z-paging-constant' import c from '.././z-paging-constant'
import interceptor from '../z-paging-interceptor' import interceptor from '../z-paging-interceptor'
const language = uni.getStorageSync('i18locale')?uni.getStorageSync('i18locale'):uni.getLocale(); const language = uni.getSystemInfoSync().language;
// console.log(uni.getLocale())
export default { export default {
data() { data() {
return { return {
@@ -18,7 +17,7 @@ export default {
computed: { computed: {
finalLanguage() { finalLanguage() {
try { try {
const local = uni.getStorageSync('i18locale')?uni.getStorageSync('i18locale'):uni.getLocale(); const local = uni.getLocale();
const language = this.language; const language = this.language;
return local === 'auto' ? interceptor._handleLanguage2Local(language, this._language2Local(language)) : local; return local === 'auto' ? interceptor._handleLanguage2Local(language, this._language2Local(language)) : local;
} catch (e) { } catch (e) {
@@ -95,7 +94,6 @@ export default {
}, },
// 获取国际化转换后的文本 // 获取国际化转换后的文本
_getI18nText(key, value) { _getI18nText(key, value) {
// console.log(this.finalLanguage)
const dataType = Object.prototype.toString.call(value); const dataType = Object.prototype.toString.call(value);
if (dataType === '[object Object]') { if (dataType === '[object Object]') {
const nextValue = value[this.finalLanguage]; const nextValue = value[this.finalLanguage];
@@ -115,7 +113,6 @@ export default {
return 'zh-Hant'; return 'zh-Hant';
} }
if (formatedLanguage.indexOf('en') !== -1) return 'en'; if (formatedLanguage.indexOf('en') !== -1) return 'en';
if (formatedLanguage.indexOf('ru') !== -1) return 'ru';
return language; return language;
} }
} }