登录、首页等

master
yujialong 3 years ago
parent 2e5c25f0b9
commit a0bde60175
  1. 8
      App.vue
  2. 4
      apis/modules/client.js
  3. 4
      apis/modules/parner.js
  4. 4
      apis/request.js
  5. 9
      config/product.js
  6. 2
      config/request.js
  7. 8
      pages/clientDetail/clientDetail.vue
  8. 83
      pages/index/index.vue
  9. 4
      pages/login/login.vue
  10. 4
      pages/orderDetail/orderDetail.vue
  11. 5
      pages/ordered/ordered.vue
  12. 7
      pages/qrcode/qrcode.vue
  13. 30
      styles/common.scss

@ -1,14 +1,10 @@
<script>
export default {
onLaunch: function() {
console.warn('当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!')
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>

@ -48,3 +48,7 @@ export const getProductsSubscribedByCustomers = (data) => {
export const getTeamsByAccountId = (data) => {
return post('nakadai/applets/customer/getTeamsByAccountId', data)
}
export const getTheBusinessManagerIdsUnderTheTeam = id => {
return post(`nakadai/applets/customer/getTheBusinessManagerIdsUnderTheTeam?id=${id}`)
}

@ -12,3 +12,7 @@ export const teamList = (data) => {
export const generateInvitationCode = accountId => {
return post(`nakadai/partnerAccount/generateInvitationCode?accountId=${accountId}`)
}
export const treeList = (data) => {
return post('nakadai/partnerClassification/treeList', data)
}

@ -13,13 +13,12 @@ const request = options => {
}
const header = Object.assign({}, config.headers, {
token: uni.getStorageSync('token')
// token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjU0NTY5OTA1LCJleHAiOjE2NTQ2MTMxMDUsImFjY291bnRJZCI6IjQ1MiJ9.IwVDQSpfYctr3ScaBiwXApNiSFjfwVbivt_uLCEPiW0'
})
return new Promise((resolve, reject)=>{
const { url } = options
uni.request({
header,
url: ((url.includes('teamList')) ? 'http://192.168.31.137:9000/' : config.baseURL) + url,
url: ((url.includes('getTeamsByAccountId') || url.includes('getTheBusinessManagerIdsUnderTheTeam') || url.includes('treeList')) ? 'http://192.168.31.151:9000/' : config.baseURL) + url,
method: options.method || 'GET', // 请求类型,默认为GET
data: options.data || {}, // 请求参数,默认空对象
success: ({ data }) => {
@ -33,6 +32,7 @@ const request = options => {
uni.removeStorageSync('userName')
uni.removeStorageSync('avatar')
uni.removeStorageSync('sessionKey')
uni.removeStorageSync('team')
uni.showToast({
title: message,
icon: 'none'

@ -0,0 +1,9 @@
/**
/**
* 产品 配置文件
* @author yujialong
*/
export default {
normalIcon: 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220609/png/1534733700683030528.png'
}

@ -5,7 +5,7 @@
*/
export default {
baseURL: 'http://192.168.31.137:9000/',
baseURL: 'http://192.168.31.151:9000/',
headers: {
'Content-Type': 'application/json;charset=UTF-8'
},

@ -37,12 +37,12 @@
<view class="line req">
<view class="name">联系人姓名</view>
<view v-if="isDetail" class="val">{{ form.name }}</view>
<input v-else type="text" v-model="form.name">
<input v-else type="text" placeholder="请输入" v-model="form.name">
</view>
<view class="line">
<view class="name">手机</view>
<view v-if="isDetail" class="val">{{ form.phone }}</view>
<input v-else type="text" maxlength="11" v-model="form.phone">
<input v-else type="text" maxlength="11" placeholder="请输入" v-model="form.phone">
</view>
<view class="line req">
<view class="name">账号</view>
@ -52,12 +52,12 @@
<view class="line">
<view class="name">职务</view>
<view v-if="isDetail" class="val">{{ form.position }}</view>
<input v-else type="text" v-model="form.position">
<input v-else type="text" placeholder="请输入" v-model="form.position">
</view>
<view class="line">
<view class="name">邮箱</view>
<view v-if="isDetail" class="val">{{ form.email }}</view>
<input v-else type="text" v-model="form.email">
<input v-else type="text" placeholder="请输入" v-model="form.email">
</view>
<view class="line">
<view class="name">产品到期时间</view>

@ -5,7 +5,14 @@
<uni-data-picker class="picker-input" placeholder="切换团队" popup-title="切换团队" preload :clear-icon="false" :localdata="list" :map="{text: 'partnerClassificationName', value: 'partnerId'}" v-model="partnerId" @change="teamChange"></uni-data-picker>
</view>
<image class="banner" src="@/static/image/index/index1.png" mode="widthFix"></image>
<view class="banner">
<image class="img" src="@/static/image/index/index1.png" mode="widthFix"></image>
<view class="info">
<view class="title">城市合伙人招募中</view>
<view class="text">携手共创教育信息化新未来合伙共享产业互备份</view>
</view>
</view>
<ul class="entry">
<li @click="$util.to('../clients/clients')">
<image class="icon" src="@/static/image/index/index3.png" mode="widthFix"></image>
@ -41,21 +48,21 @@
<view class="line">
<view class="item">
<view class="name">本月新增客户</view>
<view class="val">152</view>
<view class="val">0</view>
</view>
<view class="item">
<view class="name">我的客户</view>
<view class="val">23</view>
<view class="val">0</view>
</view>
</view>
<view class="line">
<view class="item">
<view class="name">本月新增产品试用</view>
<view class="val">152</view>
<view class="val">0</view>
</view>
<view class="item">
<view class="name">试用客户</view>
<view class="val">23</view>
<view class="val">0</view>
</view>
</view>
</view>
@ -73,19 +80,19 @@
<view class="data second">
<view class="line">
<view class="item">
<view class="val">12W</view>
<view class="val">0</view>
<view class="name">成交总额</view>
</view>
<view class="item">
<view class="val">0.9W</view>
<view class="val">0</view>
<view class="name">收益金额</view>
</view>
<view class="item">
<view class="val">8.3w</view>
<view class="val">0</view>
<view class="name">已到账</view>
</view>
<view class="item">
<view class="val">1.4w</view>
<view class="val">0</view>
<view class="name">未到账</view>
</view>
</view>
@ -95,12 +102,15 @@
</template>
<script>
import { getTeamsByAccountId } from '@/apis/modules/client.js'
import { getTeamsByAccountId, getTheBusinessManagerIdsUnderTheTeam } from '@/apis/modules/client.js'
import { treeList } from '@/apis/modules/parner.js'
export default {
data() {
return {
partnerId: this.$util.getBmId() || '',
list: [],
id: '',
teamList: []
}
},
onShow() {
@ -110,17 +120,45 @@
//
getInfo() {
getTeamsByAccountId().then(({ data }) => {
//
if (data.length) {
//
treeList().then(({ treeList }) => {
this.teamList = treeList
this.getId(treeList, '', data[0].teamId)
data[0].teamId = this.id
// id()
getTheBusinessManagerIdsUnderTheTeam(this.id).then(res => {
data[0].businessManagerIds = res
//
this.partnerId = data[0].partnerId
uni.setStorageSync('team', data[0])
}).catch(e => {})
}).catch(e => {})
}
this.list = data
}).catch(e => {})
},
// teamIdid
getId(list, parentId, id) {
list.map(e => {
if (e.id === id) {
this.id = e.isTeam ? id : parentId
} else {
this.getId(e.children, e.id, id)
}
})
},
//
teamChange() {
uni.setStorageSync('partnerId', this.partnerId)
const { partnerId } = this
const e = this.list.find(e => e.partnerId == partnerId)
this.getId(this.teamList, '', e.teamId)
e.teamId = this.id
getTheBusinessManagerIdsUnderTheTeam(this.id).then(res => {
e.businessManagerIds = res
uni.setStorageSync('team', e)
}).catch(e => {})
},
//
toPanel(i) {
@ -145,12 +183,31 @@
height: 100%;
}
.team {
width: 200rpx;
width: 300rpx;
margin-bottom: 30rpx;
}
.banner {
position: relative;
.img {
width: 100%;
}
.info {
position: absolute;
top: 80rpx;
left: 46rpx;
}
.title {
margin-bottom: 15rpx;
font-size: 36rpx;
font-weight: 600;
color: #001D67;
}
.text {
font-size: 20rpx;
font-family: PingFangSC-Regular, PingFang SC;
color: #001D67;
}
}
.entry {
display: flex;
justify-content: space-around;

@ -38,8 +38,8 @@
text: '同意',
value: 1
}],
isLogin: true, //
getPhone: true ,//
isLogin: false, //
getPhone: false ,//
sessionKey: '',
openId: '',
unionid: '',

@ -362,13 +362,15 @@
//
submit() {
const { form, courses } = this
if (!form.customerId) return this.$util.errMsg('请选择客户!')
if (!form.orderType) return this.$util.errMsg('请选择订单类型!')
if (!courses.length) return this.$util.errMsg('请选择课程权限或数据权限后再确认订单!')
courses.map(e => {
e.startTime = this.$util.formatDate(new Date(e.startTime), 'yyyy-MM-dd')
})
const data = {
contractInformation: this.contract, //
order: this.form, //
order: form, //
orderOther: courses //
}
if (this.orderId) {

@ -15,7 +15,7 @@
<ul class="list">
<li v-for="item in list">
<view class="pro-name">
<image v-if="item.miniProgramPictureAddress" class="icon" :src="item.miniProgramPictureAddress" mode="widthFix"></image>
<image class="icon" :src="item.miniProgramPictureAddress ? item.miniProgramPictureAddress : normalIcon" mode="widthFix"></image>
{{ item.productName }}
</view>
<view class="info">
@ -40,9 +40,11 @@
<script>
import { getProductsSubscribedByCustomers } from '@/apis/modules/client.js'
import slFilter from '@/components/sl-filter/sl-filter.vue'
import product from '@/config/product.js'
export default {
data() {
return {
normalIcon: product.normalIcon,
customerId: '',
menuList: [
{
@ -134,6 +136,7 @@
}, 1500)
},
onShow() {
console.log(33, this.normalIcon, product)
const pages = getCurrentPages()
this.customerId = pages[pages.length - 1].options.customerId
this.getList()

@ -1,6 +1,7 @@
<template>
<view class="page">
<view class="wrap">
<view class="inner">
<view class="info">
<image class="avatar" :src="avatar" mode=""></image>
<view class="text">
@ -14,6 +15,7 @@
<u-qrcode ref="qrcode" canvas-id="qrcode" :size="size" :value="link"></u-qrcode>
</view>
<view class="tips">扫一扫加入我们吧</view>
</view>
<view class="warn">邀请二维码失效日期{{ expireTime }}</view>
</view>
</view>
@ -58,10 +60,13 @@
overflow: hidden;
}
.wrap {
padding: 40rpx 80rpx;
padding-bottom: 40rpx;
margin: 120rpx 80rpx 0;
text-align: center;
background-color: #fff;
.inner {
padding: 40rpx 80rpx 0;
}
.info {
display: flex;
align-items: center;

@ -60,7 +60,7 @@ ul {
.req {
.name:after {
content: '*';
margin-left: 3px;
margin-left: 6rpx;
color: #F53232;
vertical-align: middle;
}
@ -81,12 +81,12 @@ ul {
.tab {
display: flex;
justify-content: space-around;
margin-bottom: 10px;
margin-bottom: 20rpx;
background-color: #fff;
li {
padding: 0 10px;
font-size: 14px;
line-height: 50px;
padding: 0 20rpx;
font-size: 28rpx;
line-height: 100rpx;
border-bottom: 3px solid transparent;
}
.active {
@ -96,8 +96,8 @@ ul {
}
.plus {
position: fixed;
bottom: 20px;
right: 20px;
bottom: 40rpx;
right: 40rpx;
}
.popup-mask {
@ -120,23 +120,23 @@ ul {
border-top-right-radius: 8px;
.top {
text-align: center;
line-height: 50px;
font-size: 14px;
line-height: 100rpx;
font-size: 28rpx;
color: #333;
border-bottom: 1px solid #f1f1f1;
}
.close {
position: absolute;
top: 15px;
right: 15px;
top: 30rpx;
right: 30rpx;
}
.list {
max-height: calc(90vh - 103px);
padding: 0 15px;
max-height: calc(90vh - 206rpx);
padding: 0 30rpx;
overflow: auto;
.item {
line-height: 34px;
font-size: 12px;
line-height: 80rpx;
font-size: 24rpx;
}
}
}

Loading…
Cancel
Save