Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsalesProgram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c89b5be7
authored
Aug 29, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
11
parent
53694284
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
234 deletions
app.js
pages/tab/home/home.js
project.config.json
app.js
View file @
c89b5be7
...
@@ -17,11 +17,11 @@ App({
...
@@ -17,11 +17,11 @@ App({
isIPX
:
false
,
//是否为iphone X
isIPX
:
false
,
//是否为iphone X
customerNum
:
"001"
,
customerNum
:
"001"
,
customerName
:
"IC助手客服"
,
customerName
:
"IC助手客服"
,
isRelogin
:
true
,
//登入环信失败后是否重新登入,只允许重新登入一次
isRelogin
:
true
,
//登入环信失败后是否重新登入,只允许重新登入一次
bus
:
bus
bus
:
bus
},
},
getImUser
:
chat
.
getImUser
,
getImUser
:
chat
.
getImUser
,
addChatMember
:
function
(
id
,
userId
)
{
//id为环信id userId为账户id
addChatMember
:
function
(
id
,
userId
)
{
//id为环信id userId为账户id
let
token
=
wx
.
getStorageSync
(
'access_token'
)
||
''
;
let
token
=
wx
.
getStorageSync
(
'access_token'
)
||
''
;
this
.
addChatMemberStorage
(
id
);
this
.
addChatMemberStorage
(
id
);
...
@@ -29,7 +29,7 @@ App({
...
@@ -29,7 +29,7 @@ App({
getData
(
apis
.
addrecord
,
'GET'
,
{
getData
(
apis
.
addrecord
,
'GET'
,
{
"token"
:
token
,
"token"
:
token
,
"user_id"
:
userId
"user_id"
:
userId
},
function
(
res
)
{
},
function
(
res
)
{
if
(
res
.
errcode
===
0
)
{
if
(
res
.
errcode
===
0
)
{
}
else
{
}
else
{
...
@@ -37,7 +37,7 @@ App({
...
@@ -37,7 +37,7 @@ App({
}
}
},
false
);
},
false
);
},
},
addChatMemberStorage
:
function
(
id
)
{
addChatMemberStorage
:
function
(
id
)
{
let
member
=
wx
.
getStorageSync
(
"member"
)
||
[];
let
member
=
wx
.
getStorageSync
(
"member"
)
||
[];
member
.
push
(
id
);
member
.
push
(
id
);
wx
.
setStorage
({
wx
.
setStorage
({
...
@@ -47,6 +47,7 @@ App({
...
@@ -47,6 +47,7 @@ App({
},
},
onLaunch
()
{
onLaunch
()
{
wx
.
removeStorageSync
(
'im'
);
wx
.
removeStorageSync
(
'im'
);
this
.
versionUpdate
();
//验证是否授权
//验证是否授权
if
(
this
.
globalData
.
auth
)
{
if
(
this
.
globalData
.
auth
)
{
//是否登录
//是否登录
...
@@ -73,10 +74,41 @@ App({
...
@@ -73,10 +74,41 @@ App({
chat
.
webimListen
();
chat
.
webimListen
();
this
.
checkIsIPhoneX
();
this
.
checkIsIPhoneX
();
},
},
checkIsIPhoneX
:
function
()
{
versionUpdate
:
function
()
{
//小程序检测版本更新
if
(
wx
.
canIUse
(
'getUpdateManager'
))
{
const
updateManager
=
wx
.
getUpdateManager
()
updateManager
.
onCheckForUpdate
(
function
(
res
)
{
if
(
res
.
hasUpdate
)
{
updateManager
.
onUpdateReady
(
function
()
{
wx
.
showModal
({
title
:
'更新提示'
,
content
:
'新版本已经准备好,是否重启应用?'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
updateManager
.
applyUpdate
()
}
}
})
})
updateManager
.
onUpdateFailed
(
function
()
{
wx
.
showModal
({
title
:
'已经有新版本了哟~'
,
content
:
'新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
})
})
}
})
}
else
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
})
}
},
checkIsIPhoneX
:
function
()
{
const
me
=
this
const
me
=
this
wx
.
getSystemInfo
({
wx
.
getSystemInfo
({
success
:
function
(
res
)
{
success
:
function
(
res
)
{
// 根据 model 进行判断
// 根据 model 进行判断
if
(
res
.
model
.
search
(
'iPhone X'
)
!=
-
1
)
{
if
(
res
.
model
.
search
(
'iPhone X'
)
!=
-
1
)
{
me
.
globalData
.
isIPX
=
true
me
.
globalData
.
isIPX
=
true
...
...
pages/tab/home/home.js
View file @
c89b5be7
...
@@ -66,7 +66,6 @@ Page({
...
@@ -66,7 +66,6 @@ Page({
me
.
setData
({
me
.
setData
({
xjList
:
newArr
xjList
:
newArr
});
});
if
(
newArr
.
length
==
1
)
{
if
(
newArr
.
length
==
1
)
{
me
.
setData
({
me
.
setData
({
multiple
:
1
multiple
:
1
...
...
project.config.json
View file @
c89b5be7
...
@@ -52,236 +52,12 @@
...
@@ -52,236 +52,12 @@
"list"
:
[]
"list"
:
[]
},
},
"miniprogram"
:
{
"miniprogram"
:
{
"current"
:
32
,
"current"
:
0
,
"list"
:
[
"list"
:
[
{
{
"id"
:
-1
,
"id"
:
-1
,
"name"
:
"pages/form/xj/index"
,
"name"
:
"版本更新"
,
"pathName"
:
"pages/form/xj/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/setting/index"
,
"pathName"
:
"pages/person/setting/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/setpassword/index"
,
"pathName"
:
"pages/person/setpassword/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
10
,
"name"
:
"pages/person/certification/addcertification/index"
,
"pathName"
:
"pages/person/certification/addcertification/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/certification/certificationmanage/index"
,
"pathName"
:
"pages/person/certification/certificationmanage/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
5
,
"name"
:
"pages/form/bj/index"
,
"pathName"
:
"pages/form/bj/index"
,
"query"
:
"type=2&offerId=156386287503289"
,
"scene"
:
null
},
{
"id"
:
6
,
"name"
:
"pages/form/good/index"
,
"pathName"
:
"pages/form/good/index"
,
"query"
:
"goodId=156454347576866"
,
"scene"
:
null
},
{
"id"
:
7
,
"name"
:
"pages/detail/chat/index"
,
"pathName"
:
"pages/detail/chat/index"
,
"query"
:
"username={
\"
myName
\"
:
\"
7a2765fc7caa5e512a6d1270bcf98bf0
\"
,
\"
your
\"
:
\"
06b6a13c7ae849be08c98ceeefd6ee7f
\"
,
\"
name
\"
:
\"
sy
\"
,
\"
name1
\"
:
\"
11
\"
,
\"
id
\"
:
\"
53
\"
,
\"
touserid
\"
:
\"
54
\"
,
\"
title
\"
:
\"
11
\"
,
\"
img
\"
:
\"
http://img.icsales.com/test/images/icsales/201907/18/ee8b86dc8cac0e5df402a72d77a1b75e.png
\"
,
\"
img1
\"
:
\"
http://img.icsales.com/test/images/icsales/201907/18/767111a5b24e07d950506ea9452ff57c.jpg
\"
}"
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/tab/me/me"
,
"pathName"
:
"pages/tab/me/me"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
9
,
"name"
:
"pages/person/exchange/index"
,
"pathName"
:
"pages/person/exchange/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/withdrawal/index"
,
"pathName"
:
"pages/person/withdrawal/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/withdrawalsuccess/index"
,
"pathName"
:
"pages/person/withdrawalsuccess/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/welfare/index"
,
"pathName"
:
"pages/person/welfare/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/integralrule/index"
,
"pathName"
:
"pages/person/integralrule/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/packet/index"
,
"pathName"
:
"pages/person/packet/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/invitation/index"
,
"pathName"
:
"pages/person/invitation/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/invitationrecord/index"
,
"pathName"
:
"pages/person/invitationrecord/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/list/signin/index"
,
"pathName"
:
"pages/list/signin/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/form/report/index"
,
"pathName"
:
"pages/form/report/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/login/index"
,
"pathName"
:
"pages/person/login/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/register/index"
,
"pathName"
:
"pages/person/register/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/company/index"
,
"pathName"
:
"pages/person/company/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/editcompany/index"
,
"pathName"
:
"pages/person/editcompany/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/auth/index"
,
"pathName"
:
"pages/person/auth/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/list/notice/index"
,
"pathName"
:
"pages/list/notice/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/tab/home/home"
,
"pathName"
:
"pages/tab/home/home"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
26
,
"name"
:
"pages/detail/good/index"
,
"pathName"
:
"pages/detail/good/index"
,
"query"
:
"goodId=156274103196309&type=3"
,
"scene"
:
null
},
{
"id"
:
27
,
"name"
:
"pages/list/xj/index"
,
"pathName"
:
"pages/list/xj/index"
,
"query"
:
"inquiryItemsId=156403573054791&type=3"
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/detail/good/index"
,
"pathName"
:
"pages/detail/good/index"
,
"query"
:
"goodId=156617742470181&type=3"
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/detail/good/index"
,
"pathName"
:
"pages/detail/good/index"
,
"query"
:
"goodId=156393707673258&type=3"
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/tab/home/home"
,
"pathName"
:
"pages/tab/home/home"
,
"pathName"
:
"pages/tab/home/home"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/list/rate/index"
,
"pathName"
:
"pages/list/rate/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/list/ratemanage/index"
,
"pathName"
:
"pages/list/ratemanage/index"
,
"scene"
:
null
"scene"
:
null
}
}
]
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment