查看协议-小程序

2022-04-24 11:27:47 阅读:1 编辑
<text class="rule" bindtap="onAgreement">订座拼餐规则及相关协议</text>
<van-popup-gray show="{{agreement_show}}" position="bottom" bind:close="closeAgreementShow">
    <view class="apply_content" w-scroll-y>
      <image src="/zhy/resource/images/close.png" class="close" bindtap="closeAgreementShow"></image>
      <view class="v1">订座拼餐规则及相关协议</view>
      <template v-html="agreement" is="wxParse" data="{{wxParseData:agreement.nodes}}" />
    </view>
  </van-popup-gray>
data: {
        agreement_show: false,
        agreement: "",
    },
 onAgreement(e) {
        let agreement_show = this.data.agreement_show;
        this.setData({
            agreement_show: !agreement_show
        })
    },
    closeAgreementShow(e) {
        this.setData({
            agreement_show: false
        })
    },
        onLoad(o) {
        this.checkPageLogin();
        let agreement = '<p>的规则好的<img src="https://zhyframe.fzh.fun/attachment/images/1023/2021/10/6019ef89bf9e4654a2e6aab254e7e087.png" width="100%"/></p>';
        this.setData({
            agreement: agreement
        });
        WxParse.wxParse('agreement', 'html', agreement, this, 20);
    },
{
  "navigationBarTitleText": "拼餐预订订单",
  "usingComponents": {
    "van-popup-gray": "/zhy/vant/popup-gray/index"
  }
}
.close{position: absolute; top:30rpx; right: 30rpx; width: 36rpx; height: 36rpx; border-radius: 50%}
.apply_content{color: #333333; max-height: 700rpx;height: 700rpx; overflow-y: scroll; padding: 0 30rpx 30rpx;}
.apply_content .v1{ padding:30rpx 0 20rpx 0; line-height: 46rpx; font-size: 32rpx; font-weight: 600; text-align: center}