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 cdd9fd13
authored
Jun 03, 2024
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix 测试bug修复
1 parent
f568fa8f
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
93 additions
and
48 deletions
api/api.js
app.js
components/SideSelectPopup/SideSelectPopup.js
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
packageEquity/pages/employeeInspection/components/contentItem/contentItem.wxml
pages/loading/loading.js
pages/merchantList/merchantList.js
pages/wxLogin/wxLogin.js
api/api.js
View file @
cdd9fd1
...
...
@@ -271,7 +271,9 @@ module.exports = {
/**
* 员工登录日志记录保存
*/
loginRecordSave
(
data
)
{
loginRecordSave
(
data
,
name
)
{
console
.
log
(
name
,
'loginRecordSave'
);
// debugger
return
api
.
post
(
"dj.api.smartcarlife.staff.login.record.save"
,
data
...
...
app.js
View file @
cdd9fd1
...
...
@@ -20,6 +20,34 @@ import eventbus from './utils/eventbus'
import
api
from
'./api/api'
import
{
Version
}
from
'glsx-common-sdk'
import
{
areaList
}
from
'@vant/area-data'
//预加载省市区
// 将 api.reNoSignIn() 函数包装为防抖函数
const
debouncedReNoSignIn
=
debounce
(
function
(
noSignInUuid
)
{
console
.
log
(
'debouncedReNoSignIn2222'
);
api
.
reNoSignIn
({
noSignInUuid
:
noSignInUuid
})
.
then
(
res
=>
{
let
{
code
,
data
}
=
res
if
(
code
==
'0'
&&
data
)
{
util
.
setSessionId
(
data
?.
sessionId
)
wx
.
reLaunch
({
url
:
'/pages/loading/loading'
})
}
else
{
util
.
removeStorage
()
removeSystemStorage
()
that
.
login
(
false
)
}
})
},
5000
);
// 设置防抖时间为 5 秒
// 定义一个防抖函数
function
debounce
(
func
,
timeout
)
{
let
timer
;
return
(...
args
)
=>
{
clearTimeout
(
timer
);
timer
=
setTimeout
(()
=>
{
func
.
apply
(
this
,
args
);
},
timeout
);
};
}
App
({
onLaunch
()
{
/**挂载到wx对象 */
...
...
@@ -92,26 +120,29 @@ App({
let
noSignInUuid
=
getNoSignInUuid
()
console
.
log
(
'noSignInUuid'
,
noSignInUuid
)
if
(
noSignInUuid
)
{
api
.
reNoSignIn
({
noSignInUuid
:
noSignInUuid
})
.
then
(
res
=>
{
let
{
code
,
data
}
=
res
if
(
code
==
'0'
&&
data
)
{
// util.setUserinfo( console.log('noSignInUuid_sessionId',data?.sessionId);
// wx.reLaunch({url: '/pages/accountItems/accountItems'})
util
.
setSessionId
(
data
?.
sessionId
)
wx
.
reLaunch
({
url
:
'/pages/loading/loading'
})
// let now = new Date()
// api.loginRecordSave({ staffUuid: data.noSignInUuid, loginTime: now.format('yyyy-MM-dd hh:mm:ss') })
// return
}
else
{
util
.
removeStorage
()
removeSystemStorage
()
that
.
login
(
false
)
}
})
// 调用防抖函数
debouncedReNoSignIn
(
noSignInUuid
);
// util.debounce(() => {
// console.log(1112);
// api
// .reNoSignIn({
// noSignInUuid: noSignInUuid
// })
// .then(res => {
// let { code, data } = res
// if (code == '0' && data) {
// // util.setUserinfo( console.log('noSignInUuid_sessionId',data?.sessionId);
// // wx.reLaunch({url: '/pages/accountItems/accountItems'})
// util.setSessionId(data?.sessionId)
// wx.reLaunch({ url: '/pages/loading/loading' })
// } else {
// util.removeStorage()
// removeSystemStorage()
// that.login(false)
// }
// })
// }, 500, true)
}
else
{
// 标志位 解决安卓查复弹框问题
if
(
wx
.
__HAS_NOTLOGIN_MODAL
)
return
false
...
...
components/SideSelectPopup/SideSelectPopup.js
View file @
cdd9fd1
...
...
@@ -285,7 +285,7 @@ Component({
loginTime
:
now
.
format
(
'yyyy-MM-dd hh:mm:ss'
),
merchantId
:
item
?.
merchantId
,
merchantName
:
item
?.
merchantName
})
}
,
'sidepop'
)
})
}
...
...
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
View file @
cdd9fd1
...
...
@@ -45,7 +45,7 @@ Page({
carSeriesName
:
""
,
salesType
:
"售前"
,
},
mode
:
1
,
mode
:
1
,
quotationGoodsList
:
[],
//权益商品列表
// owner: {
// owner: 'test2',
...
...
@@ -696,7 +696,7 @@ Page({
});
this
.
getQuotationInfo
(
true
);
// 不重新调用详情接口 避免修改车辆价格导致重新获取详情 把数据重置了
},
getQuotationInfo
(
getOrderInfo
,
timeNum
=
0
)
{
getQuotationInfo
(
getOrderInfo
,
timeNum
=
0
)
{
let
{
default4SStoreInfo
}
=
wx
.
$util
.
getUserInfo
();
let
{
owner
:
{
price
},
...
...
@@ -881,6 +881,7 @@ Page({
this
.
setData
({
isClue
,
});
this
.
orderSettingList
()
},
setCustomerInfo
(
customerInfo
)
{
let
{
owner
,
orderInfo
}
=
this
.
data
;
...
...
@@ -1033,7 +1034,7 @@ Page({
[
"owner.carSeriesName"
]:
res
.
vehicleSeriesName
,
});
});
this
.
orderSettingList
()
},
/**
* 生命周期函数--监听页面初次渲染完成
...
...
packageEquity/pages/employeeInspection/components/contentItem/contentItem.wxml
View file @
cdd9fd1
<view class="item">
<view class="title">
<view class="info">
<view class="name">{{item.employeeName}}</view>
<view class="name">{{item.employeeName
|| '-'
}}</view>
<view class="num">{{item.phoneNumber}}</view>
</view>
<view class="sub score">
...
...
@@ -17,14 +17,14 @@
<view class="value" wx:elif="{{i.addHtml=='abnormalProportionHtml'}}">
<text>{{item[i.key]?item[i.key]:item[i.key]==0?0:'-'}}%</text>
</view>
<view class="value"
wx:elif="{{i.addHtml=='service'}}">
<view class="value" wx:elif="{{i.addHtml=='service'}}">
<block wx-if="{{item[i.key].length>0}}">
<view class="s-name" wx:for="{{item[!isPack?i.key:i.tempKey]}}" wx:for-item="s">{{s}}</view>
<gl-image class="icon {{isPack?'pack':''}}" src="/equity/date-arrow.png"
bind:tap="packHandle"
/>
<gl-image class="icon {{isPack?'pack':''}}" src="/equity/date-arrow.png"
bind:tap="packHandle"
/>
</block>
<view wx:else>-</view>
</view>
<view class="value"
wx:elif="{{i.addHtml=='store'}}">
<view class="value" wx:elif="{{i.addHtml=='store'}}">
<block wx-if="{{item[i.key].length>0}}">
<view class="s-name" wx:for="{{item[i.key]}}" wx:for-item="s">{{s.merchantName}}</view>
</block>
...
...
pages/loading/loading.js
View file @
cdd9fd1
import
constantData
from
'../constant/data'
const
IMG_URL
=
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
const
app
=
getApp
()
import
api
from
'~/api/api'
Page
({
/**
* 页面的初始数据
...
...
@@ -12,41 +13,41 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{},
onLoad
(
options
)
{
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{},
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
this
.
init
()
this
.
init
Data
()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{},
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{},
onUnload
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{},
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{},
onReachBottom
()
{
},
init
()
{
init
Data
()
{
let
userInfo
=
wx
.
$util
.
getUserInfo
()
wx
.
nextTick
(()
=>
{
// 没有登录信息 退出登录
...
...
@@ -59,6 +60,13 @@ Page({
if
((
userInfo
?.
sceneType
??
''
)
===
''
)
return
wx
.
$router
.
reLaunch
(
'pages.sceneIndex'
)
// 登录了更新用户权限
app
.
gobalCheckYqdSuper
(
userInfo
)
let
now
=
new
Date
()
api
.
loginRecordSave
({
staffUuid
:
userInfo
.
uuid
,
loginTime
:
now
.
format
(
'yyyy-MM-dd hh:mm:ss'
),
merchantId
:
userInfo
?.
shopMerchantId
,
merchantName
:
userInfo
?.
shopMerchantName
,
},
'loading'
)
if
(
!
((
userInfo
?.
sceneType
??
''
)
===
''
))
return
wx
.
$router
.
reLaunch
(
constantData
?.
pageUrl
[
userInfo
?.
sceneType
],
{
resetStoreList
:
true
})
...
...
pages/merchantList/merchantList.js
View file @
cdd9fd1
...
...
@@ -155,7 +155,7 @@ Page({
loginTime
:
now
.
format
(
'yyyy-MM-dd hh:mm:ss'
),
merchantId
:
shopMerchantId
,
merchantName
:
shopMerchantName
})
}
,
'merchantlist'
)
wx
.
$router
.
reLaunch
(
constantData
?.
pageUrl
[
1
],
queryParams
)
}
else
{
...
...
pages/wxLogin/wxLogin.js
View file @
cdd9fd1
...
...
@@ -454,9 +454,9 @@ Page({
// let { uuid } = wx.$util. 找()
// debugger
let
now
=
new
Date
()
api
.
loginRecordSave
({
num
!=
0
&&
api
.
loginRecordSave
({
staffUuid
:
loginUserObj
.
uuid
,
loginTime
:
now
.
format
(
'yyyy-MM-dd hh:mm:ss'
),
merchantId
:
shopMerchantId
,
merchantId
:
shopMerchantId
,
merchantName
:
shopMerchantName
})
}
...
...
@@ -478,11 +478,12 @@ Page({
this
.
setData
({
jumpPageFlag
:
false
})
let
{
uuid
}
=
wx
.
$util
.
getUserInfo
()
let
now
=
new
Date
()
api
.
loginRecordSave
({
staffUuid
:
uuid
,
api
.
loginRecordSave
({
staffUuid
:
uuid
,
loginTime
:
now
.
format
(
'yyyy-MM-dd hh:mm:ss'
),
merchantId
,
merchantName
})
merchantId
,
merchantName
})
return
}
// 仅一家4s店
...
...
@@ -509,10 +510,12 @@ Page({
this
.
setData
({
jumpPageFlag
:
false
})
let
{
uuid
}
=
wx
.
$util
.
getUserInfo
()
let
now
=
new
Date
()
api
.
loginRecordSave
({
staffUuid
:
uuid
,
loginTime
:
now
.
format
(
'yyyy-MM-dd hh:mm:ss'
),
merchantId
,
merchantName
})
api
.
loginRecordSave
({
staffUuid
:
uuid
,
loginTime
:
now
.
format
(
'yyyy-MM-dd hh:mm:ss'
),
merchantId
,
merchantName
})
}
else
if
(
!
result
?.
length
)
{
this
.
setData
({
jumpPageFlag
:
false
})
return
wx
.
$util
.
showToast
(
'园区店关联的4s店商户账号无效,请联系总部管理员'
)
...
...
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