| | |
| | | "quickapp" : {}, |
| | | /* 快应用特有相关 */ |
| | | "mp-weixin" : { |
| | | "appid" : "wx1441324401626290", |
| | | "appid" : "wx6d0ecc4e18710458", |
| | | "setting" : { |
| | | "urlCheck" : false, |
| | | "es6" : true, |
| | |
| | | {
|
| | | "path": "self/member-center",
|
| | | "style": {
|
| | | "navigationBarTitleText": "会员中心"
|
| | | "navigationBarTitleText": "会员中心", |
| | | "enablePullDownRefresh": true |
| | | }
|
| | | }
|
| | | // #endif
|
| | |
| | | list: [], |
| | | }; |
| | | }, |
| | | async mounted() { |
| | | methods: { |
| | | async init() { |
| | | const { |
| | | data, |
| | | code |
| | |
| | | } |
| | | console.log(this.list) |
| | | } |
| | | } |
| | | }, |
| | | async mounted() { |
| | | this.init() |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | <style lang="scss"> |
| | | .home-banner-imgs { |
| | | |
| | | // background-color: #fff; |
| | | .p1 { |
| | | // width: 334rpx; |
| | |
| | | // width: 334rpx; |
| | | height: 142rpx; |
| | | } |
| | | |
| | | // .l-1{ |
| | | // .p1{ |
| | | // min-height: 308rpx; |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | init(){ |
| | | this.today = this.$util.toDate(new Date()) |
| | | this.$http.request('get', '/api/customer/flower/category/tree', {}).then(res => { |
| | | var data = res.data |
| | | this.list = [] |
| | | var arr = data || [] |
| | | for (let i = 0; i < arr.length && i < 10; i++) { |
| | | this.list.push({ |
| | | id: arr[i].id, |
| | | name: arr[i].name, |
| | | url: arr[i].imageUrl |
| | | }) |
| | | } |
| | | }) |
| | | this.$http.request('get', '/api/customer/flower/up/stock', {}).then(res => { |
| | | var data = res.data |
| | | this.tj = data || 0 |
| | | }) |
| | | }, |
| | | toList(item) { |
| | | // uni.navigateTo({ |
| | | // url:'/sub_pages/customer/trade/list?categoryId='+item.id |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | init(){ |
| | | this.refreshList('post') |
| | | }, |
| | | fun_GetMore(){ |
| | | this.getMore('post') |
| | | }, |
| | |
| | | <template> |
| | | <view class="home-zones"> |
| | | <view class="c" v-for="(item,index) of list" @click.stop="toDetail(item.id)"> |
| | | <image class="p1 img100 m-t-12" :lazy-load="true" mode="aspectFill" |
| | | :src="item.bgUrl"> |
| | | <image class="p1 img100 m-t-12" :lazy-load="true" mode="aspectFill" :src="item.bgUrl"> |
| | | </image> |
| | | <view class="c-txt-1" v-show="false"> |
| | | <view class="title">{{ item.name }}</view> |
| | |
| | | url: `/sub_pages/customer/trade/list?zoneId=${id}` |
| | | }) |
| | | }, |
| | | init() { |
| | | this.list = [] |
| | | this.$http.request('get', '/api/flower/zone/list', {}).then(res => { |
| | | this.list = res.data || [] |
| | | }) |
| | | } |
| | | }, |
| | | mounted() { |
| | | console.log('init hone zones') |
| | |
| | | <span v-if="!currentNotice||!currentNotice.id"> </span>
|
| | | </view>
|
| | | <!-- 当前分类 -->
|
| | | <home-category></home-category>
|
| | | <home-category ref="home_category"></home-category>
|
| | | <!-- 特别的几个公告图片 -->
|
| | | <home-banner-imgs></home-banner-imgs>
|
| | | <home-banner-imgs ref="home_banner"></home-banner-imgs>
|
| | | <!-- 均价情况 -->
|
| | | <!-- <home-price></home-price> -->
|
| | | <!-- 几个专区 -->
|
| | | <home-zones></home-zones>
|
| | | <home-zones ref="home_zeros"></home-zones>
|
| | | <!-- 置顶的花列表 -->
|
| | | <home-top-flow ref="home_top_flow"></home-top-flow>
|
| | |
|
| | |
| | | <common-footer flg="0"></common-footer>
|
| | |
|
| | | <uni-popup ref="coupon_home" type="bottom" border-radius="10px 10px 0 0">底部弹出 Popup 自定义圆角</uni-popup>
|
| | |
|
| | |
|
| | | </view>
|
| | | </template>
|
| | |
| | | homeZones,
|
| | | homeTopFlow
|
| | | },
|
| | |
|
| | | onPullDownRefresh() {
|
| | | // 下拉刷新方法
|
| | | this.init() |
| | | this.$message.showLoading()
|
| | | this.init_children()
|
| | | setTimeout(() => { |
| | | this.$message.hideLoading()
|
| | | uni.stopPullDownRefresh()
|
| | | }, 2000)
|
| | | },
|
| | | data() {
|
| | | return {
|
| | | search_flow: '',
|
| | |
| | | }
|
| | | },
|
| | | onLoad(options) {
|
| | | this.init()
|
| | | },
|
| | | methods: {
|
| | | 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()
|
| | | this.$refs.home_banner && this.$refs.home_banner.init && this.$refs.home_banner.init()
|
| | | this.$refs.home_zeros && this.$refs.home_zeros.init && this.$refs.home_zeros.init()
|
| | | },
|
| | | init() {
|
| | | // if(options.partnerUserId){
|
| | | // //需要前往注册了
|
| | | // uni.navigateTo({
|
| | |
| | | // }
|
| | | // })
|
| | | },
|
| | | methods: {
|
| | |
|
| | | clickBanner(item) {
|
| | | if (item.id) {
|
| | | uni.navigateTo({
|
| | |
| | | <no-data v-if="!list||list.length==0" style="width: 100%;"></no-data> |
| | | |
| | | <view v-for="(item,index) of list" :key="index" class="coupont-item" :class="[query.status]" |
| | | @click="selectCoupon(item)"> |
| | | @click.stop="selectCoupon(item)"> |
| | | <view class="flex container img100"> |
| | | <view class="info-price"> |
| | | <view class="price1"> |
| | |
| | | <view class="price2">{{item.minOrderAmount?(`满¥${item.minOrderAmount}可用`):'无门槛'}}</view> |
| | | </view> |
| | | <view class="info flex1"> |
| | | <view class="title"> |
| | | <view class="title flex"> |
| | | {{item.couponName||'-'}} |
| | | <radio :checked="cache_coupon.id===item.id" v-if="source==='shopping'" class="select-coupon"></radio> |
| | | <!-- <radio :checked="cache_coupon.id===item.id" |
| | | v-if="source==='shopping'" |
| | | class="select-coupon"></radio> --> |
| | | <view :style="{ 'margin-right': '20rpx'}" v-if="source==='shopping'" |
| | | class="component-radio m-l-a" :class="[cache_coupon.id===item.id?'cur':'']"> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="time"> |
| | |
| | | status: 'unused' |
| | | }, |
| | | list: [], |
| | | source: '' |
| | | source: '', |
| | | paymoney: -1 |
| | | |
| | | } |
| | | }, |
| | | async onLoad(options) { |
| | | if (options.source) { |
| | | this.source = options.source || '' |
| | | } |
| | | if (options.paymoney) { |
| | | this.paymoney = parseFloat(options.paymoney).toFixed(2) |
| | | } |
| | | if (this.source === 'shopping') { |
| | | //只展示可用的 |
| | |
| | | methods: { |
| | | async selectCoupon(item) { |
| | | if (this.source == 'shopping') { |
| | | if (this.cache_coupon.id === item.id) { |
| | | await this.$message.confirm('是否取消使用此优惠券') |
| | | await this.$store.dispatch('cache_coupon_select', {}) |
| | | uni.navigateBack() |
| | | return |
| | | } |
| | | console.log('paymoney',this.paymoney) |
| | | if (this.paymoney >= 0) { |
| | | //判断是否可以选择使用 |
| | | if (item.couponDiscountType === 'zero') { |
| | | // if (this.cache_coupon.couponDiscountValue > this.paymoney) { |
| | | // this.$message.showToast('订单价格小于优惠券优惠额度') |
| | | // return |
| | | // } |
| | | } else if (item.minOrderAmount && item.minOrderAmount > 0) { |
| | | // if (this.cache_coupon.minOrderAmount > this.paymoney) { |
| | | // this.$message.showToast('订单价格') |
| | | // return |
| | | // } |
| | | if (this.paymoney < item.minOrderAmount) { |
| | | this.$message.showToast('订单价格不满足使用条件') |
| | | this.$nextTick(()=>{ |
| | | this.$forceUpdate() |
| | | }) |
| | | return |
| | | } |
| | | } else { |
| | | // if (this.cache_coupon.couponDiscountValue > this.paymoney) { |
| | | // this.$message.showToast('订单价格小于优惠券优惠额度') |
| | | // return |
| | | // } |
| | | } |
| | | } |
| | | await this.$store.dispatch('cache_coupon_select', item) |
| | | uni.navigateBack() |
| | | } |
| | |
| | | <image :lazy-load="true" :src="item.cover" class="cover" mode="scaleToFill"></image> |
| | | </view> |
| | | <view class="info flex1"> |
| | | <view class="title"> |
| | | <view class="title flex"> |
| | | {{item.name||''}} |
| | | <radio :checked="isIngood(item)" @click.stop="updateSelectGood(item)" v-if="source==='shopping'" class="select-coupon"></radio> |
| | | <!-- <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> |
| | | |
| | | </view> |
| | | <view class="time word-e"> |
| | |
| | | </view> |
| | | </view> |
| | | <view style="min-height: 140rpx;" v-if="source=='shopping'"></view> |
| | | <view class="bottom-button" @click="backpage()" v-if="source=='shopping'">返回订单结算</view> |
| | | <view class="bottom-button" @click="backpage()" v-if="source=='shopping'">确定选择</view> |
| | | |
| | | <!-- <view class="bottom-button" @click="toGoodAll">前往兑换</view> --> |
| | | </view> |
| | |
| | | <script> |
| | | import banner3d from '@/components/banner3d/banner3d' |
| | | export default { |
| | | async onPullDownRefresh() { |
| | | await this.$store.dispatch('getCurrentInfo') |
| | | uni.stopPullDownRefresh() |
| | | }, |
| | | methods: { |
| | | |
| | | }, |
| | | onLoad() { |
| | | if (this.currentInfo.customerDTO && this.currentInfo.customerDTO.userGrowthRecord && this.currentInfo |
| | | async onLoad() { |
| | | await this.$store.dispatch('getCurrentInfo') |
| | | this.$nextTick(() => { |
| | | if (this.currentInfo.customerDTO && this.currentInfo.customerDTO.userGrowthRecord && this |
| | | .currentInfo |
| | | .customerDTO.userGrowthRecord.currentMemberLevel) { |
| | | // userGrowthRecord: {currentMemberLevel: "普通会员", currentGrowthValue: 6919,…} |
| | | // currentGrowthValue: 6919 |
| | |
| | | if (tmp.title === k.targetMemberLevel) { |
| | | console.log('eq', k, tmp) |
| | | tmp.point = { |
| | | current: this.currentInfo.customerDTO.userGrowthRecord.currentGrowthValue || 0, |
| | | current: this.currentInfo.customerDTO.userGrowthRecord |
| | | .currentGrowthValue || 0, |
| | | end: k.targetStartPoint || 0, |
| | | } |
| | | } |
| | |
| | | }) |
| | | |
| | | } |
| | | }) |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | margin-bottom: 10rpx; |
| | | |
| | | } |
| | | |
| | | .desc{ |
| | | text-align: center; |
| | | |
| | |
| | | <view class="label">获赞</view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="value">{{dto.fans || '*'}}</view> |
| | | <view class="value">{{dto.fans || '0'}}</view> |
| | | <view class="label">粉丝</view> |
| | | </view> |
| | | <!-- <view class="form-item"> |
| | |
| | | if (this.cache_coupon.couponDiscountType === 'zero') { |
| | | return this.cache_coupon.couponDiscountValue || 0 |
| | | } else if (this.cache_coupon.minOrderAmount && this.cache_coupon.minOrderAmount > 0) { |
| | | var total = (( this.dto.totalMemberAmount || this.dto.totalAmount || 0) + (this.dto.packing || 0) + (this.current_transport.fee || |
| | | var total = ((this.dto.totalMemberAmount || this.dto.totalAmount || 0) + (this.dto.packing || 0) + |
| | | (this.current_transport.fee || |
| | | 0) || 0) |
| | | .toFixed(2) |
| | | if (total >= this.cache_coupon.minOrderAmount) { |
| | |
| | | if (this.cache_coupon && this.cache_coupon.id) { |
| | | this.dto.couponRecordId = this.cache_coupon.id |
| | | this.dto.couponRecordStr = this.cache_coupon.couponName |
| | | } else if (this.cache_coupon && !this.cache_coupon.id) { |
| | | this.dto.couponRecordId = '' |
| | | this.dto.couponRecordStr = '' |
| | | } |
| | | //兑换券 |
| | | this.dto.goodsRecordIdListStr = '' |
| | |
| | | methods: { |
| | | toSelectCoupon() { |
| | | //跳转去列表页面进行选择 |
| | | var total = ((this.dto.totalMemberAmount || this.dto.totalAmount || 0) + (this.dto.packing || 0) + (this |
| | | .current_transport.fee || |
| | | 0) || 0) |
| | | .toFixed(2) |
| | | // if (total >= this.cache_coupon.minOrderAmount) { |
| | | // return this.cache_coupon.couponDiscountValue || 0 |
| | | // } |
| | | |
| | | uni.navigateTo({ |
| | | url: '/sub_pages/customer/coupon/coupon-self?source=shopping' |
| | | url: `/sub_pages/customer/coupon/coupon-self?source=shopping&paymoney=${total}` |
| | | }) |
| | | }, |
| | | toSelectGood() { |
| | |
| | | </view> |
| | | <view class="price"> |
| | | <view class="m-l-a m-r-0 text-right"> |
| | | 共{{ dto.flowers.length }}件,小计<span class="t-red">¥{{ dto.totalMemberAmount || dto.totalAmount || 0 }}</span> |
| | | 共{{ dto.flowers.length }}件,小计<span |
| | | class="t-red">¥{{ dto.totalMemberAmount || dto.totalAmount || 0 }}</span> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | </swiper-item> |
| | | <swiper-item v-for="(url, index) in dto.bannerList" :key="index"> |
| | | <image class="top-img" :lazy-load="true" mode="scaleToFill" @click="previewImg(url)" :src="url"> |
| | | <image class="top-img" :lazy-load="true" mode="aspectFit" @click="previewImg(url)" :src="url"> |
| | | </image> |
| | | <view class="index-tag"> |
| | | {{index+1+(dto.video&&1)}}/{{(dto.video&&1||0)+(dto.cover&&1||0)+(dto.bannerList&&dto.bannerList.length||0)}} |
| | |
| | | |
| | | <swiper-item> |
| | | <image :src="dto.cover" :lazy-load="true" @click="previewImg(dto.cover)" class="top-img" |
| | | mode="scaleToFill"> |
| | | mode="aspectFit"> |
| | | </image> |
| | | <view class="index-tag"> |
| | | {{(dto.bannerList&&dto.bannerList.length||0)+1+(dto.video&&1||0)}}/{{(dto.video&&1||0)+(dto.cover&&1||0)+(dto.bannerList&&dto.bannerList.length||0)}} |
| | |
| | | |
| | | .swiper-box { |
| | | position: relative; |
| | | |
| | | border-bottom: 1px solid #d3d4d7; |
| | | swiper-item { |
| | | background-color: #fff; |
| | | border-radius: 8rpx; |
| | |
| | | |
| | | |
| | | |
| | | <view class="button-green-1 m-t-20 button-fixed-bottom before-line " @click="submit" v-if="dto.status&&dto.status!='P' " > |
| | | <view class="button-green-1 m-t-20 button-fixed-bottom before-line " @click="submit" v-if="dto.status&&dto.status!='P' || source==='step' " > |
| | | {{source==='step'?'下一步':'提交审核'}} |
| | | </view> |
| | | |