Commit 610cd2b4 by 张立顺

Merge branch 'SAAS+V4.43-0807' of http://192.168.3.233:8090/saas_plus/dj-car-bou…

…tique-work-wechat into SAAS+V4.43-0807
2 parents 5f87901b d9614640
...@@ -6,6 +6,12 @@ module.exports = { ...@@ -6,6 +6,12 @@ module.exports = {
data.productCode = "PC00c2"; data.productCode = "PC00c2";
return api.post("dj.api.smartcarlife.jscode.login", data); return api.post("dj.api.smartcarlife.jscode.login", data);
}, },
/**微信登录 */
ssoLogin(data) {
return api.post("scrm.api.sso.weapp.jscode.login", data, [],
"/rop-scrm-sso/router",
"scrm",false);
},
/**微信手机号登录 */ /**微信手机号登录 */
authPhone(data) { authPhone(data) {
data.productCode = "PC00c2"; data.productCode = "PC00c2";
...@@ -294,4 +300,4 @@ module.exports = { ...@@ -294,4 +300,4 @@ module.exports = {
getCurShopList(data) { getCurShopList(data) {
return api.post("dj.api.smartcarlife.serviceMerchant.curShopList", data) return api.post("dj.api.smartcarlife.serviceMerchant.curShopList", data)
} }
}; };
\ No newline at end of file \ No newline at end of file
...@@ -70,17 +70,17 @@ Page({ ...@@ -70,17 +70,17 @@ Page({
}, },
// 结束,查看报告 // 结束,查看报告
toResult() { toResult() {
const history_message = this.getHistoryAll();
const audioBox = this.selectComponent("#audioBox"); const audioBox = this.selectComponent("#audioBox");
const list = audioBox.data.list; const list = audioBox.data.list;
if (list.length == 0) { if (list.length == 0) {
return this.back(); return this.back();
} }
let isJump = true,Sentences = []; let isJump = true,
Sentences = [];
list.forEach((i) => { list.forEach((i) => {
if (i.role == 2) { if (i.role == 2) {
isJump = false; isJump = false;
Sentences = [...Sentences, ...i.Sentences?i.Sentences:[]] Sentences = [...Sentences, ...i.Sentences ? i.Sentences : []]
} }
}); });
if (isJump) { if (isJump) {
...@@ -90,10 +90,22 @@ Page({ ...@@ -90,10 +90,22 @@ Page({
wx.$util.showToast("AI还未回复"); wx.$util.showToast("AI还未回复");
return; return;
} }
if(Sentences.length == 0) { if (Sentences.length == 0) {
wx.$util.showToast("对话内容太短"); wx.$util.showToast("对话内容太短");
return; return;
} }
this.setData({
isVisible: true
})
},
handleCancel() {
this.setData({
isVisible: false
})
},
handleSure() {
const history_message = this.getHistoryAll();
const audioBox = this.selectComponent("#audioBox");
const chatList = JSON.stringify(audioBox.data.list); const chatList = JSON.stringify(audioBox.data.list);
wx.setStorageSync("chatList", chatList); wx.setStorageSync("chatList", chatList);
const { const {
...@@ -150,7 +162,7 @@ Page({ ...@@ -150,7 +162,7 @@ Page({
content: "", content: "",
openAudio: false openAudio: false
}; };
audioBox.addList(addVal,1); audioBox.addList(addVal, 1);
const index = Math.floor(Math.random() * 3); const index = Math.floor(Math.random() * 3);
const message = scriptList[index].content; const message = scriptList[index].content;
const Phrases = await aiApi.getPhrases({ const Phrases = await aiApi.getPhrases({
...@@ -377,7 +389,7 @@ Page({ ...@@ -377,7 +389,7 @@ Page({
}); });
}, },
//提供相应的建议 //提供相应的建议
getSparring(user_message,retryCount = 0) { getSparring(user_message, retryCount = 0) {
const { const {
step, step,
reject_reason, reject_reason,
...@@ -396,7 +408,7 @@ Page({ ...@@ -396,7 +408,7 @@ Page({
content: "" content: ""
}; };
const audioBox = this.selectComponent("#audioBox"); const audioBox = this.selectComponent("#audioBox");
if(retryCount == 0) { if (retryCount == 0) {
audioBox.addList(addVal); audioBox.addList(addVal);
} }
const { const {
...@@ -425,7 +437,7 @@ Page({ ...@@ -425,7 +437,7 @@ Page({
} = res; } = res;
console.log('batch_id', batch_id, 'uuid', uuid) console.log('batch_id', batch_id, 'uuid', uuid)
audioBox.setList({ audioBox.setList({
content: sale_message.replace(/,/g,','), content: sale_message.replace(/,/g, ','),
times: Math.ceil(sale_message.length / 4), times: Math.ceil(sale_message.length / 4),
spkTime: new Date().format("yyyy-MM-dd hh:mm:ss"), spkTime: new Date().format("yyyy-MM-dd hh:mm:ss"),
}, },
...@@ -446,7 +458,7 @@ Page({ ...@@ -446,7 +458,7 @@ Page({
defense_step, defense_step,
step: next_step, step: next_step,
}); });
}).catch(e=>{ }).catch(e => {
if (retryCount < 1) { // 如果重试次数小于1,则重试一次 if (retryCount < 1) { // 如果重试次数小于1,则重试一次
this.getSparring(user_message, retryCount + 1); this.getSparring(user_message, retryCount + 1);
} }
...@@ -550,12 +562,16 @@ Page({ ...@@ -550,12 +562,16 @@ Page({
}; };
if (name) { if (name) {
params = { params = {
roleName: name.replace('客户',''), roleName: name.replace('客户', ''),
}; };
this.setData({entry:'other'}) this.setData({
entry: 'other'
})
} }
if(entry == 'other') { if (entry == 'other') {
this.setData({entry:'other'}) this.setData({
entry: 'other'
})
} }
const roleInfo = await carLifeApi.sparringRole({ const roleInfo = await carLifeApi.sparringRole({
currentPage: 1, currentPage: 1,
...@@ -601,12 +617,6 @@ Page({ ...@@ -601,12 +617,6 @@ Page({
this.setData({ this.setData({
sparringTaskId: res.data.sparringTaskId sparringTaskId: res.data.sparringTaskId
}); });
if (!res.data.sparringAllow) {
this.setData({
isVisible: true
});
return;
}
}, },
//获取攻防话术 //获取攻防话术
getScriptList(attackScript) { getScriptList(attackScript) {
......
...@@ -261,6 +261,7 @@ page { ...@@ -261,6 +261,7 @@ page {
} }
} }
} }
.wrapper-pop { .wrapper-pop {
position: fixed; position: fixed;
top: 0; top: 0;
...@@ -269,6 +270,7 @@ page { ...@@ -269,6 +270,7 @@ page {
bottom: 0; bottom: 0;
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5);
} }
.icon-tips { .icon-tips {
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
...@@ -277,6 +279,7 @@ page { ...@@ -277,6 +279,7 @@ page {
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
} }
.wrapper-content { .wrapper-content {
position: absolute; position: absolute;
left: 50%; left: 50%;
...@@ -288,21 +291,29 @@ page { ...@@ -288,21 +291,29 @@ page {
box-shadow: 0 -8rpx 12rpx 0 rgba(0, 0, 0, 0.05); box-shadow: 0 -8rpx 12rpx 0 rgba(0, 0, 0, 0.05);
border-radius: 32rpx; border-radius: 32rpx;
text-align: center; text-align: center;
.title { .title {
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 32rpx;
color: #292D33; color: #292D33;
margin-top: 112rpx; margin-top: 112rpx;
} }
.content { .content {
font-size: 28rpx; font-size: 28rpx;
color: #5A5E66; color: #5A5E66;
margin-top: 20rpx; margin-top: 20rpx;
padding: 0 70rpx; padding: 0 70rpx;
} }
.btn {
.footer {
display: flex;
margin: 48rpx auto; margin: 48rpx auto;
width: 333rpx; justify-content: center;
}
.btn {
width: 244rpx;
height: 80rpx; height: 80rpx;
background-image: linear-gradient(90deg, #4D53FF 0%, #389AFF 100%); background-image: linear-gradient(90deg, #4D53FF 0%, #389AFF 100%);
border-radius: 486rpx; border-radius: 486rpx;
...@@ -310,5 +321,13 @@ page { ...@@ -310,5 +321,13 @@ page {
font-weight: 500; font-weight: 500;
font-size: 28rpx; font-size: 28rpx;
line-height: 80rpx; line-height: 80rpx;
margin-right: 20rpx;
&.cancel {
background: #F2F3F5;
color: #292D33;
} }
}
\ No newline at end of file \ No newline at end of file
&.sure {
background-image: linear-gradient(90deg, #4D53FF 0%, #389AFF 100%);
}
}
}
\ No newline at end of file \ No newline at end of file
...@@ -13,38 +13,56 @@ ...@@ -13,38 +13,56 @@
<view class="chat-section"> <view class="chat-section">
<view class="chat-list"> <view class="chat-list">
<scroll-view scroll-y="true" scroll-x="false" style="height:100%" scroll-top="{{scrollTop}}"> <scroll-view scroll-y="true" scroll-x="false" style="height:100%" scroll-top="{{scrollTop}}">
<view class="chat-item"> <view class="chat-item">
<view class="chat-left"> <view class="chat-left">
<image class="avatar-icon" src="{{avatar}}"></image> <image class="avatar-icon" src="{{avatar}}"></image>
<view class="chat-box"> <view class="chat-box">
<view class="content-box">你已选择:<text class="font-b">{{roleName}}、{{stage}}环节</text></view> <view class="content-box">你已选择:<text class="font-b">{{roleName}}、{{stage}}环节</text></view>
<view class="operation"> <view class="operation">
<view class="operation-top"> <gl-image class="suggest-icon" src="/aiCheck/suggest-icon.png"></gl-image> <view class="operation-top">
对练建议</view> <gl-image class="suggest-icon" src="/aiCheck/suggest-icon.png"></gl-image>
<view class="content">{{roleDesc}}</view> 对练建议
</view> </view>
<view class="content">{{roleDesc}}</view>
</view>
</view>
</view> </view>
</view> </view>
</view> <audio-tts wx:if="{{roleName}}" isDemo="{{isDemo}}" showSpeechPopup="{{showSpeechPopup}}" roleName="{{roleName}}"
<audio-tts wx:if="{{roleName}}" isDemo="{{isDemo}}" showSpeechPopup="{{showSpeechPopup}}" roleName="{{roleName}}" chatList="{{chatList}}" voice="{{voice}}" avatar="{{avatar}}" id="audioBox"></audio-tts></scroll-view> chatList="{{chatList}}" voice="{{voice}}" avatar="{{avatar}}" id="audioBox"></audio-tts>
</scroll-view>
</view> </view>
<view class="control-box" style="{{controlBoxStyle}}"> <view class="control-box" style="{{controlBoxStyle}}">
<view class="inspiration-btn {{popType == 'inspiration' ? 'active' : ''}}" bindtap="openPopup" data-type="inspiration"><gl-image class="icon" src="/aiCheck/{{popType == 'inspiration' ? 'inspiration-icon-white' : 'inspiration-icon'}}.png"></gl-image></view> <view class="inspiration-btn {{popType == 'inspiration' ? 'active' : ''}}" bindtap="openPopup"
<view class="inspiration-btn {{popType == 'script' ? 'active' : ''}}" bindtap="handleScript" data-type="script"><gl-image class="icon" src="/aiCheck/{{popType == 'script' ? 'script-icon-white' : 'script-icon'}}.png"></gl-image></view> data-type="inspiration">
<view class="speak-btn" bindtap="handleSpeak"><gl-image class="icon" src="/aiCheck/speech-icon.png"></gl-image>点击说话</view> <gl-image class="icon"
src="/aiCheck/{{popType == 'inspiration' ? 'inspiration-icon-white' : 'inspiration-icon'}}.png"></gl-image>
</view>
<view class="inspiration-btn {{popType == 'script' ? 'active' : ''}}" bindtap="handleScript" data-type="script">
<gl-image class="icon" src="/aiCheck/{{popType == 'script' ? 'script-icon-white' : 'script-icon'}}.png">
</gl-image>
</view>
<view class="speak-btn" bindtap="handleSpeak">
<gl-image class="icon" src="/aiCheck/speech-icon.png"></gl-image>点击说话
</view>
</view> </view>
</view> </view>
<!-- 弹窗组件 --> <!-- 弹窗组件 -->
<scene-popup avatar="{{avatar}}" bind:handleMask="handleMask" popType="{{popType}}" show="{{showScenePopup}}" inspirationContent="{{inspirationContent}}" scriptList="{{scriptList}}" bindcancel="cancel" bind:handleScript="handleScript" bindscene="handleScene"></scene-popup> <scene-popup avatar="{{avatar}}" bind:handleMask="handleMask" popType="{{popType}}" show="{{showScenePopup}}"
<speech-popup bindsend="send" show="{{showSpeechPopup}}" inspirationContent="{{inspirationContent}}" bindclose="closeSpeechPopup"></speech-popup> inspirationContent="{{inspirationContent}}" scriptList="{{scriptList}}" bindcancel="cancel"
bind:handleScript="handleScript" bindscene="handleScene"></scene-popup>
<speech-popup bindsend="send" show="{{showSpeechPopup}}" inspirationContent="{{inspirationContent}}"
bindclose="closeSpeechPopup"></speech-popup>
<view class="wrapper-pop" wx:if="{{isVisible}}"> <view class="wrapper-pop" wx:if="{{isVisible}}">
<view class="wrapper-content"> <view class="wrapper-content">
<gl-image class="icon-tips" webp src="/aiCheck/icon-tips.webp"></gl-image> <gl-image class="icon-tips" webp src="/aiCheck/icon-tips.webp"></gl-image>
<view class="title">温馨提示</view> <view class="title">温馨提示</view>
<view class="content">您的对练试用次数已用完,请等待管理员为您分配对练任务</view> <view class="content">点击确定按钮,您将结束此次对练并订阅生成报告提醒</view>
<view class="btn" bind:tap="back">我知道了</view> <view class="footer">
<view class="btn cancel" bind:tap="handleCancel">取消</view>
<view class="btn sure" bind:tap="handleSure">确定</view>
</view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -117,25 +117,27 @@ Page({ ...@@ -117,25 +117,27 @@ Page({
wx.navigateTo({ wx.navigateTo({
url: `/packageEquity/pages/aiCheck/scene/scene`, url: `/packageEquity/pages/aiCheck/scene/scene`,
}); });
} else if(entry == 'other'){ } else if (entry == 'other') {
wx.navigateTo({ wx.navigateTo({
url: `/packageEquity/pages/aiCheck/scene/scene`, url: `/packageEquity/pages/aiCheck/scene/scene`,
}); });
}else { } else {
wx.$router.back(); wx.$router.back();
} }
}, },
backHome() { backHome() {
const pages = getCurrentPages(); const pages = getCurrentPages();
const prevPage = pages[pages.length - 2]; const prevPage = pages[pages.length - 2];
const {entry} = this.data const {
console.log(entry,'entry') entry
if(entry == 'other'){ } = this.data
console.log(entry, 'entry')
if (entry == 'other') {
wx.navigateTo({ wx.navigateTo({
url: `/packageEquity/pages/aiCheck/start/start`, url: `/packageEquity/pages/aiCheck/start/start`,
}); });
return return
} }
if (prevPage.route == "packageEquity/pages/aiCheck/start/start") { if (prevPage.route == "packageEquity/pages/aiCheck/start/start") {
wx.navigateBack({ wx.navigateBack({
delta: 1, delta: 1,
...@@ -176,11 +178,24 @@ Page({ ...@@ -176,11 +178,24 @@ Page({
}) })
.exec(); .exec();
}, },
setRemind() {
wx.requestSubscribeMessage({
tmplIds: ['ctivVQAIoDzv1OKlcI9cXiJpyKZBUP1XamO8sBP8ij0'],
success(res) {
wx.showToast({
title: '订阅成功',
icon: 'none'
})
wx.p.router.back()
}
})
},
/** /**
* 生命周期函数--监听页面加载+ * 生命周期函数--监听页面加载+
* *
*/ */
async onLoad(options) { async onLoad(options) {
this.setRemind()
const { const {
history_message, history_message,
duration, duration,
...@@ -212,13 +227,15 @@ Page({ ...@@ -212,13 +227,15 @@ Page({
id id
}) })
} else { } else {
const sensitiveRes = await aiApi.getSensitive({history_message}) const sensitiveRes = await aiApi.getSensitive({
history_message
})
const is_sensitive = sensitiveRes.is_sensitive const is_sensitive = sensitiveRes.is_sensitive
const chatList = JSON.parse(wx.getStorageSync("chatList")); const chatList = JSON.parse(wx.getStorageSync("chatList"));
this.setData({ this.setData({
chatList chatList
}) })
this.handleSave(chatList, duration,is_sensitive) this.handleSave(chatList, duration, is_sensitive)
} }
console.log(windowW); console.log(windowW);
}, },
...@@ -319,7 +336,7 @@ Page({ ...@@ -319,7 +336,7 @@ Page({
let axisX = []; let axisX = [];
let axisY_SpeechRate = []; let axisY_SpeechRate = [];
let axisY_EmotionValue = []; let axisY_EmotionValue = [];
if(Sentences.length == 0) { if (Sentences.length == 0) {
return return
} }
if (Sentences.length > 2) { if (Sentences.length > 2) {
...@@ -366,7 +383,7 @@ Page({ ...@@ -366,7 +383,7 @@ Page({
} }
const axisY_Intonation = axisY_EmotionValue.map((currentValue, index) => { const axisY_Intonation = axisY_EmotionValue.map((currentValue, index) => {
if (index < axisY_EmotionValue.length - 1) { if (index < axisY_EmotionValue.length - 1) {
const mul = Math.ceil( axisY_EmotionValue[index + 1] - currentValue) + 1 const mul = Math.ceil(axisY_EmotionValue[index + 1] - currentValue) + 1
return mul > 0 ? mul : 0 return mul > 0 ? mul : 0
} else { } else {
return 1 return 1
...@@ -417,7 +434,7 @@ Page({ ...@@ -417,7 +434,7 @@ Page({
content content
} }
}, },
handleSave(list, sparringDuration,triggerSensitive) { handleSave(list, sparringDuration, triggerSensitive) {
console.log(list) console.log(list)
let totalTime = 0; let totalTime = 0;
let Sentences = []; let Sentences = [];
...@@ -434,7 +451,7 @@ Page({ ...@@ -434,7 +451,7 @@ Page({
redundantWords, redundantWords,
definition, definition,
intonation intonation
} = this.getSentencesDetail(Sentences, totalTime, content) ||{} } = this.getSentencesDetail(Sentences, totalTime, content) || {}
const { const {
sparringTaskId, sparringTaskId,
roleType, roleType,
...@@ -522,15 +539,15 @@ Page({ ...@@ -522,15 +539,15 @@ Page({
extra: { extra: {
radar: { radar: {
max: 6, max: 6,
gridColor:'#F3F5FA', gridColor: '#F3F5FA',
bgColor:'#ffffff', bgColor: '#ffffff',
maxAlpha: 0.3 maxAlpha: 0.3
}, },
}, },
}, { }, {
dataPointShape: ["circle"], dataPointShape: ["circle"],
drawLine: true, drawLine: true,
radarGridCount:6 radarGridCount: 6
}); });
setTimeout(() => { setTimeout(() => {
console.log(this.a) console.log(this.a)
...@@ -556,7 +573,7 @@ Page({ ...@@ -556,7 +573,7 @@ Page({
id, id,
entry entry
} = this.data } = this.data
if(score == null) return if (score == null) return
wx.$router.go("/packageEquity/pages/aiCheck/detail/detail", { wx.$router.go("/packageEquity/pages/aiCheck/detail/detail", {
reportItem, reportItem,
avatar, avatar,
......
...@@ -79,22 +79,10 @@ Component({ ...@@ -79,22 +79,10 @@ Component({
}) })
} }
},1000), },1000),
async setSparringVerify(id) { setSparringVerify(id) {
const { wx.navigateTo({
merchantId, url: `/packageEquity/pages/aiCheck/scene/scene?id=${id}`
uuid
} = wx.$util.getUserInfo()
const res = await aiApi.setSparringVerify({
staffUuid: uuid,
yqMerchantId: merchantId
}) })
this.setData({isVisible: !res.data.sparringAllow})
if (res.data.sparringAllow) {
wx.navigateTo({
url: `/packageEquity/pages/aiCheck/scene/scene?id=${id}`
})
}
}, },
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -30,6 +30,4 @@ ...@@ -30,6 +30,4 @@
</view> </view>
</block> </block>
</view> </view>
</view>
<tipsPop isVisible="{{isVisible}}" bindconfirm="confirm"></tipsPop>
\ No newline at end of file \ No newline at end of file
</view>
\ No newline at end of file \ No newline at end of file
...@@ -53,6 +53,11 @@ Page({ ...@@ -53,6 +53,11 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
wx.getUserProfile({
desc: '获取用户信息',
}).then(res=>{
console.log(res)
})
// wx.getRecorderManager().start({ // wx.getRecorderManager().start({
// duration: 600000, // duration: 600000,
// numberOfChannels: 1, // numberOfChannels: 1,
......
...@@ -386,7 +386,7 @@ Component({ ...@@ -386,7 +386,7 @@ Component({
carModels: searchForm?.carModels, carModels: searchForm?.carModels,
orderResult: searchForm?.orderResult, orderResult: searchForm?.orderResult,
merchantNo: !searchForm?.merchantNo?.length ? (userInfo?.isSuper ? storeRangeList.map(v => { if (v.merchantNo) return v.merchantNo }) : userInfo?.loginRole == 3 ? '' : [userInfo?.default4SStoreInfo?.merchantId]) : searchForm?.merchantNo, merchantNo: !searchForm?.merchantNo?.length ? (userInfo?.isSuper ? storeRangeList.map(v => { if (v.merchantNo) return v.merchantNo }) : userInfo?.loginRole == 3 ? '' : [userInfo?.default4SStoreInfo?.merchantId]) : searchForm?.merchantNo,
staffUuids: userInfo.isSuper ? searchForm?.staffUuids : [userInfo.uuid] staffUuids: userInfo.isSuper || userInfo?.loginRole == 3 ? searchForm?.staffUuids : [userInfo.uuid]
} }
return obj return obj
}, },
...@@ -398,7 +398,7 @@ Component({ ...@@ -398,7 +398,7 @@ Component({
onLoad() { onLoad() {
const isStaff = app.globalData.isStaff; const isStaff = app.globalData.isStaff;
let userInfo = wx.$util.getUserInfo() || {}; let userInfo = wx.$util.getUserInfo() || {};
if (userInfo.isSuper) this.setData({ showEmployeeName: true, isShowDefeatBtn: false }) if (userInfo?.isSuper || userInfo?.loginRole == 3) this.setData({ showEmployeeName: true, isShowDefeatBtn: false })
this.setData({ this.setData({
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {}, storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {},
userInfo, userInfo,
...@@ -500,7 +500,7 @@ Component({ ...@@ -500,7 +500,7 @@ Component({
}, },
getStoreList() { getStoreList() {
return new Promise(resolve => { return new Promise(resolve => {
if (wx.$receptionLoaded) return // if (wx.$receptionLoaded) return
let userInfo = wx.$util.getUserInfo() || {} let userInfo = wx.$util.getUserInfo() || {}
let { menuList } = this.data let { menuList } = this.data
carLifeApi.selectrecmerchantList({}).then(res => { carLifeApi.selectrecmerchantList({}).then(res => {
......
...@@ -25,7 +25,7 @@ Page({ ...@@ -25,7 +25,7 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
let userInfo = wx.$util.getUserInfo() || {} let userInfo = wx.$util.getUserInfo() || {}
if (userInfo.isSuper) this.setData({showEmployeeName: true, isShowDefeatBtn: false}) if (userInfo?.isSuper || userInfo?.loginRole == 3) this.setData({showEmployeeName: true, isShowDefeatBtn: false})
// 超管获取所有质检门店/员工 // 超管获取所有质检门店/员工
this.setData({ this.setData({
nothing: false nothing: false
...@@ -71,7 +71,7 @@ Page({ ...@@ -71,7 +71,7 @@ Page({
carModels: searchForm?.carModels, carModels: searchForm?.carModels,
orderResult: searchForm?.orderResult, orderResult: searchForm?.orderResult,
merchantNo: !searchForm?.merchantNo?.length ? (userInfo?.isSuper ? storeRangeList.map(v => {if (v.merchantNo) return v.merchantNo}) : userInfo?.loginRole == 3 ? '' : [userInfo?.default4SStoreInfo?.merchantId]) : searchForm?.merchantNo, merchantNo: !searchForm?.merchantNo?.length ? (userInfo?.isSuper ? storeRangeList.map(v => {if (v.merchantNo) return v.merchantNo}) : userInfo?.loginRole == 3 ? '' : [userInfo?.default4SStoreInfo?.merchantId]) : searchForm?.merchantNo,
staffUuids: userInfo.isSuper ? searchForm?.staffUuids : [userInfo.uuid] staffUuids: userInfo.isSuper || userInfo?.loginRole == 3 ? searchForm?.staffUuids : [userInfo.uuid]
} }
return obj return obj
}, },
......
...@@ -790,6 +790,17 @@ Page({ ...@@ -790,6 +790,17 @@ Page({
data data
} = result; } = result;
if (code == 0) { if (code == 0) {
this.data.changeBtnData.forEach(changeData => {
if (data[changeData.valueObj].totalOrderMoney > 10000000) {
data[changeData.valueObj].totalOrderMoney = parseInt(data[changeData.valueObj].totalOrderMoney)
}
if (data[changeData.valueFn].totalOrderMoney > 10000000) {
data[changeData.valueFn].totalOrderMoney = parseInt(data[changeData.valueFn].totalOrderMoney)
}
})
this.setData({ this.setData({
userStat: data, userStat: data,
}); });
...@@ -1263,12 +1274,11 @@ Page({ ...@@ -1263,12 +1274,11 @@ Page({
// 不是员工类型 // 不是员工类型
if (isNoStaff) { if (isNoStaff) {
menu = [{ menu = [{
name: "预约管理", name: "预约管理",
url: "pages.tabDateIndex", url: "pages.tabDateIndex",
recordId: 8, recordId: 8,
icon: "booking_management", icon: "booking_management",
}, }, ];
];
// 判断是超管再加 这个菜单 // 判断是超管再加 这个菜单
// if (userInfo.isSuper) { // if (userInfo.isSuper) {
// menu.push({ // menu.push({
...@@ -1280,8 +1290,8 @@ Page({ ...@@ -1280,8 +1290,8 @@ Page({
// } // }
} }
//超管、督导驻店日报、BI报表、生意助手 //超管、督导驻店日报、BI报表、生意助手
if(userInfo.loginRole === 3 || userInfo.isSuper){ if (userInfo.loginRole === 3 || userInfo.isSuper) {
menu=[] menu = []
} }
if ((userInfo.isSuper || userInfo.loginRole === 3) && menu.every((item) => item.name != "BI报表")) { if ((userInfo.isSuper || userInfo.loginRole === 3) && menu.every((item) => item.name != "BI报表")) {
menu.push({ menu.push({
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<swiper-item> <swiper-item>
<view class="swiper-item"> <view class="swiper-item">
<view class="total-wrap"> <view class="total-wrap">
<view class="item"> <view class="item left">
<view class="title">{{changeSelectIndex==0?'今日':changeSelectIndex==1?'本月':'累计'}}产值</view> <view class="title">{{changeSelectIndex==0?'今日':changeSelectIndex==1?'本月':'累计'}}产值</view>
<veiw class="number" wx:if="{{userInfo.userType == 2 && !userInfo.isSuper}}"> <veiw class="number" wx:if="{{userInfo.userType == 2 && !userInfo.isSuper}}">
<text class="unit">¥</text> <text class="unit">¥</text>
......
...@@ -110,6 +110,12 @@ const getSessionId = () => { ...@@ -110,6 +110,12 @@ const getSessionId = () => {
const setSessionId = sessionId => { const setSessionId = sessionId => {
wx.setStorageSync('dj_boutique_sessionId', sessionId) wx.setStorageSync('dj_boutique_sessionId', sessionId)
} }
const setOpenId = openId => {
wx.setStorageSync('dj_boutique_openId', openId)
}
const getOpenId = () => {
wx.getStorageSync('dj_boutique_openId', openId)
}
const removeStorage = () => { const removeStorage = () => {
wx.removeStorageSync('noSignInUuid') wx.removeStorageSync('noSignInUuid')
wx.removeStorageSync('dj_boutique_user_info') wx.removeStorageSync('dj_boutique_user_info')
...@@ -292,6 +298,8 @@ const util = { ...@@ -292,6 +298,8 @@ const util = {
getUserInfo, getUserInfo,
setUserInfo, setUserInfo,
getSessionId, getSessionId,
setOpenId,
getOpenId,
setSessionId, setSessionId,
removeSellerInfo, removeSellerInfo,
removeStorage, removeStorage,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!