|
|
@@ -46,9 +46,18 @@ export default {
|
|
|
if (!this.name || !this.phone || this.phone.length < 6) {
|
|
|
return this.$message.error('请填写完整的信息')
|
|
|
}
|
|
|
+ const UA = ['Mobile 浏览器', 'PC 浏览器', 'Android', 'IOS']
|
|
|
+ let agent = 'PC 浏览器'
|
|
|
+ if (this.$deviceType.android) {
|
|
|
+ agent = 'Android'
|
|
|
+ } else if (this.$deviceType.ios) {
|
|
|
+ agent = 'IOS'
|
|
|
+ } else if (this.$deviceType.isMobile()) {
|
|
|
+ agent = 'Mobile 浏览器'
|
|
|
+ }
|
|
|
const { name, phone, source, sourceId } = this
|
|
|
let p = {
|
|
|
- name, phone, from: source
|
|
|
+ name, phone, from: source, agent
|
|
|
}
|
|
|
if (sourceId) {
|
|
|
p.id = sourceId
|