Skip to content

Commit

Permalink
将页面和组件文件名统一为index
Browse files Browse the repository at this point in the history
补充遗漏的修改
  • Loading branch information
WBBB0730 committed Aug 11, 2023
1 parent 3bcf2ca commit 427660b
Show file tree
Hide file tree
Showing 17 changed files with 28 additions and 26 deletions.
10 changes: 8 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@
"tabBar": {
"custom": true,
"list": [
{ "pagePath": "pages/home/index", "text": "首页" },
{ "pagePath": "pages/my/index", "text": "我的" }
{
"pagePath": "pages/home/index",
"text": "首页"
},
{
"pagePath": "pages/my/index",
"text": "我的"
}
]
},
"window": {
Expand Down
8 changes: 2 additions & 6 deletions custom-tab-bar/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// custom-tab-bar/index.js
Component({

/**
* 组件的初始数据
*/
/** 组件的初始数据 */
data: {
value: 'home',
list: [
Expand All @@ -12,9 +10,7 @@ Component({
],
},

/**
* 组件的方法列表
*/
/** 组件的方法列表 */
methods: {
onChange(event) {
const { value } = event.detail
Expand Down
2 changes: 1 addition & 1 deletion pages/city-picker/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// pages/city-picker/city-picker.js
// pages/city-picker/index.js
import { fetchCurrentCity } from '../../services/location'
const app = getApp()

Expand Down
2 changes: 1 addition & 1 deletion pages/city-picker/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* pages/city-picker/city-picker.wxss */
/* pages/city-picker/index.wxss */
@import '/style/global.less';

.page {
Expand Down
4 changes: 2 additions & 2 deletions pages/city-picker/index.wxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--pages/city-picker/city-picker.wxml-->
<t-navbar title="选择城市" fixed left-arrow />
<!--pages/city-picker/index.wxml-->
<t-navbar title="选择城市" left-arrow />
<view class="current" bind:tap="selectCity" data-city="{{ currentCity }}">
<t-icon name="location" size="48rpx" />
<text>{{ loading ? '正在定位...' : currentCity || '定位失败' }}</text>
Expand Down
2 changes: 1 addition & 1 deletion pages/home/components/card/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// pages/home/components/card/card.js
// pages/home/components/card/index.js
Component({
/** 组件的属性列表 */
properties: {
Expand Down
2 changes: 1 addition & 1 deletion pages/home/components/card/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* pages/home/components/card/card.wxss */
/* pages/home/components/card/index.wxss */
.card {
position: relative;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion pages/home/components/card/index.wxml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--pages/home/components/card/card.wxml-->
<!--pages/home/components/card/index.wxml-->
<view class="card" bind:tap="handleTapCard">
<image class="image" src="{{ activity.image }}" mode="aspectFill" />
<view class="content">
Expand Down
2 changes: 1 addition & 1 deletion pages/home/components/loading-card/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// pages/home/components/loading-card/loading-card.js
// pages/home/components/loading-card/index.js
Component({
/**
* 组件的属性列表
Expand Down
2 changes: 1 addition & 1 deletion pages/home/components/loading-card/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* pages/home/components/loading-card/loading-card.wxss */
/* pages/home/components/loading-card/index.wxss */
.card {
position: relative;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion pages/home/components/loading-card/index.wxml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--pages/home/components/loading-card/loading-card.wxml-->
<!--pages/home/components/loading-card/index.wxml-->
<view class="card">
<t-skeleton rowCol="{{ [{ type: 'rect', size: '240rpx' }] }}" animation="gradient" loading />
<t-skeleton class="content" rowCol="{{ [{ width: '100%' }, {width: '40%'}, {width: '70%'}] }}" animation="gradient" loading />
Expand Down
4 changes: 2 additions & 2 deletions pages/home/components/navigation-bar/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// pages/home/components/navigation-bar/navigation-bar.js
// pages/home/components/navigation-bar/index.js
import { fetchCurrentCity } from '../../../../services/location'
const app = getApp()

Expand Down Expand Up @@ -38,7 +38,7 @@ Component({
selectCity() {
const app = getApp()
wx.navigateTo({
url: '/pages/city-picker/city-picker?city=' + app.globalData.city,
url: '/pages/city-picker/index?city=' + app.globalData.city,
events: {
/** 完成选择 */
selectCity: (city) => {
Expand Down
2 changes: 1 addition & 1 deletion pages/home/components/navigation-bar/index.less

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pages/home/components/navigation-bar/index.wxml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--pages/home/components/navigation-bar/navigation-bar.wxml-->
<!--pages/home/components/navigation-bar/index.wxml-->
<view class="navigation-bar">
<view class="status-bar" style="height: {{statusBarHeight}}px;" />
<view class="nav-bar" style="height: {{(capsule.top - statusBarHeight) * 2 + capsule.height}}px;" bind:tap="selectCity">
Expand Down
2 changes: 1 addition & 1 deletion pages/my/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// pages/my/my.js
// pages/my/index.js
Page({

/**
Expand Down
2 changes: 1 addition & 1 deletion pages/my/index.less
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/* pages/my/my.wxss */
/* pages/my/index.wxss */
4 changes: 2 additions & 2 deletions pages/my/index.wxml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<!--pages/my/my.wxml-->
<text>pages/my/my.wxml</text>
<!--pages/my/index.wxml-->
<text>pages/my/index.wxml</text>

0 comments on commit 427660b

Please sign in to comment.