| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- Component({
- data: {
- selected: 0,
- selectedColor: "#1195db",
- color: "#8a8a8a",
- list: [
- {
- pagePath: "/pages/takePhoto/takePhoto",
- text: "货盘",
- selectedIconPath: "../images/tabs/camera-.png",
- iconPath: "../images/tabs/camera.png",
- },
- {
- pagePath: "/pages/cert/cert",
- text: "证书",
- selectedIconPath: "../images/tabs/cert-.png",
- iconPath: "../images/tabs/cert.png",
- },
- {
- pagePath: "/pages/maritime/maritime",
- text: "海事/法务",
- selectedIconPath: "../images/tabs/ship-.png",
- iconPath: "../images/tabs/ship.png",
- },
- {
- pagePath: "/pages/securityCheck/securityCheck",
- text: "年检",
- selectedIconPath: "../images/tabs/check-.png",
- iconPath: "../images/tabs/check.png",
- },
- {
- pagePath: "/pages/shipyard/shipyard",
- text: "船厂",
- selectedIconPath: "../images/tabs/oilPrice-.png",
- iconPath: "../images/tabs/oilPrice.png",
- },
- {
- pagePath: "/pages/school/school",
- text: "学校",
- selectedIconPath: "../images/tabs/legal-.png",
- iconPath: "../images/tabs/legal.png",
- },
- ],
- },
- attached() {},
- methods: {
- switchTab(e) {
- const data = e.currentTarget.dataset;
- const url = data.path;
- wx.switchTab({
- url,
- success: () => {
- this.setData({
- selected: data.index,
- });
- },
- });
- },
- },
- });
|