Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c2bf7341
authored
Nov 14, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
功能
1 parent
a9b826e3
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
424 additions
and
154 deletions
components/TabMine/TabMine.js
components/TabMine/TabMine.wxml
config.js
project.private.config.json
tabMine/api.js
tabMine/pages/technicianSetup/technicianSetup.js
tabMine/pages/technicianSetup/technicianSetup.sass
tabMine/pages/technicianSetup/technicianSetup.scss
tabMine/pages/technicianSetup/technicianSetup.wxml
utils/request/environment.js
utils/utils_wx.js
components/TabMine/TabMine.js
View file @
c2bf734
// components/tabMine/TabMine.js
// components/tabMine/TabMine.js
import
api
from
'../../tabMine/api'
import
api
from
'../../
pages/
tabMine/api'
const
app
=
getApp
()
const
app
=
getApp
()
import
constantData
from
'../../pages/constant/data'
import
constantData
from
'../../pages/constant/data'
const
IMG_URL
=
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/mine/'
const
IMG_URL
=
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/mine/'
...
...
components/TabMine/TabMine.wxml
View file @
c2bf734
<!--components/tabMine/TabMine.wxml-->
<!--components/tabMine/TabMine.wxml-->
<!-- src引入filter.wxs, module给模块起名 -->
<!-- src引入filter.wxs, module给模块起名 -->
<!-- <wxs src="./index.wxs" module="filter" /> -->
<!-- <wxs src="./index.wxs" module="filter" /> -->
<view>2222</view>
<view class="bg"></view>
<view class="bg"></view>
<block>
<block>
<block>
<view class="main" style="margin-top:104rpx">
<view class="main" style="margin-top:104rpx">
<view class="user-box">
<view class="user-box">
...
@@ -67,92 +68,12 @@
...
@@ -67,92 +68,12 @@
<image class="icon_image" src="{{IMG_URL}}mine_icon_1.png" mode=""/>
<image class="icon_image" src="{{IMG_URL}}mine_icon_1.png" mode=""/>
</view>
</view>
</view>
</view>
<!-- <view class="version_box" bindtap="goVersionPage">
<view class="item">
<view class="icon_box">
<view class="is_new" hidden="{{!versionData.isNew}}">NEW</view>
</view>
<view>更新日志</view>
</view>
</view> -->
</block>
</block>
<view class="logout text-center" bindtap="logout">退出账号</view>
<view class="logout text-center" bindtap="logout">退出账号</view>
</view>
</view>
</block>
</block>
<!-- <block wx:if="{{showWorkBox}}">
<view class="work-box" catchtouchmove="noScroll">
<view class="work-bg" bindtap="showWork" />
<view class="work-content">
<view class="work-title text-center hasborder">工位设置</view>
<view class="work-body">
<block wx:for="{{workItem}}" wx:key="index">
<view class="item hasborder">
<view class="label">{{item.label}}</view>
<view class="value">
<view
class="minus {{userInfo.userType == 2 ?'disabled':''}}"
bindtap="addWorkCount"
data-count="{{-1}}"
data-index="{{index}}"
bindlongtap="addWorkCount"
bindtouchend="touchend"
bindtouchstart="touchstart">
-
</view>
<view class="input text-center {{userInfo.userType == 2 ?'disabled':''}}">
{{item.maxCount}}
</view>
<view
class="add {{userInfo.userType == 2 ?'disabled':''}}"
bindtap="addWorkCount"
data-count="{{1}}"
data-index="{{index}}"
bindlongtap="addWorkCount"
bindtouchend="touchend"
bindtouchstart="touchstart">
+
</view>
个
</view>
</view>
</block>
<view class="item hasborder">
<view class="label">周六施工</view>
<switch
class="{{userInfo.userType == 2 ?'disabled':''}}"
disabled="{{userInfo.userType == 2}}"
color="#347BFF"
isYqdSuper="{{isYqdSuper}}"
checked="{{saturdayFlag}}"
bindchange="changeSwitch"
data-target="saturdayFlag" />
</view>
<view class="item hasborder">
<view class="label">周日施工</view>
<switch
class="{{userInfo.userType == 2 ?'disabled':''}}"
disabled="{{userInfo.userType == 2}}"
color="#347BFF"
checked="{{sundayFlag}}"
bindchange="changeSwitch"
data-target="sundayFlag" />
</view>
<view class="tips">设置门店每日每个时段可接待的客户人数, 施工时段以1个半小时为准,请合理安排施工进度</view>
</view>
<view class="work-footer">
<view class="cancel text-center" bindtap="showWork">取消</view>
<view class="confirm text-center" bindtap="confirm">确定</view>
</view>
</view>
</view>
</block>
<switch-popup
show="{{showMerchantPop}}"
height="{{merchantPopConfig.height}}"
title="{{merchantPopConfig.title}}"
isYqdSuper="{{isYqdSuper}}"
tips="{{merchantPopConfig.tips}}" /> -->
</block>
...
...
config.js
View file @
c2bf734
...
@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
...
@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布
* 4预发布
* 5cdptest
* 5cdptest
*/
*/
let
index
=
2
let
index
=
0
const
accountInfo
=
wx
.
getAccountInfoSync
()
const
accountInfo
=
wx
.
getAccountInfoSync
()
const
systemInfo
=
wx
.
getSystemInfoSync
()
const
systemInfo
=
wx
.
getSystemInfoSync
()
...
...
project.private.config.json
View file @
c2bf734
...
@@ -4,6 +4,13 @@
...
@@ -4,6 +4,13 @@
"miniprogram"
:
{
"miniprogram"
:
{
"list"
:
[
"list"
:
[
{
{
"name"
:
"技师设置"
,
"pathName"
:
"tabMine/pages/technicianSetup/technicianSetup"
,
"query"
:
""
,
"launchMode"
:
"default"
,
"scene"
:
null
},
{
"name"
:
"权益修改客户信息"
,
"name"
:
"权益修改客户信息"
,
"pathName"
:
"packageEquity/pages/carQuotation/updateOrderInfo/updateOrderInfo"
,
"pathName"
:
"packageEquity/pages/carQuotation/updateOrderInfo/updateOrderInfo"
,
"query"
:
"id=1912"
,
"query"
:
"id=1912"
,
...
...
tabMine/api.js
View file @
c2bf734
...
@@ -26,34 +26,22 @@ module.exports = {
...
@@ -26,34 +26,22 @@ module.exports = {
// },
// },
// 分页查询技师列表
// 分页查询技师列表
getTechnicianList
(
data
)
{
getTechnicianList
(
data
)
{
return
api
.
post
(
'scrm.api.busassistant.staff.findStaffByPage'
,
data
)
return
api
.
post
(
'dj.api.smartcarlife.staff.findStaffByPage'
,
data
)
},
},
// 新增技师信息
// 新增技师信息
addTechnician
(
data
)
{
addTechnician
(
data
)
{
return
api
.
post
(
'scrm.api.busassistant.technicianConfig.add'
,
data
)
return
api
.
post
(
'dj.api.smartcarlife.technicianConfig.add'
,
data
)
},
},
// 修改技师信息
// 修改技师信息
updateTechnician
(
data
)
{
updateTechnician
(
data
)
{
return
api
.
post
(
return
api
.
post
(
'dj.api.smartcarlife.technicianConfig.update'
,
data
)
{
},
method
:
'scrm.api.busassistant.technicianConfig.update'
,
...
data
},
true
)
},
// 删除技师
// 删除技师
deleteTechnician
(
data
)
{
deleteTechnician
(
data
)
{
return
api
.
post
(
return
api
.
post
(
'dj.api.smartcarlife.technicianConfig.delete'
,
data
)
{
}
method
:
'scrm.api.busassistant.technicianConfig.delete'
,
}
...
data
},
true
)
}
}
\ No newline at end of file
\ No newline at end of file
tabMine/pages/technicianSetup/technicianSetup.js
View file @
c2bf734
// tabMine/pages/technicianSetup/technicianSetup.js
// tabMine/pages/technicianSetup/technicianSetup.js
import
api
from
'../../api.js'
import
api
from
'../../api.js'
import
{
ImgUrl
}
from
'~/config'
;
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
IMG_URL
:
ImgUrl
,
total
:
-
1
,
total
:
-
1
,
pageCof
:
{
pageCof
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
1000
pageSize
:
1000
},
},
isAsk
:
false
,
isAsk
:
false
,
technicianList
:[]
technicianList
:
[
// {
// staffName: '',
// staffPhone: '',
// isEdit: true
// }
]
},
},
init
()
{
init
()
{
this
.
getList
(
true
)
this
.
getList
(
true
)
},
},
addTechnicalItem
()
{
let
{
technicianList
,
userInfo
}
=
this
.
data
technicianList
.
unshift
({
staffName
:
''
,
staffPhone
:
''
,
merchantId
:
userInfo
.
merchantId
,
merchantName
:
userInfo
.
merchantName
,
isEdit
:
true
})
this
.
setData
({
technicianList
})
},
editTechicianInfo
(
e
)
{
let
{
index
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
[
`technicianList[
${
index
}
].isEdit`
]:
true
})
},
submit
(
e
)
{
let
{
index
}
=
e
.
currentTarget
.
dataset
let
{
technicianList
}
=
this
.
data
let
params
=
wx
.
$util
.
deepClone
(
technicianList
[
index
])
if
(
!
params
.
staffName
)
{
wx
.
$util
.
showToast
(
'请输入姓名'
)
}
const
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
if
(
!
params
.
staffPhone
||
!
phoneRex
.
test
(
params
.
staffPhone
))
{
wx
.
$util
.
showToast
(
'请输入正确手机号'
)
}
params
.
technicianName
=
params
.
staffName
params
.
technicianPhone
=
params
.
staffPhone
console
.
log
(
'18775035205'
);
wx
.
$util
.
showLoading
(
'加载中'
)
// this.setData({
// [`technicianList[${index}].isEdit`]: false
// })
// return
let
apiName
=
params
.
id
?
'updateTechnician'
:
'addTechnician'
// debugger
api
[
apiName
](
params
).
then
((
res
)
=>
{
wx
.
hideLoading
()
// debugger
console
.
log
(
res
,
'res'
);
let
{
code
,
data
,
message
}
=
res
if
(
code
==
0
)
{
wx
.
$util
.
showToast
(
params
.
id
?
'修改成功'
:
'新增成功'
)
this
.
setData
({
[
`technicianList[
${
index
}
].isEdit`
]:
false
})
}
else
{
wx
.
$util
.
showToast
(
message
)
}
}).
catch
((
err
)
=>
{
});
// this.setData({
// // [`technicianList[${index}].isEdit`]:true
// })
},
deleteTechicianInfo
(
e
)
{
let
{
index
}
=
e
.
currentTarget
.
dataset
let
{
technicianList
}
=
this
.
data
const
id
=
technicianList
[
index
]?.
id
// if (id) {
let
_this
=
this
wx
.
showModal
({
title
:
'温馨提示'
,
content
:
'是否删除该技师'
,
// showCancel: false,
confirmText
:
'确定'
,
confirmColor
:
'#347BFF'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
if
(
!
id
)
{
technicianList
.
splice
(
index
,
1
)
_this
.
setData
({
technicianList
})
return
}
wx
.
$util
.
showLoading
(
'加载中'
)
api
.
deleteTechnician
({
id
}).
then
((
result
)
=>
{
wx
.
hideLoading
()
let
{
code
,
data
,
message
}
=
result
if
(
code
==
0
)
{
technicianList
.
splice
(
index
,
1
)
_this
.
setData
({
technicianList
})
}
else
{
wx
.
$util
.
showToast
(
message
)
}
}).
catch
((
err
)
=>
{
console
.
log
(
err
);
});
// _this.getDetail(orderCode)
}
}
})
// }
},
input
(
e
)
{
let
{
value
}
=
e
.
detail
let
{
name
,
index
}
=
e
.
currentTarget
.
dataset
let
{
technicianList
}
=
this
.
data
let
itemChar
=
`technicianList[
${
index
}
].
${
name
}
`
this
.
setData
({
[
itemChar
]:
value
.
trim
()
})
},
getList
(
isReset
=
false
)
{
getList
(
isReset
=
false
)
{
// let user
// let user
let
{
technicianList
,
pageCof
,
total
,
userInfo
,
isAsk
}
=
this
.
data
let
{
console
.
log
(
userInfo
,
'userInfo'
);
technicianList
,
pageCof
,
total
,
userInfo
,
isAsk
}
=
this
.
data
console
.
log
(
userInfo
,
'userInfo'
);
let
_this
=
this
let
_this
=
this
if
(
total
==
technicianList
.
length
||
isAsk
)
{
if
(
total
==
technicianList
.
length
||
isAsk
)
{
return
true
return
true
...
@@ -36,7 +198,10 @@ Page({
...
@@ -36,7 +198,10 @@ Page({
isAsk
:
true
isAsk
:
true
})
})
api
.
getTechnicianList
(
params
).
then
(
res
=>
{
api
.
getTechnicianList
(
params
).
then
(
res
=>
{
let
{
data
,
count
}
=
res
let
{
data
,
count
}
=
res
.
data
this
.
setData
({
this
.
setData
({
technicianList
:
pageCof
.
pageNum
==
1
?
(
data
||
[])
:
technicianList
.
concat
(
data
),
technicianList
:
pageCof
.
pageNum
==
1
?
(
data
||
[])
:
technicianList
.
concat
(
data
),
[
'pageCof.pageNum'
]:
pageCof
.
pageNum
+
1
,
[
'pageCof.pageNum'
]:
pageCof
.
pageNum
+
1
,
...
@@ -58,7 +223,7 @@ Page({
...
@@ -58,7 +223,7 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
},
},
/**
/**
...
...
tabMine/pages/technicianSetup/technicianSetup.sass
0 → 100644
View file @
c2bf734
/* tabMine/pages/technicianSetup/technicianSetup.wxss */
page
{
background
:
rgb
(
246
,
248
,
250
)
;
}
.scrollCon
{
width
:
710rpx
;
// height: 108rpx;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
margin
:
20rpx
auto
;
overflow-y
:
scroll
;
.merchantNameCon
{
box-sizing
:
border-box
;
padding
:
32rpx
;
width
:
100%
;
height
:
108rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-family
:
PingFangSC-Medium
;
font-weight
:
500
;
font-size
:
32rpx
;
color
:
#292D33
;
.addIcon
{
display
:
flex
;
align-items
:
center
;
font-family
:
PingFangSC-Medium
;
font-weight
:
500
;
font-size
:
28rpx
;
color
:
#347BFF
;
.icon-plus
{
width
:
28rpx
;
height
:
28rpx
;
margin-right
:
5rpx
;
}
}
}
}
.item-box
{
.item
{
box-sizing
:
border-box
;
width
:
670rpx
;
height
:
124rpx
;
background
:
#F7F8FA
;
border-radius
:
16rpx
;
margin
:
0
auto
20rpx
;
}
.techicianInfoEdit
{
box-sizing
:
border-box
;
padding
:
0
24rpx
0
32rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.icon-delete
{
width
:
28rpx
;
height
:
28rpx
;
}
.name
{
box-sizing
:
border-box
;
width
:
200rpx
;
height
:
80rpx
;
background
:
#FFFFFF
;
border
:
2rpx
solid
#DEE0E3
;
border-radius
:
12rpx
;
}
.phone
{
box-sizing
:
border-box
;
width
:
280rpx
;
height
:
80rpx
;
background
:
#FFFFFF
;
border
:
2rpx
solid
#DEE0E3
;
border-radius
:
12rpx
;
}
.btn
{
font-family
:
PingFangSC-Medium
;
font-weight
:
500
;
font-size
:
28rpx
;
color
:
#347BFF
;
}
}
.techicianInfo
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
18rpx
32rpx
;
.left
{
.label
{
display
:
flex
;
.name
{
font-family
:
PingFangSC-SNaNrpxibold
;
font-weight
:
600
;
font-size
:
28rpx
;
color
:
#292D33
;
margin-right
:
10rpx
;
}
.position
{
font-family
:
PingFangSC-SNaNrpxibold
;
font-weight
:
600
;
font-size
:
20rpx
;
background
:
#EAF1FF
;
border
:
1rpx
solid
#347bff
80
;
padding
:
4rpx
16rpx
;
font-family
:
PingFangSC-SNaNrpxibold
;
font-weight
:
600
;
font-size
:
20rpx
;
color
:
#347BFF
;
}
}
.phone
{
margin-top
:
10rpx
;
font-family
:
PingFangSC-Regular
;
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#292D33
;
}
}
.icon-edit
{
width
:
32rpx
;
height
:
32rpx
;
}
}
}
.input
{
// text-align: right;
font-size
:
28rpx
;
padding
:
0
24rpx
;
}
.placeholder-class
{
color
:
#BEC1C7
;
}
\ No newline at end of file
\ No newline at end of file
tabMine/pages/technicianSetup/technicianSetup.scss
deleted
100644 → 0
View file @
a9b826e
/* tabMine/pages/technicianSetup/technicianSetup.wxss */
\ No newline at end of file
\ No newline at end of file
tabMine/pages/technicianSetup/technicianSetup.wxml
View file @
c2bf734
<!--tabMine/pages/technicianSetup/technicianSetup.wxml-->
<!--tabMine/pages/technicianSetup/technicianSetup.wxml-->
<scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="handleSearch" bindscrolltolower="scrollonReachBottom" class="list" style="height:calc(100vh - 148rpx - 110rpx);" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}">
<!-- <view>1111</view> -->
<view class="item-box" wx:for="{{technicianList}}" wx:key="index">
<!-- <scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="handleSearch" bindscrolltolower="scrollonReachBottom" class="list" style="height:calc(100vh);" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}"> -->
<view class="top">
<view class="scrollCon">
<view class="message">
<view class="merchantNameCon">
<glsx-image src="personal/tech_defalut_avatar.png" class="avatar" />
<view class="name">{{userInfo.merchantName}}</view>
<view class="message-text">
<view class="addIcon" bind:tap="addTechnicalItem">
<input wx:if="{{item.isEdit}}" type="text" placeholder="{{formItems[0].placeholder}}" maxlength="{{formItems[0].maxlength}}" class="input" value="{{formData.staffName}}" focus="{{item.isEdit}}" placeholder-class="input-placeholder" data-attr="{{formItems[0].props}}" confirm-type="done" bindinput="handleInput" bindblur="handleConfirm" />
<image class="icon-plus" src="{{IMG_URL}}/miniProgram/icon-plus.png" />
<view wx:else class="merchant">{{item.staffName}}</view>
技师
</view>
</view>
<glsx-image wx:if="{{!item.isEdit}}" src="personal/icon-edit.png" class="icon-edit" bindtap="handleEdit" data-type="edit" data-target="{{item}}" data-idx="{{index}}" />
</view>
</view>
<view class="item-box" wx:for="{{technicianList}}" wx:key="index">
<view class="delete" bindtap="handleDelete" data-target="{{item}}">删除</view>
<view class=" item techicianInfoEdit" wx:if="{{item.isEdit}}">
<image class="icon-delete" bind:tap="deleteTechicianInfo" data-index="{{index}}" src="{{IMG_URL}}/miniProgram/deleteIcon.png" />
<input placeholder="技师姓名" class="input name" placeholder-class="placeholder-class" maxlength="16" data-index="{{index}}" value="{{ item.staffName }}" bindinput="input" data-name="staffName" always-embed></input>
<input placeholder="技师手机号" class="input phone" type="number" maxlength="11" placeholder-class="placeholder-class" value="{{ item.staffPhone }}" bindinput="input" bindblur="phoneBlur" data-index="{{index}}" data-name="staffPhone" always-embed></input>
<view class="btn" bind:tap="submit" data-index="{{index}}">提交</view>
</view>
<view class=" item techicianInfo" wx:else>
<view class="left">
<view class="label">
<view class="name">{{item.staffName}}</view>
<view class="position">技师</view>
</view>
</view>
<view class="bottom">
<view class="phone">手机号 {{item.staffPhone}}</view>
<view class="technician_name">
</view>
所属:{{item.merchantName}}
<image class="icon-edit" bind:tap="editTechicianInfo" data-index="{{index}}" src="{{IMG_URL}}/miniProgram/grayEditIcon.png" />
</view>
<!-- <view class="top">
<view class="message">
<glsx-image src="personal/tech_defalut_avatar.png" class="avatar" />
<view class="message-text">
<input wx:if="{{item.isEdit}}" type="text" placeholder="{{formItems[0].placeholder}}" maxlength="{{formItems[0].maxlength}}" class="input" value="{{formData.staffName}}" focus="{{item.isEdit}}" placeholder-class="input-placeholder" data-attr="{{formItems[0].props}}" confirm-type="done" bindinput="handleInput" bindblur="handleConfirm" />
<view wx:else class="merchant">{{item.staffName}}</view>
</view>
</view>
<
view class="time">{{item.createdTime}}</view
>
<
glsx-image wx:if="{{!item.isEdit}}" src="personal/icon-edit.png" class="icon-edit" bindtap="handleEdit" data-type="edit" data-target="{{item}}" data-idx="{{index}}" /
>
</view>
</view>
<view class="delete" bindtap="handleDelete" data-target="{{item}}">删除</view>
</view>
</view>
<view class="bottomTips" wx:if="{{technicianList.length == total}}">到底啦!</view>
<view class="bottom">
</scroll-view>
<view class="technician_name">
所属:{{item.merchantName}}
</view>
<view class="time">{{item.createdTime}}</view>
</view> -->
</view>
<!-- <view class="bottomTips" wx:if="{{technicianList.length == total}}">到底啦!</view> -->
</view>
<!-- </scroll-view> -->
\ No newline at end of file
\ No newline at end of file
utils/request/environment.js
View file @
c2bf734
import
{
envIndex
}
from
'~/config'
import
{
envIndex
}
from
'~/config'
// console.log(envIndex, 'envIndex')
// console.log(envIndex, 'envIndex')
...
@@ -23,7 +25,7 @@ const secretKey_items = {
...
@@ -23,7 +25,7 @@ const secretKey_items = {
appKey
:
'48e5e13229b82c1b4e6e8c96151f0637'
,
appKey
:
'48e5e13229b82c1b4e6e8c96151f0637'
,
secret
:
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
secret
:
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
},
},
cdptest
:{
cdptest
:
{
appKey
:
'48e5e13229b82c1b4e6e8c96151f0637'
,
appKey
:
'48e5e13229b82c1b4e6e8c96151f0637'
,
secret
:
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
secret
:
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
}
}
...
@@ -49,7 +51,7 @@ const scrmSecretKey_items = {
...
@@ -49,7 +51,7 @@ const scrmSecretKey_items = {
appKey
:
'48e5e13229b82c1b4e6e8c96151f0637'
,
appKey
:
'48e5e13229b82c1b4e6e8c96151f0637'
,
secret
:
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
secret
:
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
},
},
cdptest
:{
cdptest
:
{
appKey
:
'48e5e13229b82c1b4e6e8c96151f0637'
,
appKey
:
'48e5e13229b82c1b4e6e8c96151f0637'
,
secret
:
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
secret
:
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
}
}
...
@@ -57,10 +59,10 @@ const scrmSecretKey_items = {
...
@@ -57,10 +59,10 @@ const scrmSecretKey_items = {
const
domain_items
=
{
const
domain_items
=
{
ip
:
{
ip
:
{
// dj: 'http://192.168.1.165:8292',
// dj: 'http://192.168.1.165:8292',
dj
:
'http://192.168.1.104:8292'
,
//叶立庆
//
dj: 'http://192.168.1.104:8292', //叶立庆
// dj: 'http://192.168.1.169:8292',//蔡远明
// dj: 'http://192.168.1.169:8292',//蔡远明
// dj: 'http://192.168.1.174:8292',//范富荣
// dj: 'http://192.168.1.174:8292',//范富荣
// dj: 'http://192.168.1.203:8292',
//周杭
dj
:
'http://192.168.1.88:8292'
,
//周杭
// dj: 'http://192.168.1.53:8292',//陈希
// dj: 'http://192.168.1.53:8292',//陈希
// dj:'http://192.168.2.59:8292/',//周立明
// dj:'http://192.168.2.59:8292/',//周立明
// scrm: 'http://192.168.1.165:8292'
// scrm: 'http://192.168.1.165:8292'
...
@@ -90,7 +92,7 @@ const domain_items = {
...
@@ -90,7 +92,7 @@ const domain_items = {
}
}
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'preRelease'
,
'cdptest'
]
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'preRelease'
,
'cdptest'
]
module
.
exports
=
{
module
.
exports
=
{
domain
:
domain_items
[
target
[
envIndex
]],
domain
:
domain_items
[
target
[
envIndex
]],
...
@@ -98,4 +100,4 @@ module.exports = {
...
@@ -98,4 +100,4 @@ module.exports = {
dj
:
secretKey_items
[
target
[
envIndex
]],
dj
:
secretKey_items
[
target
[
envIndex
]],
scrm
:
scrmSecretKey_items
[
target
[
envIndex
]]
scrm
:
scrmSecretKey_items
[
target
[
envIndex
]]
}
}
}
}
\ No newline at end of file
\ No newline at end of file
utils/utils_wx.js
View file @
c2bf734
...
@@ -24,11 +24,11 @@ const noScroll = () => {}
...
@@ -24,11 +24,11 @@ const noScroll = () => {}
/**设置粘贴板内容 */
/**设置粘贴板内容 */
const
setCopyData
=
(
data
,
callBack
)
=>
{
const
setCopyData
=
(
data
,
callBack
)
=>
{
console
.
log
(
data
,
'setCopyData'
);
console
.
log
(
data
,
'setCopyData'
);
wx
.
setClipboardData
({
wx
.
setClipboardData
({
data
:
data
,
data
:
data
,
success
(
res
)
{
success
(
res
)
{
console
.
log
(
res
,
'setCopyData'
);
console
.
log
(
res
,
'setCopyData'
);
if
(
callBack
&&
typeof
callBack
===
'function'
)
callBack
(
res
)
if
(
callBack
&&
typeof
callBack
===
'function'
)
callBack
(
res
)
}
}
})
})
...
@@ -37,7 +37,7 @@ const setCopyData = (data, callBack) => {
...
@@ -37,7 +37,7 @@ const setCopyData = (data, callBack) => {
/**
/**
* 防止重复点击
* 防止重复点击
*/
*/
const
showLoading
=
(
title
=
''
)
=>
{
const
showLoading
=
(
title
=
'
加载中
'
)
=>
{
if
(
wx
.
showLoading
)
{
if
(
wx
.
showLoading
)
{
// 基础库 1.1.0 微信6.5.6版本开始支持,低版本需做兼容处理
// 基础库 1.1.0 微信6.5.6版本开始支持,低版本需做兼容处理
wx
.
showLoading
({
wx
.
showLoading
({
...
@@ -68,7 +68,7 @@ const showToast = val => {
...
@@ -68,7 +68,7 @@ const showToast = val => {
if
(
val
&&
typeof
val
===
'string'
)
{
if
(
val
&&
typeof
val
===
'string'
)
{
obj
.
title
=
val
obj
.
title
=
val
obj
.
icon
=
'none'
,
obj
.
icon
=
'none'
,
obj
.
duration
=
3000
obj
.
duration
=
3000
}
else
{
}
else
{
obj
=
val
obj
=
val
}
}
...
@@ -175,10 +175,17 @@ const getDeviceSize = () => {
...
@@ -175,10 +175,17 @@ const getDeviceSize = () => {
wx
.
getSystemInfo
({
wx
.
getSystemInfo
({
success
:
function
(
res
)
{
success
:
function
(
res
)
{
// console.log(res)
// console.log(res)
const
{
screenHeight
,
safeArea
}
=
res
const
{
const
{
bottom
}
=
safeArea
screenHeight
,
safeArea
}
=
res
const
{
bottom
}
=
safeArea
const
bottomLift
=
screenHeight
-
bottom
const
bottomLift
=
screenHeight
-
bottom
resolve
({
bottomLift
})
resolve
({
bottomLift
})
}
}
})
})
})
})
...
@@ -193,10 +200,17 @@ const isFullSucreen = isComponents => {
...
@@ -193,10 +200,17 @@ const isFullSucreen = isComponents => {
wx
.
getSystemInfo
({
wx
.
getSystemInfo
({
success
(
res
)
{
success
(
res
)
{
// console.log(res)
// console.log(res)
let
{
statusBarHeight
,
screenHeight
,
windowHeight
,
safeArea
}
=
res
let
{
statusBarHeight
,
screenHeight
,
windowHeight
,
safeArea
}
=
res
// console.log(statusBarHeight, screenHeight, windowHeight, safeArea)
// console.log(statusBarHeight, screenHeight, windowHeight, safeArea)
// const { screenHeight, safeArea } = res
// const { screenHeight, safeArea } = res
const
{
bottom
}
=
safeArea
const
{
bottom
}
=
safeArea
// console.log(bottom)
// console.log(bottom)
// console.log(router.isTab, 'router.isTab')
// console.log(router.isTab, 'router.isTab')
// windowHeight 属性会在自定义导航栏时跟screenHeight 一样导致无法区分是否是iphoneX的机型
// windowHeight 属性会在自定义导航栏时跟screenHeight 一样导致无法区分是否是iphoneX的机型
...
@@ -258,4 +272,4 @@ const wxApi = {
...
@@ -258,4 +272,4 @@ const wxApi = {
handleCopy
handleCopy
}
}
export
default
wxApi
export
default
wxApi
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment