c***@126.com
c***@126.com
  • 发布:2022-08-15 10:59
  • 更新:2022-08-15 14:03
  • 阅读:245

uniapp打包报错 h5运行没报错

分类:uni-app


uniapp打包报错检查代码没写错不知道啥原因
[HBuilder] 10:56:02.690 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js):
[HBuilder] 10:56:02.695 语法错误: Unexpected token (3:4)
[HBuilder] 10:56:02.695 at pages\personInfo\personInfo.vue:3

<template>  
    <view class="container">  
        <view class="headers">  
            <view class="user">  
                <view class="logo">  
                    <image src="https://img3.sycdn.imooc.com/5d302ebe0001b64602560256-140-140.jpg" />  
                    <view class="text">商</view>  
                </view>  
                <view class="user-right">  
                    <view class="name">给我一个亿</view>  
                    <view class="vip-btn">vip1</view>  
                </view>  
            </view>  
            <view class="more">  
                <text class="iconfont icon-qiandao"></text>  
                <image src="/static/user_info_btn.png" />  
            </view>  
        </view>  
        <view class="currency">  
            <view class="item">  
                <view class="count">583.50</view>  
                <view class="label">show</view>  
            </view>  
            <view class="item">  
                <view class="count">0.00</view>  
                <view class="label">待解Show</view>  
            </view>  
            <view class="item">  
                <view class="count">673.54</view>  
                <view class="label">锁仓Show</view>  
            </view>  
        </view>  
        <view class="distributor">  
            <view class="desc">  
                <view class="name">经销商</view>  
                <view class="text">即刻畅享3项专属权益</view>  
            </view>  
            <view class="btn" @click="distributor">立即兑换</view>  
        </view>  
        <view class="team">  
            <view class="team-left">  
                <view class="team-name">我的团队</view>  
                <view class="count">23</view>  
                <view class="text">团队总人数</view>  
            </view>  
            <view class="team-right">  
                <view class="icon"><u-icon color="#9a9a9a" name="arrow-right"></u-icon></view>  
                <view class="icon"><image src="/static/team-icon.png"></image></view>  
            </view>  
        </view>  
        <view class="order-container">  
            <view class="title">  
                <view class="title-left">我的订单</view>  
                <view class="title-right">  
                    <text>全部</text>  
                    <u-icon color="#9a9a9a" name="arrow-right"></u-icon>  
                </view>  
            </view>  
            <view class="content">  
                <view class="order-item">  
                    <image src="/static/order/dfk.png"></image>  
                    <view class="desc">待付款</view>  
                </view>  
                <view class="order-item">  
                    <image src="/static/order/dsk.png"></image>  
                    <view class="desc">待收款</view>  
                </view>  
                <view class="order-item">  
                    <image src="/static/order/ssz.png"></image>  
                    <view class="desc">申诉中</view>  
                </view>  
                <view class="order-item">  
                    <image src="/static/order/ywc.png"></image>  
                    <view class="desc">已完成</view>  
                </view>  
            </view>  
        </view>  
        <view class="menu">  
            <view  
                class="menu-item"  
                @click="()=>uni.navigateTo({  
                url: '/pages/walletManager/walletManager'  
            });"  
            >  
                <view class="text">  
                    <u-icon name="red-packet" size="26"></u-icon>  
                    <text>钱包管理</text>  
                </view>  
                <view class="icon"><u-icon color="#9a9a9a" name="arrow-right" size="20"></u-icon></view>  
            </view>  
            <view class="menu-item" @click="clickMenu('/pages/invitation/invitation')">  
                <view class="text">  
                    <u-icon name="share-square" size="26"></u-icon>  
                    <text>分享好友</text>  
                </view>  
                <view class="icon"><u-icon color="#9a9a9a" name="arrow-right" size="20"></u-icon></view>  
            </view>  
            <view class="menu-item">  
                <view class="text">  
                    <u-icon name="minus-people-fill" size="26"></u-icon>  
                    <text>实名认证</text>  
                </view>  
                <view class="icon"><u-icon color="#9a9a9a" name="arrow-right" size="20"></u-icon></view>  
            </view>  
        </view>  
    </view>  
</template>  

<script>  
import { userInfo } from '@/api/userApi.js';  
export default {  
    data() {  
        return {};  
    },  
    created() {  
        this.getData();  
    },  
    methods: {  
        getData() {  
            userInfo().then(res => {  
                console.log(res);  
            });  
        },  
        distributor() {  
            uni.navigateTo({  
                url: '/pages/distributor/distributor'  
            });  
        },  
        clickMenu(path) {  
            uni.navigateTo({  
                url: path  
            });  
        }  
    }  
};  
</script>  

