修复部分bug

This commit is contained in:
唐明明
2021-10-09 17:21:18 +08:00
parent 09c68e4289
commit ce1f3ff02f
22 changed files with 12438 additions and 58615 deletions

48
App.vue
View File

@@ -1,24 +1,36 @@
<script>
export default {
onLaunch () {
console.log('App Launch')
},
onShow () {
console.log('App Show')
uni.hideLoading()
},
onHide () {
console.log('App Hide')
},
globalData: {
mainColor: "white"
}
export default {
onLaunch() {
// if (typeof WeixinJSBridge == 'object' && typeof WeixinJSBridge.invoke == 'function') {
// handleFontSize();
// } else {
// document.addEventListener('WeixinJSBridgeReady', handleFontSize, false);
// }
// function handleFontSize() {
// // 设置网页字体为默认大小
// WeixinJSBridge.invoke('setFontSizeCallback', { fontSize: 0 });
// // 重写设置网页字体大小的事件
// WeixinJSBridge.on('menu:setfont', function() {
// WeixinJSBridge.invoke('setFontSizeCallback', { fontSize: 0 });
// });
// }
},
onShow() {
console.log('App Show');
},
onHide() {
console.log('App Hide');
},
globalData: {
mainColor: 'white'
}
};
</script>
<style lang="scss">
@import "uview-ui/index.scss";
page{
background: #f5f5f5;
}
@import 'uview-ui/index.scss';
page {
background: #f5f5f5;
-webkit-text-size-adjust: 100% !important;
}
</style>

View File

@@ -31,7 +31,7 @@ const request = (parameter) => {
'Authorization': store.getters.getToken || ''
}
console.log('parameterDbug', parameter)
// console.log('parameterDbug', parameter)
// 加载提示
uni.showLoading({

View File

@@ -3,95 +3,97 @@
* moduleName:个人中心相关操作
*/
import { request } from '../index'
import {
request
} from '../index'
// 关注店铺
const shopSubscribe = (id) => {
return request({
url: 'mall/shops/subscribe/' + id,
method: 'POST'
})
return request({
url: 'mall/shops/subscribe/' + id,
method: 'POST'
})
}
// 我的关注店铺列表
const shopSubscribeList = (page) => {
return request({
url: 'mall/shops/subscribe',
method:'get',
data:{
page:page
}
})
return request({
url: 'mall/shops/subscribe',
method: 'get',
data: {
page: page
}
})
}
// 关于我们
const aboutUs = () => {
return request({
url: 'articles/about'
})
return request({
url: 'articles/about'
})
}
// 获取用户信息
const getUserInfo = () => {
return request({
url: 'user/app'
})
return request({
url: 'user/app'
})
}
// 获取用户设置中心的信息
const getUserSettingInfo = () => {
return request({
url: 'user/setting'
})
return request({
url: 'user/setting'
})
}
// 账号余额等信息
const chaineb = (data) => {
return request({
url: 'user/account/chaineb',
method:'get',
data:data
})
return request({
url: 'user/account/chaineb',
method: 'get',
data: data
})
}
// 我的足迹
const browsers = (page) => {
return request({
url: 'mall/goods/browsers',
method: 'get',
data: {
page:page,
page_size:20
}
})
return request({
url: 'mall/goods/browsers',
method: 'get',
data: {
page: page,
page_size: 20
}
})
}
// 修改用户头像或昵称
const resetUserInfo= (data) => {
return request({
url: 'user/'+data.key,
method: 'PUT',
data:{
value:data.value
}
})
const resetUserInfo = (data) => {
return request({
url: 'user/' + data.key,
method: 'PUT',
data: {
value: data.value
}
})
}
// 我的推广码
const appcode = () => {
return request({
url: 'user/appcode'
})
return request({
url: 'user/appcode'
})
}
export {
shopSubscribe,
shopSubscribeList,
aboutUs,
getUserInfo,
getUserSettingInfo,
chaineb,
browsers,
resetUserInfo,
appcode
shopSubscribe,
shopSubscribeList,
aboutUs,
getUserInfo,
getUserSettingInfo,
chaineb,
browsers,
resetUserInfo,
appcode
}

View File

@@ -30,7 +30,7 @@
<view class="member-tips-title" v-if="wordData.grade == 1">会员升级/续费</view>
<view class="member-tips-title" v-else-if="wordData.grade == 2">续费</view>
<view class="member-tips-title" v-else>企业会员</view>
<view class="member-tips-time">有效期{{wordData.identity}}</view>
<view class="member-tips-time nowrap">有效期{{wordData.identity}}</view>
</view>
<view class="member-btn" v-if="wordData.grade == 3">
<image class="member-btn-icon" src="../../static/icons/store_icon_vip.png" mode="aspectFill"></image>

View File

@@ -507,7 +507,7 @@
}
}, {
"path": "pages/coupons/couponList",
"name": "Coupons",
"name": "CouponsList",
"style": {
"enablePullDownRefresh": true,
"navigationBarTextStyle": "white",

View File

@@ -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
},
// 上传优惠券封面

View File

@@ -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

View File

@@ -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{

View File

@@ -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){
@@ -569,6 +597,13 @@
line-height: 64rpx;
font-size: 28rpx;
font-weight: 600;
&[disabled]{
background: rgba($color: #faf2dd, $alpha: .8);
color: rgba($color: #fd5f3c, $alpha: .5);
}
&::after{
border: none;
}
}
}
}

View File

@@ -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为企业列表

View File

@@ -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'}})
}
}
})

