|
|
@@ -8,19 +8,22 @@
|
|
|
{{ item.name }}
|
|
|
</text>
|
|
|
</view>
|
|
|
- <image class="image" src="/static/c+selected.svg" mode="widthFix"
|
|
|
- @click="onClick('cloud', cloudLastPage || '资料库')" />
|
|
|
+ <image v-if="!sightseer" class="image" src="/static/c+selected.svg" mode="widthFix"
|
|
|
+ @click="onClick('cloud', '工作台')" />
|
|
|
</swiper-item>
|
|
|
+
|
|
|
<swiper-item class="swiper-item" item-id="cloud">
|
|
|
- <image class="image" src="/static/c+unselected.svg" mode="widthFix"
|
|
|
- @click="onClick('index', indexLastPage || '首页')" />
|
|
|
- <view class="item" v-for="item in cloud" :key="item.name"
|
|
|
- @click="item.name == showPageName ? update() : onClick('cloud', item.name)">
|
|
|
- <u-loading-icon v-if="item.loading" mode="circle" />
|
|
|
- <text v-else :style="{ fontWeight: item.name == showPageName ? 'bold' : 'normal' }">
|
|
|
- {{ item.name }}
|
|
|
- </text>
|
|
|
- </view>
|
|
|
+ <image class="image" :src="showPageName == '工作台' ? '/static/c+unselected.svg' : '/static/c+selected.svg'"
|
|
|
+ mode="widthFix" @click="onClick('cloud', '工作台')" />
|
|
|
+ <block v-for="item in cloud" :key="item.name">
|
|
|
+ <block v-if="item.name == '工作台'" />
|
|
|
+ <view v-else class="item" @click="item.name == showPageName ? update() : onClick('cloud', item.name)">
|
|
|
+ <u-loading-icon v-if="item.loading" mode="circle" />
|
|
|
+ <text v-else :style="{ fontWeight: item.name == showPageName ? 'bold' : 'normal' }">
|
|
|
+ {{ item.name }}
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
</template>
|
|
|
@@ -29,6 +32,7 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ sightseer: true,
|
|
|
current: "index",
|
|
|
showPageName: "",
|
|
|
indexLastPage: '',
|
|
|
@@ -41,8 +45,12 @@ export default {
|
|
|
name: "案例"
|
|
|
}, {
|
|
|
name: "视频"
|
|
|
+ }, {
|
|
|
+ name: "我的"
|
|
|
}],
|
|
|
cloud: [{
|
|
|
+ name: "工作台"
|
|
|
+ }, {
|
|
|
name: "资料库"
|
|
|
}, {
|
|
|
name: "商学院"
|
|
|
@@ -60,11 +68,27 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.init();
|
|
|
// #ifdef !MP-WEIXIN
|
|
|
this.onClick(this.$parent.$parent.swiperItemID, this.$parent.$parent.page)
|
|
|
// #endif
|
|
|
},
|
|
|
methods: {
|
|
|
+ init() {
|
|
|
+ const systemInitIsComplete = this.$Http.systemInitIsComplete;
|
|
|
+ if (!systemInitIsComplete || typeof systemInitIsComplete == 'object') {
|
|
|
+ this.$Http.HomePageStartRendering = render(this)
|
|
|
+ } else {
|
|
|
+ render(this)
|
|
|
+ }
|
|
|
+ function render(that) {
|
|
|
+ let sightseer = uni.getStorageSync('userMsg').usertype == 99;
|
|
|
+ if (!that.sightseer) that.index.pop();
|
|
|
+ that.sightseer = sightseer
|
|
|
+ console.log("是否游客", that.sightseer)
|
|
|
+ console.log(that.index)
|
|
|
+ }
|
|
|
+ },
|
|
|
onClick(current, name, update = false, params = null) {
|
|
|
if (name == '首页') current = 'index';
|
|
|
const item = this[current].find(v => v.name == name),
|
|
|
@@ -131,6 +155,5 @@ export default {
|
|
|
padding: 4px;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
</style>
|