Commit 0cee31a0 by 张立顺

Merge branch 'zhangjie_v3.1' into dev_v3.1

2 parents 40a2bf80 68d0eedd
Showing 49 changed files with 115 additions and 18 deletions
...@@ -4,15 +4,9 @@ ...@@ -4,15 +4,9 @@
"pages/tab/index/index", "pages/tab/index/index",
"pages/tab/output/output", "pages/tab/output/output",
"pages/tab/mine/mine", "pages/tab/mine/mine",
"pages/webView/webView",
"pages/apply/apply",
"login/index/index", "login/index/index",
"login/accountItems/accountItems", "login/accountItems/accountItems",
"pages/checkProduct/checkProduct", "pages/checkProduct/checkProduct"
"packageOutput/pages/summary/summary",
"packageOutput/pages/openBusiness/openBusiness",
"pages/mineDetail/customerManagement/customerManagement",
"pages/mineDetail/messageBox/messageBox"
], ],
"requiredPrivateInfos": ["getLocation"], "requiredPrivateInfos": ["getLocation"],
"lazyCodeLoading": "requiredComponents", "lazyCodeLoading": "requiredComponents",
...@@ -26,8 +20,7 @@ ...@@ -26,8 +20,7 @@
"selectedColor": "#3666FE", "selectedColor": "#3666FE",
"backgroundColor": "#FFFFFF", "backgroundColor": "#FFFFFF",
"borderStyle": "white", "borderStyle": "white",
"list": [ "list": [{
{
"pagePath": "pages/tab/index/index", "pagePath": "pages/tab/index/index",
"text": "拓客户", "text": "拓客户",
"iconPath": "images/home.png", "iconPath": "images/home.png",
...@@ -47,13 +40,55 @@ ...@@ -47,13 +40,55 @@
} }
] ]
}, },
"subpackages": [], "subpackages": [{
"root": "packagesList/packageOutput",
"name": "packageOutput",
"pages": [
"pages/openBusiness",
"pages/summary"
]
}, {
"root": "packagesList/mineDetail",
"name": "mineDetail",
"pages": [
"pages/messageBox",
"pages/customerManagement"
]
}, {
"root": "packagesList/webView",
"name": "webView",
"pages": [
"pages/webView"
]
}, {
"root": "packagesList/apply",
"name": "apply",
"pages": [
"pages/apply"
]
}],
"preloadRule": {
"pages/tab/mine/mine": {
"network": "all",
"packages": [
"mineDetail"
]
},
"pages/tab/index/index": {
"network": "all",
"packages": [
"apply",
"packageOutput"
]
}
},
"usingComponents": { "usingComponents": {
"tab": "/components/Tab/Tab", "tab": "/components/Tab/Tab",
"navigation-bar": "/components/NavigationBar/NavigationBar", "navigation-bar": "/components/NavigationBar/NavigationBar",
"popup": "/components/Popup/Popup", "popup": "/components/Popup/Popup",
"nothing-tips": "/components/Nothing-tips/nothingTips", "nothing-tips": "/components/Nothing-tips/nothingTips",
"crowdfund-poster": "/components/CrowdfundPoster/CrowdfundPoster" "crowdfund-poster": "/components/CrowdfundPoster/CrowdfundPoster",
"glsx-image": "/components/image/index"
}, },
"style": "v2", "style": "v2",
"resolveAlias": { "resolveAlias": {
......
// components/image/index.js
import {IMG_URL,IMG_VERSION} from '~/utils/constantData'
Component({
externalClasses: ['custom-class','class'],
/**
* 组件的属性列表
*/
properties: {
src: {
type: String,
value: ''
},
mode: {
type: String,
value: 'scaleToFill'
}
},
/**
* 组件的初始数据
*/
data: {
imagePath: ''
},
// 组件生命周期
lifetimes: {
// 在组件实例进入页面节点树时执行
attached: function () {
let src = this.data.src
let prefix = IMG_URL
this.setData({
imagePath: `${prefix}${src}` + IMG_VERSION()
})
},
// 在组件实例被从页面节点树移除时执行
detached: function () {
}
},
/**
* 组件的方法列表
*/
methods: {
}
})
\ No newline at end of file \ No newline at end of file
/* components/image/index.wxss */
\ No newline at end of file \ No newline at end of file
<!--components/image/index.wxml-->
<image src="{{imagePath}}" mode="{{mode}}" lazy-load class="custom-class class"></image>
\ No newline at end of file \ No newline at end of file
{ {
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"msg-box": "./components/msgBox/msgBox", "msg-box": "../components/msgBox/msgBox",
"tab": "./components/Tab/Tab" "tab": "../components/Tab/Tab"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
{ {
"usingComponents": { "usingComponents": {
"scene-box": "../../../components/SceneBox/SceneBox", "scene-box": "../../../components/SceneBox/SceneBox",
"output-transform": "./components/outputTransform/outputTransform", "output-transform": "../components//outputTransform/outputTransform",
"output-crowdfund": "./components/outputCrowdfund/outputCrowdfund" "output-crowdfund": "../components/outputCrowdfund/outputCrowdfund"
} }
} }
\ No newline at end of file \ No newline at end of file
/* packagesList/webView/pages/webView.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -18,6 +18,7 @@ Page({ ...@@ -18,6 +18,7 @@ Page({
}, },
navGO(e) { navGO(e) {
let { path } = e.currentTarget.dataset let { path } = e.currentTarget.dataset
console.log(path)
wx.$router.go(path) wx.$router.go(path)
}, },
logout() { logout() {
......
...@@ -32,13 +32,13 @@ ...@@ -32,13 +32,13 @@
</view> </view>
<view class="utilBoxTitle">常用工具</view> <view class="utilBoxTitle">常用工具</view>
<view class="boxItemCon"> <view class="boxItemCon">
<view class="item" data-path="pages.customerManagement" bind:tap="navGO"> <view class="item" data-path="/packagesList/mineDetail/pages/customerManagement" bind:tap="navGO">
<view class="imgcon"> <view class="imgcon">
<image class="img" src="{{IMAGES.icon0}}" /> <image class="img" src="{{IMAGES.icon0}}" />
</view> </view>
<view class="name">客户管理</view> <view class="name">客户管理</view>
</view> </view>
<view class="item" data-path="pages.messageBox" bind:tap="navGO"> <view class="item" data-path="/packagesList/mineDetail/pages/messageBox" bind:tap="navGO">
<view class="imgcon"> <view class="imgcon">
<view class="redPot" hidden="{{!isRead}}" /> <view class="redPot" hidden="{{!isRead}}" />
<image class="img" src="{{IMAGES.icon1}}" /> <image class="img" src="{{IMAGES.icon1}}" />
......
...@@ -14,6 +14,8 @@ class Router { ...@@ -14,6 +14,8 @@ class Router {
wx.onAppRoute && wx.onAppRoute &&
wx.onAppRoute(e => { wx.onAppRoute(e => {
let thisPage = this.getPageInstance() let thisPage = this.getPageInstance()
console.log(e)
console.log(thisPage)
if (thisPage) { if (thisPage) {
thisPage.setData({ IMG_URL, img_version: IMG_VERSION() }) thisPage.setData({ IMG_URL, img_version: IMG_VERSION() })
if (Object.keys(this[_query]).length) thisPage.options = { if (Object.keys(this[_query]).length) thisPage.options = {
...@@ -76,7 +78,9 @@ class Router { ...@@ -76,7 +78,9 @@ class Router {
/**只传页面名 默认跳转当前包下的页面,相同名称默认第一个 */ /**只传页面名 默认跳转当前包下的页面,相同名称默认第一个 */
if (!_name && !last_name) name = _parent if (!_name && !last_name) name = _parent
const routerMapItem = this[_routerList].find(item => { const routerMapItem = this[_routerList].find(item => {
if (route.includes('/')) return item.url === route if (route.includes('/')) {
return item.url === route
}
else { else {
if (last_name) { if (last_name) {
return item.parent === parent && item.name === last_name && item.subPages === name return item.parent === parent && item.name === last_name && item.subPages === name
...@@ -113,6 +117,7 @@ class Router { ...@@ -113,6 +117,7 @@ class Router {
*/ */
go (route, events) { go (route, events) {
let { routerMapItem, query } = this.checkRouter(route, events) let { routerMapItem, query } = this.checkRouter(route, events)
console.log(routerMapItem)
if (routerMapItem.isTab) { if (routerMapItem.isTab) {
wx.switchTab({ wx.switchTab({
url: routerMapItem.url url: routerMapItem.url
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!