appid:wxf402bb1307e1ece4 [图片] <template> <!-- v-model="_waitOrderVisible" --> <van-popup v-model="_waitOrderVisible" safe-area-inset-bottom :close-on-click-overlay="false" :closeable="true" :close-on-popstate="true" class="waitOrderPopup" get-container="#app" > <p class="waitOrderPopup-title"></p> <div class="waitOrderPopup-content"> <div class="waitOrderPopup-item"> <label>是否接收通知,及时获取充值结果提醒</label> </div> </div> <div class="waitOrderPopup-button"> <!-- <button @click="closeWaitOrder">取 消</button> --> <wx-open-subscribe style="width: 100%; height: 100px" @success="success" @error="subError" :template="beachRechargeBol ? subTemplateIdBeach : subTemplateId" id="subscribe-btn" > <script type="text/wxtag-template" > <style> .btn2 { color: #108ee8; font-size: 15px; background-color: #fff; width:100%; height: 40px; line-height: 40px; outline: none; border: none; } </style> <Button class="btn2">确 认</Button> </script> </wx-open-subscribe> </div> </van-popup> </template> <script> import { Popup, Button } from "vant"; export default { name: "ZchSubscribe", components: { [Popup.name]: Popup, }, props: { subscribeVisible: Boolean, beachRechargeBol: Boolean, }, computed: { _waitOrderVisible: { set(value) { this.$emit("close", value); if (value === false) this.$emit("showOrder", true); }, get() { return true; }, }, }, data() { return { searchCountryKeyword: "", countryInvalidVisible: false, subTemplateId: process.env.VUE_APP_FILE_NOTICE, subTemplateIdBeach: process.env.VUE_APP_FILE_NOTICE_BACTH, }; }, methods: { // 错误提示 subError(e) { // this.$toast("subError"+e); console.log("subError" + e.errMsg); }, // 我这里判断是必须把复数模板全部订阅 success(e) { // this.$toast("success"+e); console.log("success" + e); this._waitOrderVisible = false; if (this.beachRechargeBol) { this.$router.push({ path: "/batch/recharge" }); } else { this.$router.push({ path: "/user/recharge-record" }); } console.log("参与成功"); }, async closeWaitOrder() { // await cancelOrder(this.waitOrderInfo.yqqNo) this._waitOrderVisible = false; if (this.beachRechargeBol) { this.$router.push({ path: "/batch/recharge" }); } else { this.$router.push({ path: "/user/recharge-record" }); } }, }, }; </script> <style lang="scss" scoped> .waitOrderPopup { border-radius: 5px; font-size: 12px; width: 80%; height: 400px; color: #414141; line-height: 1.5; &-title { font-size: 16px; color: #fff; padding: 18px 0; text-align: center; } &-content { padding: 23px 36px; } &-item { margin-bottom: 12px; display: flex; &-discount { color: #ff9a22; } &-payPrice { color: #ff3c3c; } label { color: #414141; font-size: 16px; text-align: center; } &:last-child { margin-bottom: 0; } } &-button { color: #108ee8; font-size: 16px; border-top: 1px solid #d9d9d9; position: relative; text-align: center; height: 40px; line-height: 40px; } #subscribe-btn { display: block; z-index: 10; width: 100%; height: 200rpx; text-align: center; line-height: 150rpx; font-size: 30rpx; font-weight: 500; color: #ffffff; background-color: green; position: relative; overflow: hidden; } .subscribe-btn { color: #fff; background-color: #07c160; width:100%; height: 40px; display:block;} } </style>
使用微信开放标签<wx-open-subscribe> 为什么不生效?在微信公众号h5页面开发中使用wx-open-subscribe 时,订阅按钮不生效,打开调试器,button按钮并没有出现 在真机上也不能正常显示,iOS14.6,微信版本8.0.9 [图片]
2021-08-12