master
yujialong 2 years ago
parent 7965408454
commit 9f468ffd0f
  1. 12
      apis/modules/parner.js
  2. 4
      apis/modules/user.js
  3. 4
      config/request.js
  4. 6
      manifest.json
  5. 17
      order/editCourse/editCourse.vue
  6. 17
      order/orderDetail/orderDetail.vue
  7. 127
      pages/index/index.vue
  8. 274
      pages/info/info.vue
  9. 2
      pages/login/login.vue
  10. 148
      pages/person/person.vue
  11. 4
      pages/reg/reg.vue
  12. 165
      pages/study/study.vue
  13. BIN
      static/image/info-bg.jpg
  14. BIN
      static/image/person8.png
  15. BIN
      static/image/person9.png
  16. BIN
      static/image/study-bg.jpg
  17. BIN
      static/image/unfold.png
  18. 7
      team/article/article.vue
  19. 3
      team/qrcode/qrcode.vue
  20. 19
      team/setting/setting.vue
  21. 13
      team/teams/teams.vue

@ -28,3 +28,15 @@ export const mailFileSend = (data) => {
export const salesProgress = data => { export const salesProgress = data => {
return post(`nakadai/nakadai/applets/partner/salesProgress`, data) return post(`nakadai/nakadai/applets/partner/salesProgress`, data)
} }
export const annualOperatingAnalysis = data => {
return post(`nakadai/nakadai/applets/partner/annualOperatingAnalysis`, data)
}
export const editProvinceCity = data => {
return post(`nakadai/nakadai/partner-team/editProvinceCity`, data)
}
export const getPartnerTeamRates = data => {
return post(`nakadai/nakadai/partner-team/getPartnerTeamRates`, data)
}

@ -13,6 +13,10 @@ export const queryCity = (data) => {
return get('nakadai/nakadai/city/queryCity', data) return get('nakadai/nakadai/city/queryCity', data)
} }
export const updateAvatars = url => {
return post(`users/users/user/updateAvatars?url=` + url)
}
export const userBinding = (data) => { export const userBinding = (data) => {
return post('users/users/user/userBinding', data) return post('users/users/user/userBinding', data)
} }

@ -6,8 +6,8 @@
export default { export default {
// baseURL: 'https://huorantech.cn/', // baseURL: 'https://huorantech.cn/',
baseURL: 'http://192.168.31.151:9000/', // baseURL: 'http://192.168.31.151:9000/',
// baseURL: 'http://121.37.12.51/', baseURL: 'http://121.37.12.51/',
headers: { headers: {
'Content-Type': 'application/json;charset=UTF-8' 'Content-Type': 'application/json;charset=UTF-8'
}, },

@ -55,9 +55,9 @@
"minified" : true "minified" : true
}, },
"usingComponents" : true, "usingComponents" : true,
"optimization": { "optimization" : {
"subPackages": true "subPackages" : true
} }
}, },
"vueVersion" : "2" "vueVersion" : "2"
} }

