12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <template>
- <g-toast :is-show="isShowToast">
- <view class="toast_container xuewei_toast" @click="toHonor">
- <image class="bg" src="https://api.jiuweiyun.cn/public/uploads/icon/toast8.png"></image>
- <view class="text">{{ serverUserInfo.score | userXueWei }}</view>
- </view>
- </g-toast>
- </template>
- <script>
- import { toClieckedToast } from "../../utils/api/toast.js"
- import GToast from "../../components/global/toast.vue"
- export default {
- components: {
- GToast
- },
- data() {
- return {
- serverUserInfo: uni.getStorageSync("serverUserInfo"),
- initToast: true
- }
- },
- computed: {
- isShowToast() {
- let { glory_popovers } = this.serverUserInfo
- return this.initToast && glory_popovers && glory_popovers.toast_id
- }
- },
- methods: {
- // 学位弹窗
- toHonor() {
- let { glory_popovers } = this.serverUserInfo
- toClieckedToast({
- id: glory_popovers.toast_id
- }).then(res => {
- this.serverUserInfo.glory_popovers = {}
- uni.setStorage({
- key: "serverUserInfo",
- data: this.serverUserInfo,
- success() {
- uni.navigateTo({
- url: '../../pages/honor/index'
- })
- }
- })
-
- })
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .toast_container {
- position: relative;
- margin: 0 auto;
- .bg {
- width: 100%;
- height: 100%;
- }
- &.xuewei_toast {
- width: 712rpx;
- height: 750rpx;
-
- .text {
- font-size: 62rpx;
- color: #FFFFFF;
- position: absolute;
- width: 488rpx;
- text-align: center;
- height: 104rpx;
- line-height: 104rpx;
- left: 50%;
- margin-left: -244rpx;
- bottom: 138rpx;
- }
- }
- }
- </style>
|