|
@@ -17,8 +17,10 @@
|
|
|
<CustomTabBar :cardId="cardId" :currentTabNumber="0" :nianji="nianji" :zhangId="zhangId"></CustomTabBar>
|
|
|
<tip-small-dialog ref="goPayDialogRef" @confirm-btn="goPayPage" :content="tipContent"></tip-small-dialog>
|
|
|
<tip-middle-dialog ref="youkeDialogRef" @confirm-btn="ykConfirm" :content="YouKeContent"></tip-middle-dialog>
|
|
|
+ <dao-tip-dialog ref="daoTipDialogRef" v-if="showDaoTip" :productTip="productTipImg" @dao-tip-close="daoTipClose"></dao-tip-dialog>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
+ import daoTipDialog from './daoTipDialog.vue';
|
|
|
import {
|
|
|
userZhangInfo,
|
|
|
userLocate,
|
|
@@ -94,10 +96,46 @@
|
|
|
1: ' 数学',
|
|
|
2: ' 英语'
|
|
|
};
|
|
|
+
|
|
|
+ const daoTipDialogRef = ref(null);
|
|
|
+ const showDaoTip = ref(true);
|
|
|
+ const productTipImg = ref('');
|
|
|
+
|
|
|
onLoad((options) => {
|
|
|
- init(options)
|
|
|
+ init(options);
|
|
|
+ getProjectImg();
|
|
|
})
|
|
|
-
|
|
|
+ function getProjectImg(){
|
|
|
+ if(currentProduct.value ==1){
|
|
|
+ // 数学
|
|
|
+ productTipImg.value = 'static/images/study/shuxue/study-wrap-bj.png';
|
|
|
+ getBj('shuxue')
|
|
|
+ }else if(currentProduct.value ==2){
|
|
|
+ // 英语
|
|
|
+ productTipImg.value = 'static/images/study/yingyu/test-item-active.png'
|
|
|
+ getBj('yingyu');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function getBj(data){
|
|
|
+ let bjType =cacheManager.get('dao-tip')[data];
|
|
|
+ if(bjType!=='has'){
|
|
|
+ nextTick(() => {
|
|
|
+ daoTipDialogRef.value.handleShow();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function daoTipClose(){
|
|
|
+ if(cacheManager.get('auth')){
|
|
|
+ // 非游客 记缓存
|
|
|
+ if(currentProduct.value ==1){
|
|
|
+ // 数学
|
|
|
+ cacheManager.updateObject('dao-tip',{shuxue:'has'})
|
|
|
+ }else if(currentProduct.value ==2){
|
|
|
+ // 英语
|
|
|
+ cacheManager.updateObject('dao-tip',{yingyu:'has'})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
function onChangeTab(e) {
|
|
|
console.log('e',e);
|
|
|
console.log(e.detail.current);
|