修复部分bug
This commit is contained in:
@@ -79,7 +79,20 @@
|
||||
<label class="input-label">{{timeIndex == 0 ? '券有效期': '延期天数'}}</label>
|
||||
<block v-if="timeIndex === 0">
|
||||
<view class="input-text" @click="showDatePicker = true">{{datePickerValue.length == 0 ? '选择优惠券有效期区间': datePickerValue[0] + ' 至 ' + datePickerValue[1]}}<uni-icons class="picker-icon" type="arrowdown" size="14" /></view>
|
||||
<tn-date-picker :show="showDatePicker" :monthNum="12" color="#e93340" :showTips="true" beginText="开始日期" endText="结束日期" @confirm="confirmDatePicker" @cancel="showDatePicker = false"/>
|
||||
<u-calendar
|
||||
:safe-area-inset-bottom="true"
|
||||
v-model="showDatePicker"
|
||||
mode="range"
|
||||
active-bg-color="#e93340"
|
||||
range-bg-color="rgba(0, 0, 0, .05)"
|
||||
range-color="#e93340"
|
||||
btn-type="default"
|
||||
max-date="2099-12-12"
|
||||
:min-date="minDate"
|
||||
@change="confirmDatePicker"
|
||||
>
|
||||
</u-calendar>
|
||||
<!-- <tn-date-picker :show="showDatePicker" :monthNum="12" color="#e93340" :showTips="true" beginText="开始日期" endText="结束日期" @confirm="confirmDatePicker" @cancel="showDatePicker = false"/> -->
|
||||
</block>
|
||||
<block v-if="timeIndex === 1">
|
||||
<view class="input-number">
|
||||
@@ -107,6 +120,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import date from '@/public/date'
|
||||
import TnDatePicker from "@/components/tn-datepicker/tn-datepicker";
|
||||
import { uploads } from '@/apis/interfaces/uploading'
|
||||
import { pushCoupons } from '@/apis/interfaces/coupons'
|
||||
@@ -138,12 +152,19 @@
|
||||
price : '', // 减少金额
|
||||
description : '', // 使用规则
|
||||
coupongoods : [], // 关联商品
|
||||
timeNumber : 1 // 延期券时间
|
||||
timeNumber : 1 , // 延期券时间
|
||||
minDate : '' // 优惠券最小期限
|
||||
};
|
||||
},
|
||||
onShow(){
|
||||
new date().then(res => {
|
||||
this.minDate = res
|
||||
})
|
||||
this.coupongoods = this.$store.getters.getCoupongoods
|
||||
},
|
||||
onUnload() {
|
||||
this.$store.commit('setCoupongoods', [])
|
||||
},
|
||||
methods:{
|
||||
// 发券数量
|
||||
quantityChange(value){
|
||||
@@ -163,11 +184,15 @@
|
||||
},
|
||||
// 选择
|
||||
changePicker(e){
|
||||
if(e.target.dataset.type === 'typeIndex'){
|
||||
this.$store.commit('setCoupongoods', [])
|
||||
this.coupongoods = this.$store.getters.getCoupongoods
|
||||
}
|
||||
this[e.target.dataset.type] = e.detail.value
|
||||
},
|
||||
// 日期
|
||||
confirmDatePicker(e){
|
||||
this.datePickerValue = e.value
|
||||
this.datePickerValue = [e.startDate , e.endDate]
|
||||
this.showDatePicker = false
|
||||
},
|
||||
// 上传优惠券封面
|
||||
|
||||
@@ -140,8 +140,7 @@
|
||||
</view>
|
||||
</u-circle-progress>
|
||||
<view class="now-get" v-if='item.can.get'
|
||||
@click="toReceiveCoupon('services',index,item.coupon_id)">
|
||||
立即领取</view>
|
||||
@click="toReceiveCoupon('services',index,item.coupon_id)">立即领取</view>
|
||||
<view class="now-get now-got" v-if="!item.can.get && item.can.is_get"
|
||||
@click="toUse(item.coupon_id)">去使用</view>
|
||||
</view>
|
||||
@@ -261,7 +260,6 @@
|
||||
// 获取首页列表
|
||||
getCoupons() {
|
||||
couponsByCompanyId({}).then(res => {
|
||||
console.log(res)
|
||||
this.activities = res.activities // 顶部活动
|
||||
this.notices = res.notices // 通知消息
|
||||
let notices = res.notices
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
.cover{
|
||||
position: relative;
|
||||
border-right: dashed 3rpx $border-color;
|
||||
width: 148rpx;
|
||||
width: 208rpx;
|
||||
text-align: center;
|
||||
.cover-img{
|
||||
width: 148rpx;
|
||||
@@ -234,7 +234,7 @@
|
||||
}
|
||||
.mian{
|
||||
justify-content: center;
|
||||
width: calc(100% - 148rpx - #{$padding*2});
|
||||
width: calc(100% - 208rpx);
|
||||
box-sizing: border-box;
|
||||
@extend .vertical;
|
||||
.title{
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
<view class="title">
|
||||
限时抢购<text>海量商家优惠券</text>
|
||||
</view>
|
||||
<navigator class="more" open-type="navigate" url="/pages/coupons/couponList">查看更多</navigator>
|
||||
<view class="more" @click="onCoupons('more')">查看更多</view>
|
||||
</view>
|
||||
<view class="coupons" v-if="coupons.length > 0">
|
||||
<view class="coupons-item" v-for="(item, index) in coupons" :key="index">
|
||||
@@ -173,7 +173,7 @@
|
||||
<view class="logo">
|
||||
<image class="logo-img" :src="item.cover" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="btn">立即领取</view>
|
||||
<button class="btn" :disabled="!item.can.get" @click="onCoupons('get', item.coupon_id, index)">{{item.can.get ? '立即领取' : '已领取'}}</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 优选商品 -->
|
||||
@@ -186,9 +186,10 @@
|
||||
|
||||
<script>
|
||||
import { companies, companiesList } from '@/apis/interfaces/company'
|
||||
import { mall, list } from '@/apis/interfaces/goods'
|
||||
import { mall, list, managesCoupons } from '@/apis/interfaces/goods'
|
||||
import goodsList from '@/components/goods-list/goods-list'
|
||||
import industryList from '@/components/industry-list/industry-list'
|
||||
import userAuth from '@/public/userAuth'
|
||||
export default{
|
||||
comments:{
|
||||
goodsList,
|
||||
@@ -251,6 +252,34 @@
|
||||
break
|
||||
}
|
||||
},
|
||||
// 领取,更多优惠券
|
||||
onCoupons(type, id, index){
|
||||
let token = this.$store.getters.getToken
|
||||
if(token == ''){
|
||||
let userLogin = new userAuth()
|
||||
userLogin.Login()
|
||||
return
|
||||
}
|
||||
if(type === 'more'){
|
||||
this.$Router.push({name: 'CouponsList'})
|
||||
return
|
||||
}
|
||||
if(type === 'get'){
|
||||
managesCoupons(id).then(res=>{
|
||||
this.$set(this.coupons, index, res)
|
||||
uni.showToast({
|
||||
title: '领取成功',
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
icon : 'none',
|
||||
title: err.message
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
// 企业广场
|
||||
getCompanies(){
|
||||
companies().then(res=>{
|
||||
@@ -323,7 +352,6 @@
|
||||
},
|
||||
// 打开微信小程序
|
||||
onOpenWechat(e){
|
||||
console.log(e)
|
||||
plus.share.getServices(res => {
|
||||
let sweixin = null;
|
||||
for(let val of res){
|
||||
@@ -568,7 +596,14 @@
|
||||
text-align: center;
|
||||
line-height: 64rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
font-weight: 600;
|
||||
&[disabled]{
|
||||
background: rgba($color: #faf2dd, $alpha: .8);
|
||||
color: rgba($color: #fd5f3c, $alpha: .5);
|
||||
}
|
||||
&::after{
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
</view>
|
||||
<view class="lists">
|
||||
<!-- 优选商品 -->
|
||||
<goods-list :list="searchArr" priceType="CNY" v-if="searchType == 0" />
|
||||
<goods-list :list="searchArr" priceType="CNY" v-if="searchType == 0" @on-goods="onGoods" />
|
||||
|
||||
<!-- 商家 -->
|
||||
<industry-list :list="searchArr" v-if="searchType == 1"/>
|
||||
<industry-list :list="searchArr" v-if="searchType == 1" @on-industry="onOpenWechat"/>
|
||||
</view>
|
||||
|
||||
<!-- 分页 -->
|
||||
@@ -77,6 +77,37 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 商品详情
|
||||
onGoods(e){
|
||||
this.$Router.push({name: 'goodsDetails', params: {id: e.goods_id}})
|
||||
},
|
||||
// 打开微信小程序
|
||||
onOpenWechat(e){
|
||||
plus.share.getServices(res => {
|
||||
let sweixin = null;
|
||||
for(let val of res){
|
||||
if(val.id === 'weixin'){
|
||||
sweixin = val
|
||||
}
|
||||
}
|
||||
/** 以此为例子 显示跳转引导页
|
||||
* 'index_4'
|
||||
* index 跳小程序企业首页
|
||||
* 4 企业id
|
||||
**/
|
||||
if(sweixin != null){
|
||||
sweixin.launchMiniProgram({
|
||||
id : e.original_id,
|
||||
path: 'pages/login/guide?scene=index_' + e.company_id,
|
||||
})
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: '当前环境不支持打开微信小程序',
|
||||
icon : 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 列表数据
|
||||
getList() {
|
||||
// type=0为商品列表; type=1为企业列表
|
||||
|
||||
@@ -398,13 +398,13 @@
|
||||
content : this.$Route.query.type === 'edit' ? '商品权证已更新,是否立即补充产品附加信息认证?' : '商品权证已发布,是否立即补充产品附加信息认证?',
|
||||
cancelText : '稍后认证',
|
||||
confirmText : '立即认证',
|
||||
success : res => {
|
||||
if(res.cancel){
|
||||
success : modalRes => {
|
||||
if(modalRes.cancel){
|
||||
this.$Router.back(this.$Route.query.type === 'edit' ? 1 : 2)
|
||||
}
|
||||
if(res.confirm){
|
||||
if(modalRes.confirm){
|
||||
let goodsId = this.$Route.query.type === 'edit' ? this.$Route.query.id : res
|
||||
this.$Router.push({name: 'goodsAuth', params: { id: goodsId , type: 'goodsAdd', edit: this.$Route.query.type === 'edit'}})
|
||||
this.$Router.replace({name: 'goodsAuth', params: { id: goodsId , type: 'goodsAdd', edit: this.$Route.query.type === 'edit'}})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -324,8 +324,8 @@
|
||||
font-size: $title-size;
|
||||
font-weight: bold;
|
||||
line-height: 50rpx;
|
||||
display: flex;
|
||||
.title-hot {
|
||||
display: inline-block;
|
||||
background-color: #fee195;
|
||||
font-size: 24rpx;
|
||||
border-radius: 50rpx;
|
||||
|
||||
@@ -140,6 +140,7 @@
|
||||
product_address : this.productAddress,
|
||||
extend_cover : this.extendCover[0].path
|
||||
}
|
||||
|
||||
let submitFund = managesGoodsAuth(this.$Route.query.id, submitData)
|
||||
submitFund.then(res => {
|
||||
uni.showModal({
|
||||
@@ -149,7 +150,7 @@
|
||||
success : res => {
|
||||
if(res.confirm){
|
||||
if(this.$Route.query.type == 'goodsAdd'){
|
||||
this.$Router.back(this.$Route.query.edit == 'true' ? 2 : 3)
|
||||
this.$Router.back(this.$Route.query.edit == 'true' ? 2 : 2)
|
||||
}else{
|
||||
this.$Router.back()
|
||||
}
|
||||
|
||||
@@ -133,9 +133,10 @@
|
||||
},
|
||||
// 选择支付类型
|
||||
payType(e){
|
||||
console.log(e.detail.value)
|
||||
|
||||
this.payValue = e.detail.value
|
||||
},
|
||||
|
||||
//数量变化
|
||||
numberChange(e){
|
||||
this.qty = e
|
||||
|
||||
@@ -1,176 +1,172 @@
|
||||
<template>
|
||||
<view v-if='loding'>
|
||||
<block v-if="this.$store.state.token != ''">
|
||||
<!-- 用户信息 -->
|
||||
<view class="user">
|
||||
<view class="user-tool" @click="$Router.push({name:'Setting'})">
|
||||
<image src="@/static/icons/user_icon_00.png" mode="widthFix" />
|
||||
</view>
|
||||
<view class="user-content">
|
||||
<image class="info-cover" :src="base.avatar" mode="aspectFill" />
|
||||
<view class="info-nickname">{{base.nickname}}</view>
|
||||
<view class="info-signa">潮流就是我的态度</view>
|
||||
<view class="info-tags">
|
||||
<text class="info-tags-item identity" v-if="base.identity">{{base.identity.name}}</text>
|
||||
<text class="info-tags-item vip" v-if="base.company_level.name">{{base.company_level.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="user-tabs">
|
||||
<view class="user-tabs-item" :class="{'show': tabsIndex === 0}" @click="tabsIndex = 0">管理中心</view>
|
||||
<view class="user-tabs-item" :class="{'show': tabsIndex === 1}" @click="tabsIndex = 1">我的推广</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 消息 -->
|
||||
<view class="user-ad">
|
||||
<uni-icons class="user-ad-icon" type="sound-filled" color="#e93340"></uni-icons>
|
||||
<swiper class="user-ad-swiper" :interval="3000" autoplay vertical circular>
|
||||
<swiper-item v-for="(item,index) in message" :key='index'>
|
||||
<view class="user-ad-item">{{item}}</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
<block v-if="tabsIndex === 0">
|
||||
<!-- 我的资产 -->
|
||||
<view class="user-group">
|
||||
<view class="title">
|
||||
<view class="title-text">我的资产</view>
|
||||
</view>
|
||||
<view class="group-flex group-flex-4">
|
||||
<view class="item" @click="showToast">
|
||||
<view class="item-num">{{base.account.token}}</view>
|
||||
<view class="item-title">原石</view>
|
||||
</view>
|
||||
<view class="item" @click="showToast">
|
||||
<view class="item-num">{{base.account.contribution}}</view>
|
||||
<view class="item-title">贡献值</view>
|
||||
</view>
|
||||
<view class="item" @click="$Router.push({name:'Eb'})">
|
||||
<view class="item-num">{{base.account.eb}}</view>
|
||||
<view class="item-title">易币</view>
|
||||
</view>
|
||||
<view class="item" @click="showToast">
|
||||
<view class="item-num">{{base.account.money}}</view>
|
||||
<view class="item-title">零钱</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 我的权证 -->
|
||||
<view class="user-group">
|
||||
<view class="title" >
|
||||
<view class="title-text">我的权证</view>
|
||||
</view>
|
||||
<view class="group-flex group-flex-4">
|
||||
<view class="item" @click="$Router.push({name:'NumberWeight'})">
|
||||
<view class="item-num">{{count.warrnats}}</view>
|
||||
<view class="item-title">权证持有</view>
|
||||
</view>
|
||||
<view class="item" @click="$Router.push({name: 'marketManag'})">
|
||||
<view class="item-num">{{count.warrnat_transfer}}</view>
|
||||
<view class="item-title">权证转让</view>
|
||||
</view>
|
||||
<view class="item" @click="$Router.push({name:'ServicesOrder'})">
|
||||
<view class="item-num">{{count.shipment_fuwu_count}}</view>
|
||||
<view class="item-title">已使用</view>
|
||||
</view>
|
||||
<view class="item" @click="$Router.push({name:'MallShipments'})">
|
||||
<view class="item-num">{{count.shipment_goods_count}}</view>
|
||||
<view class="item-title">已提货</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 我的权证 -->
|
||||
<view class="user-group">
|
||||
<view class="group-flex group-flex-4">
|
||||
<view class="item" @click="$Router.push({name:'Collection'})">
|
||||
<image class="item-cover" src="@/static/icons/user_icon_02.png" mode="aspectFill" />
|
||||
<view class="item-title">收藏的企业</view>
|
||||
</view>
|
||||
<view class="item" @click="$Router.push({name:'CouponList'})">
|
||||
<image class="item-cover" src="@/static/icons/user_icon_03.png" mode="aspectFill" />
|
||||
<view class="item-title">我的优惠券</view>
|
||||
</view>
|
||||
<view class="item" @click="$Router.push({name:'HistoryShop'})">
|
||||
<image class="item-cover" src="@/static/icons/user_icon_01.png" mode="aspectFill" />
|
||||
<view class="item-title">我的足迹</view>
|
||||
</view>
|
||||
<view class="item" @click="$Router.push({name:'AddressList'})">
|
||||
<image class="item-cover" src="@/static/icons/user_icon_04.png" mode="aspectFill" />
|
||||
<view class="item-title">地址管理</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else-if="tabsIndex === 1">
|
||||
<!-- 我的权证 -->
|
||||
<view class="user-group">
|
||||
<view class="title">
|
||||
<view class="title-text">推广数据</view>
|
||||
</view>
|
||||
<view class="group-flex group-flex-2">
|
||||
<view class="item">
|
||||
<view class="item-num">{{relations.children}}</view>
|
||||
<view class="item-title">推广人数</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item-num">{{relations.company}}</view>
|
||||
<view class="item-title">推广企业</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 排名信息 -->
|
||||
<view class="user-group">
|
||||
<view class="title">
|
||||
<view class="title-text">推广排名</view>
|
||||
</view>
|
||||
<view class="ranking ranking-after">
|
||||
<view class="ranking-title">
|
||||
<view class="ranking-text">全站推广人数</view>
|
||||
<view class="ranking-number">{{relations.childrenRank}}</view>
|
||||
</view>
|
||||
<image class="tips" src="../../static/icons/property_icon_00.png" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="ranking">
|
||||
<view class="ranking-title">
|
||||
<view class="ranking-text">推广企业</view>
|
||||
<view class="ranking-number">{{relations.companyRank}}</view>
|
||||
</view>
|
||||
<image class="tips" src="../../static/icons/property_icon_01.png" mode="aspectFill" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 推广海报 -->
|
||||
<view class="poster-text">推广海报</view>
|
||||
|
||||
<!-- <carousel :img-list="imgList" url-key="url" @selected="selectedBanner"/> -->
|
||||
<view class="code">
|
||||
<image class="code-img-bg" src="/static/images/share_bg_3.png" mode="aspectFill" />
|
||||
<image class='code-img' :src="shareCode" mode="widthFix" />
|
||||
</view>
|
||||
|
||||
</block>
|
||||
<!-- 弹窗 -->
|
||||
<u-toast ref="uToast" />
|
||||
<!-- 版权信息 -->
|
||||
<view class="copyright">易品新境 beta 1.0.0</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="statusBar">
|
||||
<view class="statusBar-title">我的资产</view>
|
||||
</view>
|
||||
<view class="store-login">
|
||||
<image class="icon" src="@/static/icons/login-icon.png" mode="widthFix"></image>
|
||||
<view class="sub-title">一键开启您的易货之旅</view>
|
||||
<button type="default" @click="login">登录</button>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 用户信息 -->
|
||||
<view class="user">
|
||||
<view class="user-tool" @click="$Router.push({name:'Setting'})">
|
||||
<image src="@/static/icons/user_icon_00.png" mode="widthFix" />
|
||||
</view>
|
||||
<view class="user-content">
|
||||
<image class="info-cover" :src="base.avatar || require('@/static/images/boss.png')" mode="aspectFill" />
|
||||
<view class="info-nickname">{{base.nickname}}</view>
|
||||
<view class="info-signa">潮流就是我的态度</view>
|
||||
<view class="info-tags" v-if="this.$store.state.token != ''">
|
||||
<text class="info-tags-item identity" v-if="base.identity">{{base.identity.name}}</text>
|
||||
<text class="info-tags-item vip" v-if="base.company_level.name">{{base.company_level.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="user-tabs">
|
||||
<view class="user-tabs-item" :class="{'show': tabsIndex === 0}" @click="tabsIndex = 0">管理中心</view>
|
||||
<view class="user-tabs-item" :class="{'show': tabsIndex === 1}" @click="tabsIndex = 1">我的推广</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 消息 -->
|
||||
<view class="user-ad" v-if="message.length > 0">
|
||||
<uni-icons class="user-ad-icon" type="sound-filled" color="#e93340"></uni-icons>
|
||||
<swiper class="user-ad-swiper" :interval="3000" autoplay vertical circular>
|
||||
<swiper-item v-for="(item,index) in message" :key='index'>
|
||||
<view class="user-ad-item">{{item}}</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
<block v-if="tabsIndex === 0">
|
||||
<!-- 我的资产 -->
|
||||
<view class="user-group">
|
||||
<view class="title">
|
||||
<view class="title-text">我的资产</view>
|
||||
</view>
|
||||
<view class="group-flex group-flex-4">
|
||||
<view class="item" @click="showToast">
|
||||
<view class="item-num">{{base.account.token}}</view>
|
||||
<view class="item-title">原石</view>
|
||||
</view>
|
||||
<view class="item" @click="showToast">
|
||||
<view class="item-num">{{base.account.contribution}}</view>
|
||||
<view class="item-title">贡献值</view>
|
||||
</view>
|
||||
<view class="item" @click="$Router.push({name:'Eb'})">
|
||||
<view class="item-num">{{base.account.eb}}</view>
|
||||
<view class="item-title">易币</view>
|
||||
</view>
|
||||
<view class="item" @click="showToast">
|
||||
<view class="item-num">{{base.account.money}}</view>
|
||||
<view class="item-title">零钱</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 我的权证 -->
|
||||
<view class="user-group">
|
||||
<view class="title" >
|
||||
<view class="title-text">我的权证</view>
|
||||
</view>
|
||||
<view class="group-flex group-flex-4">
|
||||
<view class="item" @click="$Router.push({name:'NumberWeight'})">
|
||||
<view class="item-num">{{count.warrnats}}</view>
|
||||
<view class="item-title">权证持有</view>
|
||||
</view>
|
||||
<view class="item" @click="$Router.push({name: 'marketManag'})">
|
||||
<view class="item-num">{{count.warrnat_transfer}}</view>
|
||||
<view class="item-title">权证转让</view>
|
||||
</view>
|
||||
<view class="item" @click="$Router.push({name:'ServicesOrder'})">
|
||||
<view class="item-num">{{count.shipment_fuwu_count}}</view>
|
||||
<view class="item-title">已使用</view>
|
||||
</view>
|
||||
<view class="item" @click="$Router.push({name:'MallShipments'})">
|
||||
<view class="item-num">{{count.shipment_goods_count}}</view>
|
||||
<view class="item-title">已提货</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 我的权证 -->
|
||||
<view class="user-group">
|
||||
<view class="group-flex group-flex-4">
|
||||
<view class="item" @click="$Router.push({name:'Collection'})">
|
||||
<image class="item-cover" src="@/static/icons/user_icon_02.png" mode="aspectFill" />
|
||||
<view class="item-title">收藏的企业</view>
|
||||
</view>
|
||||
<view class="item" @click="$Router.push({name:'CouponList'})">
|
||||
<image class="item-cover" src="@/static/icons/user_icon_03.png" mode="aspectFill" />
|
||||
<view class="item-title">我的优惠券</view>
|
||||
</view>
|
||||
<view class="item" @click="$Router.push({name:'HistoryShop'})">
|
||||
<image class="item-cover" src="@/static/icons/user_icon_01.png" mode="aspectFill" />
|
||||
<view class="item-title">我的足迹</view>
|
||||
</view>
|
||||
<view class="item" @click="$Router.push({name:'AddressList'})">
|
||||
<image class="item-cover" src="@/static/icons/user_icon_04.png" mode="aspectFill" />
|
||||
<view class="item-title">地址管理</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else-if="tabsIndex === 1">
|
||||
<!-- 我的权证 -->
|
||||
<view class="user-group">
|
||||
<view class="title">
|
||||
<view class="title-text">推广数据</view>
|
||||
</view>
|
||||
<view class="group-flex group-flex-2">
|
||||
<view class="item">
|
||||
<view class="item-num">{{relations.children}}</view>
|
||||
<view class="item-title">推广人数</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item-num">{{relations.company}}</view>
|
||||
<view class="item-title">推广企业</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 排名信息 -->
|
||||
<view class="user-group">
|
||||
<view class="title">
|
||||
<view class="title-text">推广排名</view>
|
||||
</view>
|
||||
<view class="ranking ranking-after">
|
||||
<view class="ranking-title">
|
||||
<view class="ranking-text">全站推广人数</view>
|
||||
<view class="ranking-number">{{relations.childrenRank}}</view>
|
||||
</view>
|
||||
<image class="tips" src="../../static/icons/property_icon_00.png" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="ranking">
|
||||
<view class="ranking-title">
|
||||
<view class="ranking-text">推广企业</view>
|
||||
<view class="ranking-number">{{relations.companyRank}}</view>
|
||||
</view>
|
||||
<image class="tips" src="../../static/icons/property_icon_01.png" mode="aspectFill" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 推广海报 -->
|
||||
<view class="poster-text">推广海报</view>
|
||||
<view class="code">
|
||||
<image class="code-img-bg" src="/static/images/share_bg_3.png" mode="aspectFill" />
|
||||
<image class='code-img' :src="shareCode" mode="widthFix" />
|
||||
</view>
|
||||
|
||||
</block>
|
||||
<!-- 弹窗 -->
|
||||
<u-toast ref="uToast" />
|
||||
<!-- 版权信息 -->
|
||||
<view class="copyright">易品新境 beta 1.0.0</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="statusBar">
|
||||
<view class="statusBar-title">我的资产</view>
|
||||
</view>
|
||||
<view class="store-login">
|
||||
<image class="icon" src="@/static/icons/login-icon.png" mode="widthFix"></image>
|
||||
<view class="sub-title">一键开启您的易货之旅</view>
|
||||
<button type="default" @click="login">登录</button>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import carousel from '@/components/vear-carousel/vear-carousel'
|
||||
import {getUserInfo , appcode} from '@/apis/interfaces/mine'
|
||||
import { getUserInfo , appcode } from '@/apis/interfaces/mine'
|
||||
import userAuth from '@/public/userAuth'
|
||||
export default {
|
||||
components: {
|
||||
@@ -178,65 +174,54 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabsIndex: 0,
|
||||
imgList: [{
|
||||
url: 'https://img9.51tietu.net/pic/2019-091200/vgkpidei2tjvgkpidei2tj.jpg',
|
||||
id: 1
|
||||
},{
|
||||
url: 'https://img9.51tietu.net/pic/2019-091200/euzekmi5m23euzekmi5m23.jpg',
|
||||
id: 2
|
||||
},{
|
||||
url: 'https://img9.51tietu.net/pic/2019-091200/143tt0ta4sr143tt0ta4sr.jpg',
|
||||
id: 3
|
||||
}],
|
||||
base:'',
|
||||
count:'',
|
||||
relations:'',
|
||||
message:'',
|
||||
loding:true,
|
||||
shareCode:''
|
||||
tabsIndex : 0,
|
||||
base : {
|
||||
avatar : '',
|
||||
nickname: '',
|
||||
account : {
|
||||
token : 0,
|
||||
contribution: 0,
|
||||
eb : 0,
|
||||
money : 0
|
||||
}
|
||||
},
|
||||
count : {
|
||||
warrnats : 0,
|
||||
warrnat_transfer : 0,
|
||||
shipment_fuwu_count : 0,
|
||||
shipment_goods_count: 0
|
||||
},
|
||||
relations : '',
|
||||
message : [],
|
||||
shareCode : '',
|
||||
loding : false
|
||||
}
|
||||
},
|
||||
onShow(){
|
||||
console.log(this.$store.state.token)
|
||||
if(this.$store.state.token != ''){
|
||||
this.getUserInfo()
|
||||
}
|
||||
if(this.$store.state.token != '') this.userInfo()
|
||||
else this.loding = true
|
||||
},
|
||||
methods: {
|
||||
// 获取用户的基本信息
|
||||
getUserInfo(){
|
||||
getUserInfo().then(res => {
|
||||
this.base = res.base
|
||||
this.count = res.count
|
||||
this.message = res.message
|
||||
this.relations = res.relations
|
||||
userInfo(){
|
||||
Promise.all([getUserInfo(), appcode()]).then(res => {
|
||||
let userInfoData = res[0],
|
||||
appcodeData = res[1]
|
||||
|
||||
this.base = userInfoData.base
|
||||
this.count = userInfoData.count
|
||||
this.message = userInfoData.message
|
||||
this.relations = userInfoData.relations
|
||||
this.shareCode = appcodeData.code
|
||||
this.loding = true
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
type: 'error',
|
||||
icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
appcode().then(res => {
|
||||
this.shareCode = res.code
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',
|
||||
icon:false,
|
||||
duration: 3000
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
outLogin(){
|
||||
this.$store.commit('setToken', '')
|
||||
},
|
||||
selectedBanner(item, index) {
|
||||
console.log('🥒', item, index)
|
||||
},
|
||||
|
||||
// 努力开发中,,,
|
||||
showToast(){
|
||||
this.$refs.uToast.show({
|
||||
|
||||
@@ -25,16 +25,12 @@
|
||||
<view @click="loginOut" class="list-item">
|
||||
<view class="list-item-left">
|
||||
<image src="/static/images/reset-info.png" mode="widthFix" />
|
||||
<span>切换账户</span>
|
||||
<span>退出登录</span>
|
||||
</view>
|
||||
<u-icon name="arrow-right" color="#f1f1f1" size="28"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 底部banner -->
|
||||
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
<u-toast ref="uToast" />
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -81,14 +77,16 @@
|
||||
})
|
||||
},
|
||||
loginOut() {
|
||||
uni.removeStorageSync('token')
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
this.$store.commit('setToken', '')
|
||||
this.$Router.replaceAll({name: 'Equity'})
|
||||
},
|
||||
// 上传头像
|
||||
updImgs(type) {
|
||||
uni.chooseImage({
|
||||
crop: {
|
||||
width: 80,
|
||||
height: 80
|
||||
},
|
||||
success: res => {
|
||||
let path = res.tempFiles.map((val, index) => {
|
||||
return {
|
||||
@@ -166,7 +164,6 @@
|
||||
margin: 0 40rpx;
|
||||
padding: 30rpx 0;
|
||||
width: calc(100% - 80rpx);
|
||||
|
||||
button::after {
|
||||
border: none;
|
||||
background-color: none;
|
||||
|
||||
Reference in New Issue
Block a user