| | |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 分页获取砍价商品 |
| | | * @param params |
| | |
| | | <view v-if="item.endTime">有效期至:{{ item.endTime.split(" ")[0] }}</view> |
| | | </view> |
| | | <view class="receive" @click="receive(item)"> |
| | | <text>点击</text><br /> |
| | | <text>{{item.owned ? '已' : '点击'}}</text><br /> |
| | | <text>领取</text> |
| | | </view> |
| | | <view class="bg-quan"> 券 </view> |
| | |
| | | import { |
| | | receiveCoupons |
| | | } from "@/api/members.js"; |
| | | import { getMemberCoupons } from "@/api/members.js"; |
| | | import { |
| | | getAllCoupons |
| | | } from "@/api/promotions.js"; |
| | |
| | | .catch((err) => { |
| | | if (this.$store.state.isShowToast){ uni.hideLoading() }; |
| | | }); |
| | | console.log(this.couponList) |
| | | }, |
| | | /** |
| | | * 领取优惠券 |
| | |
| | | this.$u.throttle(()=>{ |
| | | this.fetchCoupon(val) |
| | | }, 1500) |
| | | |
| | | }, |
| | | |
| | | fetchCoupon(val){ |
| | | receiveCoupons(val.id).then((res) => { |
| | | if (res.data.code == 200) { |
| | | //修改点击的优惠卷当前的领取状态 |
| | | val.owned = true; |
| | | uni.showToast({ |
| | | title: "领取成功", |
| | | icon: "none", |
| | |
| | | title: "加载中", |
| | | }); |
| | | let index = this.tabCurrentIndex; |
| | | console.log(this.navList[index].params) |
| | | getMemberCoupons(this.navList[index].params).then((res) => { |
| | | uni.stopPullDownRefresh(); |
| | | if (res.data.success) { |
| | |
| | | <template> |
| | | <div class="wrapper"> |
| | | <u-parse :show-with-animation="true" :lazy-load="true" :selectable="true" :html="res.content" v-if="res"></u-parse> |
| | | |
| | | <button class="submit" @click="agreed()">同意协议</button> |
| | | </div> |
| | | </template> |
| | | <script> |
| | |
| | | title: this.way[option.type].title, |
| | | }); |
| | | this.init(option); |
| | | |
| | | }, |
| | | |
| | | methods: { |
| | | agreed(){ |
| | | uni.setStorageSync('agreed', true); // 存储同意状态 |
| | | uni.navigateBack(); // 返回原页面 |
| | | }, |
| | | init(option) { |
| | | getArticleDetailByType(this.way[option.type].type).then((res) => { |
| | | if (res.data.success) { |
| | |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .submit { |
| | | color: #fff; |
| | | margin-top: 120rpx; |
| | | background: rgba($light-color, 0.8); |
| | | } |
| | | .wrapper { |
| | | padding: 16rpx; |
| | | } |
| | |
| | | font-weight: bold; |
| | | } |
| | | .submit, |
| | | .noSubmit, |
| | | .notice { |
| | | font-weight: bold; |
| | | font-size: 28rpx; |
| | |
| | | {{ item.title }} |
| | | </div> |
| | | </div> |
| | | <div class="submit" @click="keepOn()">开始填写</div> |
| | | <div class="notice" @click="getEntryNotice">查看店铺入驻协议</div> |
| | | <div :class="isAgreed ? 'submit' : 'noSubmit'" @click="keepOn()" :disabled="!isAgreed">开始填写</div> |
| | | <div class="agreement-container" > |
| | | <label class="agreement-label"> |
| | | <checkbox :checked="isAgreed" class="agreement-checkbox" :disabled="isDisabled" /> |
| | | <text class="agreement-text" @click="getEntryNotice"> |
| | | 查看店铺<text class="agreement-link">《入驻协议》</text> |
| | | </text> |
| | | </label> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | data() { |
| | | return { |
| | | isDisabled:true, |
| | | isAgreed:false, |
| | | current: 999, |
| | | entrySteps: [ |
| | | { |
| | |
| | | onShow() { |
| | | if(this.$options.filters.tipsToLogin()){ |
| | | this.init(); |
| | | } |
| | | if (uni.getStorageSync('agreed')) { |
| | | this.isAgreed = true; // 自动勾选 |
| | | uni.removeStorageSync('agreed'); // 清除标记 |
| | | } |
| | | }, |
| | | |
| | |
| | | }, |
| | | ]; |
| | | const res = await getCompanyDetail(); |
| | | console.log(res) |
| | | if (res.data.success) { |
| | | |
| | | this.companyData = res.data.result; |
| | | |
| | | if (this.companyData) { |
| | |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | .agreement-container { |
| | | display: flex; |
| | | justify-content: center; |
| | | margin-top: 20rpx; |
| | | } |
| | | /* 勾选框和文字对齐 */ |
| | | .agreement-label { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | @import url("./entry.scss"); |
| | | .wrapper { |
| | | padding: 0 80rpx; |
| | |
| | | background: rgba($color: $light-color, $alpha: 0.1); |
| | | border-radius: 20rpx; |
| | | } |
| | | .noSubmit{ |
| | | color: #fff; |
| | | margin-top: 120rpx; |
| | | background: rgba(204, 204, 204, 0.8);; |
| | | } |
| | | .submit { |
| | | color: #fff; |
| | | margin-top: 120rpx; |