master
yujialong 3 years ago
parent 8de4d1fa7a
commit fd4363423f
  1. 4
      apis/request.js
  2. 25
      pages.json
  3. 96
      pages/index/index.vue
  4. 2
      pages/invite/invite.vue
  5. 13
      pages/login/login.vue
  6. 148
      pages/main/main.vue
  7. 4
      pages/ordered/ordered.vue
  8. 0
      static/image/house.png
  9. BIN
      static/image/index/index10.png
  10. BIN
      static/image/index/index8.png
  11. BIN
      static/image/index/index9.png
  12. BIN
      static/image/none.png

@ -13,13 +13,13 @@ const request = options => {
}
const header = Object.assign({}, config.headers, {
// token: uni.getStorageSync('token')
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjU0MTYzMjI2LCJleHAiOjE2NTQyMDY0MjYsImFjY291bnRJZCI6IjQ1MiJ9.oqupeDUjOWMKjdj7p7TclcfnPbsZfqwra5QKxo2YqvU'
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjU0NDg1NjgzLCJleHAiOjE2NTQ1Mjg4ODMsImFjY291bnRJZCI6IjQ1MiJ9.rsgoTtE1l0ooK7TBTQjC8Xd1nKGYTfoQrM8BDZqODGU'
})
return new Promise((resolve, reject)=>{
const { url } = options
uni.request({
header,
url: ((url.includes('weChatAppletCallback') || url.includes('userBinding')) ? 'http://192.168.31.137:9000/' : config.baseURL) + url,
url: ((url.includes('weChatAppletCallback') || url.includes('userBinding')) ? 'http://192.168.31.151:9000/' : config.baseURL) + url,
method: options.method || 'GET', // 请求类型,默认为GET
data: options.data || {}, // 请求参数,默认空对象
success: ({ data }) => {

@ -1,11 +1,13 @@
{
"pages": [
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页"
}
},
{
"path" : "pages/main/main",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/login/login",
"style" :
@ -158,15 +160,6 @@
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/main/main",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
"condition": { //
"current": 0, //list
@ -192,7 +185,7 @@
"height": "100px",
"spacing": "10px",
"list": [{
"pagePath": "pages/index/index",
"pagePath": "pages/main/main",
"iconPath": "static/image/tab1.png",
"selectedIconPath": "static/image/tab1-1.png",
"text": "首页"

@ -1,96 +0,0 @@
<template>
<view class="page">
<view class="team">
<uni-data-picker class="picker-input" placeholder="切换团队" popup-title="切换团队" preload :clear-icon="false" :localdata="list" v-model="partnerId" @change="teamChange"></uni-data-picker>
</view>
<image class="banner" src="../../static/image/index/index1.png" mode="widthFix"></image>
<ul class="entry">
<li @click="$util.to('../clients/clients')">
<image class="icon" src="../../static/image/index/index3.png" mode="widthFix"></image>
<view class="text">客户</view>
</li>
<li @click="$util.to('../plans/plans')">
<image class="icon" src="../../static/image/index/index4.png" mode="widthFix"></image>
<view class="text">方案</view>
</li>
<li @click="$util.to('../orders/orders')">
<image class="icon" src="../../static/image/index/index5.png" mode="widthFix"></image>
<view class="text">订单</view>
</li>
<li @click="$util.to('../products/products')">
<image class="icon" src="../../static/image/index/index6.png" mode="widthFix"></image>
<view class="text">产品</view>
</li>
</ul>
</view>
</template>
<script>
import { getTeamsByAccountId } from '@/apis/modules/client.js'
export default {
data() {
return {
partnerId: uni.getStorageSync('partnerId') || '',
list: [],
}
},
onShow() {
this.getInfo()
},
methods: {
//
getInfo() {
getTeamsByAccountId().then(({ data }) => {
const result = []
data.map(e => {
result.push({
text: e.partnerClassificationName,
value: e.partnerId
})
})
console.log(22, result)
if (result.length === 1) {
const val = result[0].value
this.partnerId = val
uni.setStorageSync('partnerId', val)
}
this.list = result
}).catch(e => {})
},
//
teamChange() {
uni.setStorageSync('partnerId', this.partnerId)
}
}
}
</script>
<style scoped lang="scss">
.page {
min-height: 100%;
padding: 30rpx 22rpx;
background: url(../../static/image/index/index2.png) 0 0/100% 100% no-repeat;
}
.team {
width: 200rpx;
margin-bottom: 30rpx;
}
.banner {
width: 100%;
}
.entry {
display: flex;
justify-content: space-around;
align-items: center;
margin-top: 10rpx;
text-align: center;
.icon {
width: 78rpx;
}
.text {
font-size: 28rpx;
color: #333;
}
}
</style>

@ -3,7 +3,7 @@
<view class="title">Annie 邀请你加入</view>
<view class="form">
<view class="icon">
<image src="../../static/house.png" mode=""></image>
<image src="../../static/image/house.png" mode=""></image>
</view>
<view class="des">或然科技城市合伙人计划</view>
<view class="des">加入并自动为你创建一个团队群组</view>

@ -53,7 +53,7 @@
//
checkLogin() {
if (uni.getStorageSync('token')) {
this.$util.to('../main/main')
this.toIndex()
} else {
this.isLogin = false
this.getPhone = false
@ -78,8 +78,9 @@
this.openId = e.openid
this.unionid = e.unionid
uni.setStorageSync('sessionKey', e.session_key)
//
if (data.state === 'login') {
this.$util.to('../main/main')
this.toIndex()
uni.setStorageSync('token', data.token)
} else {
this.isLogin = true
@ -106,17 +107,23 @@
const accountInfo = uni.getAccountInfoSync() // appid
const pc = new WXBizDataCrypt(accountInfo.miniProgram.appId , this.sessionKey)
const data = pc.decryptData(encryptedData , iv)
//
userBinding({
openId: this.openId,
phone: data.phoneNumber,
unionid: this.unionid
}).then(({ token }) => {
uni.setStorageSync('token', token)
this.$util.to('../main/main')
this.toIndex()
}).catch(e => {})
},
toAgreement(id) {
this.$util.to('../detail/detail?id=' + id)
},
toIndex() {
uni.reLaunch({
url: '../main/main'
})
}
}
}

@ -23,6 +23,73 @@
<view class="text">产品</view>
</li>
</ul>
<view class="panel">
<view class="title">
<view class="left">
<image class="icon" src="../../static/image/index/index8.png" mode="widthFix"></image>
销售进展
</view>
<view class="right">
<image class="date" src="../../static/image/index/index7.png" mode="widthFix"></image>
<text>本月</text>
<image class="arrow" src="../../static/image/index/index10.png" mode="widthFix"></image>
</view>
</view>
<view class="data first">
<view class="line">
<view class="item">
<view class="name">本月新增客户</view>
<view class="val">152</view>
</view>
<view class="item">
<view class="name">我的客户</view>
<view class="val">23</view>
</view>
</view>
<view class="line">
<view class="item">
<view class="name">本月新增产品试用</view>
<view class="val">152</view>
</view>
<view class="item">
<view class="name">试用客户</view>
<view class="val">23</view>
</view>
</view>
</view>
</view>
<view class="panel">
<view class="title">
<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">12W</view>
<view class="name">成交总额</view>
</view>
<view class="item">
<view class="val">0.9W</view>
<view class="name">收益金额</view>
</view>
<view class="item">
<view class="val">8.3w</view>
<view class="name">已到账</view>
</view>
<view class="item">
<view class="val">1.4w</view>
<view class="name">未到账</view>
</view>
</view>
</view>
</view>
</view>
</template>
@ -84,7 +151,7 @@
display: flex;
justify-content: space-around;
align-items: center;
margin-top: 10rpx;
margin: 10rpx 0 30rpx;
text-align: center;
.icon {
width: 78rpx;
@ -94,4 +161,83 @@
color: #333;
}
}
.panel {
margin: 20rpx 10rpx;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
.title {
display: flex;
justify-content: space-between;
align-items: center;
padding: 17rpx 20rpx;
background: linear-gradient(90deg, #E5EFFF 0%, #FFFFFF 100%);
}
.left {
display: flex;
align-items: center;
font-size: 30rpx;
color: #333;
}
.right {
display: flex;
align-items: center;
font-size: 28rpx;
color: #333;
text {
margin: 0 15rpx 0 8rpx;
}
}
.icon {
width: 36rpx;
margin-right: 10rpx;
}
.date {
width: 26rpx;
}
.arrow {
width: 16rpx;
}
.data {
padding: 33rpx 36rpx;
}
.line {
display: flex;
}
.first {
.item:first-child {
width: 65%;
}
.name {
margin-bottom: 14rpx;
font-size: 24rpx;
color: #999;
}
.val {
font-size: 30rpx;
color: #333;
}
.line:first-child {
margin-bottom: 32rpx;
}
}
.second {
padding: 38rpx 36rpx;
.line {
justify-content: space-between;
}
.item {
text-align: center;
}
.val {
margin-bottom: 10rpx;
font-size: 30rpx;
color: #333;
}
.name {
font-size: 24rpx;
color: #999;
}
}
}
</style>

@ -13,9 +13,9 @@
</ul>
<ul class="list">
<li v-for="item in list" @click="toDetail">
<li v-for="item in list">
<view class="pro-name">
<image class="icon" src="../../static/image/course1.png" mode="widthFix"></image>
<image v-if="item.miniProgramPictureAddress" class="icon" :src="item.miniProgramPictureAddress" mode="widthFix"></image>
{{ item.productName }}
</view>
<view class="info">

Before

Width:  |  Height:  |  Size: 331 B

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Loading…
Cancel
Save