fix
This commit is contained in:
@@ -37,12 +37,13 @@
|
||||
class="trialApproval button_second credits hideChecked"
|
||||
>
|
||||
Credits :
|
||||
<span :title="presentAssignment">
|
||||
<!-- <div>{{ String(presentAssignment[presentAssignment.legnth-1]) }}</div> -->
|
||||
<div class="credits_item" v-for="item in String(presentAssignment)" :style="{'transform': 'translateY('+item*-100+'%)'}">
|
||||
<span :title="credits">
|
||||
<!-- <div>{{ String(credits.value[credits.value.legnth-1]) }}</div> -->
|
||||
<div class="credits_item" v-for="item in String(credits)" :style="{'transform': 'translateY('+item*-100+'%)'}">
|
||||
<div v-for="numItem in 10">{{ numItem-1 }}</div>
|
||||
</div>
|
||||
</span>
|
||||
<i @click="getCredits" class="fi fi-br-refresh" :class="[activeCredits?'active':'']"></i>
|
||||
<i @click="Assignment" class="fi fi-rr-gift" title="Assignment"></i>
|
||||
<i @click="UpgradePlan" title="Purchase" class="fi fi-rr-shop"></i>
|
||||
</div>
|
||||
@@ -103,6 +104,11 @@
|
||||
<span class="icon iconfont icon-yuyan"></span>
|
||||
<span class="select_item_des">{{$t('Header.language')}}</span>
|
||||
</div>
|
||||
<div class="select_item" @click="orderForm()">
|
||||
|
||||
<i class="fi fi-rs-notebook"></i>
|
||||
<span class="select_item_des">View Orders</span>
|
||||
</div>
|
||||
<div class="select_item" @click="logout()">
|
||||
<span class="icon iconfont icon-tuichu"></span
|
||||
><span class="select_item_des">{{$t('Header.logOff')}}</span>
|
||||
@@ -179,13 +185,15 @@
|
||||
<!-- 绑定邮箱第一步 end -->
|
||||
</div>
|
||||
</a-modal>
|
||||
<payOrder ref="payOrder"></payOrder>
|
||||
<UpgradePlan ref="UpgradePlan"></UpgradePlan>
|
||||
</div>
|
||||
</template>
|
||||
<script >
|
||||
import { defineComponent, createVNode, ref } from "vue";
|
||||
import { defineComponent, createVNode, ref, computed } from "vue";
|
||||
import { isEmail } from "@/tool/util";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import payOrder from "@/component/Pay/payOrder.vue";
|
||||
import VerificationCodeInput from "@/component/LoginPage/verificationCodeInput.vue";
|
||||
import Habit from "@/component/Detail/habit.vue";
|
||||
import UpgradePlan from "@/component/HomePage/UpgradePlan.vue";
|
||||
@@ -200,6 +208,7 @@ export default defineComponent({
|
||||
VerificationCodeInput,
|
||||
Habit,
|
||||
UpgradePlan,
|
||||
payOrder,
|
||||
},
|
||||
setup(){
|
||||
const store = useStore();
|
||||
@@ -207,12 +216,18 @@ export default defineComponent({
|
||||
const {locale} = useI18n()
|
||||
let isTest = ref()
|
||||
let isMurmur = ref()
|
||||
let credits = computed(()=>{
|
||||
return store.state.UserHabit.credits.value
|
||||
})
|
||||
let activeCredits = ref(false)
|
||||
return {
|
||||
store,
|
||||
t,
|
||||
locale,
|
||||
isTest,
|
||||
isMurmur,
|
||||
credits,
|
||||
activeCredits,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -243,11 +258,10 @@ export default defineComponent({
|
||||
// {name:'Tiếng Việt',value:'VIETNAMESE'},
|
||||
// {name:'Italiano',value:'ITALIAN'},
|
||||
],
|
||||
presentAssignment:String(0),
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// presentAssignment(newVal,oldVal){
|
||||
// credits.value(newVal,oldVal){
|
||||
// console.log(String(newVal).length);
|
||||
// }
|
||||
},
|
||||
@@ -283,7 +297,16 @@ export default defineComponent({
|
||||
UpgradePlan.init()
|
||||
},
|
||||
Assignment(){//任务
|
||||
this.presentAssignment = Number(this.presentAssignment) + 123
|
||||
let num = 123+this.credits
|
||||
this.store.commit('setCredits',num)
|
||||
},
|
||||
getCredits(){//刷新当前积分
|
||||
let num = 123+this.credits
|
||||
this.activeCredits = true
|
||||
setTimeout(()=>{
|
||||
this.activeCredits = false
|
||||
},300)
|
||||
this.store.commit('setCredits',num)
|
||||
},
|
||||
//点击下拉图标出现操作
|
||||
changeShowOperateContent() {
|
||||
@@ -364,7 +387,11 @@ export default defineComponent({
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
},
|
||||
|
||||
//查看订单
|
||||
orderForm(){
|
||||
let payOrder = this.$refs.payOrder
|
||||
payOrder.init()
|
||||
},
|
||||
//登出
|
||||
async logout() {
|
||||
let data = {
|
||||
@@ -654,6 +681,7 @@ export default defineComponent({
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
margin-right: .9rem;
|
||||
.credits_item{
|
||||
transition: .3s all;
|
||||
div{
|
||||
@@ -670,6 +698,15 @@ export default defineComponent({
|
||||
font-size: 1.8rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
.fi-br-refresh{
|
||||
margin-left: 0;
|
||||
border-left: none;
|
||||
padding-left: 0;
|
||||
&.active{
|
||||
transition: all .3s;
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
.trialApproval{
|
||||
margin-left: 2rem;
|
||||
|
||||
Reference in New Issue
Block a user