<style lang="less" sc>  
.container {  
    padding: 20rpx 30rpx;  
    background: linear-gradient(90deg, #f0f4f7, #f0f4f7);  
    min-height: 100vh;  
    .headers {  
        margin-top: 40rpx;  
        display: flex;  
        justify-content: space-between;  
        align-items: center;  
        .user {  
            display: flex;  
            font-weight: bold;  
            .logo {  
                position: relative;  
                image {  
                    width: 120rpx;  
                    height: 120rpx;  
                    border-radius: 50%;  
                }  
                .text {  
                    background-color: #6696fc;  
                    color: #fff;  
                    font-size: 20rpx;  
                    position: absolute;  
                    right: -10rpx;  
                    bottom: 10rpx;  
                    padding: 10rpx 15rpx;  
                    border-radius: 50%;  
                }  
            }  
            .user-right {  
                margin-left: 40rpx;  
                .name {  
                    margin-bottom: 14%;  
                }  
                .vip-btn {  
                    font-size: 24rpx;  
                    background-color: #f6e7d2;  
                    padding: 6rpx 12rpx;  
                    border-radius: 30rpx;  
                    display: flex;  
                    align-items: center;  
                    justify-content: center;  
                    color: #b49e6e;  
                }  
            }  
        }  
        .more {  
            display: flex;  
            align-items: center;  
            .iconfont {  
                margin-right: 15rpx;  
                font-size: 48rpx;  
            }  
            image {  
                width: 50rpx;  
                height: 50rpx;  
            }  
        }  
    }  
    .currency {  
        display: flex;  
        justify-content: space-around;  
        align-items: center;  
        background-color: #fff;  
        padding: 34rpx 30rpx;  
        .item {  
            display: flex;  
            flex-direction: column;  
            align-items: center;  
            border-right: 1px solid #ccc;  
            padding-right: 40rpx;  
            &:last-child {  
                border: none;  
            }  
            .count {  
                font-size: 40rpx;  
                font-weight: bold;  
            }  
            .label {  
                font-size: 24rpx;  
                color: #8a919f;  
            }  
        }  
    }  
    .distributor {  
        background: linear-gradient(90deg, #f4ebd0, #faefdd);  
        height: 130rpx;  
        border-bottom-left-radius: 16rpx;  
        border-bottom-right-radius: 16rpx;  
        display: flex;  
        justify-content: space-around;  
        align-items: center;  
        // padding: 0 50rpx;  
        .desc {  
            .name {  
                font-size: 32rpx;  
                color: #69512e;  
            }  
            .text {  
                font-size: 24rpx;  
                color: #b49d75;  
            }  
        }  
        .btn {  
            color: #7b602b;  
            background-color: #e5c493;  
            padding: 14rpx 18rpx;  
            border-radius: 40rpx;  
        }  
    }  
    .team {  
        display: flex;  
        justify-content: space-between;  
        background-color: #fff;  
        border-radius: 14rpx;  
        margin-top: 36rpx;  
        padding: 40rpx 26rpx;  
        // width: 100%;  
        border-radius: 16rpx;  
        .team-left {  
            > view {  
                padding: 5rpx 0;  
            }  
            .team-name {  
                font-size: 30rpx;  
                font-weight: bold;  
            }  
            .count {  
                font-size: 30rpx;  
                font-weight: bold;  
            }  
            .text {  
                font-size: 12px;  
                color: #8a919f;  
            }  
        }  
        .team-right {  
            display: flex;  
            flex-direction: column;  
            justify-content: space-between;  
            align-items: center;  
            margin-top: 4%;  
            .icon {  
                &:nth-child(2) {  
                    width: 70rpx;  
                    height: 50rpx;  
                    image {  
                        width: 100%;  
                        height: 100%;  
                    }  
                }  
            }  
        }  
    }  
    .order-container {  
        background-color: #fff;  
        margin-top: 36rpx;  
        padding: 40rpx 30rpx;  
        border-radius: 16rpx;  
        .title {  
            display: flex;  
            justify-content: space-between;  
            align-items: center;  
            .title-left {  
                font-size: 30rpx;  
                color: #000;  
                font-weight: bold;  
            }  
            .title-right {  
                display: flex;  
                color: #8a919f;  
                font-size: 24rpx;  
            }  
        }  
        .content {  
            margin-top: 30rpx;  
            display: flex;  
            justify-content: space-around;  
            align-items: center;  
            .order-item {  
                display: flex;  
                flex-direction: column;  
                align-items: center;  
                image {  
                    width: 54rpx;  
                    height: 50rpx;  
                }  
                .desc {  
                    margin-top: 10rpx;  
                    font-size: 28rpx;  
                }  
            }  
        }  
    }  
    .menu {  
        background-color: #fff;  
        margin-top: 36rpx;  
        padding: 30rpx 30rpx;  
        border-radius: 16rpx;  
        .menu-item {  
            display: flex;  
            justify-content: space-between;  
            align-items: center;  
            padding: 10rpx;  
            .text {  
                display: flex;  
                align-items: center;  
                font-size: 28rpx;  
                text {  
                    margin-left: 15rpx;  
                }  
            }  
        }  
    }  
}  
</style>  

检查了几遍还是没发现问题

2022-08-15 10:59 负责人:无 分享
已邀请:
BoredApe

BoredApe - 有问题就会有答案。


不支持这么写

要回复问题请先登录注册