分包优化,学习、资讯联调

master
yujialong 2 years ago
parent a6d034487d
commit 7965408454
  1. 18
      apis/modules/article.js
  2. 4
      apis/modules/parner.js
  3. 28
      apis/modules/user.js
  4. 6
      apis/request.js
  5. 4
      config/request.js
  6. 7
      manifest.json
  7. 231
      pages.json
  8. 53
      pages/index/index.vue
  9. 223
      pages/info/info.vue
  10. 88
      pages/login/login.vue
  11. 42
      pages/person/person.vue
  12. 153
      pages/plans/plans.vue
  13. 7
      pages/products/products.vue
  14. 174
      pages/reg/reg.vue
  15. 226
      pages/study/study.vue
  16. BIN
      static/image/person4.png
  17. BIN
      static/image/person5.png
  18. BIN
      static/image/person6.png
  19. BIN
      static/image/person7.png
  20. BIN
      static/image/tab2-1.png
  21. BIN
      static/image/tab2.png
  22. BIN
      static/image/tab3-1.png
  23. BIN
      static/image/tab3.png
  24. BIN
      static/image/tab4-1.png
  25. BIN
      static/image/tab4.png
  26. 0
      team/account/account.vue
  27. 93
      team/article/article.vue
  28. 0
      team/email/email.vue
  29. 0
      team/password/password.vue
  30. 0
      team/phone/phone.vue
  31. 0
      team/qrcode/qrcode.vue
  32. 27
      team/setting/setting.vue
  33. 0
      team/teams/teams.vue

@ -0,0 +1,18 @@
import request from '@/apis/request.js'
const { get, post } = request
export const partnerOperatingList = (data) => {
return post('nakadai/nakadai/partner/article/management/partnerOperatingList', data)
}
export const findById = id => {
return post('nakadai/nakadai/applets/partner/browse?contentId=' + id)
}
export const queryClassificationByType = id => {
return post('nakadai/nakadai/partner/article/classification/queryClassificationByType?typeId=' + id)
}
export const schemeList = data => {
return post('nakadai/nakadai/partner/schemeManagement/schemeList', data)
}

