请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

老师我的代码运行有错误啊

<view>

  <view>

    商品单价:{{product.price}}

  </view>

  <view>

    商品的数量:{{product.num}}

  </view>

  <view>

    商品总价格:{{product.price*product.num}}</view>

    <button type="primarybindtap="onAddNum">num+1</button>

    <button type="primarybindtap="onAddNumN"data-tep="5">num+N</button>

    <view>商品的数量

      <input class="num-inputtype="numbervalue="{{product.num}}"bindinput="oninput"/>

    </view>

    <view>

    售货员小姐姐对你发生一声惊呼

    <text wx:if="{{product.price*product.num<=100}}">hello 帅哥</text>

    <text wx:eiif="{{product.price*product.num>100&&product.price*product.num<1000}}">哇哦,有钱人哦</text>

    <text wx:else="">土豪你好</text>

</view>

    <view>

    售货员小姐姐对你发生一声惊呼

    <text hidden="{{!(product.price*product.num<=100)}}">hello 帅哥</text>

    <text hidden="{{!(product.price*product.num>100&&product.price*product.num<1000)}}">哇哦,有钱人哦</text>

    <text hidden="{{product.price*product.num<=1000}}">土豪你好</text>

    

<view class="produce]t-box">

<block wx:for="{{products}}"

wx:key="index"

>

  <view class="producrt-item">

  <text>索引:{{index}}</text>

  <text>商品名称{{item.name}}</text>

  <text>商品名称{{item.price}}</text>

  </view>


</block>

</view>

</view>

</view>


https://img1.sycdn.imooc.com//szimg/64e32b7909614bd718650783.jpg

正在回答 回答被采纳积分+3

1回答

Sunday 2023-08-21 18:51:13

你好

这个错误是 html 结构出错导致的,应该是缺少闭合标签的原因。

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号