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";
......
...@@ -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;
}
&.sure {
background-image: linear-gradient(90deg, #4D53FF 0%, #389AFF 100%);
} }
} }
}
\ No newline at end of file \ No newline at end of file
...@@ -20,31 +20,49 @@ ...@@ -20,31 +20,49 @@
<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>
<view class="content">{{roleDesc}}</view> <view class="content">{{roleDesc}}</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<audio-tts wx:if="{{roleName}}" isDemo="{{isDemo}}" showSpeechPopup="{{showSpeechPopup}}" roleName="{{roleName}}" chatList="{{chatList}}" voice="{{voice}}" avatar="{{avatar}}" id="audioBox"></audio-tts></scroll-view> <audio-tts wx:if="{{roleName}}" isDemo="{{isDemo}}" showSpeechPopup="{{showSpeechPopup}}" roleName="{{roleName}}"
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,20 +117,22 @@ Page({ ...@@ -117,20 +117,22 @@ 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`,
}); });
...@@ -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 {
merchantId,
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({ wx.navigateTo({
url: `/packageEquity/pages/aiCheck/scene/scene?id=${id}` url: `/packageEquity/pages/aiCheck/scene/scene?id=${id}`
}) })
}
}, },
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -31,5 +31,3 @@ ...@@ -31,5 +31,3 @@
</block> </block>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
<tipsPop isVisible="{{isVisible}}" bindconfirm="confirm"></tipsPop>
\ 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,
}); });
...@@ -1267,8 +1278,7 @@ Page({ ...@@ -1267,8 +1278,7 @@ Page({
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({
......
...@@ -18,12 +18,13 @@ page ::-webkit-scrollbar { ...@@ -18,12 +18,13 @@ page ::-webkit-scrollbar {
top: 0; top: 0;
z-index: -1; z-index: -1;
} }
.layout { .layout {
box-sizing: border-box; box-sizing: border-box;
opacity: 0; opacity: 0;
position: relative; position: relative;
overflow: scroll; overflow: scroll;
margin:0 var(--fontSize20); margin: 0 var(--fontSize20);
.main { .main {
z-index: 2; z-index: 2;
...@@ -229,7 +230,7 @@ margin:0 var(--fontSize20); ...@@ -229,7 +230,7 @@ margin:0 var(--fontSize20);
font-size: var(--fontSize22); font-size: var(--fontSize22);
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items:center; align-items: center;
} }
.menu .item .bubble_icon { .menu .item .bubble_icon {
...@@ -259,9 +260,9 @@ margin:0 var(--fontSize20); ...@@ -259,9 +260,9 @@ margin:0 var(--fontSize20);
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
font-size: var(--fontSize28); font-size: var(--fontSize28);
color:#FFFFFF; color: #FFFFFF;
font-weight: 400; font-weight: 400;
margin:var(--fontSize12) 0 var(--fontSize16) var(--fontSize20); margin: var(--fontSize12) 0 var(--fontSize16) var(--fontSize20);
} }
.tips .tips-text { .tips .tips-text {
...@@ -852,11 +853,9 @@ margin:0 var(--fontSize20); ...@@ -852,11 +853,9 @@ margin:0 var(--fontSize20);
box-sizing: border-box; box-sizing: border-box;
word-break: break-all; word-break: break-all;
display: -webkit-box; display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
overflow: hidden;
} }
.table .table-body .th .labelName.oneLine { .table .table-body .th .labelName.oneLine {
...@@ -911,11 +910,13 @@ margin:0 var(--fontSize20); ...@@ -911,11 +910,13 @@ margin:0 var(--fontSize20);
white-space: nowrap; white-space: nowrap;
display: flex; display: flex;
} }
.table-box{
.table-box {
background: #FFFFFF; background: #FFFFFF;
border: var(--fontSize2) solid #F3F3F3; border: var(--fontSize2) solid #F3F3F3;
border-radius:var(--fontSize16); border-radius: var(--fontSize16);
} }
.table__head__td { .table__head__td {
width: var(--fontSize200); width: var(--fontSize200);
display: flex; display: flex;
...@@ -1008,207 +1009,251 @@ border-radius:var(--fontSize16); ...@@ -1008,207 +1009,251 @@ border-radius:var(--fontSize16);
border: 1px solid #F24724; border: 1px solid #F24724;
border-radius: var(--fontSize28); border-radius: var(--fontSize28);
} }
.swiper-wrap{
margin-bottom:var(--fontSize16);
swiper{ .swiper-wrap {
margin-bottom: var(--fontSize16);
swiper {
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0 24rpx 24rpx -12rpx #d3d9e680; box-shadow: 0 24rpx 24rpx -12rpx #d3d9e680;
border-radius: var(--fontSize20); border-radius: var(--fontSize20);
height:var(--fontSize392); height: var(--fontSize392);
margin-bottom:var(--fontSize16); margin-bottom: var(--fontSize16);
padding:var(--fontSize16); padding: var(--fontSize16);
box-sizing: border-box; box-sizing: border-box;
} }
.dots{
marin:auto; .dots {
display:flex; marin: auto;
align-item:center; display: flex;
justify-content:center; align-item: center;
.dot{ justify-content: center;
.dot {
width: var(--fontSize16); width: var(--fontSize16);
height: var(--fontSize8); height: var(--fontSize8);
background: #C9C9C9; background: #C9C9C9;
border-radius:var(--fontSize8); border-radius: var(--fontSize8);
margin-right:var(--fontSize8); margin-right: var(--fontSize8);
} }
.active{
width:var(--fontSize32); .active {
width: var(--fontSize32);
background: #2C66F7; background: #2C66F7;
} }
}
} }
.first {
margin-left: var(--fontSize56);
} }
.first{
margin-left:var(--fontSize56); .total-wrap {
} display: flex;
.total-wrap{
display:flex;
margin: var(--fontSize16) var(--fontSize56); margin: var(--fontSize16) var(--fontSize56);
.item{
flex:1; .item {
.title{ // flex: 1;
.title {
font-weight: 500; font-weight: 500;
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #292D33; color: #292D33;
margin-bottom:var(--fontSize8); margin-bottom: var(--fontSize8);
} }
.number{
.number {
font-weight: 700; font-weight: 700;
font-size: var(--fontSize48); font-size: var(--fontSize48);
color: #2C66F7; color: #2C66F7;
white-space:nowrap; white-space: nowrap;
font-family: numberNor; font-family: numberNor;
line-height:var(--fontSize56); line-height: var(--fontSize56);
} }
.unit{
.unit {
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #2C66F7; color: #2C66F7;
margin-right:var(--fontSize4); margin-right: var(--fontSize4);
} }
.units{
.units {
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #2C66F7; color: #2C66F7;
margin-left:var(--fontSize4); margin-left: var(--fontSize4);
}
}
.left {
width: 53%
} }
.right {
width: 47%;
} }
} }
.custom-statistic{
padding:var(--fontSize20) var(--fontSize56) var(--fontSize4); .custom-statistic {
padding: var(--fontSize20) var(--fontSize56) var(--fontSize4);
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
background: #F7F8FA; background: #F7F8FA;
border-radius:var(--fontSize16) var(--fontSize16); border-radius: var(--fontSize16) var(--fontSize16);
.customItem{ .customItem {
width:50%; width: 47%;
padding-bottom:var(--fontSize16); padding-bottom: var(--fontSize16);
.label{
.label {
font-weight: 400; font-weight: 400;
font-size:var(--fontSize24); font-size: var(--fontSize24);
color: #999EA8; color: #999EA8;
line-height:var(--fontSize36); line-height: var(--fontSize36);
} }
.number{
.number {
font-weight: 700; font-weight: 700;
font-size:var(--fontSize36); font-size: var(--fontSize36);
white-space: nowrap; white-space: nowrap;
display:flex; display: flex;
font-family: numberNor; font-family: numberNor;
align-items:flex-end; align-items: flex-end;
margin:var(--fontSize4); margin: var(--fontSize4);
.unit{
font-size:var(--fontSize24); .unit {
margin-right:var(--fontSize4);
height:var(--fontSize28);
}
text{
font-size: var(--fontSize24); font-size: var(--fontSize24);
height:var(--fontSize48); margin-right: var(--fontSize4);
height: var(--fontSize28);
} }
.firstValue{
margin-right:var(--fontSize4); text {
font-size: var(--fontSize24);
height: var(--fontSize48);
} }
.lastValue{
height:var(--fontSize28); .firstValue {
margin-right: var(--fontSize4);
}
.lastValue {
height: var(--fontSize28);
font-size: var(--fontSize24); font-size: var(--fontSize24);
} }
} }
} }
.customItem:nth-child(2n-1) {
width: 53%;
} }
}
.menu{ .menu {
background: #FFFFFF; background: #FFFFFF;
border-radius:var(--fontSize16); border-radius: var(--fontSize16);
padding:var(--fontSize16) var(--fontSize38) 0; padding: var(--fontSize16) var(--fontSize38) 0;
margin-bottom:var(--fontSize16); margin-bottom: var(--fontSize16);
} }
.todo-list{
.todo-list {
background: #FFFFFF; background: #FFFFFF;
border-radius:var(--fontSize16); border-radius: var(--fontSize16);
margin-bottom:var(--fontSize16); margin-bottom: var(--fontSize16);
padding:var(--fontSize32 ) var(--fontSize32 )var(--fontSize48) var(--fontSize32); padding: var(--fontSize32) var(--fontSize32)var(--fontSize48) var(--fontSize32);
.title{
.title {
font-weight: 400; font-weight: 400;
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #999EA8; color: #999EA8;
margin-bottom:var(--fontSize8); margin-bottom: var(--fontSize8);
} }
.todo-items{
overflow:hidden; .todo-items {
display:flex; overflow: hidden;
flex-wrap:wrap; display: flex;
.todo-item{ flex-wrap: wrap;
.todo-item {
position: relative; position: relative;
padding:var(--fontSize24) 0; padding: var(--fontSize24) 0;
box-sizing: border-box; box-sizing: border-box;
width:100%; width: 100%;
.todo-item-title{
display:flex; .todo-item-title {
align-items:center; display: flex;
margin-bottom:var(--fontSize4); align-items: center;
margin-bottom: var(--fontSize4);
font-weight: 400; font-weight: 400;
font-size:var(--fontSize28); font-size: var(--fontSize28);
color: #1A1A1A; color: #1A1A1A;
image{
image {
width: var(--fontSize32); width: var(--fontSize32);
height: var(--fontSize32); height: var(--fontSize32);
margin-right:var(--fontSize11) margin-right: var(--fontSize11)
} }
} }
.todo-item-info{
.todo-item-info {
font-size: var(--fontSize24); font-size: var(--fontSize24);
color: #999EA8; color: #999EA8;
max-width: var(--fontSize500); max-width: var(--fontSize500);
margin-left:var(--fontSize43); margin-left: var(--fontSize43);
} }
.todo-item-btn{
padding:var(--fontSize10) var(--fontSize16); .todo-item-btn {
padding: var(--fontSize10) var(--fontSize16);
background: #F7F8FA; background: #F7F8FA;
border-radius:var(--fontSize28); border-radius: var(--fontSize28);
font-weight: 400; font-weight: 400;
font-size: var(--fontSize26); font-size: var(--fontSize26);
color: #2C66F7; color: #2C66F7;
box-sizing: border-box; box-sizing: border-box;
position: absolute; position: absolute;
right:0; right: 0;
top: var(--fontSize36); top: var(--fontSize36);
} }
} }
} }
.pack-up{
width:var(--fontSize32); .pack-up {
width: var(--fontSize32);
height: var(--fontSize32); height: var(--fontSize32);
position: absolute; position: absolute;
left:50%; left: 50%;
transform:translateX(-50%); transform: translateX(-50%);
image{
width:100%; image {
} width: 100%;
} }
.pack-up-active{
transform:rotate(180deg);
margin-left:-var(--fontSize32);
} }
.pack-up-active {
transform: rotate(180deg);
margin-left: -var(--fontSize32);
} }
}
@media screen and (min-width: 768px) and (orientation: landscape) {
@media screen and (min-width: 768px) and (orientation: landscape) {
/* 横屏模式下的平板设备样式 */ /* 横屏模式下的平板设备样式 */
swiper{ swiper {
height:var(--fontSize292)!important; height: var(--fontSize292) !important;
.customItem{
width:25%!important; .customItem {
width: 25% !important;
} }
} }
.todo-items{
.todo-items {
justify-content: space-between; justify-content: space-between;
} }
.todo-item{
width:49%!important; .todo-item {
width: 49% !important;
} }
.menu { .menu {
grid-template-columns: repeat(7, var(--fontSize100))!important; grid-template-columns: repeat(7, var(--fontSize100)) !important;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -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!