yujialong 12 months ago
parent cd4c7de91d
commit 7587b2cc5d
  1. 2
      README.md
  2. 50
      pages.json
  3. 126
      pages/person/person.vue
  4. 25
      styles/common.scss
  5. 113
      team/email/email.vue
  6. 331
      team/info/info.vue
  7. 62
      team/password/password.vue
  8. 281
      team/plans/plans.vue
  9. 116
      team/scheme/scheme.vue
  10. 95
      team/send/send.vue
  11. 4
      team/setting/setting.vue
  12. 289
      team/study/study.vue
  13. 17
      team/userName/userName.vue

@ -1 +1 @@
# 职站商城 # 幼教产品B2B生态平台小程序端

@ -83,14 +83,6 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path" : "password/password",
"style" :
{
"navigationBarTitleText": "修改密码",
"enablePullDownRefresh": false
}
},
{ {
"path" : "teams/teams", "path" : "teams/teams",
"style" : "style" :
@ -108,14 +100,6 @@
} }
}, },
{ {
"path" : "account/account",
"style" :
{
"navigationBarTitleText": "修改账号",
"enablePullDownRefresh": false
}
}
,{
"path" : "phone/phone", "path" : "phone/phone",
"style" : "style" :
{ {
@ -123,14 +107,6 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
,{
"path" : "email/email",
"style" :
{
"navigationBarTitleText": "修改邮箱",
"enablePullDownRefresh": false
}
}
,{ ,{
"path" : "qrcode/qrcode", "path" : "qrcode/qrcode",
"style" : "style" :
@ -139,30 +115,20 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
,{ ,{
"path" : "article/article", "path" : "info/info",
"style" : "style" :
{
"navigationBarTitleText": "学习",
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#fff",
"enablePullDownRefresh": false
}
}
,{
"path" : "scheme/scheme",
"style" :
{ {
"navigationBarTitleText": "方案详情", "navigationBarTitleText": "信息维护",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path" : "send/send", "path" : "userName/userName",
"style" : "style" :
{ {
"navigationBarTitleText": "下载发送", "navigationBarTitleText" : "用户名修改",
"enablePullDownRefresh": false "enablePullDownRefresh" : false
} }
} }
] ]

@ -18,11 +18,41 @@
<view class="title">基础功能</view> <view class="title">基础功能</view>
<ul class="func"> <ul class="func">
<li v-for="(item, i) in funcs" :key="i" @click="toFunc(item)"> <li @click="toPage('')">
<view class="icon"> <view class="icon">
<image src="@/static/image/info-bg.jpg"></image> <image src="@/static/image/info-bg.jpg"></image>
</view> </view>
<view class="text ell">{{ item.name }}</view> <view class="text ell">我的电子券</view>
</li>
<li @click="tips">
<view class="icon">
<image src="@/static/image/info-bg.jpg"></image>
</view>
<view class="text ell">我的关注</view>
</li>
<li @click="toPage('')">
<view class="icon">
<image src="@/static/image/info-bg.jpg"></image>
</view>
<view class="text ell">已报名活动</view>
</li>
<li @click="tips">
<view class="icon">
<image src="@/static/image/info-bg.jpg"></image>
</view>
<view class="text ell">我的发票</view>
</li>
<li @click="tips">
<view class="icon">
<image src="@/static/image/info-bg.jpg"></image>
</view>
<view class="text ell">我的订单</view>
</li>
<li @click="tips">
<view class="icon">
<image src="@/static/image/info-bg.jpg"></image>
</view>
<view class="text ell">发布采购</view>
</li> </li>
</ul> </ul>
</view> </view>
@ -40,17 +70,65 @@
<view class="title">工作台</view> <view class="title">工作台</view>
<ul class="func"> <ul class="func">
<li v-for="(item, i) in funcs" :key="i" @click="toFunc(item)"> <li @click="toPage('')">
<view class="icon">
<image src="@/static/image/info-bg.jpg"></image>
</view>
<view class="text ell">供应商认证</view>
</li>
<li @click="tips">
<view class="icon"> <view class="icon">
<image src="@/static/image/info-bg.jpg"></image> <image src="@/static/image/info-bg.jpg"></image>
</view> </view>
<view class="text ell">{{ item.name }}</view> <view class="text ell">商品管理</view>
</li>
<li @click="toPage('/team/teams/teams')">
<view class="icon">
<image src="@/static/image/info-bg.jpg"></image>
</view>
<view class="text ell">团队管理</view>
</li>
<li @click="tips">
<view class="icon">
<image src="@/static/image/info-bg.jpg"></image>
</view>
<view class="text ell">订单管理</view>
</li>
<li @click="tips">
<view class="icon">
<image src="@/static/image/info-bg.jpg"></image>
</view>
<view class="text ell">活动管理</view>
</li>
<li @click="toPage('/team/info/info')">
<view class="icon">
<image src="@/static/image/info-bg.jpg"></image>
</view>
<view class="text ell">信息维护</view>
</li>
<li @click="tips">
<view class="icon">
<image src="@/static/image/info-bg.jpg"></image>
</view>
<view class="text ell">对账管理</view>
</li>
<li @click="tips">
<view class="icon">
<image src="@/static/image/info-bg.jpg"></image>
</view>
<view class="text ell">商机线索</view>
</li>
<li @click="tips">
<view class="icon">
<image src="@/static/image/info-bg.jpg"></image>
</view>
<view class="text ell">发票管理</view>
</li> </li>
</ul> </ul>
</view> </view>
<view class="list"> <view class="list">
<view v-if="auth('我的:设置')" class="item" @click="toSet"> <view class="item" @click="toPage(`/team/setting/setting`)">
<view class="left"> <view class="left">
<image class="icon" src="@/static/image/person3.png" mode=""></image> <image class="icon" src="@/static/image/person3.png" mode=""></image>
<text class="name">设置</text> <text class="name">设置</text>
@ -87,32 +165,6 @@
userName: uni.getStorageSync('userName'), userName: uni.getStorageSync('userName'),
hasOwnTeam: 0, // hasOwnTeam: 0, //
disabled: true, disabled: true,
provinces: [],
cities: [],
provinceIcon: {
color: '#007eff',
size: '22',
type: 'location'
},
cityIcon: {
color: '#007eff',
size: '22',
type: 'map-pin-ellipse'
},
provinceId: '',
cityId: '',
provinceName: '',
cityName: '',
funcs: [
{
id: 1,
name: '我的电子券'
},
{
id: 2,
name: '已报名活动'
},
]
} }
}, },
onShow() { onShow() {
@ -242,12 +294,12 @@
createTeam() { createTeam() {
this.$util.to(`../reg/reg?openid=${uni.getStorageSync('openid')}&phone=${this.my.info.phone}&my=1`) this.$util.to(`../reg/reg?openid=${uni.getStorageSync('openid')}&phone=${this.my.info.phone}&my=1`)
}, },
// toPage(href) {
toSet() { this.$util.to(href)
this.$util.to(`/team/setting/setting`)
}, },
toFunc(item) { //
tips() {
this.$util.errMsg('功能暂未开放!')
} }
} }
} }
@ -260,7 +312,7 @@
} }
.wrap { .wrap {
position: relative; position: relative;
padding: 0 24rpx; padding: 0 24rpx 24rpx;
margin-top: -150rpx; margin-top: -150rpx;
} }
.block { .block {

@ -78,7 +78,6 @@ ul {
} }
} }
.form-list { .form-list {
border-top: 1px solid #E6E8ED;
.line { .line {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -93,15 +92,35 @@ ul {
font-size: 28rpx; font-size: 28rpx;
color: #999; color: #999;
} }
.name, .val, input { .with-arrow {
.val {
display: inline-flex;
align-items: center;
}
.arrow {
margin-left: 15rpx;
}
}
.name {
white-space: nowrap;
font-size: 28rpx;
color: #4a4a4a;
}
.val, input, textarea {
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #333;
} }
input { input, textarea {
flex: 1; flex: 1;
margin-left: 20rpx; margin-left: 20rpx;
text-align: right; text-align: right;
} }
.textarea-line {
align-items: flex-start;
}
textarea {
height: 150rpx;
}
.req { .req {
.name:after { .name:after {
content: '*'; content: '*';

@ -1,113 +0,0 @@
<template>
<view class="page">
<view class="input">
<uni-easyinput v-model="form.email" placeholder="请填写你的邮箱" :clearable="false" />
</view>
<view class="input code-wrap">
<uni-easyinput class="code" v-model="form.code" placeholder="验证码" :clearable="false" />
<view class="send-code" @click="sendCode" :disabled="codeDisabled">{{ btnText }}</view>
</view>
<button type="primary" @click="submit">确认</button>
</view>
</template>
<script>
import { updateMyEmail, mailCodeSend } from '@/apis/modules/user.js'
export default {
data() {
return {
userId: '',
form: {
email: '',
code: ''
},
codeDisabled: false,
phoneTimer: null,
btnText: '发送验证码',
}
},
onShow() {
},
methods: {
//
sendCode() {
const { email } = this.form
if (!email) return this.$util.errMsg('请输入邮箱')
if (!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(email) && !/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(email)) return this.$util.errMsg('请输入正确的请输入邮箱')
mailCodeSend({
email,
platformId: 4
}).then(res => {
this.phoneCountdown()
}).catch(res => {})
},
//
phoneCountdown() {
let count = 60
if (!this.phoneTimer) {
this.codeDisabled = true
this.phoneTimer = setInterval(() => {
if (count > 0) {
count--
this.btnText = `${count}秒后重试`
} else {
this.codeDisabled = false
clearInterval(this.phoneTimer)
this.phoneTimer = null
this.btnText = `发送验证码`
}
}, 1000)
}
},
//
submit() {
const { email, code } = this.form
if (!email) return this.$util.errMsg('请输入邮箱')
if (!code) return this.$util.errMsg('请输入验证码')
updateMyEmail({
email,
code,
platformId: 4
}).then(res => {
this.$util.sucMsg('修改成功!')
setTimeout(() => {
uni.navigateBack()
}, 1500)
}).catch(res => {})
}
}
}
</script>
<style scoped lang="scss">
.page {
padding: 20px;
background-color: #fff;
}
/deep/.input {
margin-bottom: 15px;
.is-input-border {
border-color: #dedede !important;
}
}
.input {
margin-bottom: 20px;
}
.code-wrap {
display: flex;
}
.code {
flex: 1;
}
.send-code {
width: 100px;
margin-left: 20px;
text-align: center;
color: #4386ff;
font-size: 12px;
line-height: 36px;
border: 1px solid #4386ff;
border-radius: 5px;
}
</style>

@ -1,285 +1,116 @@
<template> <template>
<view> <view>
<view class="search-wrap"> <view class="block">
<image class="bg" src="@/static/image/info.png"></image> <view class="form-list">
<view class="info"> <view class="line with-arrow">
<uni-search-bar class="search" radius="30" placeholder="请输入文章名称,标签" v-model="keyword" clearButton="auto" cancelButton="none" bgColor="#fff" /> <view class="name">LOGO</view>
</view> <view class="val">
</view> <image class="avatar" src="@/static/image/info-bg.jpg"></image>
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
<view class="type"> </view>
<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> </view>
<uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="22" color="#007eff" @click="typeVisible = true"></uni-icons> <view class="line with-arrow">
</view> <view class="name">幼儿园名称</view>
<view class="val">
<template v-if="list.length"> <input type="text" placeholder="请输入幼儿园名称" />
<view class="list"> <uni-icons type="right" size="18" color="#ababab"></uni-icons>
<view v-for="(item, i) in list" :key="i" class="item" @click="toDetail(item)">
<view class="title ell">{{ item.title }}</view>
<view class="texts">
<view class="left">
<view class="des">{{ item.mainBody }}</view>
<view class="metas">
<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>
</view>
<image class="pic" :src="item.bannerImg"></image>
</view> </view>
</view> </view>
<view class="line with-arrow">
<view class="name">标签</view>
<view class="val">
<input type="text" placeholder="请输入标签" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
</view>
<view class="line textarea-line">
<view class="name">幼儿园slogan</view>
<textarea placeholder="请输入幼儿园slogan"></textarea>
</view>
<view class="line textarea-line">
<view class="name">地址</view>
<textarea placeholder="请输入地址"></textarea>
</view>
<view class="line textarea-line">
<view class="name">幼儿园简介</view>
<textarea placeholder="请输入幼儿园简介"></textarea>
</view>
</view> </view>
<uni-load-more :status="status" /> </view>
</template>
<empty v-else></empty>
<view :class="['type-popup', {active: typeVisible}]"> <view class="block info">
<uni-icons class="close" type="closeempty" size="20" color="#757575" @click="closeType"></uni-icons> <view class="title">联系我们</view>
<view class="title">所属分类</view> <view class="line">地址测试测试</view>
<view class="types"> <view class="line">联系电话测试测试</view>
<view v-for="(item, i) in classifications" :key="i" :class="['item', {active: active == item.id}]" @click="classificationClick(item)">{{ item.classificationName }}</view> <image class="qrcode" src="@/static/image/info-bg.jpg"></image>
</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { partnerOperatingList, queryClassificationByType } from '@/apis/modules/article.js' import { my } from '@/apis/modules/parner.js'
export default { export default {
data() { data() {
return { return {
classifications: [],
active: '',
typeVisible: false,
reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore
searchTimer: null,
articleNameSort: '',
keyword: '',
list: [],
page: 1,
pageSize: 10,
}
},
watch: {
keyword () {
this.active = ''
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() { onShow() {
this.keyword = '' this.getInfo()
this.active = ''
this.typeVisible = false
this.initRole()
}, },
methods: { methods: {
// //
initRole() { getInfo() {
if (!uni.getStorageSync('auth').includes('资讯')) { const { partnerId, teamId } = uni.getStorageSync('team')
this.per = false my({
} partnerId,
this.initList() teamId
this.getClassification() }).then(({ my }) => {
}, this.info = my.info
getList() {
const data = {
keyWord: this.keyword,
pageNum: this.page,
pageSize: this.pageSize,
querySource: 4,
typeId: 2,
articleNameSort: this.articleNameSort,
classificationId: this.active
}
uni.showLoading({
title: '加载中'
})
partnerOperatingList(data).then(({ page, total }) => {
uni.hideLoading()
// list
const list = page
list.forEach(e => {
if (e.labelName) e.labelName = e.labelName.split(',').slice(0, 2) //
e.mainBody = (e.summary || e.mainBody).replace(/(<[^>]+>)|((&nbsp;)+)/g , '')
})
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list
this.page++ // page+1
const noMore = this.list.length === 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(2).then(({ data }) => {
this.classifications = [
{
id: '',
classificationName: '不限'
}
]
this.classifications.push(...data)
}).catch(e => {}) }).catch(e => {})
}, },
// toPage(path) {
classificationClick(item, query) { this.$util.to(path)
this.active = item.id
query && this.initList()
},
//
closeType() {
this.typeVisible = false
this.initList()
},
//
toggle(item) {
item.toggle = !item.toggle
},
//
switchSort() {
this.articleNameSort = this.articleNameSort === 'desc' ? 'asc' : 'desc'
this.initList()
},
//
toDetail(item) {
this.$util.to(`/team/article/article?info=1&id=` + item.id)
}, },
// 退
logout() {
const that = this
uni.showModal({
title: '提示',
content: '确定要退出账号吗?',
success(res) {
if (res.confirm) {
uni.clearStorageSync()
that.$util.to('/pages/login/login')
}
}
})
}
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.search-wrap { .avatar {
position: relative; width: 80rpx;
height: 300rpx; height: 80rpx;
padding: 120rpx 10px 0; border: 0;
.bg { border-radius: 50%;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.info {
position: relative;
margin-top: 160rpx;
}
.text {
margin: 0 10px 10rpx;
font-size: 50rpx;
color: #fff;
}
} }
.type { .info {
position: relative; position: relative;
display: flex; padding: 24rpx;
padding: 30rpx; .line {
background-color: #fff; margin: 20rpx 0;
.item { font-size: 26rpx;
padding: 0 15rpx;
line-height: 1.6;
font-size: 28rpx;
color: #333; color: #333;
white-space: nowrap;
&.active {
color: #007FFF;
font-weight: 600;
}
} }
.icon { .qrcode {
position: absolute; position: absolute;
right: 40rpx; top: 30rpx;
width: 40rpx; right: 30rpx;
} width: 120rpx;
} height: 120rpx;
.list {
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;
}
.pic {
width: 260rpx;
height: 180rpx;
border-radius: 8px;
}
.left {
width: calc(100% - 280rpx);
}
.title {
margin-bottom: 20rpx;
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 {
margin-top: 10rpx;
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-top: 15rpx;
}
.label {
width: 90rpx;
padding: 2px 6px;
margin: 0 10rpx 15rpx 0;
font-size: 24rpx;
color: #fff;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
background-color: #ccc;
border-radius: 4px;
} }
} }
</style> </style>

@ -1,62 +0,0 @@
<template>
<view class="page">
<view class="input">
<uni-easyinput type="password" v-model.trim="form.password" placeholder="请输入旧密码"></uni-easyinput>
</view>
<view class="input">
<uni-easyinput type="password" v-model.trim="form.newPassword" placeholder="请输入新密码"></uni-easyinput>
</view>
<view class="input">
<uni-easyinput type="password" v-model.trim="form.reNewPassword" placeholder="请再次输入新密码"></uni-easyinput>
</view>
<button type="primary" @click="submit">确认</button>
</view>
</template>
<script>
import { examinePassword } from '@/apis/modules/user.js'
export default {
data() {
return {
form: {
password: '',
newPassword: '',
reNewPassword: ''
},
}
},
methods: {
submit() {
const { form } = this
const { password, newPassword, reNewPassword } = form
if(!password) return this.$util.errMsg('请输入旧密码')
if(!newPassword) return this.$util.errMsg('请输入新密码')
if(!reNewPassword) return this.$util.errMsg('请确认新密码')
if(newPassword.length < 6 || reNewPassword.length < 6) return this.$util.errMsg('请输入6位数以上的密码')
if(newPassword !== reNewPassword) return this.$util.errMsg('输入的新密码不一致,请重新确认')
if(password === newPassword) return this.$util.errMsg('旧密码跟新密码不能一致')
form.accountId = uni.getStorageSync('team').accountId
examinePassword(form).then(res => {
this.$util.sucMsg('修改成功!')
setTimeout(() => {
uni.navigateBack()
}, 1000)
}).catch(e => {})
}
}
}
</script>
<style scoped lang="scss">
.page {
padding: 20px;
background-color: #fff;
}
/deep/.input {
margin-bottom: 15px;
.is-input-border {
border-color: #dedede !important;
}
}
</style>

@ -1,281 +0,0 @@
<template>
<view>
<view :class="[{'not-auth': !per}]">
<view class="filter">
<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 classifications.slice(0, 4)" :class="{active: active === tab.id}" @click="tabChange(tab)">{{ tab.classificationName }}</li>
<uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="22" color="#007eff" @click="typeVisible = true"></uni-icons>
</ul>
<view v-if="list.length" class="list">
<view v-for="(item, i) in list" class="item" @click="toDetail(item)">
<view class="c-name ell">{{ item.title }}</view>
<view class="content">
<view class="info">
<view class="line">
<view class="name">产品</view>
<view class="val ell-wrap">
<view v-if="!item.toggle" class="product ell">{{ item.productNames }}</view>
<view v-else class="product" v-html="item.productNamesHtml"></view>
<view v-if="item.productNames && item.productNames.length > 14" class="toggle" @click.stop="toggle(item)">{{ item.toggle ? '收起' : '展开' }}</view>
</view>
</view>
<view class="line">
<view class="name">更新日期</view>
<view class="val">{{ item.updateTime }}</view>
</view>
<view class="line">
<view class="name">适用专业</view>
<view class="val">{{ item.applicableMajor }}</view>
</view>
</view>
<!-- <view class="detail" @click.stop="toEmail(i)">下载</view> -->
</view>
</view>
</view>
<empty v-else></empty>
<view :class="['type-popup', {active: 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>
<notAuth v-if="!per"></notAuth>
</view>
</template>
<script>
import { schemeList, queryClassificationByType } from '@/apis/modules/article.js'
export default {
data() {
return {
per: true, //
active: '',
typeVisible: false,
classifications: [],
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.per = true
this.keyword = ''
this.active = ''
this.initRole()
},
methods: {
//
initRole() {
const auth = uni.getStorageSync('auth')
if (!auth.includes('工作台:方案')) {
this.per = false
this.list = [
{
title: '智信云',
productNames: '智信云师资培训班',
applicableMajor: 'python实训系统',
updateTime: '2023-08-08'
},
{
title: '智信云',
productNames: '智信云师资培训班智信云师资培训班',
applicableMajor: 'python实训系统',
updateTime: '2023-08-08'
},
{
title: '智信云智信云',
productNames: '智信云师资培训班智信云师资培训班',
applicableMajor: 'python实训系统',
updateTime: '2023-08-08'
},
{
title: '智信云',
productNames: '智信云师资培训班智信云师资培训班',
applicableMajor: 'python实训系统实训系统',
updateTime: '2023-08-08'
},
]
} else {
this.initList()
this.getClassification()
}
},
getList() {
uni.showLoading({
title: '加载中'
})
schemeList({
keyWord: this.keyword,
pageNum: this.page,
pageSize: this.pageSize,
querySource: 4,
classificationId: this.active
}).then(({ data }) => {
uni.hideLoading()
// list
const list = data.records
list.forEach(e => {
if (e.productNames) {
e.toggle = e.productNames.length < 14 // 14
e.productNamesHtml = e.productNames.split(',').join('<br>')
}
})
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 = [
{
id: '',
classificationName: '不限'
}
]
this.classifications.push(...data)
}).catch(e => {})
},
//
classificationClick(item, query) {
this.active = item.id
query && this.initList()
},
//
closeType() {
this.typeVisible = false
this.initList()
},
// tab
tabChange(tab) {
this.active = tab.id
this.initList()
},
//
toDetail(item) {
this.$util.to(`/team/scheme/scheme?id=` + item.id)
},
//
toEmail(id) {
this.$util.to(`../send/send?id=${id}`)
},
//
toggle(item) {
item.toggle = !item.toggle
}
}
}
</script>
<style scoped lang="scss">
.tab {
position: relative;
justify-content: flex-start;
li {
padding: 0 30rpx;
}
.icon {
position: absolute;
top: 32rpx;
right: 44rpx;
}
}
.list {
background-color: #fff;
.item {
padding: 20rpx 40rpx;
border-bottom: 1px solid #f1f1f1;
}
.c-name {
font-size: 30rpx;
color: #333;
}
.line {
display: flex;
padding: 10rpx 0;
}
.content {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20rpx;
}
.name {
width: 140rpx;
margin-right: 10rpx;
white-space: nowrap;
font-size: 28rpx;
color: #999;
}
.val {
font-size: 28rpx;
color: #333;
}
.product {
max-width: 67vw;
white-space: pre-wrap;
&.ell {
white-space: nowrap;
}
}
.toggle {
margin-top: 10rpx;
white-space: nowrap;
font-size: 24rpx;
color: #0e92ef;
}
.detail {
margin-left: 20rpx;
font-size: 26rpx;
color: #1f83ff;
white-space: nowrap;
}
}
</style>

@ -1,116 +0,0 @@
<template>
<view class="wrap">
<view class="title">{{ form.title }}</view>
<view class="text">{{ form.applicableMajor }}</view>
<view class="text">{{ form.schemeIntroduction }}</view>
<view class="text" v-html="form.product"></view>
<template v-if="form.fileName">
<view class="file">{{ form.fileName }}</view>
<view class="detail" @click.stop="download">下载</view>
</template>
</view>
</template>
<script>
import { schemeFindById } 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: '加载中'
})
schemeFindById(this.id).then(({ data }) => {
if (data.productList) data.product = data.productList.map(e => e.productName).join('<br>')
this.form = data
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
})
},
//
download() {
uni.setStorageSync('files', {
copyWriting: this.form.title,
fileName: [this.form.fileName],
urls: [this.form.schemeFile]
})
this.$util.to(`/team/send/send`)
// uni.showLoading({
// title: '',
// mask: true
// })
// const url = this.form.schemeFile
// const that = this
// //
// uni.downloadFile({
// url,
// success: function(res) {
// console.log(444, res)
// uni.saveFile({
// tempFilePath: res.tempFilePath,
// success: function(res) {
// console.log(555, res)
// // doc, xls, ppt, pdf, docx, xlsx, pptx
// that.$util.isDoc(url.substring(url.lastIndexOf('.') +1)) && uni.openDocument({
// filePath: res.savedFilePath,
// showMenu: true, //
// success: res => {
// uni.hideLoading()
// },
// fail: openError => {
// uni.hideLoading()
// }
// })
// }
// })
// },
// fail: function(err) {
// uni.hideLoading()
// }
// })
}
}
}
</script>
<style scoped lang="scss">
.wrap {
padding: 30rpx;
background-color: #fff;
}
.title {
font-size: 34rpx;
font-weight: 600;
color: #333;
}
.text {
margin: 20rpx 0;
font-size: 28rpx;
line-height: 1.6;
}
.file {
margin: 20rpx 0;
font-size: 26rpx;
word-break: break-all;
}
.detail {
font-size: 30rpx;
color: #1f83ff;
}
</style>

@ -1,95 +0,0 @@
<template>
<view class="container">
<uni-card :is-shadow="false" :border="false" padding="0" is-full>
<view class="form">
<view class="line">
<uni-data-checkbox v-model="myVal" :localdata="checkList" @change="myChange"></uni-data-checkbox>
<text>我的邮箱</text>
<uni-easyinput v-model="email" disabled />
<view class="bind" @click="$util.to('../email/email')">绑定</view>
</view>
<view class="line">
<uni-data-checkbox v-model="otherVal" :localdata="checkList" @change="otherChange"></uni-data-checkbox>
<text>其他邮箱</text>
<uni-easyinput v-model="otherEmail" placeholder="请输入其他邮箱" />
</view>
<button type="primary" @click="submit">确认</button>
</view>
</uni-card>
</view>
</template>
<script>
import { mailFileSend } from '@/apis/modules/parner.js'
import { my } from '@/apis/modules/parner.js'
export default {
data() {
return {
email: '',
otherEmail: '',
myVal: 1,
otherVal: '',
checkList: [{
text: '',
value: 1
}],
}
},
onShow() {
this.getInfo()
},
methods: {
//
getInfo() {
const team = uni.getStorageSync('team')
my({
partnerId: team.partnerId,
teamId: team.teamId
}).then(({ my }) => {
this.email = my.info.email
}).catch(e => {})
},
myChange(e) {
this.otherVal = ''
},
otherChange(e) {
this.myVal = ''
},
//
submit() {
const { otherEmail } = this
if (this.myVal && !this.email) return this.$util.errMsg('请选择其他邮箱!')
if (this.otherVal && !otherEmail) return this.$util.errMsg('请输入邮箱!')
const data = uni.getStorageSync('files')
data.mail = this.myVal ? this.email : otherEmail
mailFileSend(data).then(res => {
this.$util.sucMsg('发送成功!')
setTimeout(() => {
uni.navigateBack()
}, 1000)
}).catch(e => {})
},
}
}
</script>
<style scoped lang="scss">
.form {
padding: 15px;
background-color: #fff;
}
.line {
display: flex;
align-items: center;
margin-bottom: 15px;
text {
margin: 0 10px 0 -20px;
}
}
.bind {
margin-left: 20rpx;
font-size: 26rpx;
color: #1f83ff;
white-space: nowrap;
}
</style>

@ -2,9 +2,7 @@
<view> <view>
<uni-list> <uni-list>
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="phoneIcon" title="手机号" :rightText="info.phone" clickable @click="toPage('../phone/phone')" /> <uni-list-item :show-extra-icon="true" showArrow :extra-icon="phoneIcon" title="手机号" :rightText="info.phone" clickable @click="toPage('../phone/phone')" />
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="mailIcon" title="邮箱" :rightText="info.email" clickable @click="toPage('../email/email')" /> <uni-list-item :show-extra-icon="true" showArrow :extra-icon="accountIcon" title="用户名" :rightText="info.account" clickable @click="toPage('../account/account')" />
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="accountIcon" title="账号" :rightText="info.account" clickable @click="toPage('../account/account')" />
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="pwdIcon" title="密码" rightText="******" clickable @click="toPage('../password/password')" />
</uni-list> </uni-list>
<view class="logout" @click="logout">退出登录</view> <view class="logout" @click="logout">退出登录</view>

@ -1,289 +0,0 @@
<template>
<view>
<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>
<uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="22" color="#007eff" @click="typeVisible = 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 ell">{{ item.title }}</view>
<view v-if="item.labelName" class="labels">
<view v-for="(label, j) in item.labelName.split(',').slice(0, 2)" :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" @click.stop="collect(item)">
<uni-icons class="icon" :type="item.collectionStatus ? 'star-filled' : 'star'" size="22" color="#007eff"></uni-icons>
{{ item.collectionNumber }}
</view>
</view>
<view v-if="item.lastReading" class="last">上次阅读</view>
</view>
</view>
</view>
<uni-load-more :status="status" />
</template>
<empty v-else></empty>
<view :class="['type-popup', {active: 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 { partnerOperatingList, queryClassificationByType, collectCourse } from '@/apis/modules/article.js'
export default {
data() {
return {
classifications: [],
active: '',
typeVisible: false,
reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore
searchTimer: null,
articleNameSort: '',
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.keyword = ''
this.active = ''
this.typeVisible = false
this.initRole()
},
methods: {
//
initRole() {
if (!uni.getStorageSync('auth').includes('学习')) {
this.per = false
}
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.active
}
uni.showLoading({
title: '加载中'
})
partnerOperatingList(data).then(({ page, total }) => {
uni.hideLoading()
// list
const list = page
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list
this.page++ // page+1
const noMore = this.list.length === 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 }) => {
this.classifications = [
{
id: '',
classificationName: '不限'
}
]
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
},
//
switchSort() {
this.articleNameSort = this.articleNameSort === 'desc' ? 'asc' : 'desc'
this.initList()
},
//
collect(item) {
const state = item.collectionStatus ? 0 : 1
collectCourse(item.id, state).then(({ data }) => {
item.collectionStatus = state
state ? ++item.collectionNumber : --item.collectionNumber
}).catch(e => {})
},
//
toDetail(item) {
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;
}
}
.icon {
position: absolute;
right: 40rpx;
width: 40rpx;
}
}
.list {
background-color: #fff;
.item {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10rpx;
padding: 20rpx 40rpx;
border-bottom: 1px solid #f1f1f1;
}
.pic {
width: 260rpx;
height: 180rpx;
border-radius: 8px;
}
.right {
width: calc(100% - 280rpx);
}
.title {
margin-bottom: 15rpx;
font-size: 32rpx;
font-weight: 600;
color: #333;
}
.labels {
display: flex;
flex-wrap: wrap;
align-items: center;
}
.label {
padding: 2px 6px;
margin: 0 20rpx 15rpx 0;
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;
}
.icon {
margin-right: 5rpx;
}
.last {
position: absolute;
bottom: 20rpx;
right: 40rpx;
font-size: 28rpx;
color: #007FFF;
}
}
</style>

@ -1,7 +1,7 @@
<template> <template>
<view class="page"> <view class="page">
<view class="input"> <view class="input">
<uni-easyinput v-model.trim="account" placeholder="请输入账号" @input="accountChange"></uni-easyinput> <uni-easyinput v-model.trim="account" placeholder="请输入用户名"></uni-easyinput>
</view> </view>
<button type="primary" @click="submit">确认</button> <button type="primary" @click="submit">确认</button>
</view> </view>
@ -12,7 +12,6 @@
export default { export default {
data() { data() {
return { return {
timer: null,
account: '', account: '',
repeat: false repeat: false
} }
@ -21,21 +20,9 @@
}, },
methods: { methods: {
//
accountChange() {
clearTimeout(this.timer)
this.timer = setTimeout(() => {
checkIfAnAccountExists(this.account).then(() => {
this.repeat = false
}).catch(e => {
this.repeat = true
})
}, 500)
},
submit() { submit() {
const { account } = this const { account } = this
if(!account) return this.$util.errMsg('请输入账号') if(!account) return this.$util.errMsg('请输入用户名')
if (this.repeat) return this.$util.errMsg('账号已存在!')
changeAccount(account).then(res => { changeAccount(account).then(res => {
this.$util.sucMsg('修改成功!') this.$util.sucMsg('修改成功!')
setTimeout(() => { setTimeout(() => {
Loading…
Cancel
Save