Commit d6a34207 by 张晓玮

Merge branch 'dev_v4.23.0' into 'dev_v4.24.0'

Dev v4.23.0

See merge request !109
2 parents b6d23c83 03a08936
Showing 42 changed files with 486 additions and 242 deletions
...@@ -39,6 +39,9 @@ App({ ...@@ -39,6 +39,9 @@ App({
checkYqdSuper(userInfo, this.globalData) checkYqdSuper(userInfo, this.globalData)
}, },
onShow(options) { onShow(options) {
wx.onMemoryWarning(function () {
console.log('onMemoryWarningReceive')
})
getUpdateManager() getUpdateManager()
if (options) { if (options) {
...@@ -57,6 +60,7 @@ App({ ...@@ -57,6 +60,7 @@ App({
if (relogin) { if (relogin) {
// 判断有没有 30 天免登陆 有直接跳选园区 // 判断有没有 30 天免登陆 有直接跳选园区
let noSignInUuid = getNoSignInUuid() let noSignInUuid = getNoSignInUuid()
console.log('noSignInUuid',noSignInUuid);
if (noSignInUuid) { if (noSignInUuid) {
api.reNoSignIn({ noSignInUuid: noSignInUuid }).then(res => { api.reNoSignIn({ noSignInUuid: noSignInUuid }).then(res => {
let { let {
......
...@@ -9,8 +9,8 @@ Component({ ...@@ -9,8 +9,8 @@ Component({
show: { show: {
type: Boolean, type: Boolean,
observer: function (n) { observer: function (n) {
wx.$util.pointRecord(19)
let { isFirst } = this.data let { isFirst } = this.data
n && wx.$util.pointRecord(19)
if (n && isFirst) { if (n && isFirst) {
this.init() this.init()
this.setData({ this.setData({
......
...@@ -170,11 +170,11 @@ Component({ ...@@ -170,11 +170,11 @@ Component({
if (!chooseList.length) return wx.$util.showToast('请勾选商品') if (!chooseList.length) return wx.$util.showToast('请勾选商品')
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
// thisPage.setGoodsTotal(chooseList)
// console.log(chooseList)
thisPage.setData({ thisPage.setData({
goodsList: chooseList goodsList: chooseList
}) })
thisPage.setGoodsTotal(chooseList)
console.log(chooseList)
this.setData({ this.setData({
show: false show: false
......
// tabWorkOrder/pages/createOrder/createOrderComponents/Popup/Popup.js // tabWorkOrder/pages/createOrder/createOrderComponents/Popup/Popup.js
Component({ Component({
externalClasses: ['popup-slot-class'],
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
...@@ -41,6 +42,7 @@ Component({ ...@@ -41,6 +42,7 @@ Component({
} }
}, },
attached() { attached() {
// console.log(wx.$util.isFullSucreen(), 'wx.$util.isFullSucreen()')
this.setData({ this.setData({
isFullSucreen: wx.$util.isFullSucreen() isFullSucreen: wx.$util.isFullSucreen()
}) })
......
<view class="popup" hidden="{{!showPopup}}" catchtouchmove="noScroll"> <view class="popup" hidden="{{ !showPopup }}" catchtouchmove="noScroll">
<view class="popup-bg" bindtap="hidePopup"></view> <view class="popup-bg" bindtap="hidePopup"></view>
<view class="popup-content" style="height:{{height}}"> <view class="popup-content" style="height:{{ height }}">
<block wx:if="{{title}}"> <block wx:if="{{ title }}">
<view class="popup-title text-center">{{title}}</view> <view class="popup-title text-center">{{title}}</view>
</block> </block>
<view class="popup-slot {{isFullSucreen?title?'isFullSucreen':'isFullSucreen-notitle':''}}"> <view class="popup-slot popup-slot-class {{ isFullSucreen?title?'isFullSucreen':'isFullSucreen-notitle':'' }}">
<slot></slot> <slot></slot>
</view> </view>
<view class="popup-footer {{isFullSucreen?'isFullSucreen':''}}"> <view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="cancel btn text-center" bindtap="hidePopup">取消</view> <view class="cancel btn text-center" bindtap="hidePopup">取消</view>
<view class="confirm btn text-center" bindtap="confirm">确认</view> <view class="confirm btn text-center" bindtap="confirm">确认</view>
</view> </view>
......
...@@ -44,21 +44,26 @@ ...@@ -44,21 +44,26 @@
.popup-slot { .popup-slot {
height: calc(100% - 200rpx); height: calc(100% - 200rpx);
} }
.popup-slot.isFullSucreen{
.popup-slot.isFullSucreen {
height: calc(100% - 268rpx); height: calc(100% - 268rpx);
} }
.popup-slot.isFullSucreen-notitle{
.popup-slot.isFullSucreen-notitle {
height: calc(100% - 170rpx); height: calc(100% - 170rpx);
} }
.popup-footer { .popup-footer {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding:10rpx 0 ; padding: 10rpx 0;
} }
.popup-footer.isFullSucreen{
.popup-footer.isFullSucreen {
padding-bottom: 68rpx !important; padding-bottom: 68rpx !important;
} }
.popup-footer .btn { .popup-footer .btn {
width: 330rpx; width: 330rpx;
height: 80rpx; height: 80rpx;
...@@ -71,10 +76,12 @@ ...@@ -71,10 +76,12 @@
color: #323233; color: #323233;
border: 2rpx solid #DCDEE0; border: 2rpx solid #DCDEE0;
} }
.popup-footer .confirm{
.popup-footer .confirm {
background: #3582EE; background: #3582EE;
color: #fff; color: #fff;
} }
@keyframes show-popup { @keyframes show-popup {
0% { 0% {
bottom: -100%; bottom: -100%;
......
...@@ -2,35 +2,36 @@ ...@@ -2,35 +2,36 @@
Component({ Component({
options: { options: {
// 在组件定义时的选项中启用多slot支持 // 在组件定义时的选项中启用多slot支持
multipleSlots: true multipleSlots: true,
}, },
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
items: { subIndex: {
type: Array, type: Number,
value: [], // value: [],
observer: function (n) { observer: function (n) {
if (n) { this.setData({
let userInfo = wx.$util.getUserInfo() selectStoreIndex: [n]
let defaultSelectStoreIndex = n?.findIndex(v => {return v.merchantId == userInfo?.default4SStoreInfo?.merchantId}) > -1 ? n?.findIndex(v => {return v.merchantId == userInfo?.default4SStoreInfo?.merchantId}) : 0 })
this.setData({defaultSelectStoreIndex: [defaultSelectStoreIndex], selectStoreIndex: defaultSelectStoreIndex})
}
} }
}, },
pickList: {
type: Array,
value: []
},
show: { show: {
type: Boolean, type: Boolean
} }
}, },
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
searchValue:'', searchValue: '',
selectStoreIndex:'', selectStoreIndex: '',
edit: false, edit: false
defaultSelectStoreIndex: []
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
...@@ -52,9 +53,7 @@ Component({ ...@@ -52,9 +53,7 @@ Component({
}) })
}, },
input(e) { input(e) {
let { let { value } = e.detail
value
} = e.detail
this.setValue(value) this.setValue(value)
this.triggerEvent('input', { this.triggerEvent('input', {
value value
...@@ -68,9 +67,7 @@ Component({ ...@@ -68,9 +67,7 @@ Component({
}, },
emit(e) { emit(e) {
let { let {
detail:{ detail: { value },
value
},
type type
} = e } = e
this.setData({ this.setData({
...@@ -78,22 +75,28 @@ Component({ ...@@ -78,22 +75,28 @@ Component({
}) })
this.setValue(value) this.setValue(value)
console.log('123') console.log('123')
this.triggerEvent(type == 'confirm' ? 'search' : 'blur', {value}) this.triggerEvent(type == 'confirm' ? 'search' : 'blur', { value })
}, },
confirm() { confirm() {
let {selectStoreIndex, items } = this.data let { selectStoreIndex, pickList } = this.data
if (!items.length) { let value = selectStoreIndex[0]
console.log(value)
console.log(pickList)
if (!pickList[value]?.merchantName) {
return wx.$util.showToast('请选择门店') return wx.$util.showToast('请选择门店')
} }
this.triggerEvent('confirm', selectStoreIndex) // console.log(value)
this.triggerEvent('confirm', { value })
this.triggerEvent('search', { value })
this.setData({ this.setData({
show: false show: false
}) })
}, },
changeStore(e) { changeStore(e) {
// console.log(e.detail.value[0])
this.setData({ this.setData({
selectStoreIndex: e.detail.value[0] selectStoreIndex: [e.detail.value[0]]
}) })
} }
} }
}) })
<!--packageEquity/components/storePicker/storePicker.wxml--> <!--packageEquity/components/storePicker/storePicker.wxml-->
<popup class="date-background" show="{{show}}" bindconfirm="confirm" height="800rpx"> <popup class="date-background" popup-slot-class="popup-style" show="{{ show }}" bindconfirm="confirm" height="800rpx">
<view class='date-container'> <view class="date-container">
<view class='date-confirm'> <view class="date-confirm">
<view class="search-box"> <view class="search-box">
<view class="search-input"> <view class="search-input">
<block wx:if="{{!edit}}"> <block wx:if="{{ !edit }}">
<view class="input {{searchValue?'':'placeholder'}}" bindtap="open"> <view class="input {{ searchValue?'':'placeholder' }}" bindtap="open">
<block wx:if="{{searchValue}}"> <block wx:if="{{ searchValue }}">{{searchValue}}</block>
{{searchValue}}
</block>
<block wx:else> <block wx:else>
<image src="../../../images/search.png" class="icon"></image> <image src="/images/search.png" class="icon"></image>
{{'请输入门店'}} {{'请输入门店'}}
</block> </block>
</view> </view>
</block> </block>
<block wx:else> <block wx:else>
<input type="text" class="input" value='{{searchValue}}' focus='{{inputFocus}}' confirm-type="search" bindinput='input' bindblur="inputBlur" bindconfirm="inputConfifm"/> <input
type="text"
class="input"
value="{{ searchValue }}"
focus="{{ inputFocus }}"
confirm-type="search"
bindinput="input"
bindblur="inputBlur"
bindconfirm="inputConfifm"
/>
</block> </block>
</view> </view>
</view> </view>
</view> </view>
<view class="picker-box"> <view class="picker-box">
<picker-view class="picker" value="{{defaultSelectStoreIndex}}" immediate-change="true" indicator-class="indicator" bindchange="changeStore"> <picker-view
class="picker"
value="{{ selectStoreIndex }}"
immediate-change="true"
indicator-class="indicator"
bindchange="changeStore"
>
<picker-view-column> <picker-view-column>
<block wx:for="{{items}}" wx:key="merchantId"> <block wx:for="{{ pickList }}" wx:key="merchantId">
<view class="view pickViewColumn">{{item.merchantName}}</view> <view class="view pickViewColumn">{{item.merchantName}}</view>
</block> </block>
</picker-view-column> </picker-view-column>
......
...@@ -59,3 +59,7 @@ ...@@ -59,3 +59,7 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.popup-style{
height: calc(100% - 100rpx)!important;
}
\ No newline at end of file \ No newline at end of file
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
padding: 0 32rpx; padding: 0 32rpx;
} }
.merchant-box{ .merchant-box{
max-height: 300rpx; /* max-height: 300rpx; */
overflow: hidden; overflow: auto;
transition: all .25s; transition: all .25s;
} }
.merchantList { .merchantList {
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* 3生产环境 * 3生产环境
* 4预发布 * 4预发布
*/ */
let index = 1 let index = 2
const accountInfo = wx.getAccountInfoSync() const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync() const systemInfo = wx.getSystemInfoSync()
......
...@@ -124,9 +124,9 @@ Page({ ...@@ -124,9 +124,9 @@ Page({
changeTabBar(e) { changeTabBar(e) {
let { pageShow } = this.data, let { pageShow } = this.data,
tabIndex = e.detail tabIndex = e.detail
this.setData({ // this.setData({
tabIndex // tabIndex
}) // })
console.log(pageShow[tabIndex]) console.log(pageShow[tabIndex])
// if (!pageShow[tabIndex]) { // if (!pageShow[tabIndex]) {
// this.getComponentPage().onLoad && this.getComponentPage().onLoad() // this.getComponentPage().onLoad && this.getComponentPage().onLoad()
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<quotation-list id="page-0" navBarHeight="{{navBarHeight}}" class="pagedetail {{tabIndex == 0?'':'hide'}}" mode="{{mode}}" /> <quotation-list id="page-0" navBarHeight="{{navBarHeight}}" class="pagedetail {{tabIndex == 0?'':'hide'}}" mode="{{mode}}" />
<equity-list <equity-list
id="page-1" id="page-1"
tabIndex="{{tabIndex}}" outTabIndex="{{tabIndex}}"
navBarHeight="{{navBarHeight}}" navBarHeight="{{navBarHeight}}"
class="pagedetail {{tabIndex == 1?'':'hide'}}" /> class="pagedetail {{tabIndex == 1?'':'hide'}}" />
</block> </block>
......
...@@ -10,7 +10,7 @@ Component({ ...@@ -10,7 +10,7 @@ Component({
type: Number, type: Number,
value: 0 value: 0
}, },
tabIndex: { outTabIndex: {
type: Number, type: Number,
observer(val) { observer(val) {
console.log(val) console.log(val)
......
...@@ -6,7 +6,12 @@ const equityStatusObj = { ...@@ -6,7 +6,12 @@ const equityStatusObj = {
'2': '提单成功', '2': '提单成功',
'3': '提单失败' '3': '提单失败'
} }
const equityStatusList = [{ const equityStatusList = [
{
confName: '全部',
confId: ''
},
{
confName: '待补单', confName: '待补单',
confId: '0' confId: '0'
}, { }, {
......
import constantList from './constantList' import constantList from './constantList'
import data from './data' import data from './data'
import Util from '~/utils/util'
const formRule = { const formRule = {
vin: [ vin: [
{ required: true, message: '车架号不能为空' }, { required: true, message: '车架号不能为空' },
...@@ -165,7 +165,8 @@ const secondObj = { ...@@ -165,7 +165,8 @@ const secondObj = {
label: '生效日期', label: '生效日期',
name: 'effectiveDate', name: 'effectiveDate',
type: 'pickerTime', type: 'pickerTime',
start: new Date(new Date().setDate(new Date(new Date()).getDate() + 1)).toLocaleDateString() start: Util.tsFormatTime(new Date(new Date().setDate(new Date(new Date()).getDate() + 1)),'Y-M-D')
// .toLocaleDateString().replace('/','-')
}, },
{ {
label: '卡号', label: '卡号',
......
...@@ -21,7 +21,7 @@ Page({ ...@@ -21,7 +21,7 @@ Page({
userInfo: {}, userInfo: {},
serviceInfo: { serviceInfo: {
seatesNum: 5, seatesNum: 5,
servicePeriod: '1年' servicePeriod: '1'
}, },
// 二次确认车架号 // 二次确认车架号
conSecondObj: { conSecondObj: {
......
...@@ -22,7 +22,14 @@ Component({ ...@@ -22,7 +22,14 @@ Component({
n && this.init() n && this.init()
} }
}, },
popInputObj: { testdata: {
type: Boolean
// observer: function (n) {
// console.log('n', n)
// n && this.init()
// }
},
popinputobj: {
type: Object, type: Object,
observer: function (n) { observer: function (n) {
this.init() this.init()
...@@ -47,9 +54,9 @@ Component({ ...@@ -47,9 +54,9 @@ Component({
*/ */
methods: { methods: {
init() { init() {
let { popInputObj } = this.data let { popinputobj } = this.data
let { typeName, compensation, payPrice, handletype } = popInputObj let { typeName, compensation, payPrice, handletype } = popinputobj
// console.log(popInputObj, 'popInputObj') // console.log(popinputobj, 'popinputobj')
if (handletype == 'add') { if (handletype == 'add') {
this.setData({ this.setData({
typeName: '', typeName: '',
...@@ -57,7 +64,7 @@ Component({ ...@@ -57,7 +64,7 @@ Component({
payPrice: '' payPrice: ''
}) })
} else { } else {
// let { typeName, compensation, payPrice } = popInputObj // let { typeName, compensation, payPrice } = popinputobj
this.setData({ this.setData({
typeName, typeName,
compensation, compensation,
...@@ -76,7 +83,7 @@ Component({ ...@@ -76,7 +83,7 @@ Component({
}) })
}, },
confirm() { confirm() {
let { compensation, payPrice, typeName, popInputObj } = this.data let { compensation, payPrice, typeName, popinputobj } = this.data
let otherInsuranceObj = { let otherInsuranceObj = {
compensation, compensation,
payPrice, payPrice,
...@@ -90,14 +97,14 @@ Component({ ...@@ -90,14 +97,14 @@ Component({
} }
// 新增 // 新增
console.log(otherInsuranceObj, 'otherInsuranceObj') console.log(otherInsuranceObj, 'otherInsuranceObj')
if (popInputObj.handletype == 'add') { if (popinputobj.handletype == 'add') {
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
thisPage.setData({ thisPage.setData({
['orderInfo' + '.' + 'otherInsuranceList']: [...thisPage.data.orderInfo?.otherInsuranceList, otherInsuranceObj] ['orderInfo' + '.' + 'otherInsuranceList']: [...thisPage.data.orderInfo?.otherInsuranceList, otherInsuranceObj]
}) })
} else { } else {
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
let { index } = popInputObj let { index } = popinputobj
thisPage.setData({ thisPage.setData({
['orderInfo' + '.' + 'otherInsuranceList' + '[' + index + ']']: otherInsuranceObj ['orderInfo' + '.' + 'otherInsuranceList' + '[' + index + ']']: otherInsuranceObj
}) })
......
...@@ -87,7 +87,7 @@ Component({ ...@@ -87,7 +87,7 @@ Component({
popObj: { popObj: {
popValue: '' popValue: ''
}, },
popInputObj: { popinputobj: {
type: 'add' type: 'add'
}, },
showError: false, showError: false,
...@@ -211,7 +211,6 @@ Component({ ...@@ -211,7 +211,6 @@ Component({
this.cancelInsuranceCheck() this.cancelInsuranceCheck()
}, },
cancelInsuranceCheck() { cancelInsuranceCheck() {
// this.setData({ // this.setData({
// // insuranceCheck: false // // insuranceCheck: false
...@@ -223,8 +222,8 @@ Component({ ...@@ -223,8 +222,8 @@ Component({
['orderInfo.goodsId']: '', ['orderInfo.goodsId']: '',
['orderInfo.goodsName']: '', ['orderInfo.goodsName']: '',
['orderInfo.valueAddedVehicleLoss']: { ['orderInfo.valueAddedVehicleLoss']: {
appreciation:'', appreciation: '',
goodsName:'', goodsName: '',
type: 3 type: 3
} }
}) })
...@@ -278,17 +277,17 @@ Component({ ...@@ -278,17 +277,17 @@ Component({
let { disable } = this.data let { disable } = this.data
if (disable) return false //修改权益价时,不可修改 if (disable) return false //修改权益价时,不可修改
let { handletype, index } = e.target.dataset let { handletype, index } = e.currentTarget.dataset
console.log(handletype, index, 'type, index') // console.log(handletype, index, 'type, index')
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
let popValue = '' let popValue = ''
if (handletype == 'edit') { if (handletype == 'edit') {
popValue = thisPage.data.orderInfo?.['otherInsuranceList']?.[index] || '' popValue = thisPage.data.orderInfo?.['otherInsuranceList']?.[index] || ''
} }
console.log(popValue, 'popValue') // console.log(popValue, 'popValue')
this.setData({ this.setData({
popupInputShow: true, popupInputShow: true,
popInputObj: { popinputobj: {
handletype, handletype,
index, index,
...popValue ...popValue
......
...@@ -81,7 +81,8 @@ module.exports = { ...@@ -81,7 +81,8 @@ module.exports = {
1: '微信支付', 1: '微信支付',
2: '门店收款', 2: '门店收款',
3: 'pos机支付', 3: 'pos机支付',
4: '支付宝支付' 4: '支付宝支付',
5: '嘀加收款'
}, },
orderType: [ orderType: [
{ {
......
// pages/wxLogin/wxLogin.js // pages/wxLogin/wxLogin.js
import api from '../../api/api.js' import api from '../../api/api.js'
import { setNoSignInUuid,getNoSignInUuid } from '~/utils/cache/storageApi.js' import { setNoSignInUuid,getNoSignInUuid,rmNoSignInUuid } from '~/utils/cache/storageApi.js'
const app = getApp() const app = getApp()
Page({ Page({
/** /**
...@@ -121,7 +121,8 @@ Page({ ...@@ -121,7 +121,8 @@ Page({
if (loginUserInfoList.length > 0) { if (loginUserInfoList.length > 0) {
wx.$util.setSessionId(sessionId) wx.$util.setSessionId(sessionId)
// wx.$storage. // wx.$storage.
noSignInUuid && setNoSignInUuid(noSignInUuid) console.log(setNoSignInUuid,'setNoSignInUuid');
noSignInUuid ? setNoSignInUuid(noSignInUuid):rmNoSignInUuid()
wx.$router.reLaunch('pages.accountItems') wx.$router.reLaunch('pages.accountItems')
} else { } else {
...@@ -232,7 +233,8 @@ Page({ ...@@ -232,7 +233,8 @@ Page({
encryptedData, encryptedData,
loginToken, loginToken,
iv, iv,
noLoginAgreeChoose // noLoginAgreeChoose
noSignIn: noLoginAgreeChoose
}) })
.then(({ code, data, message }) => { .then(({ code, data, message }) => {
console.log(data) console.log(data)
...@@ -242,7 +244,9 @@ Page({ ...@@ -242,7 +244,9 @@ Page({
if (loginUserInfoList.length) { if (loginUserInfoList.length) {
wx.$util.setSessionId(sessionId) wx.$util.setSessionId(sessionId)
// wx.$storage. // wx.$storage.
noSignInUuid && setNoSignInUuid(noSignInUuid) console.log(setNoSignInUuid,'setNoSignInUuid');
noSignInUuid ? setNoSignInUuid(noSignInUuid):rmNoSignInUuid()
wx.$router.reLaunch('pages.accountItems') wx.$router.reLaunch('pages.accountItems')
} else { } else {
wx.$router.reLaunch('pages.nothing') wx.$router.reLaunch('pages.nothing')
......
/* pages/login/login/login.wxss */ /* pages/login/login/login.wxss */
page{ page {
background: #fff; background: #fff;
} }
.layout{
.layout {
padding: 0 80rpx; padding: 0 80rpx;
position: relative; position: relative;
height: 100vh; height: 100vh;
} }
.layout::before { .layout::before {
content: ''; content: '';
width: 100%; width: 100%;
...@@ -18,7 +20,8 @@ page{ ...@@ -18,7 +20,8 @@ page{
top: 0; top: 0;
z-index: -1; z-index: -1;
} }
.phone_login_layout::after{
.phone_login_layout::after {
content: ''; content: '';
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -28,7 +31,8 @@ page{ ...@@ -28,7 +31,8 @@ page{
top: 0; top: 0;
z-index: -1; z-index: -1;
} }
.navigation-header{
.navigation-header {
background-color: transparent; background-color: transparent;
} }
...@@ -57,7 +61,7 @@ page{ ...@@ -57,7 +61,7 @@ page{
} }
.login-btn { .login-btn {
margin: 144rpx 0 28rpx; margin: 130rpx 0 28rpx;
background-image: linear-gradient(125deg, #65B8F8 0%, #3582EE 100%); background-image: linear-gradient(125deg, #65B8F8 0%, #3582EE 100%);
border-radius: 12rpx; border-radius: 12rpx;
text-align: center; text-align: center;
...@@ -71,7 +75,8 @@ page{ ...@@ -71,7 +75,8 @@ page{
transition: all .5s; transition: all .5s;
position: relative; position: relative;
} }
.login-btn button{
.login-btn button {
opacity: 0; opacity: 0;
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -82,7 +87,7 @@ page{ ...@@ -82,7 +87,7 @@ page{
box-sizing: border-box; box-sizing: border-box;
} }
.mobile_btn{ .mobile_btn {
width: 594rpx; width: 594rpx;
height: 100rpx; height: 100rpx;
background: #E6F0FD; background: #E6F0FD;
...@@ -91,29 +96,35 @@ page{ ...@@ -91,29 +96,35 @@ page{
text-align: center; text-align: center;
line-height: 100rpx; line-height: 100rpx;
} }
.auth-dialog-class{
.auth-dialog-class {
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
} }
.auth-dialog-class .van-dialog__header{
.auth-dialog-class .van-dialog__header {
font-size: 36rpx; font-size: 36rpx;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
} }
.message-box text { .message-box text {
color: #5092FF; color: #5092FF;
} }
.message-box { .message-box {
margin: 20rpx 0 30rpx; margin: 20rpx 0 30rpx;
color: #666666; color: #666666;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
} }
.message-box .message{
.message-box .message {
padding: 8px 0; padding: 8px 0;
} }
.phone_login .title{
.phone_login .title {
font-weight: 600; font-weight: 600;
font-size: 48rpx; font-size: 48rpx;
color: #333333; color: #333333;
...@@ -128,13 +139,15 @@ page{ ...@@ -128,13 +139,15 @@ page{
background: #F7F8FA; background: #F7F8FA;
border-radius: 12rpx; border-radius: 12rpx;
} }
.login-form .input .clear{
.login-form .input .clear {
flex-shrink: 0; flex-shrink: 0;
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
padding: 0 20rpx; padding: 0 20rpx;
} }
.login-form .sms{
.login-form .sms {
flex-shrink: 0; flex-shrink: 0;
font-size: 24rpx; font-size: 24rpx;
padding: 0; padding: 0;
...@@ -142,10 +155,12 @@ page{ ...@@ -142,10 +155,12 @@ page{
transition: all 0.25s; transition: all 0.25s;
color: #3582EE; color: #3582EE;
} }
.login-form .code-disabled{
.login-form .code-disabled {
color: #A5A5A7; color: #A5A5A7;
} }
.login-form .login_btn{
.login-form .login_btn {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
background-image: linear-gradient(125deg, #65B8F8 0%, #3582EE 100%); background-image: linear-gradient(125deg, #65B8F8 0%, #3582EE 100%);
...@@ -156,13 +171,13 @@ page{ ...@@ -156,13 +171,13 @@ page{
margin: 94rpx 0 40rpx; margin: 94rpx 0 40rpx;
} }
.login-form .wx_login{ .login-form .wx_login {
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
color: #888888; color: #888888;
} }
.login-form .wx_login text{ .login-form .wx_login text {
color: #3582EE; color: #3582EE;
margin-left: 20rpx; margin-left: 20rpx;
} }
\ No newline at end of file \ No newline at end of file
...@@ -326,6 +326,34 @@ ...@@ -326,6 +326,34 @@
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "1.1 订单补录",
"pathName": "tabWorkOrder/pages/additionRecordOrder/additionRecordOrder",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "1.1经营数据统计",
"pathName": "tabOperating/pages/operatingShow/operatingShow",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "1.1 首页",
"pathName": "tabIndex/pages/index/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "订单补录",
"pathName": "tabWorkOrder/pages/additionRecordOrder/additionRecordOrder",
"query": "",
"launchMode": "default",
"scene": null
} }
] ]
} }
......
...@@ -35,16 +35,18 @@ export const getYQInfo = userInfo => { ...@@ -35,16 +35,18 @@ export const getYQInfo = userInfo => {
// 判断是否是多账号用户 // 判断是否是多账号用户
let subIndex = 0 let subIndex = 0
console.log(!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2); // console.log(!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2);
console.log(userInfo.merchantId,'userInfo.merchantId'); // console.log(userInfo.merchantId,'userInfo.merchantId');
if (!userInfo.loginRole || userInfo.loginRole ==4 ) { if (!userInfo.loginRole || userInfo.loginRole == 4) {
// console.log(userInfo.merchantId,'userInfo.merchantId'); // console.log(userInfo.merchantId,'userInfo.merchantId');
app.globalData.yqdInfo = { app.globalData.yqdInfo = {
subIndex, subIndex,
merchantRange: [{ merchantRange: [
{
merchantName: userInfo.merchantName, merchantName: userInfo.merchantName,
merchantId: userInfo.merchantId merchantId: userInfo.merchantId
}] }
]
} }
// this.setData({ // this.setData({
// merchantRange: [{ merchantName: userInfo.merchantName }] // merchantRange: [{ merchantName: userInfo.merchantName }]
...@@ -59,10 +61,7 @@ export const getYQInfo = userInfo => { ...@@ -59,10 +61,7 @@ export const getYQInfo = userInfo => {
.getYQList() .getYQList()
.then(res => { .then(res => {
// console.log(res) // console.log(res)
let { let { code, data } = res
code,
data
} = res
if (code == 0) { if (code == 0) {
let arr = [] let arr = []
if (data.length > 1) { if (data.length > 1) {
...@@ -73,10 +72,12 @@ export const getYQInfo = userInfo => { ...@@ -73,10 +72,12 @@ export const getYQInfo = userInfo => {
} }
arr = [all, ...data] arr = [all, ...data]
} else { } else {
arr = [{ arr = [
{
merchantName: userInfo.merchantName, merchantName: userInfo.merchantName,
merchantId: userInfo.merchantId merchantId: userInfo.merchantId
}] }
]
} }
app.globalData.yqdInfo = { app.globalData.yqdInfo = {
merchantRange: arr, merchantRange: arr,
...@@ -102,10 +103,7 @@ export const getYQorderInfo = () => { ...@@ -102,10 +103,7 @@ export const getYQorderInfo = () => {
} else { } else {
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
if (!userInfo) this.login(true) if (!userInfo) this.login(true)
let { let { merchantId, merchantName } = userInfo.subLoginUser
merchantId,
merchantName
} = userInfo.subLoginUser
api api
.getMerchantRecordingSettings({ .getMerchantRecordingSettings({
...@@ -114,10 +112,7 @@ export const getYQorderInfo = () => { ...@@ -114,10 +112,7 @@ export const getYQorderInfo = () => {
}) })
.then(res => { .then(res => {
// console.log(res) // console.log(res)
let { let { code, data } = res
code,
data
} = res
if (code == 0) { if (code == 0) {
// debugger // debugger
// console.log(typeof data.yqPhoneConfig, 'data.yqPhoneConfig') // console.log(typeof data.yqPhoneConfig, 'data.yqPhoneConfig')
...@@ -144,9 +139,7 @@ export const setConfigInfo = globalData => { ...@@ -144,9 +139,7 @@ export const setConfigInfo = globalData => {
// 如果有 直接返回 // 如果有 直接返回
// console.log(app.globalData.YQorderSetting, 'app.globalData.YQorderSetting') // console.log(app.globalData.YQorderSetting, 'app.globalData.YQorderSetting')
// console.log('app.globalData.YQorderSetting', app.globalData.YQorderSetting) // console.log('app.globalData.YQorderSetting', app.globalData.YQorderSetting)
let { let { configInfo } = globalData
configInfo
} = globalData
if (configInfo) { if (configInfo) {
return resolve(configInfo) return resolve(configInfo)
} else { } else {
...@@ -175,9 +168,7 @@ export const setConfigInfo = globalData => { ...@@ -175,9 +168,7 @@ export const setConfigInfo = globalData => {
export const checkScene = options => { export const checkScene = options => {
// let query = options.query // let query = options.query
let { let { query } = options
query
} = options
if (query) { if (query) {
// 解码 // 解码
for (const key in query) { for (const key in query) {
...@@ -259,17 +250,14 @@ export const setWebSocket = () => { ...@@ -259,17 +250,14 @@ export const setWebSocket = () => {
/** 获取园区店下的4S店 */ /** 获取园区店下的4S店 */
export const get4SStoreList = options => { export const get4SStoreList = options => {
console.log(options,'options'); console.log(options, 'options')
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const app = getApp() const app = getApp()
api api
.getSceneMerchantRefStoreList(options) .getSceneMerchantRefStoreList(options)
.then(res => { .then(res => {
let { let { code, data } = res
code,
data
} = res
if (code == 0) { if (code == 0) {
app.globalData.storeListRange = data app.globalData.storeListRange = data
let default4SStoreInfo = wx.$util.getUserInfo()?.default4SStoreInfo ? wx.$util.getUserInfo()?.default4SStoreInfo : data && data[0] let default4SStoreInfo = wx.$util.getUserInfo()?.default4SStoreInfo ? wx.$util.getUserInfo()?.default4SStoreInfo : data && data[0]
...@@ -282,7 +270,8 @@ export const get4SStoreList = options => { ...@@ -282,7 +270,8 @@ export const get4SStoreList = options => {
default4SStoreInfo: default4SStoreInfo default4SStoreInfo: default4SStoreInfo
}) })
if (options.scene == 3 || options.scene == 2) if (options.scene == 3 || options.scene == 2)
if (options.isSubcehicle) { // 是否是次新车转化业务场景(商户关联关系与众筹一样) if (options.isSubcehicle) {
// 是否是次新车转化业务场景(商户关联关系与众筹一样)
wx.$util.setUserInfo({ wx.$util.setUserInfo({
...wx.$util.getUserInfo(), ...wx.$util.getUserInfo(),
default4SStoreInfo_newCarConversion: default4SStoreInfo_newCarConversion default4SStoreInfo_newCarConversion: default4SStoreInfo_newCarConversion
...@@ -308,10 +297,7 @@ export const getStaffListByMerchant = options => { ...@@ -308,10 +297,7 @@ export const getStaffListByMerchant = options => {
api api
.getStaffListByMerchantAPI(options) .getStaffListByMerchantAPI(options)
.then(res => { .then(res => {
let { let { code, data } = res
code,
data
} = res
if (code == 0) { if (code == 0) {
app.globalData.staffListRange = data app.globalData.staffListRange = data
resolve(app.globalData.staffListRange) resolve(app.globalData.staffListRange)
......
...@@ -25,9 +25,13 @@ Page({ ...@@ -25,9 +25,13 @@ Page({
flag: true, flag: true,
dateObj: { dateObj: {
beginDateStr: '' beginDateStr: ''
} },
showPicker: false
// showPicker: true
}, },
showStorePicker() { showStorePicker() {
let { merchantRange } = this.data
merchantRange.length > 1 &&
this.setData({ this.setData({
showPicker: true showPicker: true
}) })
...@@ -124,7 +128,24 @@ Page({ ...@@ -124,7 +128,24 @@ Page({
moveArrow: !this.data.moveArrow moveArrow: !this.data.moveArrow
}) })
}, },
getStoreList(e) {
console.log(e)
let { value } = e.detail
getYQInfo(this.data.userInfo)
.then(result => {
// console.log(result)
let { merchantRange } = result
if (value) {
merchantRange = merchantRange.filter(item => item.merchantName.includes(value))
}
this.setData({
merchantRange
})
})
.catch(err => {})
},
changePicker(e) { changePicker(e) {
console.log(e)
let { value } = e.detail let { value } = e.detail
let { merchantId } = this.data.merchantRange[value] let { merchantId } = this.data.merchantRange[value]
// 修改对应下标显示 // 修改对应下标显示
...@@ -151,6 +172,7 @@ Page({ ...@@ -151,6 +172,7 @@ Page({
let { userInfo } = this.data let { userInfo } = this.data
// 判断是不是门店员工 // 判断是不是门店员工
if (userInfo.merchantType && !userInfo.isSuper && type == 2) { if (userInfo.merchantType && !userInfo.isSuper && type == 2) {
wx.$util.pointRecord(item.recordId)
if (item.type == 'scanCode') { if (item.type == 'scanCode') {
wx.scanCode({ wx.scanCode({
success(res) { success(res) {
...@@ -167,6 +189,7 @@ Page({ ...@@ -167,6 +189,7 @@ Page({
} else { } else {
// item.url != 'tabWorkOrder.createOrder' // item.url != 'tabWorkOrder.createOrder'
if (!['tabWorkOrder.createOrder', 'tabWorkOrder.createArchives'].includes(item.url)) { if (!['tabWorkOrder.createOrder', 'tabWorkOrder.createArchives'].includes(item.url)) {
wx.$util.pointRecord(item.recordId)
return wx.$router.go(item.url) return wx.$router.go(item.url)
} else { } else {
wx.$util.showNoAccess() wx.$util.showNoAccess()
...@@ -397,12 +420,12 @@ Page({ ...@@ -397,12 +420,12 @@ Page({
}, },
getOutputValue(yqdInfo) { getOutputValue(yqdInfo) {
let { dateObj, userInfo } = this.data let { dateObj, userInfo } = this.data
console.log(yqdInfo, 'yqdInfo') // console.log(yqdInfo, 'yqdInfo')
let { subIndex, merchantRange } = yqdInfo let { subIndex, merchantRange } = yqdInfo
// yqMerchantId 不是全部就必要要带过去 // yqMerchantId 不是全部就必要要带过去
// 1-超管 2-商户管理员 3-区域督导 4-驻店人员 // 1-超管 2-商户管理员 3-区域督导 4-驻店人员
const yqMerchantId = merchantRange[subIndex].merchantId || '' const yqMerchantId = merchantRange[subIndex].merchantId || ''
const loginRole = userInfo.subLoginUser.loginRole const loginRole = userInfo.subLoginUser?.loginRole
this.setData({ this.setData({
loginRole loginRole
}) })
...@@ -473,7 +496,7 @@ Page({ ...@@ -473,7 +496,7 @@ Page({
}, },
totalListSet() { totalListSet() {
let { userInfo } = this.data let { userInfo } = this.data
if (userInfo.loginRole == 3 || userInfo.isSuper) { if (userInfo.subLoginUser?.loginRole == 3 || userInfo.isSuper) {
this.setData({ this.setData({
totalList: [ totalList: [
{ {
......
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
"side-select-popup": "/components/SideSelectPopup/SideSelectPopup", "side-select-popup": "/components/SideSelectPopup/SideSelectPopup",
"CalendarMonthSingle": "/components/CalendarMonthSingle/CalendarMonth", "CalendarMonthSingle": "/components/CalendarMonthSingle/CalendarMonth",
"van-progress": "@vant/weapp/progress/index", "van-progress": "@vant/weapp/progress/index",
"store-picker": "../../components/storePicker/storePicker" "store-picker": "/components/storePicker/storePicker"
} }
} }
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
</view> </view>
</view> </view>
</view> </view>
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType}}"> <!-- wx:if="{{!userInfo.isSuper && userInfo.merchantType}}" -->
<block >
<view class="set-box " bindtap="showWork"> <view class="set-box " bindtap="showWork">
<view class="label"> <view class="label">
<image src="../../images/set.png" /> <image src="../../images/set.png" />
......
...@@ -17,19 +17,19 @@ Page({ ...@@ -17,19 +17,19 @@ Page({
name: '营业概况', name: '营业概况',
active: true, active: true,
componentsName: 'businessCell', componentsName: 'businessCell',
recordId:12 recordId: 12
}, },
{ {
name: '员工业绩', name: '员工业绩',
active: false, active: false,
componentsName: 'staffCell', componentsName: 'staffCell',
recordId:13 recordId: 13
}, },
{ {
name: '今日战果', name: '今日战果',
active: false, active: false,
componentsName: 'conquestCell', componentsName: 'conquestCell',
recordId:14 recordId: 14
} }
], ],
dateObj: { dateObj: {
...@@ -43,10 +43,34 @@ Page({ ...@@ -43,10 +43,34 @@ Page({
totalOrderMoney: 0, totalOrderMoney: 0,
totalAdd: 0 totalAdd: 0
}, },
refresh: false refresh: false,
showPicker: false
}, },
// 混入跳转方法 // 混入跳转方法
...mixins.methods, ...mixins.methods,
showStorePicker() {
let { merchantRange } = this.data
merchantRange.length > 1 &&
this.setData({
showPicker: true
})
},
getStoreList(e) {
console.log(e)
let { value } = e.detail
getYQInfo(this.data.userInfo)
.then(result => {
// console.log(result)
let { merchantRange } = result
if (value) {
merchantRange = merchantRange.filter(item => item.merchantName.includes(value))
}
this.setData({
merchantRange
})
})
.catch(err => {})
},
changePicker(e) { changePicker(e) {
console.log('changePicker') console.log('changePicker')
let { value } = e.detail let { value } = e.detail
...@@ -192,7 +216,7 @@ Page({ ...@@ -192,7 +216,7 @@ Page({
} else { } else {
this.setTimeList(dateObj.nextDay) this.setTimeList(dateObj.nextDay)
} }
wx.$util.pointRecord(type == 'before'?16:17) wx.$util.pointRecord(type == 'before' ? 16 : 17)
this.calendar.resetData(type == 'before' ? dateObj.beforeDay : dateObj.nextDay) this.calendar.resetData(type == 'before' ? dateObj.beforeDay : dateObj.nextDay)
}, },
// 获取选中天数 // 获取选中天数
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"businessCell": "./components/businessCell/businessCell", "businessCell": "./components/businessCell/businessCell",
"staffCell": "./components/staffCell/staffCell", "staffCell": "./components/staffCell/staffCell",
"conquestCell": "./components/conquestCell/conquestCell", "conquestCell": "./components/conquestCell/conquestCell",
"tipsPopup": "/components/tipsPopup/Popup" "tipsPopup": "/components/tipsPopup/Popup",
"store-picker": "/components/storePicker/storePicker"
} }
} }
...@@ -3,20 +3,19 @@ ...@@ -3,20 +3,19 @@
<wxs src="../index.wxs" module="filter" /> <wxs src="../index.wxs" module="filter" />
<!-- <view class="" style="height:{{statusBarHeight}}px" /> --> <!-- <view class="" style="height:{{statusBarHeight}}px" /> -->
<!-- 自定义的导航栏 --> <!-- 自定义的导航栏 -->
<view class="layout {{flag?'opacity':''}}"> <view class="layout {{ flag?'opacity':'' }}">
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{true}}"> <navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{ true }}">
<picker range="{{merchantRange}}" value="{{subIndex}}" range-key="merchantName" bindchange="changePicker" bindtap="tapPicker" bindcancel="tapPicker" disabled="{{merchantRange.length < 2}}"> <!-- <picker range="{{merchantRange}}" value="{{subIndex}}" range-key="merchantName" bindchange="changePicker" bindtap="tapPicker" bindcancel="tapPicker" disabled="{{merchantRange.length < 2}}"> -->
<view class="navigation-title"> <view class="navigation-title" bindtap="showStorePicker">
<view class="navigation-title-text text-hide"> <view class="navigation-title-text text-hide">{{merchantRange[subIndex].merchantName}}</view>
{{merchantRange[subIndex].merchantName}} <!-- {{moveArrow?'move':''}} -->
</view> <view class="arrow" wx:if="{{ merchantRange.length > 1 }}">
<view class="arrow {{moveArrow?'move':''}}" wx:if="{{merchantRange.length > 1}}">
<image src="/images/arrow-bottom.png" /> <image src="/images/arrow-bottom.png" />
</view> </view>
</view> </view>
</picker> <!-- </picker> -->
</navigation-bar> </navigation-bar>
<view class="headerContainer" style="margin-top:{{statusBarHeight}}px"> <view class="headerContainer" style="margin-top:{{ statusBarHeight }}px">
<view class="businessDataContainer"> <view class="businessDataContainer">
<view class="turnover"> <view class="turnover">
<view class="num">¥{{filter.toDecimal2(todayData.totalOrderMoney)}}</view> <view class="num">¥{{filter.toDecimal2(todayData.totalOrderMoney)}}</view>
...@@ -30,15 +29,15 @@ ...@@ -30,15 +29,15 @@
</view> </view>
<view class="menu"> <view class="menu">
<!-- wx:for-index="index" --> <!-- wx:for-index="index" -->
<block wx:for="{{menu}}" wx:key="index"> <block wx:for="{{ menu }}" wx:key="index">
<view class="item" bindtap="menuJump" data-item="{{item}}" data-index="{{index}}"> <view class="item" bindtap="menuJump" data-item="{{ item }}" data-index="{{ index }}">
<image src="../../images/navIcon{{index}}.png" /> <image src="../../images/navIcon{{ index }}.png" />
{{item.name}} {{item.name}}
</view> </view>
</block> </block>
</view> </view>
</view> </view>
<view class="Container" style="margin-bottom: {{!activeTab?showTips?bottomLift+41:bottomLift :bottomLift }}px"> <view class="Container" style="margin-bottom: {{ !activeTab?showTips?bottomLift+41:bottomLift :bottomLift }}px">
<!-- <van-calendar show /> + 41 style="padding-bottom: {{ bottomLift + 41}}px" --> <!-- <van-calendar show /> + 41 style="padding-bottom: {{ bottomLift + 41}}px" -->
<view class="dateContainer"> <view class="dateContainer">
<view class="date"> <view class="date">
...@@ -49,7 +48,20 @@ ...@@ -49,7 +48,20 @@
前一天 前一天
</view> </view>
<!-- forceFullSucreen="{{bottomLift>0?true:false}}" --> <!-- forceFullSucreen="{{bottomLift>0?true:false}}" -->
<calendar id="calender" class="calendar" allowSameDay shortcut bindselect='rangeSelect' rangeAll dateType='single' calenderColor='#3582EE' vertical minDate="2020-10-01" maxDate="{{dateObj.maxDate}}" isComponents> <calendar
id="calender"
class="calendar"
allowSameDay
shortcut
bindselect="rangeSelect"
rangeAll
dateType="single"
calenderColor="#3582EE"
vertical
minDate="2020-10-01"
maxDate="{{ dateObj.maxDate }}"
isComponents
>
<!-- dataDateStr="{{dateObj.todayShow}}" --> <!-- dataDateStr="{{dateObj.todayShow}}" -->
<view class="item text-center dateNum"> <view class="item text-center dateNum">
{{dateObj.todayShow}} {{dateObj.todayShow}}
...@@ -57,7 +69,7 @@ ...@@ -57,7 +69,7 @@
</view> </view>
</calendar> </calendar>
<!-- --> <!-- -->
<view class="nextDay item {{dateObj.maxDate==dateObj.today?'hidden':''}}" data-type="next" bindtap="dateChange"> <view class="nextDay item {{ dateObj.maxDate==dateObj.today?'hidden':'' }}" data-type="next" bindtap="dateChange">
后一天 后一天
<image class="arrow" src="../../images/rightArrow.png" mode="" binderror="" bindload="" /> <image class="arrow" src="../../images/rightArrow.png" mode="" binderror="" bindload="" />
</view> </view>
...@@ -65,17 +77,27 @@ ...@@ -65,17 +77,27 @@
</view> </view>
<view class="cellTab"> <view class="cellTab">
<view class="tabContainer"> <view class="tabContainer">
<view bindtap="changeTabIndex" data-index="{{index}}" class="tabItem {{item.active?'active':''}}" wx:for="{{tabList}}" wx:key="index"> <view
{{item.name}} bindtap="changeTabIndex"
</view> data-index="{{ index }}"
class="tabItem {{ item.active?'active':'' }}"
wx:for="{{ tabList }}"
wx:key="index"
>{{item.name}}</view>
</view> </view>
</view> </view>
<!-- wx:if="{{activeTab==0}}" wx:if="{{activeTab==1}}" wx:if="{{activeTab==2}}" --> <!-- wx:if="{{activeTab==0}}" wx:if="{{activeTab==1}}" wx:if="{{activeTab==2}}" -->
<!-- hidden="{{activeTab!=0}}" hidden="{{activeTab!=0}}" --> <!-- hidden="{{activeTab!=0}}" hidden="{{activeTab!=0}}" -->
<view class="componentContainer"> <view class="componentContainer">
<businessCell id="businessCell" wx:if="{{activeTab==0}}" canRemark="{{canRemark}}" today="{{dateObj.maxDate}}" dataDateStr="{{dateObj.today}}" /> <businessCell
<staffCell id="staffCell" wx:if="{{activeTab==1}}" dataDateStr="{{dateObj.today}}" /> id="businessCell"
<conquestCell id="conquestCell" wx:if="{{activeTab==2}}" date="{{dateObj.today}}" /> wx:if="{{ activeTab==0 }}"
canRemark="{{ canRemark }}"
today="{{ dateObj.maxDate }}"
dataDateStr="{{ dateObj.today }}"
/>
<staffCell id="staffCell" wx:if="{{ activeTab==1 }}" dataDateStr="{{ dateObj.today }}" />
<conquestCell id="conquestCell" wx:if="{{ activeTab==2 }}" date="{{ dateObj.today }}" />
</view> </view>
<!-- <scroll-view class="scrollStyle" scroll-y> --> <!-- <scroll-view class="scrollStyle" scroll-y> -->
<!-- </scroll-view> --> <!-- </scroll-view> -->
...@@ -94,17 +116,27 @@ ...@@ -94,17 +116,27 @@
<conquestCell/> <conquestCell/>
</template> --> </template> -->
</view> </view>
<view wx:if="{{!activeTab&& showTips}}" class="btn-box" style="padding-bottom: {{ bottomLift}}px"> <view wx:if="{{ !activeTab&& showTips }}" class="btn-box" style="padding-bottom: {{ bottomLift }}px">
<view class="tips"> <view class="tips">
<image class=" tipsIcon" src="../../../images/tips.png" /> <image class="tipsIcon" src="../../../images/tips.png" />
<view class="contentText">如数据存在不准确,可点击核准数据修改当日数据量。</view> <view class="contentText">如数据存在不准确,可点击核准数据修改当日数据量。</view>
<image class="closeIcon" bindtap="closeTips" src="../../images/closeIcon.png" /> <image class="closeIcon" bindtap="closeTips" src="../../images/closeIcon.png" />
</view> </view>
</view> </view>
</view> </view>
<!-- isFormComponent="{{true}}" bind:closePop="closePop" --> <!-- isFormComponent="{{true}}" bind:closePop="closePop" -->
<remark-popup wx:if="{{showRemark}}" show="{{showRemark}}" isLimitNum="{{remarkObj.type== 'add'?false:true}}" title="{{remarkObj.title}}" btnName="{{'确认'}}" bind:confirm="remarkConfirm" placeholder="{{remarkObj.placeholder}}" maxlength="10" value="{{remarkObj.type== 'add'?'':remarkObj.remarkValue}}" /> <remark-popup
<tipsPopup title="字段解释" show="{{businessTipsShow}}" bindconfirm="confirm" class="tipsShow" height="460px"> wx:if="{{ showRemark }}"
show="{{ showRemark }}"
isLimitNum="{{ remarkObj.type== 'add'?false:true }}"
title="{{ remarkObj.title }}"
btnName="{{ '确认' }}"
bind:confirm="remarkConfirm"
placeholder="{{ remarkObj.placeholder }}"
maxlength="10"
value="{{ remarkObj.type== 'add'?'':remarkObj.remarkValue }}"
/>
<tipsPopup title="字段解释" show="{{ businessTipsShow }}" bindconfirm="confirm" class="tipsShow" height="460px">
<view class="item">今日贴膜台次:当日进店贴膜且下单的车辆台次</view> <view class="item">今日贴膜台次:当日进店贴膜且下单的车辆台次</view>
<view class="item">今日升级太阳膜台次: 当日进店贴膜且下升级工单的车辆台次</view> <view class="item">今日升级太阳膜台次: 当日进店贴膜且下升级工单的车辆台次</view>
<view class="item">今日贴膜升级率: 当日升级工单量与贴膜工单量的比值</view> <view class="item">今日贴膜升级率: 当日升级工单量与贴膜工单量的比值</view>
...@@ -113,10 +145,17 @@ ...@@ -113,10 +145,17 @@
<view class="item">累计剩余未到店贴膜台次: 累计已发券未核销的客户数量</view> <view class="item">累计剩余未到店贴膜台次: 累计已发券未核销的客户数量</view>
<view class="item">其他产品总营业额: 除贴膜产品收入总和外,本店当日其他类型产品的收入总和</view> <view class="item">其他产品总营业额: 除贴膜产品收入总和外,本店当日其他类型产品的收入总和</view>
</tipsPopup> </tipsPopup>
<tipsPopup title="字段解释" show="{{staffTipsShow}}" bindconfirm="confirm" class="tipsShow" height="290px"> <tipsPopup title="字段解释" show="{{ staffTipsShow }}" bindconfirm="confirm" class="tipsShow" height="290px">
<view class="item">今日接车数量:当日该员工服务进店贴膜客户且下单的车辆台次</view> <view class="item">今日接车数量:当日该员工服务进店贴膜客户且下单的车辆台次</view>
<view class="item">贴膜升级率:当日该员工的贴膜升级率</view> <view class="item">贴膜升级率:当日该员工的贴膜升级率</view>
<view class="item">均客单价:当日该员工创造的贴膜收入总和的均值</view> <view class="item">均客单价:当日该员工创造的贴膜收入总和的均值</view>
<view class="item">累计业绩:该员工累计创造的营收数据(累计接车数量/累计总贴膜升级率/累计均客单价)</view> <view class="item">累计业绩:该员工累计创造的营收数据(累计接车数量/累计总贴膜升级率/累计均客单价)</view>
</tipsPopup> </tipsPopup>
<store-picker
subIndex="{{ subIndex }}"
pickList="{{ merchantRange }}"
show="{{ showPicker }}"
bindsearch="getStoreList"
bindconfirm="changePicker"
/>
<!-- bind:close="onClose" bind:confirm="onConfirm" --> <!-- bind:close="onClose" bind:confirm="onConfirm" -->
\ No newline at end of file \ No newline at end of file
...@@ -44,9 +44,32 @@ Page({ ...@@ -44,9 +44,32 @@ Page({
pages: 1, pages: 1,
dateObj: { dateObj: {
beginDateStr: '' beginDateStr: ''
},
showPicker: false
},
showStorePicker() {
let { merchantRange } = this.data
merchantRange.length > 1 &&
this.setData({
showPicker: true
})
},
getStoreList(e) {
console.log(e)
let { value } = e.detail
getYQInfo(this.data.userInfo)
.then(result => {
// console.log(result)
let { merchantRange } = result
if (value) {
merchantRange = merchantRange.filter(item => item.merchantName.includes(value))
} }
this.setData({
merchantRange
})
})
.catch(err => {})
}, },
navbarReady(e) { navbarReady(e) {
let navBarHeight = e.detail.height let navBarHeight = e.detail.height
this.setData({ this.setData({
......
{ {
"navigationStyle": "custom", "navigationStyle": "custom",
"usingComponents": { "usingComponents": {
"CalendarMonth": "/components/CalendarMonth/CalendarMonth" "CalendarMonth": "/components/CalendarMonth/CalendarMonth",
"store-picker": "/components/storePicker/storePicker"
} }
} }
<!-- tabOperating/pages/operatingShow/operatingShow.wxml --> <!-- tabOperating/pages/operatingShow/operatingShow.wxml -->
<!-- src引入filter.wxs, module给模块起名 --> <!-- src引入filter.wxs, module给模块起名 -->
<wxs src="../index.wxs" module="filter" /> <wxs src="../index.wxs" module="filter" />
<view class="layout {{flag?'opacity':''}}"> <view class="layout {{ flag?'opacity':'' }}">
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{true}}"> <navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{ true }}">
<picker <!-- <picker
range="{{merchantRange}}" range="{{merchantRange}}"
value="{{subIndex}}" value="{{subIndex}}"
range-key="merchantName" range-key="merchantName"
bindchange="changePicker" bindchange="changePicker"
bindtap="tapPicker" bindtap="tapPicker"
bindcancel="tapPicker" bindcancel="tapPicker"
disabled="{{merchantRange.length < 2}}"> disabled="{{merchantRange.length < 2}}"> -->
<view class="navigation-title"> <view class="navigation-title" bindtap="showStorePicker">
<view class="navigation-title-text text-hide"> <view class="navigation-title-text text-hide">{{merchantRange[subIndex].merchantName}}</view>
{{merchantRange[subIndex].merchantName}} <view class="arrow {{ moveArrow?'move':'' }}" wx:if="{{ merchantRange.length > 1 }}">
</view>
<view class="arrow {{moveArrow?'move':''}}" wx:if="{{merchantRange.length > 1}}">
<image src="/images/arrow-bottom.png" /> <image src="/images/arrow-bottom.png" />
</view> </view>
</view> </view>
</picker> <!-- </picker> -->
</navigation-bar> </navigation-bar>
<view class="header" style="margin-top:{{statusBarHeight}}px"> <view class="header" style="margin-top:{{ statusBarHeight }}px">
<view class="date"> <view class="date">
<!-- {{dateObj.maxDate}} --> <!-- {{dateObj.maxDate}} -->
<CalendarMonth <CalendarMonth
allowSameDay allowSameDay
shortcut shortcut
bindselect='rangeSelect' bindselect="rangeSelect"
bindtapCalendar='tapCalendar' bindtapCalendar="tapCalendar"
rangeAll rangeAll
dateType='range' dateType="range"
calenderColor='#3582EE' calenderColor="#3582EE"
vertical vertical
minDate="2020-10-01" minDate="2020-10-01"
maxDate="{{dateObj.today}}" maxDate="{{ dateObj.today }}"
forceFullSucreen="{{bottomLift>0?true:false}}" forceFullSucreen="{{ bottomLift>0?true:false }}"
isComponents> isComponents
>
<view class="item dateNum"> <view class="item dateNum">
<block wx:if="{{dateObj.type=='year'}}">{{dateObj.label}}年</block> <block wx:if="{{ dateObj.type=='year' }}">{{dateObj.label}}年</block>
<block wx:else> <block wx:else>
<!-- {{filter.dateFormatSlash(dateObj.beginDateStr)}}-{{filter.dateFormatSlash(dateObj.endDateStr)}} --> <!-- {{filter.dateFormatSlash(dateObj.beginDateStr)}}-{{filter.dateFormatSlash(dateObj.endDateStr)}} -->
五月份 五月份
...@@ -50,7 +49,7 @@ ...@@ -50,7 +49,7 @@
</block> --> </block> -->
<!-- wx:if="{{merchantRange.length > 1}}" --> <!-- wx:if="{{merchantRange.length > 1}}" -->
<!-- 2021年 2-8月 --> <!-- 2021年 2-8月 -->
<view class="arrow {{whiteArrow?'move':''}}"> <view class="arrow {{ whiteArrow?'move':'' }}">
<image src="/images/whiteArrowIcon.png" /> <image src="/images/whiteArrowIcon.png" />
</view> </view>
</view> </view>
...@@ -73,14 +72,14 @@ ...@@ -73,14 +72,14 @@
</view> </view>
</view> </view>
<!-- --> <!-- -->
<view class="table {{isFullSucreen?'isFullSucreen':''}}"> <view class="table {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="tableContainer"> <view class="tableContainer">
<view class="table-header"> <view class="table-header">
<block wx:for="{{tableHeaderList}}" wx:key="index"> <block wx:for="{{ tableHeaderList }}" wx:key="index">
<view class="tableHeader-td">{{item.name}}</view> <view class="tableHeader-td">{{item.name}}</view>
</block> </block>
</view> </view>
<block wx:if="{{tableList.length}}"> <block wx:if="{{ tableList.length }}">
<view class="table-body"> <view class="table-body">
<!-- show-scrollbar="{{false}}" scroll-x bindscrolltoupper="getAccumulateList" --> <!-- show-scrollbar="{{false}}" scroll-x bindscrolltoupper="getAccumulateList" -->
<!-- bindrefresherrefresh="search" --> <!-- bindrefresherrefresh="search" -->
...@@ -88,45 +87,32 @@ ...@@ -88,45 +87,32 @@
<scroll-view <scroll-view
scroll-y scroll-y
enable-back-to-top enable-back-to-top
refresher-enabled="{{true}}" refresher-enabled="{{ true }}"
bindrefresherrefresh="restPageNum" bindrefresherrefresh="restPageNum"
bindscrolltolower="scrollonReachBottom" bindscrolltolower="scrollonReachBottom"
refresher-threshold="104" refresher-threshold="104"
style="height:100%;" style="height:100%;"
class="list" class="list"
refresher-triggered="{{triggered}}"> refresher-triggered="{{ triggered }}"
<block wx:for="{{tableList}}" wx:for-item="tableItem" wx:key="index"> >
<block wx:for="{{ tableList }}" wx:for-item="tableItem" wx:key="index">
<view class="table-th"> <view class="table-th">
<block <block wx:for="{{ tableHeaderList }}" wx:for-item="item" wx:for-index="tdIndex" wx:key="tdIndex">
wx:for="{{tableHeaderList}}"
wx:for-item="item"
wx:for-index="tdIndex"
wx:key="tdIndex">
<!-- <view class="table-td">{{tableHeaderList[tdIndex]}}</view> --> <!-- <view class="table-td">{{tableHeaderList[tdIndex]}}</view> -->
<view class="table-td" wx:if="{{tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type =='day'}}"> <view class="table-td" wx:if="{{ tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type =='day' }}">{{filter.dateFormatSlash(tableItem[tableHeaderList[tdIndex]['propName']])}}</view>
{{filter.dateFormatSlash(tableItem[tableHeaderList[tdIndex]['propName']])}} <view class="table-td" wx:elif="{{ tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type=='year' }}">{{filter.dateFormatYear(tableItem[tableHeaderList[tdIndex]['propName']])}}</view>
</view> <view class="table-td" wx:elif="{{ tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type=='month' }}">{{filter.dateFormatMonth(tableItem[tableHeaderList[tdIndex]['propName']])}}</view>
<view class="table-td" wx:elif="{{tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type=='year'}}"> <view class="table-td" wx:elif="{{ tableHeaderList[tdIndex]['propName']=='upgradeRate' }}">{{filter.rateFormat(tableItem[tableHeaderList[tdIndex]['propName']])}}</view>
{{filter.dateFormatYear(tableItem[tableHeaderList[tdIndex]['propName']])}} <view class="table-td" wx:else>{{tableItem[tableHeaderList[tdIndex]['propName']]}}</view>
</view>
<view class="table-td" wx:elif="{{tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type=='month'}}">
{{filter.dateFormatMonth(tableItem[tableHeaderList[tdIndex]['propName']])}}
</view>
<view class="table-td" wx:elif="{{tableHeaderList[tdIndex]['propName']=='upgradeRate'}}">
{{filter.rateFormat(tableItem[tableHeaderList[tdIndex]['propName']])}}
</view>
<view class="table-td" wx:else>
{{tableItem[tableHeaderList[tdIndex]['propName']]}}
</view>
<!-- <view class="table-td">{{tableItem[]}}</view> --> <!-- <view class="table-td">{{tableItem[]}}</view> -->
</block> </block>
</view> </view>
</block> </block>
<view class="tips" wx:if="{{currentPage == pages&&tableList.length>13}}">到底了~</view> <view class="tips" wx:if="{{ currentPage == pages&&tableList.length>13 }}">到底了~</view>
</scroll-view> </scroll-view>
</view> </view>
</block> </block>
<block wx:if="{{!tableList.length}}"> <block wx:if="{{ !tableList.length }}">
<!-- <view class="tips-nothing">暂无数据</view> --> <!-- <view class="tips-nothing">暂无数据</view> -->
<!-- <view class=" noListText"> <!-- <view class=" noListText">
<image <image
...@@ -141,4 +127,10 @@ ...@@ -141,4 +127,10 @@
</view> </view>
</view> </view>
</view> </view>
<store-picker
subIndex="{{ subIndex }}"
pickList="{{ merchantRange }}"
show="{{ showPicker }}"
bindsearch="getStoreList"
bindconfirm="changePicker"
/>
\ No newline at end of file \ No newline at end of file
...@@ -58,7 +58,7 @@ Page({ ...@@ -58,7 +58,7 @@ Page({
}, },
selectPayType: 2, selectPayType: 2,
remark: '', remark: '',
customerCouponId:'', customerCouponId: ''
}, },
goodsList: [], goodsList: [],
goodsData: [], goodsData: [],
...@@ -148,7 +148,7 @@ Page({ ...@@ -148,7 +148,7 @@ Page({
orderObj, orderObj,
goodsList goodsList
}) })
this.setGoodsTotal(goodsList) // this.setGoodsTotal(goodsList)
} }
} }
this.setData({ this.setData({
...@@ -217,7 +217,7 @@ Page({ ...@@ -217,7 +217,7 @@ Page({
this.showToast('单价不可低于商品最低价') this.showToast('单价不可低于商品最低价')
} }
let { goodsList } = this.data let { goodsList } = this.data
this.setGoodsTotal(goodsList) // this.setGoodsTotal(goodsList)
}, },
priceBlur(e) { priceBlur(e) {
let { index, item } = e.currentTarget.dataset let { index, item } = e.currentTarget.dataset
...@@ -227,16 +227,16 @@ Page({ ...@@ -227,16 +227,16 @@ Page({
}) })
let { goodsList } = this.data let { goodsList } = this.data
this.setGoodsTotal(goodsList) // this.setGoodsTotal(goodsList)
}, },
setGoodsTotal(goodsList) { setGoodsTotal(goodsList) {
let { totalFee } = this.data let { totalFee } = this.data
let total = 0 let total = 0
// goodsList.map(i => (total += i.count * i.price)) // goodsList.map(i => (total += i.count * i.price))
goodsList.map(i =>{ goodsList.map(i => {
const totalPrice = NP.times(i.count,i.price) const totalPrice = NP.times(i.count, i.price)
total = NP.plus(total,totalPrice) total = NP.plus(total, totalPrice)
} ) })
// 用来解决小数相减导致精度问题 // 用来解决小数相减导致精度问题
// total = this.accMul(total, 100) // total = this.accMul(total, 100)
total = NP.times(total, 100) total = NP.times(total, 100)
...@@ -249,7 +249,7 @@ Page({ ...@@ -249,7 +249,7 @@ Page({
// console.log(this.accMul(total, 100)) // console.log(this.accMul(total, 100))
// 解决数据精度丢失问题 // 解决数据精度丢失问题
// let priceSpread = goodsList.length ? parseFloat((total - totalFee).toFixed(2)) : 0 // let priceSpread = goodsList.length ? parseFloat((total - totalFee).toFixed(2)) : 0
let priceSpread = goodsList.length ? NP.minus(total,totalFee): 0 let priceSpread = goodsList.length ? NP.minus(total, totalFee) : 0
// console.log(priceSpread) // console.log(priceSpread)
this.setData({ this.setData({
priceSpread: priceSpread, priceSpread: priceSpread,
...@@ -302,7 +302,7 @@ Page({ ...@@ -302,7 +302,7 @@ Page({
this.setData({ this.setData({
goodsList goodsList
}) })
this.setGoodsTotal(goodsList) // this.setGoodsTotal(goodsList)
}, },
submit(i) { submit(i) {
// 判断手机号是否用配置的默认值 // 判断手机号是否用配置的默认值
...@@ -406,14 +406,45 @@ Page({ ...@@ -406,14 +406,45 @@ Page({
this.setData({ this.setData({
disabled: true disabled: true
}) })
// console.log(object);
// const orderObj = {
// couponName: "流程测试新建001",
// customer: {customerName: "张立顺",
// customerPhone: "15817639334",
// customerSex: "2",
// experienceFlag: "Y",
// plateNumber: "",
// standNo: ""},
// customerCouponCode: "GH151S",
// employeeName: "刘伟",
// merchantCouponId: 11385,
// merchantId: 44211116,
// merchantName: "流程测试4s店",
// outTradeNo: "0120230630676252458305200128",
// remark: "",
// selectPayType: 2,
// sellerMerchantId: 44211025,
// sellerMerchantName: "流程测试园区门店",
// sellerName: "zhangls",
// sellerUserId: "bfe4919ab01143e5844846ef92aa3db3",
// subOrderList: [
// {baseGoodsId: null, totalPrice: 0.1, number: 1, merchantGoodsId: 7213},
// {baseGoodsId: null, totalPrice: 0.1, number: 1, merchantGoodsId: 5897}
// ],
// subShopMerchantId: 44211746,
// subShopMerchantName: "test_xjq03",
// // userId: "cbe5621e7afa4ccaac1b279c2a2ee98d",
// }
console.log(orderObj);
// return // return
api api
.supplementOrder(orderObj) .supplementOrder(orderObj)
.then(res => { .then(res => {
wx.hideLoading() wx.hideLoading()
// console.log(orderObj, res) // console.log(orderObj, res)
let { code, data, message } = res let { code, data, message,subErrors } = res
if (code == 0) { if (code == 0) {
if (save) { if (save) {
wx.showModal({ wx.showModal({
...@@ -439,6 +470,8 @@ Page({ ...@@ -439,6 +470,8 @@ Page({
} }
} else { } else {
this.showToast(message) this.showToast(message)
// console.log(subErrors);
throw subErrors
} }
}) })
.finally(() => { .finally(() => {
...@@ -687,7 +720,7 @@ Page({ ...@@ -687,7 +720,7 @@ Page({
goodsList: chooseList, goodsList: chooseList,
first: false first: false
}) })
this.setGoodsTotal(chooseList) // this.setGoodsTotal(chooseList)
}, },
getSetting() { getSetting() {
......
...@@ -81,7 +81,8 @@ module.exports = { ...@@ -81,7 +81,8 @@ module.exports = {
1: '微信支付', 1: '微信支付',
2: '门店收款', 2: '门店收款',
3: 'pos机支付', 3: 'pos机支付',
4: '支付宝支付' 4: '支付宝支付',
5: '嘀加收款'
}, },
orderType: [ orderType: [
{ {
......
...@@ -12,8 +12,12 @@ export function setSessionId(sessionId) { ...@@ -12,8 +12,12 @@ export function setSessionId(sessionId) {
export function getNoSignInUuid() { export function getNoSignInUuid() {
return $Storage.get('noSignInUuid') return $Storage.get('noSignInUuid')
} }
export function rmNoSignInUuid() {
return $Storage.rm('noSignInUuid')
}
export function setNoSignInUuid(noSignInUuid) { export function setNoSignInUuid(noSignInUuid) {
$Storage.set('noSignInUuid', noSignInUuid) $Storage.set('noSignInUuid', noSignInUuid)
console.log($Storage.get('noSignInUuid'),'St(noSignInUuid)');
} }
export function getUserInfo() { export function getUserInfo() {
return $Storage.get('userInfo') return $Storage.get('userInfo')
......
...@@ -4,6 +4,10 @@ import qs from '~/utils/lib/qs' ...@@ -4,6 +4,10 @@ import qs from '~/utils/lib/qs'
const path = '/rop-dj-car-boutique/router' const path = '/rop-dj-car-boutique/router'
const sign = (params, secret, noSignAttr = []) => { const sign = (params, secret, noSignAttr = []) => {
delete params.sign delete params.sign
// if (params.sessionId&&params.method!='dj.api.smartcarlife.workWechat.listSelectAccount') {
// delete params.sessionId
// }
var objStr = qs.stringify(params, { var objStr = qs.stringify(params, {
arrayFormat: 'indices', arrayFormat: 'indices',
allowDots: true, allowDots: true,
......
...@@ -21,6 +21,11 @@ class Request { ...@@ -21,6 +21,11 @@ class Request {
} }
: {} : {}
data = _this.getData(data, method, noSignAttr) data = _this.getData(data, method, noSignAttr)
// console.log('reqData',data?.sessionId);
// delete
// if (data?.sessionId) {
// delete data?.sessionId
// }
wx.request({ wx.request({
url: `${domain[domainName]}${requestPath || path}?method=${method}`, url: `${domain[domainName]}${requestPath || path}?method=${method}`,
data, data,
...@@ -31,7 +36,7 @@ class Request { ...@@ -31,7 +36,7 @@ class Request {
success(response) { success(response) {
/**业务代码 */ /**业务代码 */
let { let {
data: { code, message }, data: { code, message, subErrors},
data data
} = response } = response
...@@ -42,7 +47,13 @@ class Request { ...@@ -42,7 +47,13 @@ class Request {
if (thisPage.route != 'pages/wxLogin/wxLogin') { if (thisPage.route != 'pages/wxLogin/wxLogin') {
getApp().login(true) getApp().login(true)
} }
} else if (code == -1) { }
// else if (code == 32){
// resolve(data)
// // console.log(subErrors);
// throw subErrors
// }
else if (code == -1) {
wx.showToast({ wx.showToast({
title: message || '网络请求失败', title: message || '网络请求失败',
icon: 'none' icon: 'none'
......
...@@ -191,15 +191,23 @@ const isFullSucreen = isComponents => { ...@@ -191,15 +191,23 @@ const isFullSucreen = isComponents => {
success(res) { success(res) {
// console.log(res) // console.log(res)
let { statusBarHeight, screenHeight, windowHeight, safeArea } = res let { statusBarHeight, screenHeight, windowHeight, safeArea } = res
// console.log(statusBarHeight, screenHeight, windowHeight, safeArea)
// const { screenHeight, safeArea } = res // const { screenHeight, safeArea } = res
const { bottom } = safeArea const { bottom } = safeArea
// console.log(bottom) // console.log(bottom)
// console.log(router.isTab, 'router.isTab')
// windowHeight 属性会在自定义导航栏时跟screenHeight 一样导致无法区分是否是iphoneX的机型 // windowHeight 属性会在自定义导航栏时跟screenHeight 一样导致无法区分是否是iphoneX的机型
// 用safeArea可以处理 // 用safeArea可以处理
val = router.isTab ? screenHeight - windowHeight - statusBarHeight - 32 > 72 : screenHeight - bottom > 0 val = router.isTab ? screenHeight - windowHeight - statusBarHeight - 32 > 72 : screenHeight - bottom > 0
// val = router.isTab ? screenHeight - windowHeight - statusBarHeight - 32 > 72 : screenHeight - windowHeight > 72 // val = router.isTab ? screenHeight - windowHeight - statusBarHeight - 32 > 72 : screenHeight - windowHeight > 72
// if (isComponents) val = screenHeight - windowHeight > 72 // if (isComponents) val = screenHeight - windowHeight > 72
if (isComponents) val = screenHeight - bottom > 0 if (isComponents) val = screenHeight - bottom > 0
// console.log(router, 'route')
// if (router.url.includes('tabIndex/pages/index/index')) {
// // console.log('当前页面为 TabBar 页面');
// val = true
// }
}, },
fail(err) { fail(err) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!