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. 4
      manifest.json
  5. 17
      order/editCourse/editCourse.vue
  6. 17
      order/orderDetail/orderDetail.vue
  7. 127
      pages/index/index.vue
  8. 270
      pages/info/info.vue
  9. 2
      pages/login/login.vue
  10. 146
      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 => {
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)
}
export const updateAvatars = url => {
return post(`users/users/user/updateAvatars?url=` + url)
}
export const userBinding = (data) => {
return post('users/users/user/userBinding', data)
}

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

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

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

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

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

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

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

@ -3,14 +3,16 @@
<image class="bg" src="@/static/image/person-bg.png"></image>
<view class="wrap">
<view class="info">
<button class="avatar-btn" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image class="avatar" :src="avatar" mode=""></image>
</button>
<view class="text">
<view class="name">{{ my.info.userName }}</view>
<view class="phone">{{ my.info.phone }}</view>
</view>
</view>
<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">
<image class="icon" src="@/static/image/person4.png" mode=""></image>
<text class="name">我的团队</text>
@ -21,36 +23,56 @@
<image class="icon" src="@/static/image/person2.png" mode=""></image>
<text class="name">团队收益</text>
</view>
<text class="val">{{ my.teamIncome}}</text>
<text class="val">{{ my.teamIncome }}</text>
</view>
<view v-if="auth('我的:我的收益')" class="item">
<view v-if="auth('我的:我的项目收益')" class="item">
<view class="left">
<image class="icon" src="@/static/image/person1.png" mode=""></image>
<text class="name">我的项目收益</text>
</view>
<text class="val">{{ my.myIncome}}</text>
<text class="val">{{ my.myIncome }}</text>
</view>
<view class="item">
<!-- <view class="item">
<view class="left">
<image class="icon" src="@/static/image/person5.png" mode=""></image>
<text class="name">我的收藏</text>
</view>
</view>
<view class="item">
</view> -->
<view v-if="auth('我的:市场服务费')" class="item">
<view class="left">
<image class="icon" src="@/static/image/person6.png" mode=""></image>
<text class="name">市场服务费</text>
</view>
<text class="val">项目抽成{{ my.myIncome}}%</text>
<text class="val">项目抽成{{ my.teamInfo.annualMarketingFee || 0 }}%</text>
</view>
<view class="item">
<view v-if="auth('我的:团队年费')" class="item">
<view class="left">
<image class="icon" src="@/static/image/person7.png" mode=""></image>
<text class="name">团队年费</text>
</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 v-if="auth('我的:设置')" class="item" @click="$util.to('/team/setting/setting')">
</view>
<view v-if="auth('我的:设置')" class="item" @click="toSet">
<view class="left">
<image class="icon" src="@/static/image/person3.png" mode=""></image>
<text class="name">设置</text>
@ -63,7 +85,8 @@
</template>
<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 {
data() {
return {
@ -72,16 +95,38 @@
info: {
phone: ''
},
teamInfo: {
annualMarketingFee: '',
annualTeamFee: '',
},
myIncome: 0,
teamIncome: 0
},
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() {
this.per = true
this.initRole()
this.disabled = uni.getStorageSync('team').isTeam == 0 //
},
methods: {
//
@ -100,6 +145,60 @@
teamId
}).then(({ 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 => {})
},
}
@ -122,11 +221,19 @@
padding: 26rpx 34rpx;
background-color: #fff;
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 {
width: 120rpx;
height: 120rpx;
margin-right: 28rpx;
border-radius: 50%;
border: 0;
}
.name {
margin-bottom: 10rpx;
@ -163,4 +270,13 @@
color: #333;
}
}
.location {
margin-top: 30rpx;
}
.picker-wrap {
margin-top: 4px;
}
.name {
font-size: 24rpx;
}
</style>

@ -10,10 +10,10 @@
<uni-forms-item label="姓名">
<uni-easyinput type="text" v-model="form.userName" placeholder="请输入姓名" />
</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-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-forms-item>
</uni-forms>

