diff --git a/package.json b/package.json index 07e5a3e..755d9b8 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,10 @@ "scripts": { "dev:h5": "uni", "dev": "uni -p mp-weixin", + "dev:dy": "uni -p mp-toutiao", "build:h5": "uni build", "build": "uni build -p mp-weixin", + "build:dy": "uni build -p mp-toutiao", "build-test:mp-weixin": "uni --mode test -p mp-weixin" }, "dependencies": { @@ -14,6 +16,7 @@ "@dcloudio/uni-components": "3.0.0-alpha-3060420220922001", "@dcloudio/uni-h5": "3.0.0-alpha-3060420220922001", "@dcloudio/uni-mp-weixin": "3.0.0-alpha-3060420220922001", + "@dcloudio/uni-mp-toutiao": "3.0.0-alpha-3060420220922001", "jsencrypt-plus": "^0.1.0", "pinia": "2.0.36", "pinia-plugin-persist-uni": "^1.2.0", diff --git a/src/manifest.json b/src/manifest.json index 6a0fa1a..523fea4 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -66,7 +66,13 @@ "usingComponents" : true }, "mp-toutiao" : { - "usingComponents" : true + "usingComponents" : true, + "appid" : "ttbbd1cd6c24e1c00801", + "setting" : { + "es6" : true, + "postcss" : true, + "minified" : true + } }, "uniStatistics" : { "enable" : false diff --git a/src/pages.json b/src/pages.json index 94ec62b..c85fb59 100644 --- a/src/pages.json +++ b/src/pages.json @@ -8,7 +8,7 @@ { "path": "pages/index/index", "style": { - "navigationStyle": "custom", + "navigationBarTitleText": "金武联驾考", "enablePullDownRefresh": false } }, diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index a43679b..4a60fe4 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -1,6 +1,6 @@ <template> <view> - <view v-if="getLoading" class="wp100 relative" style="height: 100vh;"> + <!-- <view v-if="getLoading" class="wp100 relative" style="height: 100vh;"> <image class="wp100" mode="widthFix" src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E8%80%83%E8%AF%95%E6%8F%90%E9%86%92_20230906135037.png"> </image> @@ -9,9 +9,9 @@ src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E9%87%91%E6%AD%A6%E8%81%94_20230831123333.png" mode="widthFix"></image> </view> - </view> + </view> --> <view v-if="!getLoading"> - <j-navbar :isBack="false">金武联驾考</j-navbar> + <!-- <j-navbar :isBack="false">金武联驾考</j-navbar> --> <u-sticky bgColor="#fff"> <u-tabs :list="categoryList" :current="curTab" :scrollable="false" @change="changeCategory"></u-tabs> </u-sticky> @@ -52,6 +52,7 @@ }, data() { return { + getLoading: true, show: false, subject: storage.get('curSubject') || '1', curTab: 0, @@ -64,7 +65,10 @@ }; }, onShow() { - this.show = true + setTimeout(() => { + this.getLoading = false + this.show = true + }, 100); this.getSubjectConfig() if (this.subject == '1' || this.subject == '4') { this.rightList = storage.get(`rightList_subject${this.subject}`) || [] @@ -82,22 +86,6 @@ ...mapState(useQuestionStore, ["loading_subject4", "loading_subject1", "curSubject", "orderQuestion_subject1", "orderQuestion_subject4" ]), //映射函数,取出tagslist - getLoading() { - return this.loading_subject4 && this.loading_subject1 - } - }, - watch: { - getLoading(newVal) { - if (this.show) { - if (newVal) { - if (this.loading_subject4 && this.loading_subject1) { - uni.hideTabBar(); - } - } else { - uni.showTabBar() - } - } - } }, methods: { ...mapActions(useQuestionStore, ['getOrderQuestion_sub4', 'getOrderQuestion_sub1', 'changeSubject']), @@ -113,7 +101,7 @@ } }) this.subject = storage.get('curSubject') || '1', - this.curTab = this.categoryList.findIndex(item => item.configItemCode == this.subject) + this.curTab = this.categoryList.findIndex(item => item.configItemCode == this.subject) || 0 } }) },