添加抖音小程序

pull/35/head
qsh 8 months ago
parent ab05529015
commit 074b53f307
  1. 3
      package.json
  2. 8
      src/manifest.json
  3. 2
      src/pages.json
  4. 28
      src/pages/index/index.vue

@ -4,8 +4,10 @@
"scripts": { "scripts": {
"dev:h5": "uni", "dev:h5": "uni",
"dev": "uni -p mp-weixin", "dev": "uni -p mp-weixin",
"dev:dy": "uni -p mp-toutiao",
"build:h5": "uni build", "build:h5": "uni build",
"build": "uni build -p mp-weixin", "build": "uni build -p mp-weixin",
"build:dy": "uni build -p mp-toutiao",
"build-test:mp-weixin": "uni --mode test -p mp-weixin" "build-test:mp-weixin": "uni --mode test -p mp-weixin"
}, },
"dependencies": { "dependencies": {
@ -14,6 +16,7 @@
"@dcloudio/uni-components": "3.0.0-alpha-3060420220922001", "@dcloudio/uni-components": "3.0.0-alpha-3060420220922001",
"@dcloudio/uni-h5": "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-weixin": "3.0.0-alpha-3060420220922001",
"@dcloudio/uni-mp-toutiao": "3.0.0-alpha-3060420220922001",
"jsencrypt-plus": "^0.1.0", "jsencrypt-plus": "^0.1.0",
"pinia": "2.0.36", "pinia": "2.0.36",
"pinia-plugin-persist-uni": "^1.2.0", "pinia-plugin-persist-uni": "^1.2.0",

@ -66,7 +66,13 @@
"usingComponents" : true "usingComponents" : true
}, },
"mp-toutiao" : { "mp-toutiao" : {
"usingComponents" : true "usingComponents" : true,
"appid" : "ttbbd1cd6c24e1c00801",
"setting" : {
"es6" : true,
"postcss" : true,
"minified" : true
}
}, },
"uniStatistics" : { "uniStatistics" : {
"enable" : false "enable" : false

@ -8,7 +8,7 @@
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationStyle": "custom", "navigationBarTitleText": "金武联驾考",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },

@ -1,6 +1,6 @@
<template> <template>
<view> <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" <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"> 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> </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" 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> mode="widthFix"></image>
</view> </view>
</view> </view> -->
<view v-if="!getLoading"> <view v-if="!getLoading">
<j-navbar :isBack="false">金武联驾考</j-navbar> <!-- <j-navbar :isBack="false">金武联驾考</j-navbar> -->
<u-sticky bgColor="#fff"> <u-sticky bgColor="#fff">
<u-tabs :list="categoryList" :current="curTab" :scrollable="false" @change="changeCategory"></u-tabs> <u-tabs :list="categoryList" :current="curTab" :scrollable="false" @change="changeCategory"></u-tabs>
</u-sticky> </u-sticky>
@ -52,6 +52,7 @@
}, },
data() { data() {
return { return {
getLoading: true,
show: false, show: false,
subject: storage.get('curSubject') || '1', subject: storage.get('curSubject') || '1',
curTab: 0, curTab: 0,
@ -64,7 +65,10 @@
}; };
}, },
onShow() { onShow() {
setTimeout(() => {
this.getLoading = false
this.show = true this.show = true
}, 100);
this.getSubjectConfig() this.getSubjectConfig()
if (this.subject == '1' || this.subject == '4') { if (this.subject == '1' || this.subject == '4') {
this.rightList = storage.get(`rightList_subject${this.subject}`) || [] this.rightList = storage.get(`rightList_subject${this.subject}`) || []
@ -82,22 +86,6 @@
...mapState(useQuestionStore, ["loading_subject4", "loading_subject1", "curSubject", "orderQuestion_subject1", ...mapState(useQuestionStore, ["loading_subject4", "loading_subject1", "curSubject", "orderQuestion_subject1",
"orderQuestion_subject4" "orderQuestion_subject4"
]), //tagslist ]), //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: { methods: {
...mapActions(useQuestionStore, ['getOrderQuestion_sub4', 'getOrderQuestion_sub1', 'changeSubject']), ...mapActions(useQuestionStore, ['getOrderQuestion_sub4', 'getOrderQuestion_sub1', 'changeSubject']),
@ -113,7 +101,7 @@
} }
}) })
this.subject = storage.get('curSubject') || '1', 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
} }
}) })
}, },

Loading…
Cancel
Save