@ -1,9 +1,16 @@
<template>
<view>
<view class="filter">
<uni-search-bar class="search" radius="30" placeholder="请输入文章名称,标签" v-model="keyword" clearButton="auto" cancelButton="none" />
<view :class="['sort', sort]" @click="switchSort"></view>
<uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="22" color="#007eff" @click="popup = true"></uni-icons>
<view class="search-wrap">
<image class="bg" src="@/static/image/study-bg.jpg"></image>
<view class="info">
<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>
<template v-if="list.length">
@ -33,7 +40,13 @@
</template>
<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>
</template>
@ -42,22 +55,14 @@
export default {
data() {
return {
popup: false,
//
filterData: [
classifications: [
{
children: false,//
title: "所属类型",
key: "classificationId", //
keyValue: "id", //
isRadio: true, //
data: [],
id: '',
classificationName: '不限'
}
],
filterForm: {
classificationId: []
},
classificationId: '',
active: '',
typeVisible: false,
reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore
searchTimer: null,
@ -97,6 +102,9 @@
methods: {
//
initRole() {
if (!uni.getStorageSync('auth').includes('学习')) {
this.per = false
}
this.initList()
this.getClassification()
},
@ -108,7 +116,7 @@
querySource: 4,
typeId: 1,
articleNameSort: this.articleNameSort,
classificationId: this.classificationId
classificationId: this.active
}
uni.showLoading({
title: '加载中'
@ -134,24 +142,23 @@
//
getClassification() {
queryClassificationByType(1).then(({ data }) => {
data.forEach(e => {
e.title = e.classificationName
e.value = e.id
})
this.filterData[0].data = data
console.log(11, this.filterData[0].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) {
item.toggle = !item.toggle
},
//
subFinsh(val) {
const { classificationId } = val
this.classificationId = classificationId.length ? classificationId[0] : ''
this.initList()
},
//
switchSort() {
this.articleNameSort = this.articleNameSort === 'desc' ? 'asc' : 'desc'
@ -166,24 +173,104 @@
</script>
<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 {
margin-top: 20rpx;
background-color: #fff;
.item {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10rpx;
margin-bottom: 10rpx;
padding: 20rpx 40rpx;
border-bottom: 1px solid #f1f1f1;
}
.pic {
width: 200rpx;
height: 140rpx;
width: 260rpx;
height: 180rpx;
border-radius: 8px;
}
.right {
width: calc(100% - 230rpx);
width: calc(100% - 280rpx);
}
.title {
font-size: 32rpx;
@ -198,8 +285,7 @@
}
.label {
padding: 2px 6px;
margin-bottom: 15rpx;
margin-right: 20rpx;
margin: 0 20rpx 15rpx 0;
font-size: 24rpx;
color: #fff;
background-color: #ccc;
@ -215,6 +301,9 @@
margin-right: 20rpx;
font-size: 24rpx;
}
.icon {
margin-right: 5rpx;
}
.last {
position: absolute;
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 {
display: flex;
justify-content: space-between;
align-items: center;
margin: 20rpx 0;
.labels {
display: inline-flex;
align-items: center;
margin: 15rpx 0;
flex-wrap: wrap;
margin: 15rpx;
}
.label {
padding: 2px 6px;
margin-right: 20rpx;
margin: 0 20rpx 15rpx 0;
font-size: 24rpx;
color: #fff;
background-color: #ccc;
@ -84,6 +84,7 @@
.meta {
display: inline-flex;
align-items: center;
white-space: nowrap;
}
}
.text {

@ -57,7 +57,8 @@
generateInvitationCode(uni.getStorageSync('team').accountId).then(({ expireTime }) => {
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.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 => {})
},
}

@ -7,15 +7,6 @@
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="pwdIcon" title="密码" rightText="******" clickable @click="toPage('../password/password')" />
</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>
</template>
@ -45,16 +36,11 @@
size: '22',
type: 'locked'
},
locationIcon: {
color: '#007eff',
size: '22',
type: 'location'
},
info: {
account: '',
phone: '',
email: ''
}
},
}
},
onShow() {
@ -93,9 +79,6 @@
</script>
<style scoped lang="scss">
.location {
margin-top: 30rpx;
}
.logout {
padding: 30rpx 0;
margin-top: 30rpx;

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

Loading…
Cancel
Save