|
@@ -1,5 +1,7 @@
|
|
|
<script lang="tsx">
|
|
|
import { defineComponent } from "vue";
|
|
|
+ import store from "@/store"
|
|
|
+ import { Dialog } from 'vant';
|
|
|
export default defineComponent({
|
|
|
props: {
|
|
|
currentSubject: Object as any,
|
|
@@ -17,6 +19,54 @@
|
|
|
},
|
|
|
},
|
|
|
setup(props, { emit }) {
|
|
|
+ //该功能就是vip专门使用
|
|
|
+ const vipClick =(index :number)=>{
|
|
|
+ let vipButtonList :[any] = [{
|
|
|
+ name:"读题+答案"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name:"读题"
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name:"读技巧解释"
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }]
|
|
|
+ if(store.getters.getIsVip){
|
|
|
+ switch(index){
|
|
|
+ case 0:
|
|
|
+ emit("subjectAudioPlay", vipButtonList[index].name);
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ emit("subjectAudioPlay", vipButtonList[index].name);
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ emit("subjectAudioPlay", vipButtonList[index].name);
|
|
|
+ emit("update:skillsShow", true);
|
|
|
+ break;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ Dialog.confirm({
|
|
|
+ title: '提示',
|
|
|
+ message: '需要vip才能使用'
|
|
|
+
|
|
|
+ }).then(()=>{
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
return () => {
|
|
|
return (
|
|
|
<div class="function-list">
|
|
@@ -61,23 +111,23 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
- .function-list {
|
|
|
- width: 100%;
|
|
|
- font-size: 13px;
|
|
|
+.function-list {
|
|
|
+ width: 100%;
|
|
|
+ font-size: 13px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ padding: 15px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ .function-item {
|
|
|
display: flex;
|
|
|
- justify-content: space-around;
|
|
|
- padding: 15px;
|
|
|
- box-sizing: border-box;
|
|
|
- .function-item {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- font-size: 13px;
|
|
|
- font-weight: 400;
|
|
|
- color: #8a9099;
|
|
|
- span {
|
|
|
- margin-top: 5px;
|
|
|
- }
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 13px;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #8a9099;
|
|
|
+ span {
|
|
|
+ margin-top: 5px;
|
|
|
}
|
|
|
}
|
|
|
+}
|
|
|
</style>
|