Commit 19c93041 by zhangxw

驻店管理 调店分配新增员工改造需求开发

1 parent 59525781
......@@ -59,10 +59,9 @@
"root": "packageWorkspace",
"name": "packageWorkspace",
"pages": [
"pages/serverCenter/view/serverCenter/serverCenter",
"pages/serverCenter/view/companyNoticeDetail/companyNoticeDetail",
"pages/refundOperationList/refundOperationList",
"pages/serverCenter/view/serverCenter/serverCenter",
"pages/serverCenter/view/companyNoticeDetail/companyNoticeDetail",
"pages/refundOperationList/refundOperationList",
"pages/refundDetailList/refundDetailList",
"pages/refundApply/refundApply",
"pages/receptionRecords/receptionRecords",
......@@ -79,17 +78,18 @@
"pages/carSeries/carSeries",
"pages/performanceRating/rateList/retaList",
"pages/validReferralCount/referralCountList/referralCountList",
"pages/attendanceStatis/attendanceList/attendanceList",
"pages/appealFormManage/appealFormList/appealFormList",
"pages/orderApprovalManage/orderApprovalList/orderApprovalList",
"pages/orderApprovalManage/orderApprovalDetail/orderApprovalDetail",
"pages/performanceRating/ruleNote/ruleNote",
"pages/performanceRating/rateEdit/rateEdit",
"pages/performanceRating/rateDetail/rateDetail",
"pages/performanceRating/batchOperation/batchOperation",
"pages/validReferralCount/referraCountEdit/referraCountEdit",
"pages/attendanceStatis/attendanceDetail/attendanceDetail",
"pages/appealFormManage/appealFormDetail/appealFormDetail"
"pages/attendanceStatis/attendanceList/attendanceList",
"pages/appealFormManage/appealFormList/appealFormList",
"pages/orderApprovalManage/orderApprovalList/orderApprovalList",
"pages/orderApprovalManage/orderApprovalDetail/orderApprovalDetail",
"pages/performanceRating/ruleNote/ruleNote",
"pages/performanceRating/rateEdit/rateEdit",
"pages/performanceRating/rateDetail/rateDetail",
"pages/performanceRating/batchOperation/batchOperation",
"pages/validReferralCount/referraCountEdit/referraCountEdit",
"pages/attendanceStatis/attendanceDetail/attendanceDetail",
"pages/appealFormManage/appealFormDetail/appealFormDetail",
"pages/residentManage/createStaff"
]
},
{
......@@ -144,4 +144,4 @@
},
"lazyCodeLoading": "requiredComponents",
"resizable": true
}
}
\ No newline at end of file
......@@ -8,12 +8,12 @@ module.exports = {
},
/**驻店管理-获取园区店 */
getyqMerchantList(data) {
return api.post('dj.api.smartcarlife.scene.yqMerchant.pageList', data)
return api.post('dj.api.scenemerchantref.findAllMerchantPage', data)
},
/**小程序新增员工*/
createStaffAccount(data) {
let params = data || {}
return api.post('dj.api.smartcarlife.staffBaseInfo.account.add', params)
return api.post('dj.api.smartcarlife.staffBaseInfo.account.merchant.assign', params)
},
/** 员工日报配置列表查询 */
......@@ -33,6 +33,10 @@ module.exports = {
/**修改员工日报填报门店配置 */
updateDailyReportConfig(data) {
return api.post("dj.api.smartcarlife.staff.dailyReportConfig.update", data);
},
},
/** 根据人员获取业务场景数据 */
getBaseSceneCodeList(data) {
return api.post("dj.api.scenemerchantref.findAllSceneByMerchantId", data)
}
};
\ No newline at end of file
......@@ -316,20 +316,12 @@ Component({
} = this.data;
let {
staffPhone,
staffName
} = accountList[index]
let pageInstance = wx.$router.getPageInstance()
pageInstance.setData({
activeIndex: 0
}, () => {
let thisPage = pageInstance.selectComponent(`#componet-0`)
thisPage.setData({
'staffObj.staffName': staffName,
'staffObj.staffPhone': staffPhone
})
})
staffName,
staffId
} = accountList[index]
wx.navigateTo({
url: `/packageWorkspace/pages/residentManage/createStaff?staffPhone=${staffPhone}&staffName=${staffName}&staffId=${staffId}`
})
},
// 触底刷新
mineReachBottom() {
......@@ -362,11 +354,11 @@ Component({
})
},
},
lifetimes: {
attached: function () {
this.getData()
}
// lifetimes: {
// attached: function () {
// this.getData()
// }
},
// },
})
\ No newline at end of file
......@@ -23,7 +23,7 @@
<block wx:if="{{ isFlag }}">
<scroll-view
class="account-box"
style="height: calc(100vh - var(--fontSize640));"
style="height: calc(100vh - var(--fontSize540));"
enhanced="{{ true }}"
show-scrollbar="{{ false }}"
scroll-y
......
......@@ -39,62 +39,70 @@ Component({
merchantName: '', //归属门店名称
yqMerchantId: '', //园区店id
yqMerchantName: '', //园区店名称
}
},
},
baseSceneList: []
},
/**
* 组件的方法列表
*/
methods: {
getBaseSceneList() {
let { staffObj } = this.data
api.getBaseSceneCodeList({merchantId: staffObj?.merchantId}).then(res => {
this.setData({baseSceneList: res?.data || []})
})
},
showPopup(e) {
let {
showName
} = e.currentTarget.dataset, {
staffObj: {
staffSceneLabel,
staffSceneLabel,
merchantId,
},
yqMerchartList
} = this.data;
if (showName == 'shopMerchantBox' && staffSceneLabel == '') {
wx.$util.showToast(`请先选择所属业务`);
return
}
if (showName == 'yqMerchartBox' && merchantId == '') {
} = this.data;
if (showName == 'isBusiness' && merchantId == '') {
wx.$util.showToast(`请先选择归属门店`);
return
}
if (showName == 'yqMerchartBox' && yqMerchartList.length <= 1) {
if (showName == 'yqMerchartBox' && staffSceneLabel == '') {
wx.$util.showToast(`请先选择所属业务`);
return
}
if (showName == 'yqMerchartBox' && yqMerchartList.length <= 1) {
return
}
this.setData({
[showName]: true
});
},
getyqMerchantList() {
let {
staffSceneLabel,
merchantId
} = this.data.staffObj
let params = {
sceneLabel: staffSceneLabel,
merchantId
}
try {
api.getyqMerchantList(params).then(res => {
if (res.code == 0) {
let item = res.data.list.length ? res.data.list[0] : ''
this.setData({
yqMerchartList: res.data.list,
'staffObj.yqMerchantId': item ? item.yqMerchantId : '',
'staffObj.yqMerchantName': item ? item.yqMerchantName : ''
})
}
})
} catch (err) {
// getyqMerchantList() {
// let {
// staffSceneLabel,
// merchantId
// } = this.data.staffObj
// let params = {
// baseSceneCode: staffSceneLabel,
// merchantId
// }
// try {
// api.getyqMerchantList(params).then(res => {
// if (res.code == 0) {
// let item = res.data.list.length ? res.data.list[0] : ''
// console.log(item)
// this.setData({
// yqMerchartList: res.data.list,
// 'staffObj.yqMerchantId': item ? item.yqMerchantId : '',
// 'staffObj.yqMerchantName': item ? item.yqMerchantName : ''
// })
// }
// })
// } catch (err) {
}
},
// }
// },
selectChoose(e) {
let {
chooseList,
......@@ -104,24 +112,36 @@ Component({
let textArr = [],
idArr = [];
chooseList.forEach(item => {
textArr.push(item.text)
idArr.push(item.id)
})
textArr.push(item.baseSceneCodeName)
idArr.push(item.baseSceneCode)
})
this.setData({
[text]: textArr.join(','),
[key]: idArr.join(','),
'staffObj.yqMerchantId': '',
'staffObj.yqMerchantName': '',
'staffObj.merchantId': '',
'staffObj.merchantName': '',
yqMerchartList: []
[key]: idArr.join(','),
'staffObj.yqMerchantId': chooseList && chooseList[0]?.serviceList && chooseList[0]?.serviceList[0]?.merchantId,
'staffObj.yqMerchantName': chooseList && chooseList[0]?.serviceList && chooseList[0]?.serviceList[0]?.merchantName,
})
},
},
selectChooseShop(e) {
let {shopMerchantId, shopMerchantName} = e.detail
this.setData({
'staffObj.merchantId': shopMerchantId,
'staffObj.merchantName': shopMerchantName,
'staffObj.staffSceneLabelText': '',
'staffObj.staffSceneLabel': '',
'staffObj.yqMerchantId': '',
'staffObj.yqMerchantName': '',
yqMerchartList: [],
shopMerchantBox: false
}, () => {
this.getBaseSceneList()
})
},
async submit(i) {
let _this = this;
let {
staffObj
staffObj
} = this.data;
let thisPage = wx.$router.getPageInstance()
let key = thisPage.checkRequired(staffObj);
......@@ -133,10 +153,11 @@ Component({
let apiName =
"createStaffAccount",
params = {
...staffObj
...staffObj,
sceneList: staffObj?.staffSceneLabel?.split(',')?.map(val => { return {baseSceneCode: val} })
};
delete params.staffSceneLabelText
delete params.staffSceneLabel
api[apiName](params)
.then((res) => {
let {
......@@ -168,10 +189,7 @@ Component({
// staffObj: clearData
// }
// )
thisPage.setData({
activeIndex: 1
})
wx.$router.back()
}
},
});
......
......@@ -11,21 +11,21 @@
<view class="box">
<gl-cell border valueAlign="right" label="员工姓名" cellHeight="{{cellHeight}}" cellStyle="{{cellStyle}}" requiredAfter labelWidth="var(--fontSize290)" required>
<input placeholder="请输入" value="{{staffObj.staffName}}" class="input" placeholder-class="placeholder-class" bindinput="input" data-name="staffObj.staffName" always-embed></input>
<input placeholder="请输入" disabled style="color: #BBBBBB;" value="{{staffObj.staffName}}" class="input" placeholder-class="placeholder-class" bindinput="input" data-name="staffObj.staffName" always-embed></input>
</gl-cell>
<gl-cell border valueAlign="right" label="手机号" cellHeight="{{cellHeight}}" cellStyle="{{cellStyle}}" requiredAfter labelWidth="var(--fontSize140)" required>
<input placeholder="请输入" class="input" value="{{staffObj.staffPhone}}" type="number" maxlength="11" placeholder-class="placeholder-class" bindinput="input" bindblur="phoneBlur" data-name="staffObj.staffPhone" always-embed></input>
<input placeholder="请输入" disabled class="input" style="color: #BBBBBB;" value="{{staffObj.staffPhone}}" type="number" maxlength="11" placeholder-class="placeholder-class" bindinput="input" bindblur="phoneBlur" data-name="staffObj.staffPhone" always-embed></input>
</gl-cell>
<gl-cell border valueAlign="right" required label="归属门店" cellHeight="{{cellHeight}}" cellStyle="{{cellStyle}}" requiredAfter labelWidth="var(--fontSize180)" haveArrow bindclick="showPopup" data-show-name="shopMerchantBox" placeholder="点击选择">
<block wx:if="{{ staffObj.merchantId }}">
<view class="between">{{staffObj.merchantName}}{{staffObj.merchantId}}</view>
</block>
</gl-cell>
<gl-cell border valueAlign="right" label="所属业务" cellHeight="{{cellHeight}}" cellStyle="{{cellStyle}}" requiredAfter labelWidth="var(--fontSize180)" required haveArrow bindclick="showPopup"data-show-name="isBusiness" placeholder="点击选择">
<block wx:if="{{ staffObj.staffSceneLabelText }}">
<view class="between">{{staffObj.staffSceneLabelText}}</view>
</block>
</gl-cell>
<gl-cell border valueAlign="right" required label="归属门店" cellHeight="{{cellHeight}}" cellStyle="{{cellStyle}}" requiredAfter labelWidth="var(--fontSize180)" haveArrow bindclick="showPopup" data-show-name="shopMerchantBox" placeholder="点击选择">
<block wx:if="{{ staffObj.merchantId }}">
<view class="between">{{staffObj.merchantName}}{{staffObj.merchantId}}</view>
</block>
</gl-cell>
<gl-cell valueAlign="right" label="关联账号" required cellHeight="{{cellHeight}}" cellBoxStyle="{{cellBoxStyle}}" cellStyle="{{cellStyle}}" requiredAfter labelWidth="var(--fontSize290)" haveArrow="{{yqMerchartList.length>1}}" bindclick="showPopup" data-show-name="yqMerchartBox" placeholder="点击选择" >
<block wx:if="{{ staffObj.yqMerchantName }}">
<view class="between">{{staffObj.yqMerchantName}}{{staffObj.yqMerchantId}}</view>
......@@ -36,6 +36,6 @@
<view class="btn" bind:tap="submit">确认开通</view>
<text class="hint">请核对员工姓名、手机号,开通账号后即可</text>
<text class="hint">投入使用。登录密码默认为Aa+手机号</text>
<business-type show="{{isBusiness}}" scene-label="{{staffObj.staffSceneLabel}}" bindconfirm="selectChoose"></business-type>
<shop-merchant show="{{shopMerchantBox}}" scene-label="{{staffObj.staffSceneLabel}}" bindconfirm="selectChoose" merchantId="{{staffObj.merchantId}}"></shop-merchant>
<business-type show="{{isBusiness}}" scene-label="{{staffObj.staffSceneLabel}}" baseSceneList="{{baseSceneList}}" bindconfirm="selectChoose"></business-type>
<shop-merchant show="{{shopMerchantBox}}" scene-label="{{staffObj.staffSceneLabel}}" bindconfirm="selectChooseShop" merchantId="{{staffObj.merchantId}}"></shop-merchant>
<yq-merchant show="{{yqMerchartBox}}" merchantId="{{staffObj.yqMerchantId}}" yqMerchartList="{{yqMerchartList}}"></yq-merchant>
\ No newline at end of file
......@@ -10,7 +10,8 @@ Component({
if (n) this.initData();
}
},
sceneLabel: String,
sceneLabel: String,
baseSceneList: Array
},
/**
......@@ -19,17 +20,7 @@ Component({
data: {
key:'staffObj.staffSceneLabel',
text:'staffObj.staffSceneLabelText',
list: [{
text: '轻改',
id: 1,
active: false
},
{
text: '会员权益/升级',
id: 0,
active: false
}
]
list: []
},
/**
......@@ -37,18 +28,18 @@ Component({
*/
methods: {
initData(ids) {
let arr = this.data.sceneLabel ?this.data.sceneLabel.split(','):[],
let arr = this.data.sceneLabel ? this.data.sceneLabel.split(','):[],
{
list
} = this.data;
list.forEach(item => {
baseSceneList
} = this.data;
baseSceneList.forEach(item => {
item.active = false
if (arr.includes(String(item.id))) {
if (arr.includes(String(item.baseSceneCode))) {
item.active = true
}
})
this.setData({
list
list: baseSceneList
})
},
choose(e) {
......@@ -56,9 +47,8 @@ Component({
list
} = this.data, {
index
} = e.currentTarget.dataset;
let thisPage = wx.$router.getPageInstance();
list.forEach(item=>{
} = e.currentTarget.dataset;
list.forEach(item=>{
item.active=false
})
list[index].active =true
......@@ -77,19 +67,10 @@ Component({
return item
}
})
let thisPage = wx.$router.getPageInstance();
if (!chooseList.length) return wx.$util.showToast("请勾选业务");
this.setData({
show: false,
});
thisPage.setData({
isBusiness: false,
});
// thisPage?.setGoodsTotal && thisPage.setGoodsTotal(chooseList);
// thisPage.setData({
// goodsList: chooseList,
// });
console.log(chooseList)
this.triggerEvent("confirm",{ chooseList,text,key});
},
cancel() {
......
/* tabWorkOrder/pages/residentManage/components/businessType/index.wxss */
.box {
height:200rpx;
// height:200rpx;
height: 100%;
// width: calc(100% + var(--fontSize64));
// margin-left: calc(-1 * var(--fontSize32));
}
......
<popup show="{{ show }}" title="选择所属业务" bindconfirm="confirm" bindcancel="cancel" height="40%">
<view class="box">
<scroll-view scroll-y show-scrollbar="{{false}}" enhanced="true" class="box">
<block wx:if="{{list.length}}">
<view class="item" wx:for="{{ list }}">
<view class="item-hd" catchtap="choose" data-index="{{ index }}">
......@@ -11,10 +11,10 @@
<view class="arc" />
</block>
</view>
<view class="name">{{item.text}}</view>
<view class="name">{{item.baseSceneCodeName}}</view>
</view>
</view>
</block>
<view class="safeAreaInset"></view>
</view>
</scroll-view>
</popup>
\ No newline at end of file
......@@ -87,8 +87,7 @@ Component({
let params = {
merchantIdName,
pageNum,
pageSize,
sceneLabel: this.data.sceneLabel
pageSize
}
api.getshopMerchantList(params).then(res => {
if (res.code == 0) {
......@@ -174,16 +173,17 @@ Component({
this.setData({
show: false
}, () => {
let pageInstance = wx.$router.getPageInstance()
let thisPage = pageInstance.selectComponent(`#componet-0`)
this.triggerEvent("confirm",{ shopMerchantId, shopMerchantName})
// let pageInstance = wx.$router.getPageInstance()
// let thisPage = pageInstance.selectComponent(`#componet-0`)
thisPage.setData({
shopMerchantBox: false,
'staffObj.merchantId': shopMerchantId,
'staffObj.merchantName': shopMerchantName
}, () => {
thisPage.getyqMerchantList()
})
// thisPage.setData({
// shopMerchantBox: false,
// 'staffObj.merchantId': shopMerchantId,
// 'staffObj.merchantName': shopMerchantName
// }, () => {
// // thisPage.getyqMerchantList()
// })
})
},
......
......@@ -62,7 +62,9 @@
}
.list-nothing,
.list-not {
text-align: center;
text-align: center;
font-size: 28rpx;
color: #979797;
}
.search-input {
// border: 1rpx solid #979797;
......
......@@ -7,7 +7,7 @@
</block>
</view>
<block wx:if="{{isFlag}}">
<scroll-view class="store-select-box" scroll-top="{{scrollTop}}" style="height: calc(100% - var(--fontSize60));" enhanced="{{true}}" show-scrollbar="{{false}}" scroll-y bindscrolltolower="mineReachBottom">
<scroll-view class="store-select-box" scroll-top="{{scrollTop}}" style="height: calc(100% - var(--fontSize82));" enhanced="{{true}}" show-scrollbar="{{false}}" scroll-y bindscrolltolower="mineReachBottom">
<view class="merchant-box" wx:if="{{shopMerchantList.length>0}}">
<block wx:for="{{shopMerchantList}}" wx:key="index">
<view class="item {{storeIndex===index?'active':''}}" bindtap="choose" data-index="{{index}}">
......
......@@ -6,7 +6,7 @@
font-size: var(--fontSize32);
}
.store-select-box{
height: calc(100% - var(--fontSize168));
height: calc(100% - var(--fontSize82));
}
.merchant-box .item{
......
// packageWorkspace/pages/residentManage/createStaff.js
const phoneRex = /^[1]([3-9])[0-9]{9}$/;
Page({
/**
* 页面的初始数据
*/
data: {
navStyle: 'background-color: transparent',
navBarHeight: 88,
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let comp = this.selectComponent('#componet-0')
if (comp) {
comp.setData({
'staffObj.staffName': options?.staffName,
'staffObj.staffPhone': options?.staffPhone,
'staffObj.staffId': options?.staffId
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
back() {
wx.$router.back()
},
getBaseSceneList() {
getBaseSceneCodeList
},
checkRequired(obj) {
let target = [
"staffName",
"staffPhone",
"staffSceneLabel",
"merchantId",
"yqMerchantId"
];
obj = {
...obj
};
if (!phoneRex.test(obj.staffPhone)) {
this.showToast("请输入正确的手机号");
return true;
}
try {
target.map((key) => {
if (!obj[key]) {
throw key;
}
});
} catch (error) {
return error;
}
return false;
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {
"add-staff":"./components/addStaff/index"
},
"navigationStyle": "custom"
}
\ No newline at end of file
/* packageWorkspace/pages/residentManage/createStaff.wxss */
page {
background: #F7F8FA;
}
.bg {
width: 100%;
height: var(--fontSize400);
background: linear-gradient(0deg, #e8f0fb00 0%, #dde8fb 100%);
position: fixed;
left: 0;
top: 0;
z-index: -1;
}
\ No newline at end of file
<!--packageWorkspace/pages/residentManage/createStaff.wxml-->
<navigation-bar bindnavbarReady="navbarReady" class="navigation-bar-wrap" bindback="back" showBack="true" navStyle="{{navStyle}}">新增员工</navigation-bar>
<view class="bg"></view>
<view class="content" style="margin-top: {{navBarHeight}}px;">
<add-staff id="componet-0"></add-staff>
</view>
......@@ -57,7 +57,8 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
const comp = this.selectComponent("#componet-1");
comp.getData && comp.getData()
},
back() {
wx.$router.back()
......
{
"navigationStyle": "custom",
"usingComponents": {
"add-staff":"./components/addStaff/index",
"account-allocation":"./components/accountAllocation/index"
}
}
\ No newline at end of file
......@@ -2,9 +2,5 @@
<navigation-bar bindnavbarReady="navbarReady" class="navigation-bar-wrap" bindback="back" showBack="true" navStyle="{{navStyle}}">驻店管理</navigation-bar>
<view class="bg"></view>
<view class="content">
<view class="tabs" >
<view wx:for="{{list}}" wx:key="index" class="tab {{activeIndex==index?'active':''}}" data-index="{{index}}" bind:tap="changeHandle">{{item}}</view>
</view>
<add-staff id="componet-0" wx:if="{{activeIndex===0}}"></add-staff>
<account-allocation id="componet-1" wx:if="{{activeIndex===1}}"></account-allocation>
<account-allocation id="componet-1"></account-allocation>
</view>
\ No newline at end of file
{
"appid": "wx6216a8e625e76b00",
"projectname": "regional-assistant",
"compileType": "miniprogram",
"libVersion": "3.14.3",
"scripts": {
"beforeUpload": "node ./scripts/wx-upload-guard.js || exit 1"
},
"packOptions": {
"ignore": [
{
"value": ".vscode",
"type": "folder"
}
],
"include": []
},
"setting": {
"urlCheck": false,
"coverView": true,
"es6": true,
"postcss": true,
"minified": true,
"enhance": true,
"showShadowRootInWxmlPanel": true,
"packNpmManually": true,
"packNpmRelationList": [
{
"packageJsonPath": "./package.json",
"miniprogramNpmDistDir": "./miniprogram_npm"
}
],
"compileHotReLoad": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useCompilerPlugins": [
"sass"
],
"ignoreDevUnusedFiles": false,
"ignoreUploadUnusedFiles": false,
"compileWorklet": false,
"uglifyFileName": false,
"uploadWithSourceMap": true,
"minifyWXSS": true,
"minifyWXML": true,
"localPlugins": false,
"disableUseStrict": false,
"condition": false,
"swc": false,
"disableSWC": true
},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
},
"simulatorPluginLibVersion": {}
"appid": "wx6216a8e625e76b00",
"projectname": "regional-assistant",
"compileType": "miniprogram",
"libVersion": "3.14.3",
"scripts": {
"beforeUpload": "node ./scripts/wx-upload-guard.js || exit 1"
},
"packOptions": {
"ignore": [
{
"value": ".vscode",
"type": "folder"
}
],
"include": []
},
"setting": {
"urlCheck": false,
"coverView": true,
"es6": true,
"postcss": true,
"minified": true,
"enhance": true,
"showShadowRootInWxmlPanel": true,
"packNpmManually": true,
"packNpmRelationList": [
{
"packageJsonPath": "./package.json",
"miniprogramNpmDistDir": "./miniprogram_npm"
}
],
"compileHotReLoad": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useCompilerPlugins": [
"sass"
],
"ignoreDevUnusedFiles": false,
"ignoreUploadUnusedFiles": false,
"compileWorklet": false,
"uglifyFileName": false,
"uploadWithSourceMap": true,
"minifyWXSS": true,
"minifyWXML": true,
"localPlugins": false,
"disableUseStrict": false,
"condition": false,
"swc": false,
"disableSWC": true
},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
},
"simulatorPluginLibVersion": {}
}
\ No newline at end of file
......@@ -118,10 +118,10 @@ class Router {
name = _name.split("?")[0];
parent = _parent;
}
console.log("this[_routerList]", this[_routerList]);
// console.log("this[_routerList]", this[_routerList]);
const routerMapItem = this[_routerList].find((item) => item.parent === parent && item.name === name);
// console.log(this[_routerList])
console.log(routerMapItem);
// console.log(routerMapItem);
if (!routerMapItem) {
console.error("找不到路由");
return;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!