master
xingyy 9 months ago
parent efad69a78b
commit 77985bd2f3

@ -1,7 +1,7 @@
<template> <template>
<div class="main"> <div class="main">
<div class="content1"> <div class="content1" @click="goContent" >
<div class="wrap1" @click="acc=0"> <div class="wrap1">
<div class="wrap1_1"> <div class="wrap1_1">
<img v-show="acc===0" class="ld ld-fall-ttb-in" style="width: 52rpx;height:52rpx" src="../../static/zu618.png" alt=""> <img v-show="acc===0" class="ld ld-fall-ttb-in" style="width: 52rpx;height:52rpx" src="../../static/zu618.png" alt="">
<img v-show="acc!==0" style="width: 52rpx;height:52rpx" src="../../static/zu759@3x.png" alt=""> <img v-show="acc!==0" style="width: 52rpx;height:52rpx" src="../../static/zu759@3x.png" alt="">
@ -10,7 +10,7 @@
选票 选票
</div> </div>
</div> </div>
<div class="wrap2" @click="acc=1"> <div class="wrap2">
<div class="wrap2_1"> <div class="wrap2_1">
<img v-show="acc===0" style="width: 52rpx;height:52rpx" src="../../static/zu628.png" alt=""> <img v-show="acc===0" style="width: 52rpx;height:52rpx" src="../../static/zu628.png" alt="">
<img v-show="acc!==0" class="ld ld-fall-ttb-in" style="width: 52rpx;height:52rpx" src="../../static/zu-44.png" alt=""> <img v-show="acc!==0" class="ld ld-fall-ttb-in" style="width: 52rpx;height:52rpx" src="../../static/zu-44.png" alt="">
@ -19,29 +19,18 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <tm-tabbar :autoSelect="false" v-model:active="acc">
<tm-tabbar-item
@click="acc = 0"
activeColor="#EB783C"
open-type="reLaunch"
text="选票"
>
<div style="width: 52rpx;height: 52rpx">
<img v-if="acc===0" style="width: 100%;height: 100%" src="../../static/zu618.png" alt="">
<img v-else style="width: 100%;height: 100%" src="../../static/zu759@3x (1).png" alt="">
</div>
</tm-tabbar-item>
<tm-tabbar-item @click="acc = 1" activeColor="#EB783C" text="我的">
<div style="width: 52rpx;height: 52rpx">
<img v-if="acc===0" style="width: 100%;height: 100%" src="../../static/zu628.png" alt="">
<img v-else style="width: 100%;height: 100%" src="../../static/zu-44.png" alt="">
</div>
</tm-tabbar-item>
</tm-tabbar>-->
</template> </template>
<script setup> <script setup>
import {ref, defineEmits, watch,} from 'vue' import {ref, defineEmits, watch} from 'vue'
const emit=defineEmits(['update:modelValue']) const emit=defineEmits(['update:modelValue'])
const goContent=(event)=>{
const windowWidth = uni.getSystemInfoSync().windowWidth;
if (event.changedTouches[0].clientX<windowWidth/2){
acc.value=0
}else {
acc.value=1
}
}
const acc = ref(0) const acc = ref(0)
watch(acc,()=>{ watch(acc,()=>{
emit('update:modelValue',acc.value) emit('update:modelValue',acc.value)

@ -1,5 +1,4 @@
import uniReq from '@/http/init' import uniReq from '@/http/init'
export const login = (data) => { export const login = (data) => {
return uniReq.post({ return uniReq.post({
url: '/api/user/login/wx/telnum', url: '/api/user/login/wx/telnum',

@ -16,8 +16,6 @@ export default uniRequest.created({
uni.hideLoading() uni.hideLoading()
},5000) },5000)
} }
return config return config
}, },
response(response) { response(response) {

Loading…
Cancel
Save