View File

@@ -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;

View File

@@ -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()
}

View File

@@ -133,9 +133,10 @@
},
// 选择支付类型
payType(e){
console.log(e.detail.value)
this.payValue = e.detail.value
},
//数量变化
numberChange(e){
this.qty = e

View File

@@ -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">
<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="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>
<!-- 推广海报 -->
<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>
</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({

View File

@@ -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;

View File

@@ -10,7 +10,8 @@ export default getDate = (type) =>{
return new Promise((resolve, reject) => {
const date = new Date()
const year = date.getFullYear()
const month = (date.getMonth() + 1) <= 9 ? '0' + (date.getMonth() + 1) : date.getMonth()
const month = (date.getMonth() + 1) <= 9 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)
const day = date.getDate()
switch(type){

View File

@@ -7,6 +7,7 @@
import { RouterMount, createRouter } from 'uni-simple-router';
import store from '../store/index'
import userAuth from '../public/userAuth'
const router = createRouter({
platform: process.env.VUE_APP_PLATFORM,
@@ -15,11 +16,6 @@ const router = createRouter({
// 全局路由前置守卫
router.beforeEach((to, from, next) => {
const token = store.getters.getToken || uni.getStorageSync('token')
// 检查是否需要登录
if(to.meta.auth && token === ''){
return
}
next();
})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__CD19AAD","name":"易品新境","version":{"name":"1.0.0","code":"100"},"description":"易品新境为商家提供营销引流工具","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"OAuth":{},"Payment":{},"Share":{},"Geolocation":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":false,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#f5f5f5"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"safearea":{"bottom":{"offset":"none"}},"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common"},"google":{"permissions":["<uses-feature android:name=\"android.hardware.camera\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{},"plugins":{"oauth":{"univerify":{},"weixin":{"appid":"wx222fbe58feee7819","appsecret":"3d24525a636d7573a8fae885097d5cf7","UniversalLinks":""}},"payment":{"weixin":{"__platform__":["android"],"appid":"wx222fbe58feee7819","UniversalLinks":""}},"share":{"weixin":{"appid":"wx222fbe58feee7819","UniversalLinks":""}},"maps":{},"ad":{},"geolocation":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"arguments":"{\"name\":\"\",\"path\":\"\",\"query\":\"\",\"id\":0}","allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"3.1.18","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#bababa","selectedColor":"#e93340","backgroundColor":"#FFFFFF","borderStyle":"rgba(255,255,255,0.4)","list":[{"pagePath":"pages/equity/index","text":"通证权易","iconPath":"static/tabBar/tabBar_icon_00.png","selectedIconPath":"static/tabBar/tabBar_show_00.png"},{"pagePath":"pages/market/index","text":"转让市场","iconPath":"static/tabBar/tabBar_icon_01.png","selectedIconPath":"static/tabBar/tabBar_show_01.png"},{"pagePath":"pages/store/index","text":"企业工具","iconPath":"static/tabBar/tabBar_icon_02.png","selectedIconPath":"static/tabBar/tabBar_show_02.png"},{"pagePath":"pages/property/index","text":"我的资产","iconPath":"static/tabBar/tabBar_icon_03.png","selectedIconPath":"static/tabBar/tabBar_show_03.png"}],"height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"}}
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__CD19AAD","name":"易品新境","version":{"name":"1.0.0","code":"100"},"description":"易品新境为商家提供营销引流工具","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"OAuth":{},"Payment":{},"Share":{},"Geolocation":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":false,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#f5f5f5"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"safearea":{"bottom":{"offset":"none"}},"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common"},"google":{"permissions":["<uses-feature android:name=\"android.hardware.camera\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{},"plugins":{"oauth":{"univerify":{},"weixin":{"appid":"wx222fbe58feee7819","appsecret":"3d24525a636d7573a8fae885097d5cf7","UniversalLinks":""}},"payment":{"weixin":{"__platform__":["android"],"appid":"wx222fbe58feee7819","UniversalLinks":""}},"share":{"weixin":{"appid":"wx222fbe58feee7819","UniversalLinks":""}},"maps":{},"ad":{},"geolocation":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"arguments":"{\"name\":\"\",\"path\":\"\",\"query\":\"\",\"id\":0}","allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"3.2.9","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#bababa","selectedColor":"#e93340","backgroundColor":"#FFFFFF","borderStyle":"rgba(255,255,255,0.4)","list":[{"pagePath":"pages/equity/index","text":"通证权易","iconPath":"static/tabBar/tabBar_icon_00.png","selectedIconPath":"static/tabBar/tabBar_show_00.png"},{"pagePath":"pages/market/index","text":"转让市场","iconPath":"static/tabBar/tabBar_icon_01.png","selectedIconPath":"static/tabBar/tabBar_show_01.png"},{"pagePath":"pages/store/index","text":"企业工具","iconPath":"static/tabBar/tabBar_icon_02.png","selectedIconPath":"static/tabBar/tabBar_show_02.png"},{"pagePath":"pages/property/index","text":"我的资产","iconPath":"static/tabBar/tabBar_icon_03.png","selectedIconPath":"static/tabBar/tabBar_show_03.png"}],"height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"}}