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