| | |
| | | import storage from '@/plugins/storage.js'
|
| | |
|
| | | export default {
|
| | | onLaunch: async function(options) {
|
| | | onLaunch: async function(options) { |
| | | //清除一些缓存 |
| | | this.$storage.removeItem('cache_home_show_coupon') |
| | | |
| | | var query = options.q && decodeURIComponent(options.q) || ''
|
| | | var querydto = {}
|
| | | if (query) {
|
| | |
| | | }
|
| | |
|
| | | // #endif
|
| | |
|
| | | |
| | | },
|
| | |
|
| | | onReady() {
|
| | |
| | | <view class="line-component" v-if="bannerList[i].point"> |
| | | <view class="line-bg"> |
| | | <view class="tip" |
| | | :style="{'left':(bannerList[i].point.end&&(bannerList[i].point.current/bannerList[i].point.end)||0).toFixed(2)*100+'%'}"> |
| | | :style="{'left':(bannerList[i].point.current<=bannerList[i].point.endPoint)?((bannerList[i].point.endPoint&&(bannerList[i].point.current/bannerList[i].point.endPoint)||0).toFixed(2)*100+'%'):'100%'}"> |
| | | {{bannerList[i].point.current || 0}} |
| | | </view> |
| | | <view class="tip-loc" |
| | | :style="{'left':(bannerList[i].point.end&&(bannerList[i].point.current/bannerList[i].point.end)||0).toFixed(2)*100+'%'}"> |
| | | :style="{'left':(bannerList[i].point.current<=bannerList[i].point.endPoint)?((bannerList[i].point.endPoint&&(bannerList[i].point.current/bannerList[i].point.endPoint)||0).toFixed(2)*100+'%'):'100%'}"> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="desc"> |
| | | <span |
| | | v-if="bannerList[i].point.end">{{bannerList[i].point.current || 0}}/{{bannerList[i].point.end}},升级还需{{bannerList[i].point.end-bannerList[i].point.current}}成长值</span> |
| | | v-if="bannerList[i].point.endPoint&&(bannerList[i].point.current<=bannerList[i].point.endPoint)">{{bannerList[i].point.current || 0}}/{{bannerList[i].point.endPoint}},升级还需{{bannerList[i].point.endPoint - bannerList[i].point.current}}成长值</span> |
| | | <span v-else>当前成长值:{{bannerList[i].point.current || 0}}</span> |
| | | </view> |
| | | </view> |
| | |
| | | that.descIndex = e.mp.detail.current |
| | | clearTimeout(timer) |
| | | }, 150) |
| | | this.$emit('changeIndex',this.curIndex) |
| | | }, |
| | | animationfinish(e) { |
| | | this.isDescAnimating = false |
| | |
| | | export default { |
| | | |
| | | httpBaseUri: 'https://www.hmyxianhua.com/flower', |
| | | // httpBaseUri: 'http://47.99.58.211/flower', |
| | | // httpBaseUri: 'https://www.hmyxianhua.com/flower', |
| | | httpBaseUri: 'http://47.99.58.211/flower', |
| | | // httpBaseUri: 'http://localhost:8080/flower', |
| | | clientId: '', |
| | | secret: '', |
| | |
| | | </view>
|
| | | <common-footer flg="0"></common-footer>
|
| | |
|
| | | <uni-popup ref="coupon_home" type="bottom" border-radius="10px 10px 0 0">底部弹出 Popup 自定义圆角</uni-popup>
|
| | | <uni-popup ref="coupon_home" type="center" border-radius="10px 10px 0 0">
|
| | | <view class="coupon-container" style="width: 690rpx;">
|
| | | <view class="coupont-item all">
|
| | | <view class="flex container img100">
|
| | | <view class="info-price">
|
| | | <view class="price1">
|
| | | {{dto_home_coupon.maxDiscountAmount?(`${dto_home_coupon.maxDiscountAmount}折`):(`¥${dto_home_coupon.couponDiscountValue}`)}}
|
| | | </view>
|
| | | <view class="price2">
|
| | | {{dto_home_coupon.minOrderAmount?(`满¥${dto_home_coupon.minOrderAmount}可用`):'无门槛'}}
|
| | | </view>
|
| | | </view>
|
| | | <view class="info flex1">
|
| | | <view class="title">
|
| | | {{dto_home_coupon.couponName||'-'}}
|
| | | </view>
|
| | | <view class="time" v-if="dto_home_coupon.getEndDate">
|
| | | <!-- 领取后{{dto_home_coupon.usageTimeNum||''}}{{dto_home_coupon.usageTimeTypeName||''}}有效 -->
|
| | | {{dto_home_coupon.getEndDate|| '-'}}前有效
|
| | | </view>
|
| | | <view class="button" @click="getCoupon(dto_home_coupon)">
|
| | | 立即领取
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | |
|
| | | <view class="tip">
|
| | | <span class="t-red">*</span>此券每人限领1张。仅限用于花满芜鲜花交易平台鲜切花花款满额使用,不可与其他优惠同享、不可叠加使用
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | | </uni-popup>
|
| | |
|
| | |
|
| | | </view>
|
| | |
| | | },
|
| | | onPullDownRefresh() {
|
| | | // 下拉刷新方法
|
| | | this.init() |
| | | this.init()
|
| | | this.$message.showLoading()
|
| | | this.init_children()
|
| | | setTimeout(() => { |
| | | setTimeout(() => {
|
| | | this.$message.hideLoading()
|
| | | uni.stopPullDownRefresh()
|
| | | }, 2000)
|
| | |
| | | hide_footer: false,
|
| | | noticeList: [],
|
| | | currentNoticeIndex: 0,
|
| | | currentNotice: {}
|
| | | currentNotice: {},
|
| | | dto_home_coupon: {}
|
| | | };
|
| | | },
|
| | | onShareAppMessage() {
|
| | |
| | | this.init()
|
| | | },
|
| | | methods: {
|
| | | async getCoupon(item) {
|
| | | this.$message.showLoading()
|
| | | const {
|
| | | code,
|
| | | data
|
| | | } = await this.$http.request('post', '/api/v2/coupon/app/receive', {
|
| | | data: {
|
| | | couponId: item.id,
|
| | | num: 1
|
| | | }
|
| | | })
|
| | | if (code == 0) {
|
| | | this.$refs.coupon_home.close()
|
| | |
|
| | | this.$message.showToast('领取成功')
|
| | | }
|
| | | },
|
| | | init_children() {
|
| | | this.$refs.home_top_flow && this.$refs.home_top_flow.init && this.$refs.home_top_flow.init()
|
| | | this.$refs.home_category && this.$refs.home_category.init && this.$refs.home_category.init()
|
| | |
| | | }
|
| | | })
|
| | |
|
| | | // let tmp = this
|
| | | // //首页优惠券
|
| | | // this.$http.request('get', '/api/v2/coupon/app' + `/home/list`).then(res => {
|
| | | // if (res.code == 0) {
|
| | | // var list = res.data || []
|
| | | // var dto = list.length >= 1 ? list[0] : undefined
|
| | | // if (dto) {
|
| | | // // 显示弹窗图片
|
| | | // tmp.$refs.coupon_home.open()
|
| | | // }
|
| | | // }
|
| | | // })
|
| | | let tmp = this
|
| | | var value = this.$storage.getItem('cache_home_show_coupon')
|
| | | if (!value || true) {
|
| | | //首页优惠券
|
| | | this.$storage.setItem('cache_home_show_coupon', '1')
|
| | | this.$http.request('get', '/api/v2/coupon/home/alert').then(res => {
|
| | | if (res.code == 0) {
|
| | | var list = res.data || []
|
| | | var dto = list.length >= 1 ? list[0] : undefined
|
| | | if (dto) {
|
| | | // 显示弹窗图片
|
| | | this.dto_home_coupon = dto
|
| | | tmp.$refs.coupon_home.open()
|
| | | }
|
| | | }
|
| | | })
|
| | | }
|
| | | },
|
| | |
|
| | | clickBanner(item) {
|
| | |
| | |
|
| | | <style lang="scss" scoped>
|
| | | @import "./home.scss";
|
| | |
|
| | | /* #ifdef PUB_CUSTOMER */
|
| | | @import "@/sub_pages/customer/coupon/coupon.scss";
|
| | | /* #endif */
|
| | | </style> |
| | |
| | | tmp.$message.hideLoading() |
| | | if (code === 0) { |
| | | tmp.getDetail() |
| | | tmp.$store.dispatch('getCurrentInfo') |
| | | } |
| | | }, |
| | | fail(e) { |
| | |
| | | <view class="label">实际支付:</view> |
| | | <view class="value">¥{{ dto.paymentAmount || '0' }}</view> |
| | | </view> |
| | | |
| | | |
| | | <!-- <view class="form-item"> |
| | | |
| | | |
| | | <!-- <view class="form-item"> |
| | | <view class="label">支付金额:</view> |
| | | <view class="value">{{ dto.paymentAmount || '-' }}</view> |
| | | </view> |
| | |
| | | <view class="label">优惠券:</view> |
| | | <view class="value">{{ dto.memberCouponName || '-' }}</view> |
| | | </view> --> |
| | | <!-- <view class="form-item"> |
| | | <!-- <view class="form-item"> |
| | | <view class="label">优惠金额:</view> |
| | | <view class="value">{{ dto.memberCouponAmount || '-' }}</view> |
| | | </view> --> |
| | |
| | | tmp.$message.hideLoading() |
| | | if (code === 0) { |
| | | tmp.refreshList() |
| | | //刷新积分 |
| | | tmp.$store.dispatch('getCurrentInfo') |
| | | } |
| | | }, |
| | | fail(e) { |
| | |
| | | if (code === 0) { |
| | | // this.$store.dispatch('sign_add', 'order') |
| | | this.refreshList() |
| | | |
| | | } |
| | | } |
| | | break |
| | |
| | | border-radius: 8rpx; |
| | | // border: 2rpx solid; |
| | | // border-image: linear-gradient(180deg, rgba(238, 217, 173, 1), rgba(219, 182, 105, 1)) 2 2; |
| | | background-image: url('../../static/images/customer/coupon/coupon-bg-user.png'); |
| | | // background-image: url('../../static/images/customer/coupon/coupon-bg-user.png'); |
| | | background-image: url('https://hmy-flower.oss-cn-shanghai.aliyuncs.com/69/69b8683eb7084e06a9d7645764a92a4ayJwLQzpZIQ5f7c5070054319d93cf972f05d429ad10c.png'); |
| | | background-size: 100% 100%; |
| | | .title{ |
| | | font-weight: 600; |
| | |
| | | dataType: options.dataType ? options.dataType : 'json', |
| | | data: options.data || null, |
| | | header, |
| | | timeout: 30000, |
| | | success: async (res) => { |
| | | if (!options.ignore) { |
| | | message.hideLoading() |
| | |
| | | if (!options.ignore) { |
| | | message.hideLoading() |
| | | } |
| | | message.showToast('网络异常') |
| | | reject({ |
| | | data: null, |
| | | code: 9999, |
| | |
| | | position: absolute; |
| | | right: -20rpx; |
| | | top: 20rpx; |
| | | background-image: url('../../../static/images/customer/coupon/coupon-has.png'); |
| | | background-image: url('@/static/images/customer/coupon/coupon-has.png'); |
| | | background-size: 100% 100%; |
| | | width: 264rpx; |
| | | height: 264rpx; |
| | |
| | | position: absolute; |
| | | right: 10rpx; |
| | | top: -20rpx; |
| | | background-image: url('../../../static/images/customer/coupon/coupon-out.png'); |
| | | background-image: url('@/static/images/customer/coupon/coupon-out.png'); |
| | | background-size: 100% 100%; |
| | | width: 196rpx; |
| | | height: 124rpx; |
| | |
| | | |
| | | .container { |
| | | z-index: 2; |
| | | background-image: url('../../../static/images/customer/coupon/coupon-bg1.png'); |
| | | background-image: url('@/static/images/customer/coupon/coupon-bg1.png'); |
| | | // width: 722rpx; |
| | | padding: 16rpx 16rpx 16rpx 0rpx; |
| | | height: 220rpx; |
| | |
| | | |
| | | <view class="good-container p15 flex"> |
| | | <view v-for="(item,index) of list" :key="index" class="good-item" @click="toDetail(item)"> |
| | | <image class="cover" :src="item.cover" :lazy-load="true" mode="scaleToFill"> |
| | | <image class="cover" :src="item.cover" :lazy-load="true" mode="scaleToFill" |
| | | :class="[dto.stock===0?'component-stock-zero':'']"> |
| | | |
| | | </image> |
| | | <view class="title"> |
| | |
| | | |
| | | <style lang="scss" scoped> |
| | | @import './coupon.scss'; |
| | | |
| | | |
| | | .good-list-container { |
| | | .good-container { |
| | | .good-item { |
| | |
| | | </top-tabs> |
| | | </view> |
| | | <no-data v-if="!list||list.length==0" style="width: 100%;"></no-data> |
| | | |
| | | |
| | | <view class="p10"> |
| | | |
| | | <view v-for="(item,index) of list" :key="index" class="good-item" :class="[query.status]"> |
| | | <view class="flex container img100"> |
| | | <view class="flex container img100" @click="selectItem(item)"> |
| | | <view class="info-price"> |
| | | <image :lazy-load="true" :src="item.cover" class="cover" mode="scaleToFill"></image> |
| | | </view> |
| | |
| | | <view class="title flex"> |
| | | {{item.name||''}} |
| | | <!-- <radio :checked="isIngood(item)" @click.stop="updateSelectGood(item)" v-if="source==='shopping'" class="select-coupon"></radio> --> |
| | | |
| | | <view :style="{ 'margin-right': '20rpx'}" @click.stop="updateSelectGood(item)" |
| | | class="component-radio m-l-a" :class="[isIngood(item)?'cur':'']" v-if="source==='shopping'"> |
| | | |
| | | |
| | | <view :style="{ 'margin-right': '20rpx'}" class="component-radio m-l-a" |
| | | :class="[isIngood(item)?'cur':'']" v-if="source==='shopping'"> |
| | | |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | <view class="time word-e"> |
| | | {{item.description||''}} |
| | | </view> |
| | | <view class="button m-l-a m-r-10" @click="getPointGood(item)" v-if="source!=='shopping'"> |
| | | <view class="button m-l-a m-r-10" v-if="source!=='shopping'"> |
| | | 查看详情 |
| | | </view> |
| | | <!-- <view class="button" @click="updateSelectGood(item)" v-if="source=='shopping'"> |
| | | <!-- <view class="button" @click="updateSelectGood(item)" v-if="source=='shopping'"> |
| | | {{isIngood(item)?'移除':'添加'}} |
| | | </view> --> |
| | | </view> |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | selectItem(item) { |
| | | if (this.srouce === 'shopping') { |
| | | //选择 |
| | | this.updateSelectGood(item) |
| | | } else { |
| | | //详情 |
| | | this.getPointGood(item) |
| | | } |
| | | }, |
| | | isIngood(item) { |
| | | for (var tmp of this.cache_goods) { |
| | | if (tmp.id == item.id) { |
| | |
| | | height: unset; |
| | | padding: 20rpx; |
| | | margin-top: 0rpx; |
| | | |
| | | .container { |
| | | background-color: #fff; |
| | | |
| | | .info-price { |
| | | .cover { |
| | | width: 150rpx; |
| | |
| | | .info { |
| | | margin-left: 20rpx; |
| | | position: relative; |
| | | |
| | | .title { |
| | | font-weight: 600; |
| | | font-size: 36rpx; |
| | |
| | | text-align: left; |
| | | position: relative; |
| | | margin-top: 20rpx; |
| | | .select-coupon{ |
| | | |
| | | .select-coupon { |
| | | position: absolute; |
| | | right: 10rpx; |
| | | top: -6rpx; |
| | | } |
| | | } |
| | | |
| | | |
| | | .time { |
| | | font-weight: 400; |
| | | font-size: 28rpx; |
| | |
| | | margin-top: 10rpx; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | .button { |
| | | width: 150rpx; |
| | |
| | | <image src="../../../static/images/customer/coupon/member/member-level-bg.png" mode="aspectFit" |
| | | class="img100 member-level-image"></image> |
| | | <view class="banner"> |
| | | <banner3d ref="banner3d" v-if="init" :banner-list="bannerList" :swiper-config="swiperConfig"></banner3d> |
| | | <banner3d @changeIndex="changeIndex" ref="banner3d" v-if="init" :banner-list="bannerList" |
| | | :swiper-config="swiperConfig"></banner3d> |
| | | </view> |
| | | <view class="p20" style="padding-top: 0rpx;"> |
| | | <!-- <view class="info bg-white p20"> |
| | |
| | | <image class="m-auto icon img100 " mode="scaleToFill" |
| | | src="../../../static/images/customer/coupon/member/icon-member-info-1.png"></image> |
| | | <view class="desc"> |
| | | 积分达到{{currentInfo.customerDTO.userGrowthRecord.currentGrowthValue || '-'}} |
| | | <!-- 积分达到{{currentInfo.customerDTO.userGrowthRecord.currentGrowthValue || '-'}} --> |
| | | 积分达到{{bannerList[curIndex].point.startPoint || '0'}} |
| | | </view> |
| | | </view> |
| | | <view class="m-t-12 flex1"> |
| | | <image class="m-auto icon img100" mode="scaleToFill" |
| | | src="../../../static/images/customer/coupon/member/icon-member-info-2.png"></image> |
| | | |
| | | <!-- createName: "孙凯悦" |
| | | createTime: "2024-09-10 14:47:29" |
| | | discountAmount: null |
| | | discountRatio: 95 |
| | | discountType: "ratio" |
| | | discountTypeStr: "百分比" |
| | | downgradeValue: 30 |
| | | endPoint: 15000 |
| | | growthValue: 1 |
| | | id: 34 |
| | | name: "金卡会员7" |
| | | startPoint: 10000 |
| | | updateTime: "2024-09-12 14:09:19" |
| | | --> |
| | | |
| | | |
| | | <view class="desc"> |
| | | 优惠 |
| | | <span v-if="currentInfo.customerDTO.userGrowthRecord.currentDiscountType=='ratio'"> |
| | | {{(currentInfo.customerDTO.userGrowthRecord.currentDiscountRatio) || '-'}}%/扎 |
| | | 优惠 |
| | | <span v-if="bannerList[curIndex].point.discountType=='ratio'"> |
| | | <!-- currentInfo.customerDTO.userGrowthRecord.currentDiscountType=='ratio' --> |
| | | <!-- {{(currentInfo.customerDTO.userGrowthRecord.currentDiscountRatio) || '-'}}%/扎 --> |
| | | {{ ((bannerList[curIndex].point.discountRatio)/10).toFixed(1) || '-'}}折/扎 |
| | | </span> |
| | | <span v-else> |
| | | {{currentInfo.customerDTO.userGrowthRecord.currentDiscountAmount || '-'}}元/扎 |
| | | {{bannerList[curIndex].point.discountAmount || '0'}}元/扎 |
| | | <!-- {{currentInfo.customerDTO.userGrowthRecord.currentDiscountAmount || '-'}}元/扎 --> |
| | | </span> |
| | | <!-- serGrowthRecord: {currentMemberLevel: "银卡会员", currentGrowthValue: 4941, currentDiscountType: |
| | | <!-- serGrowthRecord: {currentMemberLevel: "银卡会员", currentGrowthValue: 4941, currentDiscountType: |
| | | "ratio",…} |
| | | currentDiscountAmount: 0 |
| | | currentDiscountRatio: 5 |
| | |
| | | </view> |
| | | </view> |
| | | <view class="protocol" @click="goto('/pages/help/content?id=会员协议',false)">会员协议 <uni-icons type="right" |
| | | size="16" color="#AD790F"></uni-icons> |
| | | size="14" color="#AD790F"></uni-icons> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | uni.stopPullDownRefresh() |
| | | }, |
| | | methods: { |
| | | |
| | | changeIndex(index) { |
| | | console.log('changeIndex', index, this.bannerList) |
| | | this.curIndex = index || 0 |
| | | this.$forceUpdate() |
| | | } |
| | | }, |
| | | async onLoad() { |
| | | await this.$store.dispatch('getCurrentInfo') |
| | | const { |
| | | code, |
| | | data |
| | | } = await this.$http.request('get', '/api/member/list') |
| | | if (code == 0 && data && data.records) { |
| | | console.log('member-data', data) |
| | | //循环赋值吧。用name包含来兼容 |
| | | for (var tmp of this.bannerList) { |
| | | for (var info of data.records) { |
| | | if (info.name && info.name.indexOf(tmp.title) >= 0) { |
| | | // 设置value |
| | | tmp.point = { |
| | | ...info, |
| | | current: this.currentInfo.customerDTO.userGrowthRecord |
| | | .currentGrowthValue || 0 |
| | | } |
| | | |
| | | break |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | consumptionAmount: 1 |
| | | |
| | | this.$nextTick(() => { |
| | | if (this.currentInfo.customerDTO && this.currentInfo.customerDTO.userGrowthRecord && this |
| | | .currentInfo |
| | |
| | | var j = -1 |
| | | for (var tmp of this.bannerList) { |
| | | j += 1 |
| | | tmp.point = { |
| | | current: this.currentInfo.customerDTO.userGrowthRecord.currentGrowthValue || 0 |
| | | } |
| | | // tmp.point = { |
| | | // current: this.currentInfo.customerDTO.userGrowthRecord.currentGrowthValue || 0 |
| | | // } |
| | | tmp.currentMsg = '' |
| | | if (tmp.title === name) { |
| | | //说明是当前等级,其他待定 |
| | |
| | | } |
| | | this.bannerList = newBannerSort |
| | | |
| | | if (this.currentInfo.customerDTO.userGrowthRecord.targetMemberInfos) { |
| | | var t = -1 |
| | | for (var tmp of this.bannerList) { |
| | | t += 1 |
| | | for (var k of this.currentInfo.customerDTO.userGrowthRecord.targetMemberInfos) { |
| | | if (tmp.title === k.targetMemberLevel) { |
| | | console.log('eq', k, tmp) |
| | | tmp.point = { |
| | | current: this.currentInfo.customerDTO.userGrowthRecord |
| | | .currentGrowthValue || 0, |
| | | end: k.targetStartPoint || 0, |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // if (this.currentInfo.customerDTO.userGrowthRecord.targetMemberInfos) { |
| | | // var t = -1 |
| | | // for (var tmp of this.bannerList) { |
| | | // t += 1 |
| | | // for (var k of this.currentInfo.customerDTO.userGrowthRecord.targetMemberInfos) { |
| | | // if (tmp.title === k.targetMemberLevel) { |
| | | // console.log('eq', k, tmp) |
| | | // tmp.point = { |
| | | // current: this.currentInfo.customerDTO.userGrowthRecord |
| | | // .currentGrowthValue || 0, |
| | | // end: k.targetStartPoint || 0, |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | this.init = true |
| | | // this.$nextTick(() => { |
| | |
| | | |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | title: '普通会员', |
| | | // description: '一万年太久,就现在,给你爱', |
| | | path: '', |
| | | point: undefined, |
| | | point: {}, |
| | | key: '1', |
| | | }, { |
| | | bg: 'https://hmy-flower.oss-cn-shanghai.aliyuncs.com/25/2534864ad275400b9e8db4042b87bfeaBv7NbzOZG0ptc7fca5df83dcd97fd02b4027518cc593.png', |
| | |
| | | // description: '花中樱,鱼乃鲷花中樱,鱼乃鲷', |
| | | path: '', |
| | | key: '2', |
| | | point: {}, |
| | | |
| | | // currentMsg:'' |
| | | }, { |
| | | bg: 'https://hmy-flower.oss-cn-shanghai.aliyuncs.com/4d/4d8ab63e75ca462fa9e3bb480ff2da68ID5KnLIH9DwM23f9a04d99cc1f3306a8655c1eff34bf.png', |
| | |
| | | // description: '取材自湘西苗族传统的烟熏文化', |
| | | path: '', |
| | | key: '3', |
| | | point: {}, |
| | | |
| | | }, { |
| | | bg: 'https://hmy-flower.oss-cn-shanghai.aliyuncs.com/db/db6b0cefdbb949cca9c8da824a5ebdebXsPsk2ROfxZu22f9b09e3feece76753b0df971fdc301.png', |
| | | picture: 'https://hmy-flower.oss-cn-shanghai.aliyuncs.com/c9/c94d8f444af94b899d1e1593cebb933eDyZyhyoyDxTRaf60a4d692f097e5d790cdb88fae9d0c.png', |
| | |
| | | // description: '在自己的小世界里,日日好日,夜夜好清宵', |
| | | path: '', |
| | | key: '4', |
| | | point: {}, |
| | | |
| | | }], |
| | | swiperConfig: { |
| | | indicatorDots: true, |
| | |
| | | circular: true, |
| | | previousMargin: '58rpx', |
| | | nextMargin: '58rpx' |
| | | } |
| | | }, |
| | | curIndex: 0, |
| | | } |
| | | }, |
| | | components: { |
| | |
| | | // if (total >= this.cache_coupon.minOrderAmount) { |
| | | // return this.cache_coupon.couponDiscountValue || 0 |
| | | // } |
| | | |
| | | |
| | | uni.navigateTo({ |
| | | url: `/sub_pages/customer/coupon/coupon-self?source=shopping&paymoney=${total}` |
| | | }) |
| | |
| | | </view> |
| | | </view> |
| | | <view class="form-item flex flex-wrap-normal"> |
| | | <view class="label">兑换券</view> |
| | | <view class="label" style="min-width: 130rpx;">兑换券</view> |
| | | |
| | | <view class="m-l-a m-r-0 flex" style="word-break: break-all;" |
| | | :class="[!dto.goodsRecordIdList||dto.goodsRecordIdList.length==0?'desc-gray':'']" |
| | |
| | | <template> |
| | | <view class="container-trade" :style="{'min-height':hidefooter?'':'calc(100vh - 20rpx)'}"> |
| | | <view class="search-container m-t-12 flex" v-if="!hidefooter"> |
| | | <view class="container-trade" :style="{'min-height':hidefooter?'':'calc(100vh - 20rpx)','max-height':hidefooter?'':'calc(100vh - 20rpx)'}"> |
| | | <view class="search-container m-t-12 flex" v-if="!hidefooter"> |
| | | <!-- <view class="flex m-r-20"> |
| | | <view class="m-r-10" style="line-height: 80rpx;" @click="changeSearchType"> |
| | | {{type=='category'?'按分类':'按店铺'}} |
| | |
| | | |
| | | </view> --> |
| | | <view class="flex m-r-20"> |
| | | <um-dropdown width="200rpx" style="line-height: 80rpx;" @change="fnChange" :defaultIndex="def" rangeKey="label" :optionList="typeList"></um-dropdown> |
| | | <um-dropdown width="200rpx" style="line-height: 80rpx;" @change="fnChange" :defaultIndex="def" |
| | | rangeKey="label" :optionList="typeList"></um-dropdown> |
| | | </view> |
| | | |
| | | |
| | | <view class="flex1 input"> |
| | | <!-- <u-input :placeholder="type==='category'?'请输入分类名称':'请输入店铺名称'" v-model="query.name" clearable |
| | | @confirm="buttonSearchFlow" @clear="()=>{ |
| | |
| | | <uni-icons color="#20613D" type="search" size="24" @click="buttonSearchFlow"></uni-icons> |
| | | </template> |
| | | </u-input> --> |
| | | <u-input :placeholder="search_home_placeholder" v-model="search_flow" clearable @confirm="buttonSearchFlow" @clear="()=>{ |
| | | <u-input :placeholder="search_home_placeholder" v-model="search_flow" clearable |
| | | @confirm="buttonSearchFlow" @clear="()=>{ |
| | | $nextTick(()=>{buttonSearchFlow()}) |
| | | }"> |
| | | <!-- <u--text text="http://" slot="prefix" margin="0 3px 0 0" type="tips"></u--text> --> |
| | | |
| | | |
| | | |
| | | |
| | | <template slot="suffix"> |
| | | <uni-icons color="#20613D" type="search" size="24" @click="buttonSearchFlow"></uni-icons> |
| | | </template> |
| | | </u-input> |
| | | |
| | | |
| | | </view> |
| | | </view> |
| | | <view class="canteen-items" :style="{'min-height':hidefooter?'':'calc(100vh - 340rpx)'}"> |
| | | <view class="canteen-items" :style="{'min-height':hidefooter?'':'calc(100vh - 340rpx)','max-height':hidefooter?'':'calc(100vh - 340rpx)'}"> |
| | | <view v-if="(!list||list.length==0)&&true" style="width: 100%;min-height: 200rpx;"> |
| | | |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="canteen-item-container"> |
| | | <!-- <view class="component-filter-container" style="padding-top: 12rpx;">--> |
| | | <!-- <view class="flex1" @click="openParamPop">--> |
| | | <!-- 筛选--> |
| | | <!-- </view>--> |
| | | <!-- <view class="flex1">--> |
| | | <!-- 颜色<image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>--> |
| | | <!-- </view>--> |
| | | <!-- <view class="flex1">--> |
| | | <!-- 筛选<image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>--> |
| | | <!-- </view>--> |
| | | <!-- </view>--> |
| | | <!-- <u-divider></u-divider>--> |
| | | <view class="flex"> |
| | | <view v-for="(item,index) of listFilter" :key="item.id" class="canteen-item list" |
| | | @click.stop="toDetailList(item)"> |
| | | <view class="m-r-10"> |
| | | <!-- @click.stop="previewImg(item.imageUrl)" --> |
| | | <image :src="item.imageUrl" :class="[!item.stock?'':'']" mode="scaleToFill" |
| | | class="cover" :lazy-load="true"> |
| | | </image> |
| | | </view> |
| | | <view v-for="(item,index) of listFilter" :key="item.id" |
| | | class="canteen-item list flex flex-wrap-normal" @click.stop="toDetailList(item)"> |
| | | <view class="m-r-10"> |
| | | <image :src="item.imageUrl" :class="[!item.stock?'':'']" mode="scaleToFill" class="cover" |
| | | :lazy-load="true"> |
| | | </image> |
| | | </view> |
| | | <view class="flex1"> |
| | | <view class="cateen_infos list"> |
| | | <view class="title">{{item.name}}</view> |
| | | |
| | | <view class="title flex"> |
| | | {{item.name}} |
| | | <view class="desc m-l-a m-r-0">在售 {{item.stock||'0'}} 扎</view> |
| | | </view> |
| | | <view class="price"> |
| | | <!-- <view>会员价</view> --> |
| | | <view>¥{{item.priceLowMember || 0}}-{{item.priceHighMember||0}}</view> |
| | | </view> |
| | | <!-- <view class="price component-price-old">¥{{item.priceLow || 0}}-{{item.priceHigh||0}}</view> --> |
| | | |
| | | <view>¥{{item.priceLowMember || 0}}-{{item.priceHighMember||0}}/扎</view> |
| | | </view> |
| | | <view class="flex info"> |
| | | <view class="m-r-15"> |
| | | 库存:{{item.stock || 0}} |
| | | </view> |
| | | <view> |
| | | {{item.unit || ''}} |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="desc">在售 {{item.stock||'0'}} 扎</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | <view style="padding-bottom:40rpx"> |
| | | </view> |
| | | <view style="padding-bottom:40rpx"> |
| | | </view> |
| | | <footer-msg v-if="!hidefooter" :more="page.total>0&&page.total>page.current*page.size"></footer-msg> |
| | | |
| | |
| | | currentCategory: {}, |
| | | type: 'category', //supplier |
| | | def: 0, |
| | | typeList:[ |
| | | { |
| | | typeList: [{ |
| | | label: '按鲜花', |
| | | value: 'flower', |
| | | }, |
| | |
| | | value: 'supplier', |
| | | }, |
| | | ], |
| | | search_home_placeholder:"请输入花名", |
| | | search_home_placeholder: "请输入花名", |
| | | |
| | | |
| | | } |
| | |
| | | if (this.type == 'flower') { |
| | | this.search_home_placeholder = '请输入花名' |
| | | uni.setNavigationBarTitle({ |
| | | title: '搜鲜花', |
| | | success: function() { |
| | | // console.log('标题搜鲜花修改成功'); |
| | | } |
| | | title: '搜鲜花', |
| | | success: function() { |
| | | // console.log('标题搜鲜花修改成功'); |
| | | } |
| | | }); |
| | | |
| | | |
| | | } else { |
| | | this.search_home_placeholder = '请输入店铺名' |
| | | uni.setNavigationBarTitle({ |
| | | title: '搜店铺', |
| | | success: function() { |
| | | // console.log('标题搜店铺修改成功'); |
| | | } |
| | | title: '搜店铺', |
| | | success: function() { |
| | | // console.log('标题搜店铺修改成功'); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | |
| | | changeSearchType() { |
| | | if (this.type == 'category') { |
| | | this.type = 'supplier' |
| | |
| | | }, |
| | | toDetailList(item) { |
| | | //去商品列表页面 |
| | | console.log('toDetailList',this.supplierId) |
| | | console.log('toDetailList', this.supplierId) |
| | | uni.navigateTo({ |
| | | url: `/sub_pages/customer/trade/list?categoryId=${item.id}&supplierId=${this.supplierId||''}` |
| | | }) |
| | |
| | | .container-trade { |
| | | background-color: #FFFFFF; |
| | | padding-top: 20rpx; |
| | | |
| | | // overflow-x: scroll; |
| | | .search-container { |
| | | margin: 0rpx 30rpx 20rpx 30rpx; |
| | | } |
| | |
| | | // margin-left: 30rpx; |
| | | |
| | | .canteen-item { |
| | | margin: 0 auto; |
| | | width: 164rpx; |
| | | // margin: 0 auto; |
| | | // width: 164rpx; |
| | | // width: 690rpx; |
| | | // max-width: 690rpx; |
| | | min-height: 266rpx; |
| | | // min-height: 266rpx; |
| | | background: #FFFFFF; |
| | | margin-bottom: 44rpx; |
| | | max-width: 164rpx; |
| | | // margin-bottom: 44rpx; |
| | | // max-width: 164rpx; |
| | | margin-bottom: 20rpx; |
| | | |
| | | .cover { |
| | | width: 164rpx; |
| | |
| | | font-size: 28rpx; |
| | | color: #000000; |
| | | line-height: 40rpx; |
| | | min-height: 80rpx; |
| | | // min-height: 50rpx; |
| | | text-align: center; |
| | | // margin-top: 10rpx; |
| | | } |
| | | |
| | | .desc { |
| | | margin-top: 8rpx; |
| | | // margin-top: 8rpx; |
| | | font-weight: 400; |
| | | font-size: 24rpx; |
| | | color: #6E9F66; |
| | |
| | | background-color: rgba(202, 229, 214, 0.57); |
| | | border-radius: 4rpx; |
| | | text-align: center; |
| | | // margin-top: 12rpx; |
| | | |
| | | } |
| | | |
| | |
| | | font-size: 28rpx; |
| | | color: #CF0000; |
| | | line-height: 34rpx; |
| | | text-align: center; |
| | | text-align: left; |
| | | margin-top: 12rpx; |
| | | } |
| | | |
| | | .info { |
| | | font-weight: 400; |
| | | font-size: 28rpx; |
| | | margin-top: 12rpx; |
| | | color: #666666; |
| | | line-height: 40rpx; |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | width: 100%; |
| | | min-height: 300rpx; |
| | | max-height: calc(100vh - 270rpx); |
| | | overflow-y: scroll; |
| | | padding-right: 20rpx; |
| | | overflow-x: scroll; |
| | | } |
| | | |
| | | .canteen-item:nth-child(3n+1) { |
| | | margin-left: 0rpx; |
| | | margin-right: 15rpx; |
| | | } |
| | | // .canteen-item:nth-child(3n+1) { |
| | | // margin-left: 0rpx; |
| | | // margin-right: 15rpx; |
| | | // } |
| | | |
| | | .canteen-item:nth-child(3n+2) { |
| | | margin-left: 15rpx; |
| | | margin-right: 15rpx; |
| | | } |
| | | // .canteen-item:nth-child(3n+2) { |
| | | // margin-left: 15rpx; |
| | | // margin-right: 15rpx; |
| | | // } |
| | | |
| | | .canteen-item:nth-child(3n+3) { |
| | | margin-left: 15rpx; |
| | | margin-right: 0rpx; |
| | | } |
| | | // .canteen-item:nth-child(3n+3) { |
| | | // margin-left: 15rpx; |
| | | // margin-right: 0rpx; |
| | | // } |
| | | } |
| | | |
| | | .canteen-footer-shop { |