@ -24,3 +24,7 @@ export const my = (data) => {
export const mailFileSend = (data) => {
return post('nakadai/nakadai/partnerAccount/mailFileSend', data)
}
export const salesProgress = data => {
return post(`nakadai/nakadai/applets/partner/salesProgress`, data)
}

@ -5,6 +5,14 @@ export const login = (data) => {
return post('users/users/user/weChatAppletCallbackByPartner', data)
}
export const queryProvince = () => {
return get('nakadai/nakadai/province/queryProvince')
}
export const queryCity = (data) => {
return get('nakadai/nakadai/city/queryCity', data)
}
export const userBinding = (data) => {
return post('users/users/user/userBinding', data)
}
@ -49,4 +57,24 @@ export const checkIfThePhoneNumberExists = phone => {
return post(`users/users/applets/mine/checkIfThePhoneNumberExists?phone=${phone}`)
}
export const queryPartnerAccount = phone => {
return post(`nakadai/nakadai/partnerAccount/queryPartnerAccount?phone=${phone}`)
}
export const getSessionKey = data => {
return post(`users/users/user/getSessionKey`, data)
}
export const partnerAccountApplication = data => {
return post(`nakadai/nakadai/partnerAccount/partnerAccountApplication`, data)
}
export const loginByOpenid = openid => {
return post(`users/users/user/loginByOpenid?openid=` + openid)
}
export const checkWorkNumOrAccount = account => {
return post(`occupationlab/occupationlab/architecture/checkWorkNumOrAccount?platformId=4&type=0&account=` + account)
}
export const updateUserAvatars = `http://39.108.250.202:9000/users/users/userAccount/updateUserAvatars`

@ -14,13 +14,13 @@ const request = options => {
const header = Object.assign({}, config.headers, {
token: uni.getStorageSync('token')
})
const otherUrl = ['getTeamsByAccountId']
const otherUrl = ['queryPartnerAccount', 'getSessionKey', 'loginByOpenid', 'partnerAccountApplication', 'checkWorkNumOrAccount']
return new Promise((resolve, reject)=>{
const { url } = options
uni.request({
header,
// url: (otherUrl.map(e => config.baseURL.includes(e)) ? 'http://192.168.31.137:9000/' : config.baseURL) + url,
url: config.baseURL + url,
url: (otherUrl.find(e => url.includes(e)) ? 'http://192.168.31.116:9000/' : config.baseURL) + url,
// url: config.baseURL + url,
method: options.method || 'GET', // 请求类型,默认为GET
data: options.data || {}, // 请求参数,默认空对象
success: ({ data }) => {

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

@ -1,5 +1,5 @@
{
"name" : "或然crm",
"name" : "或然合伙人运营管理平台",
"appid" : "__UNI__2E89BA6",
"description" : "",
"versionName" : "1.0.0",
@ -54,7 +54,10 @@
"es6" : true,
"minified" : true
},
"usingComponents" : true
"usingComponents" : true,
"optimization": {
"subPackages": true
}
},
"vueVersion" : "2"
}

@ -15,14 +15,6 @@
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/qrcode/qrcode",
"style" :
{
"navigationBarTitleText": "邀请加入",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/clients/clients",
@ -61,7 +53,7 @@
"style" :
{
"navigationBarTitleText": "产品方案",
"enablePullDownRefresh": false
"enablePullDownRefresh": true
}
},
{
@ -79,113 +71,163 @@
"navigationBarTitleText": "下载发送",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/password/password",
"style" :
{
"navigationBarTitleText": "修改密码",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/setting/setting",
"style" :
{
"navigationBarTitleText": "设置",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/teams/teams",
"style" :
{
"navigationBarTitleText": "团队",
"enablePullDownRefresh": true
}
},
{
"path" : "pages/account/account",
}
,{
"path" : "pages/reg/reg",
"style" :
{
"navigationBarTitleText": "修改账号",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/phone/phone",
"path" : "pages/study/study",
"style" :
{
"navigationBarTitleText": "修改手机号",
"enablePullDownRefresh": false
"navigationBarTitleText": "学习",
"enablePullDownRefresh": true
}
}
,{
"path" : "pages/email/email",
"path" : "pages/info/info",
"style" :
{
"navigationBarTitleText": "修改邮箱",
"enablePullDownRefresh": false
"navigationBarTitleText": "资讯",
"enablePullDownRefresh": true
}
}
],
"subPackages": [{
"root": "order",
"pages": [
{
"path": "orders/orders",
"style" :
"subPackages": [
{
"root": "order",
"pages": [
{
"navigationBarTitleText": "订单列表",
"enablePullDownRefresh": true
}
},
{
"path" : "addCourse/addCourse",
"style" :
"path": "orders/orders",
"style" :
{
"navigationBarTitleText": "订单列表",
"enablePullDownRefresh": true
}
},
{
"navigationBarTitleText": "选择产品",
"enablePullDownRefresh": true
}
},
{
"path" : "orderDetail/orderDetail",
"style" :
"path" : "addCourse/addCourse",
"style" :
{
"navigationBarTitleText": "选择产品",
"enablePullDownRefresh": true
}
},
{
"navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false
}
},
{
"path" : "ordered/ordered",
"style" :
"path" : "orderDetail/orderDetail",
"style" :
{
"navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false
}
},
{
"navigationBarTitleText": "已订阅产品",
"enablePullDownRefresh": false
"path" : "ordered/ordered",
"style" :
{
"navigationBarTitleText": "已订阅产品",
"enablePullDownRefresh": false
}
},
{
"path" : "editCourse/editCourse",
"style" :
{
"navigationBarTitleText": "编辑产品",
"enablePullDownRefresh": false
}
},
{
"path" : "curClient/curClient",
"style" :
{
"navigationBarTitleText": "订单记录",
"enablePullDownRefresh": false
}
}
},
{
"path" : "editCourse/editCourse",
"style" :
]
},
{
"root": "team",
"pages": [
{
"path" : "setting/setting",
"style" :
{
"navigationBarTitleText": "设置",
"enablePullDownRefresh": false
}
},
{
"path" : "password/password",
"style" :
{
"navigationBarTitleText": "修改密码",
"enablePullDownRefresh": false
}
},
{
"path" : "teams/teams",
"style" :
{
"navigationBarTitleText": "团队",
"enablePullDownRefresh": true
}
},
{
"navigationBarTitleText": "编辑产品",
"enablePullDownRefresh": false
"path" : "account/account",
"style" :
{
"navigationBarTitleText": "修改账号",
"enablePullDownRefresh": false
}
}
},
{
"path" : "curClient/curClient",
"style" :
{
"navigationBarTitleText": "订单记录",
"enablePullDownRefresh": false
,{
"path" : "phone/phone",
"style" :
{
"navigationBarTitleText": "修改手机号",
"enablePullDownRefresh": false
}
}
,{
"path" : "email/email",
"style" :
{
"navigationBarTitleText": "修改邮箱",
"enablePullDownRefresh": false
}
}
,{
"path" : "qrcode/qrcode",
"style" :
{
"navigationBarTitleText": "邀请加入",
"enablePullDownRefresh": false
}
}
,{
"path" : "article/article",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
}
]
}],
}
],
"preloadRule": {
"order/orders/orders": {
"pages/index/index": {
"network": "all",
"packages": ["__APP__"]
"packages": ["order"]
}
},
"condition": { //
@ -217,14 +259,19 @@
"selectedIconPath": "static/image/tab1-1.png",
"text": "首页"
}, {
"pagePath": "pages/teams/teams",
"pagePath": "pages/study/study",
"iconPath": "static/image/tab2.png",
"selectedIconPath": "static/image/tab2-1.png",
"text": "团队"
"text": "学习"
}, {
"pagePath": "pages/person/person",
"pagePath": "pages/info/info",
"iconPath": "static/image/tab3.png",
"selectedIconPath": "static/image/tab3-1.png",
"text": "资讯"
}, {
"pagePath": "pages/person/person",
"iconPath": "static/image/tab4.png",
"selectedIconPath": "static/image/tab4-1.png",
"text": "我的"
}]
}

@ -32,6 +32,37 @@
</li>
</ul>
<view class="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>
</view>
</view>
<view class="panel">
<view class="title" @click="toPanel(1)">
<view class="left">
@ -48,21 +79,21 @@
<view class="line">
<view class="item">
<view class="name">本月新增客户</view>
<view class="val">0</view>
<view class="val">{{ sell.officialProduct }}</view>
</view>
<view class="item">
<view class="name">我的客户</view>
<view class="val">0</view>
<view class="val">{{ sell.regularUser }}</view>
</view>
</view>
<view class="line">
<view class="item">
<view class="name">本月新增产品试用</view>
<view class="val">0</view>
<view class="val">{{ sell.trialProduct }}</view>
</view>
<view class="item">
<view class="name">试用客户</view>
<view class="val">0</view>
<view class="val">{{ sell.trialUser }}</view>
</view>
</view>
</view>
@ -105,7 +136,7 @@
<script>
import { getUserRolesPermissionMenu } from '@/apis/modules/user.js'
import { getTeamsByAccountId, getTheBusinessManagerIdsUnderTheTeam } from '@/apis/modules/client.js'
import { treeList } from '@/apis/modules/parner.js'
import { treeList, salesProgress } from '@/apis/modules/parner.js'
export default {
data() {
return {
@ -114,7 +145,8 @@
teamId: '',
list: [],
id: '',
teamList: []
teamList: [],
sell: {}
}
},
onShow() {
@ -127,6 +159,7 @@
if (!uni.getStorageSync('auth').includes('首页')) {
this.per = false
}
this.getSell()
},
//
getAuth() {
@ -191,6 +224,14 @@
uni.hideLoading()
})
},
//
getSell() {
salesProgress({
businessManagerId: this.teamId
}).then(res => {
this.sell = res
}).catch(e => {})
},
//
teamChange() {
const { teamId } = this

@ -0,0 +1,223 @@
<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>
<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 class="metas">
<view class="meta">
<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>
</view>
<uni-load-more :status="status" />
</template>
<empty v-else></empty>
<filter-popup :data="filterData" :form.sync="filterForm" v-model="popup" title="全部筛选" height="1104rpx" @finsh="subFinsh"></filter-popup>
</view>
</template>
<script>
import { queryCustomer } from '@/apis/modules/client.js'
import { list, del } from '@/apis/modules/order.js'
export default {
data() {
return {
popup: false,
//
filterData: [
{
children: false,//
title: "所属类型",
key: "classificationId", //
keyValue: "value", //
isRadio: true, //
data: [
{
title: "待发货",
value: 0
},
{
title: "已完成",
value: 1
},
],
}
],
filterForm: {},
reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore
searchTimer: null,
orderStatus: '',
sort: 'desc',
keyword: '',
list: [
{
name: '1'
}
],
page: 1,
pageSize: 10,
}
},
watch: {
keyword () {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initList()
}, 500)
}
},
//
onPullDownRefresh() {
this.initList()
setTimeout(() => {
uni.stopPullDownRefresh()
}, 1500)
},
//
onReachBottom() {
if (this.reachBottom >= 0) {
this.reachBottom = 1
this.status = 'loading'
this.getList()
}
},
onShow() {
// this.initRole()
},
methods: {
//
initRole() {
this.initList()
},
getList() {
const data = {
keywords: this.keyword,
pageNum: this.page,
pageSize: this.pageSize,
sort: this.sort,
orderStatus: this.orderStatus,
type: this.curTab
}
uni.showLoading({
title: '加载中'
})
list(data).then(({ data }) => {
uni.hideLoading()
// list
const list = data.records
list.map(e => {
e.toggle = e.orderContent.length < 14 // 14
})
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list
this.page++ // page+1
const noMore = this.list.length === data.total //
this.status = noMore ? 'noMore' : 'more' // noMore
this.reachBottom = noMore ? -1 : 0 // -1
}).catch(e => {
uni.hideLoading()
})
},
initList() {
this.page = 1
this.reachBottom = 0
this.getList()
},
//
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.initList()
},
//
toDetail(item) {
this.$util.to(`/team/article/article`)
},
}
}
</script>
<style scoped lang="scss">
.list {
margin-top: 20rpx;
background-color: #fff;
.item {
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;
}
.right {
width: calc(100% - 230rpx);
}
.title {
font-size: 32rpx;
font-weight: 600;
color: #333;
}
.labels {
display: inline-flex;
align-items: center;
margin: 15rpx 0;
}
.label {
padding: 2px 6px;
margin-right: 20rpx;
font-size: 24rpx;
color: #fff;
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>

@ -5,13 +5,14 @@
<view class="hello">Hi城市合伙人请登录</view>
<button v-if="isLogin && !getPhone" class="btn phone" open-type="getPhoneNumber" @getphonenumber="onGetPhoneNumber">
<image src="@/static/image/phone.png" mode="widthFix"></image>
绑定手机
{{ isReg ? '获取手机号' : '绑定手机'}}
</button>
<template v-else>
<view class="btn wechat" @click="login">
<image src="@/static/image/wechat.png" mode="widthFix"></image>
微信授权登录
</view>
<view class="reg" @click="toReg">没有账号申请注册</view>
</template>
<view class="agree">
@ -24,7 +25,7 @@
</template>
<script>
import { login, userBinding } from '@/apis/modules/user.js'
import { login, userBinding, getSessionKey, queryPartnerAccount } from '@/apis/modules/user.js'
import WXBizDataCrypt from '@/libs/WXBizDataCrypt'
export default {
data() {
@ -36,6 +37,7 @@
}],
isLogin: false, //
getPhone: false ,//
isReg: false, //
sessionKey: '',
openid: '',
unionid: '',
@ -43,6 +45,7 @@
}
},
onShow() {
// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjc5NjQ5Nzk2LCJleHAiOjE2Nzk2OTI5OTYsImFjY291bnRJZCI6IjIwNCJ9.17xb5qZyaBF1Qf_sjO0XvkUnLBb8e3Z__d4lZViFpi0')
//
this.checkLogin()
},
@ -59,6 +62,7 @@
},
//
login() {
this.isReg = false
if (this.agree.length) {
if (this.submiting) return false
const that = this
@ -119,22 +123,67 @@
const pc = new WXBizDataCrypt(accountInfo.miniProgram.appId , this.sessionKey)
const data = pc.decryptData(encryptedData , iv)
this.submiting = true
//
userBinding({
openid: this.openid,
phone: data.phoneNumber,
unionid: this.unionid,
platformId: 4
}).then(({ token }) => {
this.submiting = false
uni.setStorageSync('token', token)
this.toIndex()
}).catch(e => {
this.submiting = false
uni.showToast({
title: e.message,
icon: 'none'
const phone = data.phoneNumber
if (this.isReg) { //
uni.redirectTo({
url: `../reg/reg?openid=${this.openid}&phone=${phone}`
})
} else { //
userBinding({
openid: this.openid,
phone,
unionid: this.unionid,
platformId: 4
}).then(({ token }) => {
this.submiting = false
uni.setStorageSync('token', token)
this.toIndex()
}).catch(e => {
this.submiting = false
uni.showToast({
title: e.message,
icon: 'none'
})
})
}
},
//
toReg() {
this.isReg = true
const that = this
uni.getUserProfile({
lang: 'zh_CN',
desc: '登录',
success: ({ userInfo }) => {
console.log(22, userInfo)
uni.setStorageSync('userName', userInfo.nickName)
uni.setStorageSync('avatar', userInfo.avatarUrl)
uni.login({
success: ({ code }) => {
if (code) {
this.submiting = true
getSessionKey({
code,
}).then(({ sessionKey }) => {
console.log(11, sessionKey)
this.sessionKey = sessionKey.session_key
this.openid = sessionKey.openid
this.submiting = false
this.isLogin = true
}).catch(e => {
this.submiting = false
})
} else {
this.submiting = false
that.$util.errMsg('登录失败!')
}
}
})
},
fail(res) {
that.$util.errMsg('登录授权失败!')
}
})
},
toAgreement(id) {
@ -201,6 +250,11 @@
width: 40rpx;
}
}
.reg {
font-size: 28rpx;
color: #e61717;
text-align: right;
}
.agree {
position: absolute;
bottom: 28rpx;

@ -10,12 +10,11 @@
</view>
</view>
<view class="list">
<view v-if="auth('我的:我的收益')" class="item">
<view class="item" @click="$util.to('/team/teams/teams')">
<view class="left">
<image class="icon" src="@/static/image/person1.png" mode=""></image>
<text class="name">我的项目收益</text>
<image class="icon" src="@/static/image/person4.png" mode=""></image>
<text class="name">我的团队</text>
</view>
<text class="val">{{ my.myIncome}}</text>
</view>
<view v-if="auth('我的:团队收益')" class="item">
<view class="left">
@ -24,7 +23,34 @@
</view>
<text class="val">{{ my.teamIncome}}</text>
</view>
<view v-if="auth('我的:设置')" class="item" @click="$util.to('../setting/setting')">
<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>
</view>
<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 class="left">
<image class="icon" src="@/static/image/person6.png" mode=""></image>
<text class="name">市场服务费</text>
</view>
<text class="val">项目抽成{{ my.myIncome}}%</text>
</view>
<view 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>
</view>
<view v-if="auth('我的:设置')" class="item" @click="$util.to('/team/setting/setting')">
<view class="left">
<image class="icon" src="@/static/image/person3.png" mode=""></image>
<text class="name">设置</text>
@ -68,10 +94,10 @@
},
//
getInfo() {
const team = uni.getStorageSync('team')
const { partnerId, teamId } = uni.getStorageSync('team')
my({
partnerId: team.partnerId,
teamId: team.teamId
partnerId,
teamId
}).then(({ my }) => {
this.my = my
}).catch(e => {})

@ -1,16 +1,16 @@
<template>
<view>
<view class="filter">
<uni-search-bar class="search" radius="30" placeholder="请输入方案名称" clearButton="auto" cancelButton="none" @confirm="search" />
<uni-search-bar class="search" radius="30" placeholder="请输入方案名称" clearButton="auto" cancelButton="none" v-model="keyword" />
</view>
<ul class="tab">
<li v-for="(tab, i) in tabs" :class="{active: curTab === tab.id}" @click="tabChange(tab)">{{ tab.name }}</li>
<li v-for="(tab, i) in classifications" :class="{active: curTab === tab.id}" @click="tabChange(tab)">{{ tab.classificationName }}</li>
</ul>
<view v-if="list.length" class="list">
<view v-for="(item, i) in list" class="item" @click="toDetail(i + 2)">
<view class="c-name">{{ item.name }}</view>
<view class="c-name">{{ item.title }}</view>
<view class="content">
<view class="info">
<view class="line">
@ -22,11 +22,11 @@
</view>
<view class="line">
<view class="name">更新日期</view>
<view class="val">{{ item.date }}</view>
<view class="val">{{ item.updateTime }}</view>
</view>
<view class="line">
<view class="name">适用专业</view>
<view class="val">{{ item.major }}</view>
<view class="val">{{ item.applicableMajor }}</view>
</view>
</view>
<view class="detail" @click.stop="toEmail(i)">下载</view>
@ -38,95 +38,94 @@
</template>
<script>
import { schemeList, queryClassificationByType } from '@/apis/modules/article.js'
export default {
data() {
return {
curTab: '',
tabs: [
classifications: [
{
name: '不限',
id: ''
},
{
name: '标准方案',
id: 1
},
{
name: '智信云方案',
id: 2
id: '',
classificationName: '不限'
}
],
reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore
searchTimer: null,
articleNameSort: 'desc',
keyword: '',
list: [],
all: [
{
type: 1,
toggle: false,
name: '人工智能实验室建设方案-2020.1',
product: `python程序设计实验教学系统<br>
Docker技术实验教学系统<br>
JAVA语言程序设计实验教学系统<br>
大数据开发实验教学系统<br>
Openstack云计算实验教学系统`,
date: '2022-06-02',
major: '人工智能方向'
},
{
type: 1,
toggle: false,
name: '大数据管理与应用专业建设方案',
product: `python程序设计实验教学系统<br>
量化投资实验教学系统<br>
区块链数字货币交易实验系统<br>
大数分析实验教学系统<br>
数据可视化实验教学系统<br>
大数据实证科研平台<br>
全球宏观经济<br>
数据库全球金融交易数据库 `,
date: '2022-06-02',
major: '大数据方向'
},
{
type: 1,
toggle: false,
name: '金融科技实验室建设方案V2.0',
product: `python程序设计实验教学系统<br>
量化投资实验教学系统<br>
区块链数字货币交易实验教学系统<br>
大数据采集实验教学系统<br>
大数据分析实验教学系统<br>
金融建模实验教学系统<br>
互联网小贷实验教学系统<br>
互联网支付实验教学系统<br>
R语言实验教学系统<br>
供应链金融实验教学系统<br>
Python数据清洗实验教学系统<br>
数据可视化实验教学系统<br>
金融随机过程实验教学系统<br>
银行综合系统<br>
大数据实证科研平台<br>
财经数据库`,
date: '2022-06-02',
major: '金融科技,大数据方向'
}
]
page: 1,
pageSize: 10,
}
},
watch: {
keyword () {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initList()
}, 500)
}
},
//
onPullDownRefresh() {
this.initList()
setTimeout(() => {
uni.stopPullDownRefresh()
}, 1500)
},
//
onReachBottom() {
if (this.reachBottom >= 0) {
this.reachBottom = 1
this.status = 'loading'
this.getList()
}
},
onShow() {
this.list = JSON.parse(JSON.stringify(this.all))
this.initList()
this.getClassification()
},
methods: {
search(res) {
uni.showToast({
title: '搜索:' + res.value,
icon: 'none'
getList() {
const data = {
keyWord: this.keyword,
pageNum: this.page,
pageSize: this.pageSize,
querySource: 4,
classificationId: this.curTab
}
uni.showLoading({
title: '加载中'
})
schemeList(data).then(({ data }) => {
uni.hideLoading()
// list
const list = data.records
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list
this.page++ // page+1
const noMore = this.list.length === data.total //
this.status = noMore ? 'noMore' : 'more' // noMore
this.reachBottom = noMore ? -1 : 0 // -1
}).catch(e => {
uni.hideLoading()
})
},
initList() {
this.page = 1
this.reachBottom = 0
this.getList()
},
//
getClassification() {
queryClassificationByType(3).then(({ data }) => {
this.classifications.push(...data)
}).catch(e => {})
},
// tab
tabChange(tab) {
const { id } = tab
const { all } = this
this.curTab = id
this.list = id ? all.filter(e => e.type === id) : all
this.curTab = tab.id
this.initList()
},
//
toDetail(id) {

@ -35,9 +35,13 @@
<text class="name">结算方式</text>
<text class="val">{{ item.settlementMethod ? '比例分成' : '结算单价' }}</text>
</view>
<view class="line">
<text class="name">结算金额</text>
<text class="val">{{ item.settlementPrice }}</text>
</view>
<view class="line">
<text class="name">供应厂商</text>
<text class="val">{{ item.supplier }}</text>
<text class="val">{{ item.supplierName }}</text>
</view>
</view>
</li>
@ -178,6 +182,7 @@
border-bottom: 1px solid #E6E8ED;
.icon {
width: 52rpx;
height: 52rpx;
margin-right: 20rpx;
}
}

@ -0,0 +1,174 @@
<template>
<view class="page">
<image class="logo" src="@/static/image/logo.png" mode=""></image>
<view class="wrap">
<view v-if="form.isTeam !== 0" class="hello">
{{ form.isTeam ? '或然科技城市合伙人,欢迎回来!' : '欢迎加入或然城市合伙人计划!请认真填写您的姓名和意向开展业务的区域。注册后,我们将会有区域运营与您联系沟通后续事宜。'}}
</view>
<view>
<uni-forms>
<uni-forms-item label="姓名">
<uni-easyinput type="text" v-model="form.userName" placeholder="请输入姓名" />
</uni-forms-item>
<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-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>
<view class="btns">
<button type="primary" @click="submit">{{ form.isTeam ? '登录' : form.isTeam === 0 ? '确定' : '注册' }}</button>
<button>取消</button>
</view>
</view>
</view>
</view>
</template>
<script>
import { queryPartnerAccount, queryProvince, queryCity, partnerAccountApplication, loginByOpenid, checkWorkNumOrAccount } from '@/apis/modules/user.js'
export default {
data() {
return {
openid: '',
phone: '',
form: {
userName: '',
provinceId: '',
cityId: '',
},
accountRepeat: false,
provinces: [],
cities: []
}
},
onShow() {
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
this.openid = options.openid
this.phone = options.phone
this.getProvince()
//
this.checkLogin()
},
methods: {
//
checkLogin() {
if (uni.getStorageSync('token')) {
this.toIndex()
} else {
// isTeam 10team
queryPartnerAccount(this.phone).then(({ team }) => {
if (team) {
if (team.isTeam) {
this.form = team
this.getCity()
} else {
this.form.userName = team.userName
uni.showModal({
title: '提示',
content: `或然科技城市合伙人,欢迎回来!
您已在${team.teamName}的团队是否要创建自己的团队`,
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
uni.redirectTo({
url: '../login/login'
})
}
}
})
}
}
}).catch(e => {})
}
},
//
getProvince() {
queryProvince().then(({ list }) => {
this.provinces = list
}).catch(res => {})
},
//
getCity(val) {
if (this.form.provinceId) {
queryCity({
provinceId: this.form.provinceId
}).then(({ list }) => {
this.cities = list
}).catch(res => {})
} else {
this.cities = []
}
if (val) this.form.cityId = ''
},
//
submit() {
const { form } = this
if (!form.userName) return this.$util.errMsg('请输入姓名!')
if (!form.provinceId) return this.$util.errMsg('请选择意向省份!')
if (!form.cityId) return this.$util.errMsg('请选择意向城市!')
form.phone = this.phone
form.appOpenId = this.openid
form.uniqueIdentification = Date.now()
if (form.isTeam) { //
loginByOpenid(this.openid).then(({ data }) => {
uni.setStorageSync('token', data.token)
this.toIndex()
}).catch(res => {})
} else { // or
partnerAccountApplication(form).then(res => {
this.$util.sucMsg(form.isTeam === 0 ? '创建成功' : '注册成功')
setTimeout(() => {
uni.redirectTo({
url: '../login/login'
})
}, 1500)
}).catch(res => {})
}
},
//
toIndex() {
uni.reLaunch({
url: '../index/index'
})
}
}
}
</script>
<style scoped lang="scss">
.page {
min-height: 100%;
text-align: center;
background: url(@/static/image/login1.png) 0 0/175rpx auto no-repeat,
url(@/static/image/login2.png) bottom right/123rpx auto no-repeat;
.logo {
width: 393rpx;
height: 93rpx;
margin: 100rpx 0 60rpx;
}
}
.wrap {
position: relative;
padding: 60rpx;
margin: 0 61rpx;
text-align: center;
border-radius: 8rpx;
background-color: #fff;
.hello {
margin-bottom: 30rpx;
font-size: 28rpx;
color: #333;
}
.btns {
display: flex;
button {
width: 200rpx;
font-size: 30rpx;
}
}
}
</style>

@ -0,0 +1,226 @@
<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>
<template v-if="list.length">
<view class="list">
<view v-for="(item, i) in list" :key="i" class="item" @click="toDetail(item)">
<image class="pic" :src="item.bannerImg"></image>
<view class="right">
<view class="title">{{ item.title }}</view>
<view v-if="item.labelName" class="labels">
<view v-for="(label, j) in item.labelName.split(',')" :key="j" class="label">{{ label }}</view>
</view>
<view class="metas">
<view class="meta">
<uni-icons class="icon" type="eye" size="22" color="#007FFF"></uni-icons>
{{ item.learnerNumber }}人学过
</view>
<!-- <view class="meta">
<uni-icons class="icon" type="star" size="22" color="#007eff"></uni-icons>
123
</view> -->
</view>
<view v-if="item.lastReading" class="last">上次阅读</view>
</view>
</view>
</view>
<uni-load-more :status="status" />
</template>
<empty v-else></empty>
<filter-popup :data="filterData" :form.sync="filterForm" v-model="popup" title="全部筛选" height="1104rpx" @finsh="subFinsh"></filter-popup>
</view>
</template>
<script>
import { partnerOperatingList, queryClassificationByType } from '@/apis/modules/article.js'
export default {
data() {
return {
popup: false,
//
filterData: [
{
children: false,//
title: "所属类型",
key: "classificationId", //
keyValue: "id", //
isRadio: true, //
data: [],
}
],
filterForm: {
classificationId: []
},
classificationId: '',
reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore
searchTimer: null,
articleNameSort: 'desc',
keyword: '',
list: [],
page: 1,
pageSize: 10,
}
},
watch: {
keyword () {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initList()
}, 500)
}
},
//
onPullDownRefresh() {
this.initList()
setTimeout(() => {
uni.stopPullDownRefresh()
}, 1500)
},
//
onReachBottom() {
if (this.reachBottom >= 0) {
this.reachBottom = 1
this.status = 'loading'
this.getList()
}
},
onShow() {
this.initRole()
},
methods: {
//
initRole() {
this.initList()
this.getClassification()
},
getList() {
const data = {
keyWord: this.keyword,
pageNum: this.page,
pageSize: this.pageSize,
querySource: 4,
typeId: 1,
articleNameSort: this.articleNameSort,
classificationId: this.classificationId
}
uni.showLoading({
title: '加载中'
})
partnerOperatingList(data).then(({ data }) => {
uni.hideLoading()
// list
const list = data.records
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list
this.page++ // page+1
const noMore = this.list.length === data.total //
this.status = noMore ? 'noMore' : 'more' // noMore
this.reachBottom = noMore ? -1 : 0 // -1
}).catch(e => {
uni.hideLoading()
})
},
initList() {
this.page = 1
this.reachBottom = 0
this.getList()
},
//
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)
}).catch(e => {})
},
//
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'
this.initList()
},
//
toDetail(item) {
this.$util.to(`/team/article/article?id=` + item.id)
},
}
}
</script>
<style scoped lang="scss">
.list {
margin-top: 20rpx;
background-color: #fff;
.item {
position: relative;
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;
}
.right {
width: calc(100% - 230rpx);
}
.title {
font-size: 32rpx;
font-weight: 600;
color: #333;
}
.labels {
display: flex;
flex-wrap: wrap;
align-items: center;
margin-top: 15rpx;
}
.label {
padding: 2px 6px;
margin-bottom: 15rpx;
margin-right: 20rpx;
font-size: 24rpx;
color: #fff;
background-color: #ccc;
border-radius: 4px;
}
.metas {
display: flex;
align-items: center;
}
.meta {
display: inline-flex;
align-items: center;
margin-right: 20rpx;
font-size: 24rpx;
}
.last {
position: absolute;
bottom: 20rpx;
right: 40rpx;
font-size: 28rpx;
color: #007FFF;
}
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 937 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 859 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 784 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 680 B

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 B

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

@ -0,0 +1,93 @@
<template>
<view class="wrap">
<view class="title">{{ form.title }}</view>
<view class="metas">
<view class="meta">
<uni-icons class="icon" type="eye" size="22" color="#007FFF"></uni-icons>
{{ form.totalBrowsing }}人学过
</view>
<view v-if="form.labelNameList" class="labels">
<view v-for="(label, j) in form.labelNameList" :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>
<view class="text" v-html="form.mainBody"></view>
</view>
</template>
<script>
import { findById } from '@/apis/modules/article.js'
export default {
data() {
return {
id: '',
form: {
totalBrowsing: ''
}
}
},
onShow() {
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
this.id = options.id
this.getInfo()
},
methods: {
//
getInfo() {
uni.showLoading({
title: '加载中'
})
findById(this.id).then(({ message }) => {
this.form = message
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
})
},
}
}
</script>
<style scoped lang="scss">
.wrap {
padding: 30rpx;
background-color: #fff;
}
.title {
font-size: 30rpx;
font-weight: 600;
color: #333;
}
.metas {
display: flex;
justify-content: space-between;
align-items: center;
margin: 20rpx 0;
.labels {
display: inline-flex;
align-items: center;
margin: 15rpx 0;
}
.label {
padding: 2px 6px;
margin-right: 20rpx;
font-size: 24rpx;
color: #fff;
background-color: #ccc;
border-radius: 4px;
}
.meta {
display: inline-flex;
align-items: center;
}
}
.text {
font-size: 28rpx;
line-height: 1.6;
}
</style>

@ -7,7 +7,16 @@
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="pwdIcon" title="密码" rightText="******" clickable @click="toPage('../password/password')" />
</uni-list>
<view v-if="auth('我的:退出账号')" class="logout" @click="logout">退出登录</view>
<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>
@ -36,6 +45,11 @@
size: '22',
type: 'locked'
},
locationIcon: {
color: '#007eff',
size: '22',
type: 'location'
},
info: {
account: '',
phone: '',
@ -49,10 +63,10 @@
methods: {
//
getInfo() {
const team = uni.getStorageSync('team')
const { partnerId, teamId } = uni.getStorageSync('team')
my({
partnerId: team.partnerId,
teamId: team.teamId
partnerId,
teamId
}).then(({ my }) => {
this.info = my.info
}).catch(e => {})
@ -69,7 +83,7 @@
success(res) {
if (res.confirm) {
uni.clearStorageSync()
that.$util.to('../login/login')
that.$util.to('/pages/login/login')
}
}
})
@ -79,6 +93,9 @@
</script>
<style scoped lang="scss">
.location {
margin-top: 30rpx;
}
.logout {
padding: 30rpx 0;
margin-top: 30rpx;
Loading…
Cancel
Save