Commit f01f640d by 张立顺

合并线上代码

2 parents 6d47207d 1c3c4812
...@@ -82,10 +82,10 @@ module.exports = { ...@@ -82,10 +82,10 @@ module.exports = {
return api.post('dj.api.smartcarlife.config.list', data) return api.post('dj.api.smartcarlife.config.list', data)
}, },
// /** 获取指定商户指定日期范围的邀约统计 */ /** 获取指定商户指定日期范围的邀约统计 */
// getInviteDateList(data) { getInviteDateList(data) {
// return api.post('dj.api.smartcarlife.inviteStat.merchant.list', data) return api.post('dj.api.smartcarlife.inviteStat.merchant.list', data)
// }, },
/** 获取WebSocket地址 */ /** 获取WebSocket地址 */
getWsUrl() { getWsUrl() {
return api.post('dj.api.smartcarlife.getWsUrl') return api.post('dj.api.smartcarlife.getWsUrl')
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff", "navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "精品升级", "navigationBarTitleText": "生意助手员工版",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
}, },
"tabBar": { "tabBar": {
......
...@@ -66,13 +66,15 @@ Component({ ...@@ -66,13 +66,15 @@ Component({
}, },
triggered: false, triggered: false,
scrollTop: 0, scrollTop: 0,
isShowTips: true isShowTips: true,
userInfo: {}
}, },
lifetimes: { lifetimes: {
attached() { attached() {
this.setData({ this.setData({
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {} storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {},
userInfo: wx.$util.getUserInfo() || {}
}) })
this.onLoad(true) this.onLoad(true)
} }
......
...@@ -66,8 +66,11 @@ ...@@ -66,8 +66,11 @@
<!-- footer --> <!-- footer -->
<view class="item-footer"> <view class="item-footer">
<view>{{item.createdDate}}</view> <view>{{item.createdDate}}</view>
<!-- 超管isSuper/商户类型 userType 1账号不可操作 -->
<block wx:if="{{!userInfo.isSuper && userInfo.userType == 2}}">
<view wx:if="{{item.orderStatus == '2'}}" class="order-btn default-btn" bindtap="handlePreviewContract" data-target="{{item}}">{{btnTxt[item.orderStatus]}}</view> <view wx:if="{{item.orderStatus == '2'}}" class="order-btn default-btn" bindtap="handlePreviewContract" data-target="{{item}}">{{btnTxt[item.orderStatus]}}</view>
<view wx:else class="order-btn" bindtap="handleRecordOrder" data-target="{{item}}">{{btnTxt[item.orderStatus]}}</view> <view wx:else class="order-btn" bindtap="handleRecordOrder" data-target="{{item}}">{{btnTxt[item.orderStatus]}}</view>
</block>
</view> </view>
</view> </view>
<block wx:if="{{nothing}}"> <block wx:if="{{nothing}}">
......
...@@ -196,7 +196,7 @@ Page({ ...@@ -196,7 +196,7 @@ Page({
quotationUpgrade(para).then(res => { quotationUpgrade(para).then(res => {
wx.$util.hideLoading() wx.$util.hideLoading()
let { code, data } = res let { code, data } = res
code == 0 && wx.$router.reLaunch('CarQuotationPay', { data, id }) code == 0 && wx.$router.redirectTo('CarQuotationPay', { data, id })
}) })
} }
}) })
...@@ -61,14 +61,17 @@ Component({ ...@@ -61,14 +61,17 @@ Component({
total: 0, total: 0,
storeInfo: {}, storeInfo: {},
triggered: false, triggered: false,
scrollTop: 0 scrollTop: 0,
userInfo: {}
}, },
lifetimes: { lifetimes: {
attached() { attached() {
this.setData({ this.setData({
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {} storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {},
userInfo: wx.$util.getUserInfo() || {}
}) })
console.log(this.data.userInfo)
this.onLoad(true) this.onLoad(true)
} }
}, },
......
...@@ -125,6 +125,8 @@ ...@@ -125,6 +125,8 @@
</view> </view>
<view wx:else>创建时间:{{item.createdTime}}</view> <view wx:else>创建时间:{{item.createdTime}}</view>
</view> </view>
<!-- 超管isSuper/商户类型 userType 1账号不可操作 -->
<block wx:if="{{!userInfo.isSuper && userInfo.userType == 2}}">
<view wx:if="{{item.orderStatus != '4'}}"> <view wx:if="{{item.orderStatus != '4'}}">
<view wx:if="{{item.orderStatus == '-1' || item.orderStatus == '0'}}" class="order-btn" bindtap="handleClickBtn" data-target="{{item}}"> <view wx:if="{{item.orderStatus == '-1' || item.orderStatus == '0'}}" class="order-btn" bindtap="handleClickBtn" data-target="{{item}}">
{{btnTxt[item.orderStatus]}} {{btnTxt[item.orderStatus]}}
...@@ -133,6 +135,7 @@ ...@@ -133,6 +135,7 @@
{{btnTxt[item.orderStatus]}} {{btnTxt[item.orderStatus]}}
</view> </view>
</view> </view>
</block>
</view> </view>
</view> </view>
<block wx:if="{{nothing}}"> <block wx:if="{{nothing}}">
...@@ -145,5 +148,6 @@ ...@@ -145,5 +148,6 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<image data-target="addOrder" bind:tap="handleClickOrderBtn" class="addOrder" src="/packageEquity/images/addOrder.png" mode="scaleToFill|aspectFit|aspectFill|widthFix" binderror="" bindload="" /> <!-- 超管isSuper/商户类型 userType 1账号不可操作 -->
<image data-target="addOrder" wx:if="{{!userInfo.isSuper && userInfo.userType == 2}}" bind:tap="handleClickOrderBtn" class="addOrder" src="/packageEquity/images/addOrder.png" mode="scaleToFill|aspectFit|aspectFill|widthFix" binderror="" bindload="" />
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -219,7 +219,7 @@ Page({ ...@@ -219,7 +219,7 @@ Page({
wx.$util.hideLoading() wx.$util.hideLoading()
console.log(res, 'res') console.log(res, 'res')
let { code, data } = res let { code, data } = res
code == 0 && wx.$router.reLaunch('CarQuotationPay', { data, id }) code == 0 && wx.$router.redirectTo('CarQuotationPay', { data, id })
}) })
} }
}) })
...@@ -3,6 +3,7 @@ import api from '../../api/api.js' ...@@ -3,6 +3,7 @@ import api from '../../api/api.js'
const app = getApp() const app = getApp()
import { getYQorderInfo } from '~/store/index' import { getYQorderInfo } from '~/store/index'
import { checkYqdSuper } from '~/store/index' import { checkYqdSuper } from '~/store/index'
import constantData from '../constant/data'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -139,10 +140,12 @@ Page({ ...@@ -139,10 +140,12 @@ Page({
let { loginUserInfoList } = this.data let { loginUserInfoList } = this.data
let id = null let id = null
let yqMerchantId = null let yqMerchantId = null
let isSuper = null
loginUserInfoList.map(e => { loginUserInfoList.map(e => {
if (e.active) { if (e.active) {
yqMerchantId = e.merchantId yqMerchantId = e.merchantId
id = e.uuid id = e.uuid
isSuper = e.isSuper
} }
}) })
if (!id) { if (!id) {
...@@ -157,6 +160,7 @@ Page({ ...@@ -157,6 +160,7 @@ Page({
.then(res => { .then(res => {
let { data, message } = res let { data, message } = res
if (data) { if (data) {
app.globalData.YQorderSetting = null
wx.$util.setUserInfo(data.loginUserInfoList[0]) wx.$util.setUserInfo(data.loginUserInfoList[0])
// console.log(data.loginUserInfoList[0]) // console.log(data.loginUserInfoList[0])
checkYqdSuper(app, data.loginUserInfoList[0]) checkYqdSuper(app, data.loginUserInfoList[0])
...@@ -174,6 +178,14 @@ Page({ ...@@ -174,6 +178,14 @@ Page({
wx.$router.reLaunch(`${target}.${name}`, query) wx.$router.reLaunch(`${target}.${name}`, query)
wx.$SCENE = null wx.$SCENE = null
} else { } else {
// 超管默认开通所有场景
if (isSuper) {
// 0 会员权益/升级 1 精品升级
let openSceneArr = constantData.sceneList.map(val => {return val?.sceneType})
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), openSceneArr })
wx.$router.reLaunch('pages.sceneIndex')
return
}
// 获取开通的业务场景 // 获取开通的业务场景
api.getYqMerchantSceneConfigAPI({ yqMerchantId: yqMerchantId }).then(res => { api.getYqMerchantSceneConfigAPI({ yqMerchantId: yqMerchantId }).then(res => {
let { data, message, code } = res let { data, message, code } = res
......
const sceneList = [
{
sceneName: '精品升级',
sceneDesc: '太阳膜升级转化下单',
sceneType: 1,
actived: false
},
{
sceneName: '会员权益/升级',
sceneDesc: '新车车损险下单',
sceneType: 0,
actived: false
}
]
export default {
sceneList
}
\ No newline at end of file \ No newline at end of file
// pages/sceneIndex/sceneIndex.js // pages/sceneIndex/sceneIndex.js
import logOutAPI from '../../tabMine/api' import logOutAPI from '../../tabMine/api'
import constantData from '../constant/data'
const app = getApp() const app = getApp()
Page({ Page({
/** /**
...@@ -7,20 +8,7 @@ Page({ ...@@ -7,20 +8,7 @@ Page({
*/ */
data: { data: {
timeState: '', timeState: '',
sceneList: [ sceneList: constantData.sceneList,
{
sceneName: '精品升级',
sceneDesc: '太阳膜升级转化下单',
sceneType: 1,
actived: false
},
{
sceneName: '会员权益/升级',
sceneDesc: '新车车损险下单',
sceneType: 0,
actived: false
}
],
isShow: false isShow: false
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!