@ -52,7 +52,7 @@
<view class="val">{{ item.discountRate }}</view> <view class="val">{{ item.discountRate }}</view>
</view> </view>
<view class="line"> <view class="line">
<view class="name">平台服务费</view> <view class="name">市场服务费</view>
<view class="val">{{ item.serviceFee }}</view> <view class="val">{{ item.serviceFee }}</view>
</view> </view>
<view :class="['line req', {err: err === 'finalPrice' + item.dataOrCourseId + item.authority}]"> <view :class="['line req', {err: err === 'finalPrice' + item.dataOrCourseId + item.authority}]">
@ -75,6 +75,7 @@
<script> <script>
import { getOrderOtherTime } from '@/apis/modules/order.js' import { getOrderOtherTime } from '@/apis/modules/order.js'
import { getPartnerTeamRates } from '@/apis/modules/parner.js'
export default { export default {
data() { data() {
return { return {
@ -110,7 +111,8 @@
courses: {} , // courses: {} , //
orderRepeat: [], orderRepeat: [],
repeatMsg: '', repeatMsg: '',
err: '' err: '',
rate: ''
} }
}, },
onShow() { onShow() {
@ -120,6 +122,7 @@
this.customerId = options.customerId this.customerId = options.customerId
this.action = options.action this.action = options.action
this.handleProduct() this.handleProduct()
this.getRate()
}, },
methods: { methods: {
// //
@ -272,10 +275,18 @@
row.settlementPrice = this.$util.handleNaN(sPrice) row.settlementPrice = this.$util.handleNaN(sPrice)
// *10% // *10%
if (row.settlementPrice) { if (row.settlementPrice) {
row.serviceFee = (row.settlementPrice * 0.1).toFixed(2) row.serviceFee = (row.finalPrice * (this.rate ? this.rate / 100 : 1)).toFixed(2)
} }
} }
}, },
//
getRate() {
getPartnerTeamRates({
teamId: uni.getStorageSync('team').teamId
}).then(({ teamRates }) => {
this.rate = teamRates.annualMarketingFee
}).catch(res => {})
},
// //
calcDiscount(row) { calcDiscount(row) {
const price = row.authority ? row.finalPrice : row.finalValue const price = row.authority ? row.finalPrice : row.finalValue

@ -83,7 +83,7 @@
<view class="val">{{ item.discountRate }}</view> <view class="val">{{ item.discountRate }}</view>
</view> </view>
<view class="line"> <view class="line">
<view class="label">平台服务费</view> <view class="label">市场服务费</view>
<view class="val">{{ item.serviceFee }}</view> <view class="val">{{ item.serviceFee }}</view>
</view> </view>
<view class="line done"> <view class="line done">
@ -138,6 +138,7 @@
<script> <script>
import { queryCustomer, queryCustomerDetails } from '@/apis/modules/client.js' import { queryCustomer, queryCustomerDetails } from '@/apis/modules/client.js'
import { add, update, getDetail } from '@/apis/modules/order.js' import { add, update, getDetail } from '@/apis/modules/order.js'
import { getPartnerTeamRates } from '@/apis/modules/parner.js'
export default { export default {
data() { data() {
return { return {
@ -186,7 +187,8 @@
searchTimer: null, searchTimer: null,
customerList: [], customerList: [],
customerListAll: [], customerListAll: [],
err: '' err: '',
rate: ''
} }
}, },
watch: { watch: {
@ -203,6 +205,7 @@
this.orderId = options.orderId this.orderId = options.orderId
this.isDetail = !!options.show this.isDetail = !!options.show
const store = uni.getStorageSync('courses') const store = uni.getStorageSync('courses')
this.getRate()
if (this.orderId) { if (this.orderId) {
this.getInfo() this.getInfo()
} else if (store) { } else if (store) {
@ -284,7 +287,7 @@
} }
// 3push(0-> 1- 2 ) // 3push(0-> 1- 2 )
list.map(e => { list.map(e => {
e.serviceFee = (e.settlementPrice * 0.1).toFixed(2) e.serviceFee = (e.settlementPrice * (this.rate ? this.rate / 100 : 1)).toFixed(2) // != 0 &&
const type = e.productType const type = e.productType
!type ? !type ?
courses.theory.list.push(e) : courses.theory.list.push(e) :
@ -341,6 +344,14 @@
}).catch(e => {}) }).catch(e => {})
this.closeCustomer() this.closeCustomer()
}, },
//
getRate() {
getPartnerTeamRates({
teamId: uni.getStorageSync('team').teamId
}).then(({ teamRates }) => {
this.rate = teamRates.annualMarketingFee
}).catch(res => {})
},
// //
toAdd() { toAdd() {
uni.setStorageSync('courses', this.courses) uni.setStorageSync('courses', this.courses)

@ -32,34 +32,20 @@
</li> </li>
</ul> </ul>
<view class="panel"> <view class="panel study-panel">
<view class="title" @click="toPanel(1)"> <view class="title" @click="toPanel(1)">
<view class="left"> <view class="left">
<image class="icon" src="@/static/image/index/index8.png" mode="widthFix"></image> <image class="icon" src="@/static/image/index/index8.png" mode="widthFix"></image>
学习速递 学习速递
</view> </view>
</view> </view>
<view class="data first"> <view class="study">
<view class="line"> <scroll-view class="scroll" scroll-x="true">
<view class="item"> <view v-for="(item, i) in studies" :key="i" class="item" @click="toDetail(item)">
<view class="name">本月新增客户</view> <image class="pic" :src="item.bannerImg"></image>
<view class="val">0</view> <view class="text">{{ item.title }}</view>
</view> </view>
<view class="item"> </scroll-view>
<view class="name">我的客户</view>
<view class="val">0</view>
</view>
</view>
<view class="line">
<view class="item">
<view class="name">本月新增产品试用</view>
<view class="val">0</view>
</view>
<view class="item">
<view class="name">试用客户</view>
<view class="val">0</view>
</view>
</view>
</view> </view>
</view> </view>
@ -78,11 +64,11 @@
<view class="data first"> <view class="data first">
<view class="line"> <view class="line">
<view class="item"> <view class="item">
<view class="name">本月新增客户</view> <view class="name">本月新增试用客户</view>
<view class="val">{{ sell.officialProduct }}</view> <view class="val">{{ sell.trialUser }}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">我的客户</view> <view class="name">本月成单客户</view>
<view class="val">{{ sell.regularUser }}</view> <view class="val">{{ sell.regularUser }}</view>
</view> </view>
</view> </view>
@ -92,8 +78,8 @@
<view class="val">{{ sell.trialProduct }}</view> <view class="val">{{ sell.trialProduct }}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">试用客户</view> <view class="name">本月成交订单产品</view>
<view class="val">{{ sell.trialUser }}</view> <view class="val">{{ sell.officialProduct }}</view>
</view> </view>
</view> </view>
</view> </view>
@ -104,27 +90,27 @@
<view class="title y-title" @click="toPanel(1)"> <view class="title y-title" @click="toPanel(1)">
<view class="left"> <view class="left">
<image class="icon" src="@/static/image/index/index9.png" mode="widthFix"></image> <image class="icon" src="@/static/image/index/index9.png" mode="widthFix"></image>
年度业绩看板 年度经营分析
</view> </view>
<image class="arrow" src="@/static/image/index/index10.png" mode="widthFix"></image> <image class="arrow" src="@/static/image/index/index10.png" mode="widthFix"></image>
</view> </view>
<view class="data second"> <view class="data second">
<view class="line"> <view class="line">
<view class="item"> <view class="item">
<view class="val">0</view> <view class="val">{{ analysis.finalPrice }}</view>
<view class="name">成交总</view> <view class="name">总成交金</view>
</view> </view>
<view class="item"> <view class="item">
<view class="val">0</view> <view class="val">{{ analysis.settlementPrice }}</view>
<view class="name">收益金额</view> <view class="name">总结算金额</view>
</view> </view>
<view class="item"> <view class="item">
<view class="val">0</view> <view class="val">{{ analysis.marketingServiceCharge }}</view>
<view class="name">已到账</view> <view class="name">市场服务费</view>
</view> </view>
<view class="item"> <view class="item">
<view class="val">0</view> <view class="val">{{ analysis.projectBenefit }}</view>
<view class="name">未到账</view> <view class="name">项目收益</view>
</view> </view>
</view> </view>
</view> </view>
@ -136,7 +122,8 @@
<script> <script>
import { getUserRolesPermissionMenu } from '@/apis/modules/user.js' import { getUserRolesPermissionMenu } from '@/apis/modules/user.js'
import { getTeamsByAccountId, getTheBusinessManagerIdsUnderTheTeam } from '@/apis/modules/client.js' import { getTeamsByAccountId, getTheBusinessManagerIdsUnderTheTeam } from '@/apis/modules/client.js'
import { treeList, salesProgress } from '@/apis/modules/parner.js' import { treeList, salesProgress, annualOperatingAnalysis } from '@/apis/modules/parner.js'
import { partnerOperatingList } from '@/apis/modules/article.js'
export default { export default {
data() { data() {
return { return {
@ -146,7 +133,9 @@
list: [], list: [],
id: '', id: '',
teamList: [], teamList: [],
sell: {} studies: [],
sell: {},
analysis: {}
} }
}, },
onShow() { onShow() {
@ -159,7 +148,9 @@
if (!uni.getStorageSync('auth').includes('首页')) { if (!uni.getStorageSync('auth').includes('首页')) {
this.per = false this.per = false
} }
this.getStudy()
this.getSell() this.getSell()
this.getAnalysis()
}, },
// //
getAuth() { getAuth() {
@ -196,6 +187,7 @@
data.map(e => { data.map(e => {
const n = e.partnerClassificationList const n = e.partnerClassificationList
e.id = n.id e.id = n.id
// parnerIdidteamIduni.getStorageSync('team').partnerId使
e.teamId = e.isTeam == 1 ? e.partnerClassificationId : n.id e.teamId = e.isTeam == 1 ? e.partnerClassificationId : n.id
e.partnerClassificationName = n.partnerClassificationName e.partnerClassificationName = n.partnerClassificationName
delete e.partnerClassificationList delete e.partnerClassificationList
@ -224,14 +216,40 @@
uni.hideLoading() uni.hideLoading()
}) })
}, },
//
getStudy() {
partnerOperatingList({
pageNum: 1,
pageSize: 5,
querySource: 4,
typeId: 1,
articleNameSort: 'desc'
}).then(({ data }) => {
this.studies = data.records
}).catch(e => {})
},
//
toDetail(item) {
this.$util.to(`/team/article/article?id=` + item.id)
},
// //
getSell() { getSell() {
salesProgress({ salesProgress({
businessManagerId: this.teamId businessManagerId: uni.getStorageSync('team').partnerId,
teamId: this.teamId,
}).then(res => { }).then(res => {
this.sell = res this.sell = res
}).catch(e => {}) }).catch(e => {})
}, },
//
getAnalysis() {
annualOperatingAnalysis({
businessManagerId: uni.getStorageSync('team').partnerId,
teamId: this.teamId,
}).then(({ data }) => {
this.analysis = data
}).catch(e => {})
},
// //
teamChange() { teamChange() {
const { teamId } = this const { teamId } = this
@ -307,6 +325,9 @@
background-color: #fff; background-color: #fff;
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
&.study-panel {
background-color: transparent;
}
.title { .title {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -383,6 +404,36 @@
color: #999; color: #999;
} }
} }
.study {
width: 100%;
margin-top: 15rpx;
overflow: auto;
.item {
display: inline-block;
width: 280rpx;
margin-right: 20rpx;
background-color: #fff;
border-radius: 8px;
overflow: hidden;
}
.pic {
width: 100%;
height: 130rpx;
}
.text {
padding: 15rpx;
font-size: 28rpx;
color: #333;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.scroll {
width: 100%;
white-space: nowrap;
}
} }
.oh { .oh {
overflow: hidden; overflow: hidden;

@ -1,31 +1,34 @@
<template> <template>
<view> <view>
<view class="filter"> <view class="search-wrap">
<uni-search-bar class="search" radius="30" placeholder="请输入文章名称,标签" v-model="keyword" clearButton="auto" cancelButton="none" /> <image class="bg" src="@/static/image/info-bg.jpg"></image>
<view :class="['sort', sort]" @click="switchSort"></view> <view class="info">
<uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="22" color="#007eff" @click="popup = true"></uni-icons> <view class="text">行业资讯与活动</view>
<view class="text">速览</view>
<uni-search-bar class="search" radius="30" placeholder="请输入文章名称,标签" v-model="keyword" clearButton="auto" cancelButton="none" bgColor="#fff" />
</view>
</view>
<view class="type">
<view v-for="(item, i) in classifications.slice(0, 4)" :key="i" :class="['item', {active: active == item.id}]" @click="classificationClick(item, 1)">{{ item.classificationName }}</view>
<image class="unfold" src="@/static/image/unfold.png" mode="widthFix" @click="typeVisible = true"></image>
</view> </view>
<template v-if="list.length"> <template v-if="list.length">
<view class="list"> <view class="list">
<view class="item" @click="toDetail(item)"> <view v-for="(item, i) in list" :key="i" class="item" @click="toDetail(item)">
<image class="pic" src="@/static/image/logo.png"></image> <view class="title">{{ item.title }}</view>
<view class="right"> <view class="texts">
<view class="title">测试标题</view> <view class="left">
<view class="labels"> <view class="des" v-html="item.mainBody"></view>
<view class="label">大赛</view> <view class="metas">
<view class="label">大赛发动机可</view> <text class="date">{{ item.releaseTime }}</text>
</view> <view v-if="item.labelName" class="labels">
<view class="metas"> <view v-for="(label, j) in item.labelName" :key="j" class="label">{{ label }}</view>
<view class="meta"> </view>
<uni-icons class="icon" type="eye" size="22" color="#007FFF"></uni-icons>
123人学过
</view>
<view class="meta">
<uni-icons class="icon" type="star" size="22" color="#007eff"></uni-icons>
123
</view> </view>
</view> </view>
<image class="pic" :src="item.bannerImg"></image>
</view> </view>
</view> </view>
</view> </view>
@ -33,55 +36,42 @@
</template> </template>
<empty v-else></empty> <empty v-else></empty>
<filter-popup :data="filterData" :form.sync="filterForm" v-model="popup" title="全部筛选" height="1104rpx" @finsh="subFinsh"></filter-popup> <view class="type-popup" v-show="typeVisible">
<uni-icons class="close" type="closeempty" size="20" color="#757575" @click="closeType"></uni-icons>
<view class="title">所属分类</view>
<view class="types">
<view v-for="(item, i) in classifications" :key="i" :class="['item', {active: active == item.id}]" @click="classificationClick(item)">{{ item.classificationName }}</view>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
import { queryCustomer } from '@/apis/modules/client.js' import { partnerOperatingList, queryClassificationByType } from '@/apis/modules/article.js'
import { list, del } from '@/apis/modules/order.js'
export default { export default {
data() { data() {
return { return {
popup: false, classifications: [
//
filterData: [
{ {
children: false,// id: '',
title: "所属类型", classificationName: '不限'
key: "classificationId", //
keyValue: "value", //
isRadio: true, //
data: [
{
title: "待发货",
value: 0
},
{
title: "已完成",
value: 1
},
],
} }
], ],
filterForm: {}, active: '',
typeVisible: false,
reachBottom: 0, // 0->,1->,-1-> reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore status: 'more', // more|loading|noMore
searchTimer: null, searchTimer: null,
orderStatus: '', articleNameSort: 'desc',
sort: 'desc',
keyword: '', keyword: '',
list: [ list: [],
{
name: '1'
}
],
page: 1, page: 1,
pageSize: 10, pageSize: 10,
} }
}, },
watch: { watch: {
keyword () { keyword () {
this.active = ''
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initList() this.initList()
@ -104,31 +94,36 @@
} }
}, },
onShow() { onShow() {
// this.initRole() this.initRole()
}, },
methods: { methods: {
// //
initRole() { initRole() {
if (!uni.getStorageSync('auth').includes('资讯')) {
this.per = false
}
this.initList() this.initList()
this.getClassification()
}, },
getList() { getList() {
const data = { const data = {
keywords: this.keyword, keyWord: this.keyword,
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
sort: this.sort, querySource: 4,
orderStatus: this.orderStatus, typeId: 2,
type: this.curTab articleNameSort: this.articleNameSort,
classificationId: this.active
} }
uni.showLoading({ uni.showLoading({
title: '加载中' title: '加载中'
}) })
list(data).then(({ data }) => { partnerOperatingList(data).then(({ data }) => {
uni.hideLoading() uni.hideLoading()
// list // list
const list = data.records const list = data.records
list.map(e => { list.forEach(e => {
e.toggle = e.orderContent.length < 14 // 14 if (e.labelName) e.labelName = e.labelName.split(',').slice(0, 2) //
}) })
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list this.list = this.reachBottom > 0 ? [...this.list, ...list] : list
this.page++ // page+1 this.page++ // page+1
@ -144,80 +139,179 @@
this.reachBottom = 0 this.reachBottom = 0
this.getList() this.getList()
}, },
//
getClassification() {
queryClassificationByType(2).then(({ data }) => {
this.classifications.push(...data)
}).catch(e => {})
},
//
classificationClick(item, query) {
this.active = item.id
query && this.initList()
},
//
closeType() {
this.typeVisible = false
this.initList()
},
// //
toggle(item) { toggle(item) {
item.toggle = !item.toggle item.toggle = !item.toggle
}, },
//
subFinsh(val) {
const { orderStatus } = val
this.orderStatus = orderStatus.length ? orderStatus[0] : ''
this.initList()
},
// //
switchSort() { switchSort() {
this.sort = this.sort === 'desc' ? 'asc' : 'desc' this.articleNameSort = this.articleNameSort === 'desc' ? 'asc' : 'desc'
this.initList()
},
// tab
tabChange(tab) {
this.curTab = tab.id
this.initList() this.initList()
}, },
// //
toDetail(item) { toDetail(item) {
this.$util.to(`/team/article/article`) this.$util.to(`/team/article/article?id=` + item.id)
}, },
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.search-wrap {
position: relative;
height: 300rpx;
padding: 120rpx 10px 0;
.bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.info {
position: relative;
}
.text {
margin: 0 10px 10rpx;
font-size: 50rpx;
color: #fff;
}
}
.type {
position: relative;
display: flex;
padding: 30rpx;
background-color: #fff;
.item {
padding: 0 15rpx;
line-height: 1.6;
font-size: 28rpx;
color: #333;
white-space: nowrap;
&.active {
color: #007FFF;
font-weight: 600;
}
}
.unfold {
position: absolute;
right: 40rpx;
width: 40rpx;
}
}
.type-popup {
z-index: 10;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding: 10rpx;
background-color: #fff;
.close {
position: absolute;
top: 50rpx;
right: 50rpx;
}
.title {
margin: 150rpx 20rpx 30rpx;
font-size: 30rpx;
color: #333;
}
.types {
display: flex;
flex-wrap: wrap;
}
.item {
width: calc((100% - 80rpx) / 3);
margin: 10rpx;
font-size: 28rpx;
line-height: 3;
text-align: center;
color: #1f1f1f;
background-color: #dbebff;
border-radius: 2px;
&.active {
color: #fff;
background-color: #007EFF;
}
}
}
.list { .list {
margin-top: 20rpx;
background-color: #fff; background-color: #fff;
.item { .item {
margin-bottom: 10rpx;
padding: 20rpx 40rpx;
border-bottom: 1px solid #f1f1f1;
}
.texts {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-top: 10rpx;
padding: 20rpx 40rpx;
border-bottom: 1px solid #f1f1f1;
} }
.pic { .pic {
width: 200rpx; width: 260rpx;
height: 140rpx; height: 180rpx;
border-radius: 8px;
} }
.right { .left {
width: calc(100% - 230rpx); width: calc(100% - 280rpx);
} }
.title { .title {
font-size: 32rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
color: #333; color: #333;
} }
.des {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
overflow: hidden;
}
.metas {
display: flex;
justify-content: space-between;
align-items: center;
}
.date {
font-size: 24rpx;
color: #ccc;
white-space: nowrap;
}
.labels { .labels {
display: inline-flex; display: inline-flex;
flex-wrap: wrap;
align-items: center; align-items: center;
margin: 15rpx 0; margin-top: 15rpx;
} }
.label { .label {
width: 90rpx;
padding: 2px 6px; padding: 2px 6px;
margin-right: 20rpx; margin: 0 10rpx 15rpx 0;
font-size: 24rpx; font-size: 24rpx;
color: #fff; color: #fff;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
background-color: #ccc; background-color: #ccc;
border-radius: 4px; border-radius: 4px;
} }
.metas {
display: inline-flex;
align-items: center;
}
.meta {
display: inline-flex;
align-items: center;
margin-right: 20rpx;
font-size: 24rpx;
}
} }
</style> </style>

@ -45,7 +45,7 @@
} }
}, },
onShow() { onShow() {
// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjc5NjQ5Nzk2LCJleHAiOjE2Nzk2OTI5OTYsImFjY291bnRJZCI6IjIwNCJ9.17xb5qZyaBF1Qf_sjO0XvkUnLBb8e3Z__d4lZViFpi0') // uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjc5OTcwMDM5LCJleHAiOjE2ODAwMTMyMzksImFjY291bnRJZCI6IjIwNCJ9.sO9Nguaw5dNlWWE2Jg3599PE4D-njPcsNI8ODH9hJD8')
// //
this.checkLogin() this.checkLogin()
}, },

@ -3,14 +3,16 @@
<image class="bg" src="@/static/image/person-bg.png"></image> <image class="bg" src="@/static/image/person-bg.png"></image>
<view class="wrap"> <view class="wrap">
<view class="info"> <view class="info">
<image class="avatar" :src="avatar" mode=""></image> <button class="avatar-btn" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image class="avatar" :src="avatar" mode=""></image>
</button>
<view class="text"> <view class="text">
<view class="name">{{ my.info.userName }}</view> <view class="name">{{ my.info.userName }}</view>
<view class="phone">{{ my.info.phone }}</view> <view class="phone">{{ my.info.phone }}</view>
</view> </view>
</view> </view>
<view class="list"> <view class="list">
<view class="item" @click="$util.to('/team/teams/teams')"> <view v-if="auth('我的:我的团队')" class="item" @click="$util.to('/team/teams/teams')">
<view class="left"> <view class="left">
<image class="icon" src="@/static/image/person4.png" mode=""></image> <image class="icon" src="@/static/image/person4.png" mode=""></image>
<text class="name">我的团队</text> <text class="name">我的团队</text>
@ -21,36 +23,56 @@
<image class="icon" src="@/static/image/person2.png" mode=""></image> <image class="icon" src="@/static/image/person2.png" mode=""></image>
<text class="name">团队收益</text> <text class="name">团队收益</text>
</view> </view>
<text class="val">{{ my.teamIncome}}</text> <text class="val">{{ my.teamIncome }}</text>
</view> </view>
<view v-if="auth('我的:我的收益')" class="item"> <view v-if="auth('我的:我的项目收益')" class="item">
<view class="left"> <view class="left">
<image class="icon" src="@/static/image/person1.png" mode=""></image> <image class="icon" src="@/static/image/person1.png" mode=""></image>
<text class="name">我的项目收益</text> <text class="name">我的项目收益</text>
</view> </view>
<text class="val">{{ my.myIncome}}</text> <text class="val">{{ my.myIncome }}</text>
</view> </view>
<view class="item"> <!-- <view class="item">
<view class="left"> <view class="left">
<image class="icon" src="@/static/image/person5.png" mode=""></image> <image class="icon" src="@/static/image/person5.png" mode=""></image>
<text class="name">我的收藏</text> <text class="name">我的收藏</text>
</view> </view>
</view> </view> -->
<view class="item"> <view v-if="auth('我的:市场服务费')" class="item">
<view class="left"> <view class="left">
<image class="icon" src="@/static/image/person6.png" mode=""></image> <image class="icon" src="@/static/image/person6.png" mode=""></image>
<text class="name">市场服务费</text> <text class="name">市场服务费</text>
</view> </view>
<text class="val">项目抽成{{ my.myIncome}}%</text> <text class="val">项目抽成{{ my.teamInfo.annualMarketingFee || 0 }}%</text>
</view> </view>
<view class="item"> <view v-if="auth('我的:团队年费')" class="item">
<view class="left"> <view class="left">
<image class="icon" src="@/static/image/person7.png" mode=""></image> <image class="icon" src="@/static/image/person7.png" mode=""></image>
<text class="name">团队年费</text> <text class="name">团队年费</text>
</view> </view>
<text class="val">固定年费{{ my.myIncome}}%</text> <text class="val">固定年费{{ my.teamInfo.annualTeamFee || 0 }}w</text>
</view>
<view v-if="auth('我的:业务省份')" class="item">
<view class="left">
<image class="icon" src="@/static/image/person8.png" mode=""></image>
<text class="name">业务省份</text>
</view>
<view class="val">
<text v-if="disabled" class="name">{{ provinceName }}</text>
<uni-data-picker v-else class="picker-input" :clear-icon="false" :readonly="disabled" placeholder="请选择省份" popup-title="请选择省份" preload :localdata="provinces" :map="{text: 'provinceName', value: 'provinceId'}" v-model="provinceId" @change="getCity"></uni-data-picker>
</view>
</view>
<view v-if="auth('我的:业务城市')" class="item">
<view class="left">
<image class="icon" src="@/static/image/person9.png" mode=""></image>
<text class="name">业务城市</text>
</view>
<view class="val">
<text v-if="disabled" class="name">{{ cityName }}</text>
<uni-data-picker v-else class="picker-input" :clear-icon="false" :readonly="disabled" placeholder="请选择城市" popup-title="请选择城市" preload :localdata="cities" :map="{text: 'cityName', value: 'cityId'}" v-model="cityId" @change="submit"></uni-data-picker>
</view>
</view> </view>
<view v-if="auth('我的:设置')" class="item" @click="$util.to('/team/setting/setting')"> <view v-if="auth('我的:设置')" class="item" @click="toSet">
<view class="left"> <view class="left">
<image class="icon" src="@/static/image/person3.png" mode=""></image> <image class="icon" src="@/static/image/person3.png" mode=""></image>
<text class="name">设置</text> <text class="name">设置</text>
@ -63,7 +85,8 @@
</template> </template>
<script> <script>
import { my } from '@/apis/modules/parner.js' import { my, editProvinceCity } from '@/apis/modules/parner.js'
import { queryProvince, queryCity, updateAvatars } from '@/apis/modules/user.js'
export default { export default {
data() { data() {
return { return {
@ -72,16 +95,38 @@
info: { info: {
phone: '' phone: ''
}, },
teamInfo: {
annualMarketingFee: '',
annualTeamFee: '',
},
myIncome: 0, myIncome: 0,
teamIncome: 0 teamIncome: 0
}, },
avatar: uni.getStorageSync('avatar') || '@/static/image/avatar.png', avatar: uni.getStorageSync('avatar') || '@/static/image/avatar.png',
userName: uni.getStorageSync('userName') userName: uni.getStorageSync('userName'),
disabled: true,
provinces: [],
cities: [],
provinceIcon: {
color: '#007eff',
size: '22',
type: 'location'
},
cityIcon: {
color: '#007eff',
size: '22',
type: 'map-pin-ellipse'
},
provinceId: '',
cityId: '',
provinceName: '',
cityName: ''
} }
}, },
onShow() { onShow() {
this.per = true this.per = true
this.initRole() this.initRole()
this.disabled = uni.getStorageSync('team').isTeam == 0 //
}, },
methods: { methods: {
// //
@ -100,6 +145,60 @@
teamId teamId
}).then(({ my }) => { }).then(({ my }) => {
this.my = my this.my = my
this.provinceId = my.teamInfo.provinceId
this.cityId = my.teamInfo.cityId
this.getProvince()
this.provinceId && this.getCity()
}).catch(e => {})
},
//
onChooseAvatar(e) {
this.avatar = e.detail.avatarUrl
updateAvatars(e.detail.avatarUrl).then(res => {}).catch(e => {})
},
//
toSet() {
this.$util.to(`/team/setting/setting`)
},
//
getProvince() {
queryProvince().then(({ list }) => {
if (this.disabled) {
const { provinceId } = this
this.provinceName = list.find(e => e.provinceId == provinceId).provinceName
} else {
this.provinces = list
}
}).catch(res => {})
},
//
getCity(val) {
if (this.provinceId) {
queryCity({
provinceId: this.provinceId
}).then(({ list }) => {
if (this.disabled) {
const { cityId } = this
this.cityName = list.find(e => e.cityId == cityId).cityName
} else {
this.cities = list
}
}).catch(res => {})
} else {
this.cities = []
}
if (val) this.cityId = ''
},
//
submit() {
const { partnerId, teamId } = uni.getStorageSync('team')
editProvinceCity({
provinceId: this.provinceId,
cityId: this.cityId,
classificationId: teamId,
partnerId
}).then(({ my }) => {
this.$util.sucMsg('修改成功')
}).catch(e => {}) }).catch(e => {})
}, },
} }
@ -122,11 +221,19 @@
padding: 26rpx 34rpx; padding: 26rpx 34rpx;
background-color: #fff; background-color: #fff;
border-radius: 16rpx; border-radius: 16rpx;
.avatar-btn {
padding: 0;
margin: 0 28rpx 0 0;
line-height: 0;
border: 0 !important;
background-color: transparent;
outline: none;
border-radius: 50%;
}
.avatar { .avatar {
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
margin-right: 28rpx; border: 0;
border-radius: 50%;
} }
.name { .name {
margin-bottom: 10rpx; margin-bottom: 10rpx;
@ -163,4 +270,13 @@
color: #333; color: #333;
} }
} }
.location {
margin-top: 30rpx;
}
.picker-wrap {
margin-top: 4px;
}
.name {
font-size: 24rpx;
}
</style> </style>

@ -10,10 +10,10 @@
<uni-forms-item label="姓名"> <uni-forms-item label="姓名">
<uni-easyinput type="text" v-model="form.userName" placeholder="请输入姓名" /> <uni-easyinput type="text" v-model="form.userName" placeholder="请输入姓名" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="意向省份"> <uni-forms-item label="业务省份">
<uni-data-picker placeholder="请选择省份" popup-title="请选择省份" preload :localdata="provinces" :map="{text: 'provinceName', value: 'provinceId'}" v-model="form.provinceId" @change="getCity"></uni-data-picker> <uni-data-picker placeholder="请选择省份" popup-title="请选择省份" preload :localdata="provinces" :map="{text: 'provinceName', value: 'provinceId'}" v-model="form.provinceId" @change="getCity"></uni-data-picker>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="意向城市"> <uni-forms-item label="业务城市">
<uni-data-picker placeholder="请选择城市" popup-title="请选择城市" preload :localdata="cities" :map="{text: 'cityName', value: 'cityId'}" v-model="form.cityId"></uni-data-picker> <uni-data-picker placeholder="请选择城市" popup-title="请选择城市" preload :localdata="cities" :map="{text: 'cityName', value: 'cityId'}" v-model="form.cityId"></uni-data-picker>
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>

@ -1,9 +1,16 @@
<template> <template>
<view> <view>
<view class="filter"> <view class="search-wrap">
<uni-search-bar class="search" radius="30" placeholder="请输入文章名称,标签" v-model="keyword" clearButton="auto" cancelButton="none" /> <image class="bg" src="@/static/image/study-bg.jpg"></image>
<view :class="['sort', sort]" @click="switchSort"></view> <view class="info">
<uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="22" color="#007eff" @click="popup = true"></uni-icons> <view class="text">销售必备技能</view>
<uni-search-bar class="search" radius="30" placeholder="请输入文章名称,标签" v-model="keyword" clearButton="auto" cancelButton="none" bgColor="#fff" />
</view>
</view>
<view class="type">
<view v-for="(item, i) in classifications.slice(0, 4)" :key="i" :class="['item', {active: active == item.id}]" @click="classificationClick(item, 1)">{{ item.classificationName }}</view>
<image class="unfold" src="@/static/image/unfold.png" mode="widthFix" @click="typeVisible = true"></image>
</view> </view>
<template v-if="list.length"> <template v-if="list.length">
@ -33,7 +40,13 @@
</template> </template>
<empty v-else></empty> <empty v-else></empty>
<filter-popup :data="filterData" :form.sync="filterForm" v-model="popup" title="全部筛选" height="1104rpx" @finsh="subFinsh"></filter-popup> <view class="type-popup" v-show="typeVisible">
<uni-icons class="close" type="closeempty" size="20" color="#757575" @click="closeType"></uni-icons>
<view class="title">所属分类</view>
<view class="types">
<view v-for="(item, i) in classifications" :key="i" :class="['item', {active: active == item.id}]" @click="classificationClick(item)">{{ item.classificationName }}</view>
</view>
</view>
</view> </view>
</template> </template>
@ -42,22 +55,14 @@
export default { export default {
data() { data() {
return { return {
popup: false, classifications: [
//
filterData: [
{ {
children: false,// id: '',
title: "所属类型", classificationName: '不限'
key: "classificationId", //
keyValue: "id", //
isRadio: true, //
data: [],
} }
], ],
filterForm: { active: '',
classificationId: [] typeVisible: false,
},
classificationId: '',
reachBottom: 0, // 0->,1->,-1-> reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore status: 'more', // more|loading|noMore
searchTimer: null, searchTimer: null,
@ -97,6 +102,9 @@
methods: { methods: {
// //
initRole() { initRole() {
if (!uni.getStorageSync('auth').includes('学习')) {
this.per = false
}
this.initList() this.initList()
this.getClassification() this.getClassification()
}, },
@ -108,7 +116,7 @@
querySource: 4, querySource: 4,
typeId: 1, typeId: 1,
articleNameSort: this.articleNameSort, articleNameSort: this.articleNameSort,
classificationId: this.classificationId classificationId: this.active
} }
uni.showLoading({ uni.showLoading({
title: '加载中' title: '加载中'
@ -134,24 +142,23 @@
// //
getClassification() { getClassification() {
queryClassificationByType(1).then(({ data }) => { queryClassificationByType(1).then(({ data }) => {
data.forEach(e => { this.classifications.push(...data)
e.title = e.classificationName
e.value = e.id
})
this.filterData[0].data = data
console.log(11, this.filterData[0].data)
}).catch(e => {}) }).catch(e => {})
}, },
//
classificationClick(item, query) {
this.active = item.id
query && this.initList()
},
//
closeType() {
this.typeVisible = false
this.initList()
},
// //
toggle(item) { toggle(item) {
item.toggle = !item.toggle item.toggle = !item.toggle
}, },
//
subFinsh(val) {
const { classificationId } = val
this.classificationId = classificationId.length ? classificationId[0] : ''
this.initList()
},
// //
switchSort() { switchSort() {
this.articleNameSort = this.articleNameSort === 'desc' ? 'asc' : 'desc' this.articleNameSort = this.articleNameSort === 'desc' ? 'asc' : 'desc'
@ -166,24 +173,104 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.search-wrap {
position: relative;
height: 300rpx;
padding: 120rpx 10px 0;
.bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.info {
position: relative;
}
.text {
margin: 0 10px 10rpx;
font-size: 50rpx;
color: #fff;
}
}
.type {
position: relative;
display: flex;
padding: 30rpx;
background-color: #fff;
.item {
padding: 0 15rpx;
line-height: 1.6;
font-size: 28rpx;
color: #333;
white-space: nowrap;
&.active {
color: #007FFF;
font-weight: 600;
}
}
.unfold {
position: absolute;
right: 40rpx;
width: 40rpx;
}
}
.type-popup {
z-index: 10;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding: 10rpx;
background-color: #fff;
.close {
position: absolute;
top: 50rpx;
right: 50rpx;
}
.title {
margin: 150rpx 20rpx 30rpx;
font-size: 30rpx;
color: #333;
}
.types {
display: flex;
flex-wrap: wrap;
}
.item {
width: calc((100% - 80rpx) / 3);
margin: 10rpx;
font-size: 28rpx;
line-height: 3;
text-align: center;
color: #1f1f1f;
background-color: #dbebff;
border-radius: 2px;
&.active {
color: #fff;
background-color: #007EFF;
}
}
}
.list { .list {
margin-top: 20rpx;
background-color: #fff; background-color: #fff;
.item { .item {
position: relative; position: relative;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-top: 10rpx; margin-bottom: 10rpx;
padding: 20rpx 40rpx; padding: 20rpx 40rpx;
border-bottom: 1px solid #f1f1f1; border-bottom: 1px solid #f1f1f1;
} }
.pic { .pic {
width: 200rpx; width: 260rpx;
height: 140rpx; height: 180rpx;
border-radius: 8px;
} }
.right { .right {
width: calc(100% - 230rpx); width: calc(100% - 280rpx);
} }
.title { .title {
font-size: 32rpx; font-size: 32rpx;
@ -198,8 +285,7 @@
} }
.label { .label {
padding: 2px 6px; padding: 2px 6px;
margin-bottom: 15rpx; margin: 0 20rpx 15rpx 0;
margin-right: 20rpx;
font-size: 24rpx; font-size: 24rpx;
color: #fff; color: #fff;
background-color: #ccc; background-color: #ccc;
@ -215,6 +301,9 @@
margin-right: 20rpx; margin-right: 20rpx;
font-size: 24rpx; font-size: 24rpx;
} }
.icon {
margin-right: 5rpx;
}
.last { .last {
position: absolute; position: absolute;
bottom: 20rpx; bottom: 20rpx;

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

@ -66,16 +66,16 @@
.metas { .metas {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
margin: 20rpx 0; margin: 20rpx 0;
.labels { .labels {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
margin: 15rpx 0; flex-wrap: wrap;
margin: 15rpx;
} }
.label { .label {
padding: 2px 6px; padding: 2px 6px;
margin-right: 20rpx; margin: 0 20rpx 15rpx 0;
font-size: 24rpx; font-size: 24rpx;
color: #fff; color: #fff;
background-color: #ccc; background-color: #ccc;
@ -84,6 +84,7 @@
.meta { .meta {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
white-space: nowrap;
} }
} }
.text { .text {

@ -57,7 +57,8 @@
generateInvitationCode(uni.getStorageSync('team').accountId).then(({ expireTime }) => { generateInvitationCode(uni.getStorageSync('team').accountId).then(({ expireTime }) => {
const date = new Date(Date.now() + expireTime * 1000) // *1000 const date = new Date(Date.now() + expireTime * 1000) // *1000
this.expireTime = `${date.getFullYear()}-${this.$util.preZero(date.getMonth() + 1)}-${this.$util.preZero(date.getDate())} ${this.$util.preZero(date.getHours())}:${this.$util.preZero(date.getMinutes())}:${this.$util.preZero(date.getMinutes())}` this.expireTime = `${date.getFullYear()}-${this.$util.preZero(date.getMonth() + 1)}-${this.$util.preZero(date.getDate())} ${this.$util.preZero(date.getHours())}:${this.$util.preZero(date.getMinutes())}:${this.$util.preZero(date.getMinutes())}`
this.link = `https://huorantech.cn/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0&teamName=${this.my.info.userName}` // this.link = `https://huorantech.cn/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0&teamName=${this.my.info.userName}`
this.link = `http://121.37.12.51/backstage/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0&teamName=${this.my.info.userName}`
}).catch(e => {}) }).catch(e => {})
}, },
} }

@ -7,15 +7,6 @@
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="pwdIcon" title="密码" rightText="******" clickable @click="toPage('../password/password')" /> <uni-list-item :show-extra-icon="true" showArrow :extra-icon="pwdIcon" title="密码" rightText="******" clickable @click="toPage('../password/password')" />
</uni-list> </uni-list>
<view class="location">
<uni-list>
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="locationIcon" title="意向城市">
</uni-list-item>
</uni-list>
</view>
<!-- <view v-if="auth('我的:退出账号')" class="logout" @click="logout">退出登录</view> -->
<view class="logout" @click="logout">退出登录</view> <view class="logout" @click="logout">退出登录</view>
</view> </view>
</template> </template>
@ -45,16 +36,11 @@
size: '22', size: '22',
type: 'locked' type: 'locked'
}, },
locationIcon: {
color: '#007eff',
size: '22',
type: 'location'
},
info: { info: {
account: '', account: '',
phone: '', phone: '',
email: '' email: ''
} },
} }
}, },
onShow() { onShow() {
@ -93,9 +79,6 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.location {
margin-top: 30rpx;
}
.logout { .logout {
padding: 30rpx 0; padding: 30rpx 0;
margin-top: 30rpx; margin-top: 30rpx;

@ -14,7 +14,7 @@
<text class="name">手机号码</text> <text class="name">手机号码</text>
<text class="val">{{ item.phone }}</text> <text class="val">{{ item.phone }}</text>
</view> </view>
<view class="line"> <view v-if="item.lastLoginTime" class="line">
<text class="name">加入时间</text> <text class="name">加入时间</text>
<text class="val">{{ item.lastLoginTime.split(' ')[0] }}</text> <text class="val">{{ item.lastLoginTime.split(' ')[0] }}</text>
</view> </view>
@ -70,18 +70,9 @@
}, },
onShow() { onShow() {
this.per = true this.per = true
this.initRole() this.initList()
}, },
methods: { methods: {
//
initRole() {
const auth = uni.getStorageSync('auth')
if (!auth.includes('团队')) {
this.per = false
} else if (auth.includes('团队:团队列表')) {
this.initList()
}
},
// //
getList() { getList() {
uni.showLoading({ uni.showLoading({

Loading…
Cancel
Save