登录、首页等

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

@ -48,3 +48,7 @@ export const getProductsSubscribedByCustomers = (data) => {
export const getTeamsByAccountId = (data) => { export const getTeamsByAccountId = (data) => {
return post('nakadai/applets/customer/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 => { export const generateInvitationCode = accountId => {
return post(`nakadai/partnerAccount/generateInvitationCode?accountId=${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, { const header = Object.assign({}, config.headers, {
token: uni.getStorageSync('token') token: uni.getStorageSync('token')
// token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjU0NTY5OTA1LCJleHAiOjE2NTQ2MTMxMDUsImFjY291bnRJZCI6IjQ1MiJ9.IwVDQSpfYctr3ScaBiwXApNiSFjfwVbivt_uLCEPiW0'
}) })
return new Promise((resolve, reject)=>{ return new Promise((resolve, reject)=>{
const { url } = options const { url } = options
uni.request({ uni.request({
header, 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 method: options.method || 'GET', // 请求类型,默认为GET
data: options.data || {}, // 请求参数,默认空对象 data: options.data || {}, // 请求参数,默认空对象
success: ({ data }) => { success: ({ data }) => {
@ -33,6 +32,7 @@ const request = options => {
uni.removeStorageSync('userName') uni.removeStorageSync('userName')
uni.removeStorageSync('avatar') uni.removeStorageSync('avatar')
uni.removeStorageSync('sessionKey') uni.removeStorageSync('sessionKey')
uni.removeStorageSync('team')
uni.showToast({ uni.showToast({
title: message, title: message,
icon: 'none' 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 { export default {
baseURL: 'http://192.168.31.137:9000/', baseURL: 'http://192.168.31.151:9000/',
headers: { headers: {
'Content-Type': 'application/json;charset=UTF-8' 'Content-Type': 'application/json;charset=UTF-8'
}, },

@ -37,12 +37,12 @@
<view class="line req"> <view class="line req">
<view class="name">联系人姓名</view> <view class="name">联系人姓名</view>
<view v-if="isDetail" class="val">{{ form.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>
<view class="line"> <view class="line">
<view class="name">手机</view> <view class="name">手机</view>
<view v-if="isDetail" class="val">{{ form.phone }}</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>
<view class="line req"> <view class="line req">
<view class="name">账号</view> <view class="name">账号</view>
@ -52,12 +52,12 @@
<view class="line"> <view class="line">
<view class="name">职务</view> <view class="name">职务</view>
<view v-if="isDetail" class="val">{{ form.position }}</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>
<view class="line"> <view class="line">
<view class="name">邮箱</view> <view class="name">邮箱</view>
<view v-if="isDetail" class="val">{{ form.email }}</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>
<view class="line"> <view class="line">
<view class="name">产品到期时间</view> <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> <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> </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"> <ul class="entry">
<li @click="$util.to('../clients/clients')"> <li @click="$util.to('../clients/clients')">
<image class="icon" src="@/static/image/index/index3.png" mode="widthFix"></image> <image class="icon" src="@/static/image/index/index3.png" mode="widthFix"></image>
@ -41,21 +48,21 @@
<view class="line"> <view class="line">
<view class="item"> <view class="item">
<view class="name">本月新增客户</view> <view class="name">本月新增客户</view>
<view class="val">152</view> <view class="val">0</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">我的客户</view> <view class="name">我的客户</view>
<view class="val">23</view> <view class="val">0</view>
</view> </view>
</view> </view>
<view class="line"> <view class="line">
<view class="item"> <view class="item">
<view class="name">本月新增产品试用</view> <view class="name">本月新增产品试用</view>
<view class="val">152</view> <view class="val">0</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">试用客户</view> <view class="name">试用客户</view>
<view class="val">23</view> <view class="val">0</view>
</view> </view>
</view> </view>
</view> </view>
@ -73,19 +80,19 @@
<view class="data second"> <view class="data second">
<view class="line"> <view class="line">
<view class="item"> <view class="item">
<view class="val">12W</view> <view class="val">0</view>
<view class="name">成交总额</view> <view class="name">成交总额</view>
</view> </view>
<view class="item"> <view class="item">
<view class="val">0.9W</view> <view class="val">0</view>
<view class="name">收益金额</view> <view class="name">收益金额</view>
</view> </view>
<view class="item"> <view class="item">
<view class="val">8.3w</view> <view class="val">0</view>
<view class="name">已到账</view> <view class="name">已到账</view>
</view> </view>
<view class="item"> <view class="item">
<view class="val">1.4w</view> <view class="val">0</view>
<view class="name">未到账</view> <view class="name">未到账</view>
</view> </view>
</view> </view>
@ -95,12 +102,15 @@
</template> </template>
<script> <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 { export default {
data() { data() {
return { return {
partnerId: this.$util.getBmId() || '', partnerId: this.$util.getBmId() || '',
list: [], list: [],
id: '',
teamList: []
} }
}, },
onShow() { onShow() {
@ -110,17 +120,45 @@
// //
getInfo() { getInfo() {
getTeamsByAccountId().then(({ data }) => { getTeamsByAccountId().then(({ data }) => {
//
if (data.length) { 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 this.partnerId = data[0].partnerId
uni.setStorageSync('team', data[0]) uni.setStorageSync('team', data[0])
}).catch(e => {})
}).catch(e => {})
} }
this.list = data this.list = data
}).catch(e => {}) }).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() { 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) { toPanel(i) {
@ -145,12 +183,31 @@
height: 100%; height: 100%;
} }
.team { .team {
width: 200rpx; width: 300rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.banner { .banner {
position: relative;
.img {
width: 100%; 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 { .entry {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;

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

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

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

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

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

Loading…
Cancel
Save