Browse Source

fix: 广告页不显示

test2
xuesinan 4 years ago
parent
commit
d749dfb8cd
  1. 8
      App.vue
  2. 3
      CHANGELOG.md
  3. 9
      components/Adv/Adv.vue
  4. 16
      pages.json
  5. 13
      pages/index/index.vue

8
App.vue

@ -25,11 +25,11 @@ export default {
// 广 // 广
// #ifdef APP-PLUS // #ifdef APP-PLUS
// uni.$storage.setStorageSync('isOpenApp', true); uni.$storage.setStorageSync('isOpenApp', true);
// this.$store.commit('setIsOpenApp', true); this.$store.commit('setIsOpenApp', true);
// App // App
// let firstOpenApp = uni.$storage.getStorageSync('firstOpenApp'); let firstOpenApp = uni.$storage.getStorageSync('firstOpenApp');
// this.$store.commit('setFirstOpenApp'); this.$store.commit('setFirstOpenApp');
this.getGuide(0); this.getGuide(0);
this.getGuide(1); this.getGuide(1);
// #endif // #endif

3
CHANGELOG.md

@ -1,4 +1,4 @@
# 1.0.0 (2022-01-27) # 1.0.0 (2022-01-28)
### 🌟 新功能 ### 🌟 新功能
范围|描述|commitId 范围|描述|commitId
@ -15,6 +15,7 @@
- | 登录图标、日历页今日 | [7de419d](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/7de419d) - | 登录图标、日历页今日 | [7de419d](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/7de419d)
- | 服务、插件缓存、导入选择服务列表、 | [cc8004b](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/cc8004b) - | 服务、插件缓存、导入选择服务列表、 | [cc8004b](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/cc8004b)
- | 更新代码 | [392c8cc](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/392c8cc) - | 更新代码 | [392c8cc](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/392c8cc)
- | 工作台功能 | [b674733](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/b674733)
- | 广告页、引导页 | [fe87d00](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/fe87d00) - | 广告页、引导页 | [fe87d00](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/fe87d00)
- | 广告页、引导页 | [1c89806](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/1c89806) - | 广告页、引导页 | [1c89806](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/1c89806)
- | 广告页、引导页改为组件 | [2be7903](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/2be7903) - | 广告页、引导页改为组件 | [2be7903](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/2be7903)

9
components/Adv/Adv.vue

@ -10,7 +10,7 @@
<image v-else src="/static/adv.jpg"></image> <image v-else src="/static/adv.jpg"></image>
<view class="time-box absolute">{{ time }} 跳过</view> <view class="time-box absolute" @click="toIndex">{{ time }} 跳过</view>
</view> </view>
</template> </template>
@ -43,6 +43,11 @@
} }
}, 1000); }, 1000);
function toIndex() {
uni.$storage.setStorageSync('isOpenApp', false);
store.commit('setIsOpenApp', false);
}
// setTimeout(() => { // setTimeout(() => {
// // App // // App
// let firstOpenApp = uni.$storage.getStorageSync('firstOpenApp'); // let firstOpenApp = uni.$storage.getStorageSync('firstOpenApp');
@ -64,7 +69,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.adv-box { .adv-box {
width: 100%; width: 100%;
height: 100%; height: calc(100vh - var(--status-bar-height));
image { image {
width: 100%; width: 100%;

16
pages.json

@ -1,21 +1,5 @@
{ {
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages "pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
// #ifdef APP-PLUS
{
"path": "pages/guide/adv",
"style": {
"navigationBarText": "TALL",
"navigationStyle": "custom"
}
},
{
"path": "pages/guide/guide",
"style": {
"navigationBarText": "TALL",
"navigationStyle": "custom"
}
},
// #endif
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {

13
pages/index/index.vue

@ -6,14 +6,19 @@
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<!-- 广告 --> <!-- 广告 -->
<!-- <Adv v-if="isOpenApp"></Adv> --> <Adv v-if="isOpenApp"></Adv>
<!-- 引导页 --> <!-- 引导页 -->
<!-- <Guide v-else-if="!firstOpenApp"></Guide> --> <Guide v-else-if="!firstOpenApp"></Guide>
<!-- #endif --> <!-- #endif -->
<!-- <view class="flex flex-col h-full bg-gray-50" @click="openAuth"> --> <!-- <view class="flex flex-col h-full bg-gray-50" @click="openAuth"> -->
<!-- #ifdef APP-PLUS -->
<theme v-if="!isOpenApp && firstOpenApp" class="relative flex flex-col h-full bg-gray-50">
<!-- #endif -->
<!-- #ifdef H5 -->
<theme class="relative flex flex-col h-full bg-gray-50"> <theme class="relative flex flex-col h-full bg-gray-50">
<!-- #endif -->
<view class="relative"> <view class="relative">
<!-- <view class="relative" @touchmove="onMove"> --> <!-- <view class="relative" @touchmove="onMove"> -->
<!-- 日历 --> <!-- 日历 -->
@ -45,8 +50,8 @@
const store = useStore(); const store = useStore();
const token = computed(() => store.state.user.token); const token = computed(() => store.state.user.token);
const uTips = ref(null); const uTips = ref(null);
// const firstOpenApp = computed(() => store.state.firstOpenApp); const firstOpenApp = computed(() => store.state.firstOpenApp); // APP false true
// const isOpenApp = computed(() => store.state.isOpenApp); // APP const isOpenApp = computed(() => store.state.isOpenApp); // APP true false
const userInfo = computed(() => store.state.user.user); const userInfo = computed(() => store.state.user.user);
const data = reactive({ const data = reactive({

Loading…
Cancel
Save