Browse Source

新增页面、对接接口

master
岳鹏龙 10 months ago
parent
commit
b8690f95d7
  1. 2
      README.md
  2. 9
      src/api/learningCenter.ts
  3. 8
      src/api/mine.ts
  4. 2
      src/components/zh-scroll/zh-scroll.vue
  5. 4
      src/manifest.json
  6. 14
      src/pages.json
  7. 16
      src/pages/index/ChatDialog.vue
  8. 61
      src/pages/index/index.vue
  9. 126
      src/pages/index/shoppage/mtbmakeMessage.vue
  10. 84
      src/pages/learningCenter/detail.vue
  11. 21
      src/pages/learningCenter/index.vue
  12. 5
      src/pages/login/login.vue
  13. 162
      src/pages/memberCenter/index.vue
  14. 222
      src/pages/memberCenter/inpart.vue
  15. 12
      src/pages/mine/completeInformation.vue
  16. 35
      src/pages/mine/myCourses.vue
  17. BIN
      src/static/img/bof.png
  18. BIN
      src/static/img/fd.png
  19. BIN
      src/static/img/sc.png
  20. BIN
      src/static/img/sx.png

2
README.md

@ -1,3 +1,3 @@
# Huiqitong # Huiqitong
惠企 惠企

9
src/api/learningCenter.ts

@ -60,3 +60,12 @@ export function studyRecord(data:any) {
}) })
} }
//是否收藏
export function isCollect(data:any) {
return request.http({
url: '/api/huiqitong/is_collect',
method: 'POST',
data
})
}

8
src/api/mine.ts

@ -7,6 +7,14 @@ export function modifyField(field:string,value:string) {
method: 'PUT' method: 'PUT'
}) })
} }
//修改用户信息(单项)
export function modifyField1(field:string,data:any) {
return request.http({
url: '/api/huiqitong/modify/'+ field,
method: 'PUT',
data
})
}
//图片上传 //图片上传
export function updataImage(data:any) { export function updataImage(data:any) {

2
src/components/zh-scroll/zh-scroll.vue

@ -144,7 +144,7 @@
sizeCalcState.value = true sizeCalcState.value = true
} }
const goxdbdetail = (id) => { const goxdbdetail = (id: string) => {
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/shoppage/shophelpDetail?id='+id url: '/pages/index/shoppage/shophelpDetail?id='+id
}) })

4
src/manifest.json

@ -1,5 +1,5 @@
{ {
"name" : "惠企", "name" : "惠企",
"appid" : "__UNI__4CC99EE", "appid" : "__UNI__4CC99EE",
"description" : "v3+ts+uniapp模版", "description" : "v3+ts+uniapp模版",
"versionName" : "1.0.68", "versionName" : "1.0.68",
@ -106,7 +106,7 @@
"quickapp" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wx4f9dae5cc37dd9f4", "appid" : "wx6b2c38d29724b0ea",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"es6" : true, "es6" : true,

14
src/pages.json

@ -19,14 +19,22 @@
"path": "pages/memberCenter/index", "path": "pages/memberCenter/index",
"style": { "style": {
"navigationBarTitleText": "会员中心", "navigationBarTitleText": "会员中心",
"enablePullDownRefresh": true "enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/memberCenter/inpart",
"style": {
"navigationBarTitleText": "申请入会",
"enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/learningCenter/index", "path": "pages/learningCenter/index",
"style": { "style": {
"navigationBarTitleText": "学习中心", "navigationBarTitleText": "学习中心",
"enablePullDownRefresh": true "enablePullDownRefresh": false
} }
}, },
{ {
@ -34,7 +42,7 @@
"path": "pages/mine/index", "path": "pages/mine/index",
"style": { "style": {
"navigationBarTitleText": "个人中心", "navigationBarTitleText": "个人中心",
"enablePullDownRefresh": true "enablePullDownRefresh": false
} }
}, },
{ {

16
src/pages/index/ChatDialog.vue

@ -1,7 +1,10 @@
<template> <template>
<view class="dialog-container" v-if="visible"> <view class="dialog-container" v-if="visible">
<view class="dialog-mask" @click="close">×</view> <view class="dialog-mask" @click="close">×</view>
<view class="dialog-content"> <view class="dialog-content" :style="{height: isdx?'88%':'686rpx'}">
<view class="butss">
<image style="width: 40rpx;height: 40rpx;" @click="dxclick" :src="isdx?'/static/img/sx.png':'/static/img/fd.png'" mode=""></image>
</view>
<scroll-view class="message-box" scroll-y> <scroll-view class="message-box" scroll-y>
<view class="akstart" v-if="showfirst"> <view class="akstart" v-if="showfirst">
<view v-for="(msg,index) in messages" :key="index" :class="['message', msg.role]"> <view v-for="(msg,index) in messages" :key="index" :class="['message', msg.role]">
@ -96,6 +99,11 @@
showfirst.value = true showfirst.value = true
inputText.value = val inputText.value = val
} }
const isdx = ref(false)
const dxclick = () => {
isdx.value = !isdx.value
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -118,7 +126,6 @@
.dialog-content { .dialog-content {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 686rpx;
bottom: 0; bottom: 0;
background: #E7F3FF; background: #E7F3FF;
box-sizing: border-box; box-sizing: border-box;
@ -260,4 +267,9 @@
letter-spacing: normal; letter-spacing: normal;
color: #007FFF; color: #007FFF;
} }
.butss {
width: 100%;
text-align: end;
padding: 20rpx;
}
</style> </style>

61
src/pages/index/index.vue

@ -1,5 +1,5 @@
<template> <template>
<u-navbar title="惠企" placeholder="true" bgColor="#F1F3F9" leftIcon="map" leftIconSize="24rpx" leftText="呼和浩特" <u-navbar title="惠企" placeholder="true" bgColor="#F1F3F9" leftIcon="map" leftIconSize="24rpx" leftText="呼和浩特"
@leftClick="leftClick"> @leftClick="leftClick">
</u-navbar> </u-navbar>
<view class="container"> <view class="container">
@ -19,13 +19,13 @@
<image style="width: 40rpx;height: 40rpx;" src="@/static/img/yaohuodong.png" mode=""></image> <image style="width: 40rpx;height: 40rpx;" src="@/static/img/yaohuodong.png" mode=""></image>
<text class="text">要活动</text> <text class="text">要活动</text>
</view> </view>
<view class="more"> <view class="more" @click="kfz">
更多活动 > 更多活动 >
</view> </view>
</view> </view>
<scroll-view class="scroll-view_H" scroll-x="true"> <scroll-view class="scroll-view_H" scroll-x="true">
<view class="hdCard" v-for="(item,index) in hdList" :key="index"> <view class="hdCard" v-for="(item,index) in hdList" :key="index" @click="kfz">
<image class="img" :src="url + '/' + item.index_pic" mode=""></image> <image class="img" :src="url + '/' + item.index_pic" mode=""></image>
<view class="message"> <view class="message">
<view class="title"> <view class="title">
@ -44,18 +44,21 @@
<view class="smallshop"> <view class="smallshop">
<text class="xdb">小店帮</text> <text class="xdb">小店帮</text>
<view class="bangCart"> <view class="bangCart">
<view class="bangone1" @click="gokdb"> <view class="bangone1" @click="kfz">
<!-- <view class="bangone1" @click="gokdb"> -->
<text class="btext">开店帮</text> <text class="btext">开店帮</text>
<image style="height: 100%;width: 140rpx;" src="@/static/img/kdb.png" mode=""></image> <image style="height: 100%;width: 140rpx;" src="@/static/img/kdb.png" mode=""></image>
</view> </view>
<view class="bangone2"> <view class="bangone2" @click="kfz">
<text class="btext">企业帮</text> <text class="btext">企业帮</text>
<image style="height: 100%;width: 140rpx;" src="@/static/img/qyb.png" mode=""></image> <image style="height: 100%;width: 140rpx;" src="@/static/img/qyb.png" mode=""></image>
</view> </view>
<view class="bangone3" @click="gojrb"> <!-- <view class="bangone3" @click="gojrb"> -->
<view class="bangone3" @click="kfz">
<text class="btext">金融帮</text> <text class="btext">金融帮</text>
<image style="height: 100%;width: 140rpx;" src="@/static/img/jrb.png" mode=""></image> <image style="height: 100%;width: 140rpx;" src="@/static/img/jrb.png" mode=""></image>
</view> </view>
<!-- <view class="bangone4" @click="kfz"> -->
<view class="bangone4" @click="gomtb"> <view class="bangone4" @click="gomtb">
<text class="btext">媒体帮</text> <text class="btext">媒体帮</text>
<image style="height: 100%;width: 140rpx;" src="@/static/img/mtb.png" mode=""></image> <image style="height: 100%;width: 140rpx;" src="@/static/img/mtb.png" mode=""></image>
@ -64,19 +67,19 @@
</view> </view>
<view class="buttonCard"> <view class="buttonCard">
<view class="but"> <view class="but" @click="kfz">
<image style="width: 96rpx;height: 96rpx;" src="@/static/img/cxw.png" mode=""></image> <image style="width: 96rpx;height: 96rpx;" src="@/static/img/cxw.png" mode=""></image>
<text class="butext">查小微</text> <text class="butext">查小微</text>
</view> </view>
<view class="but"> <view class="but" @click="kfz">
<image style="width: 96rpx;height: 96rpx;" src="@/static/img/czl.png" mode=""></image> <image style="width: 96rpx;height: 96rpx;" src="@/static/img/czl.png" mode=""></image>
<text class="butext">查专利</text> <text class="butext">查专利</text>
</view> </view>
<view class="but"> <view class="but" @click="kfz">
<image style="width: 96rpx;height: 96rpx;" src="@/static/img/cbz.png" mode=""></image> <image style="width: 96rpx;height: 96rpx;" src="@/static/img/cbz.png" mode=""></image>
<text class="butext">查标准</text> <text class="butext">查标准</text>
</view> </view>
<view class="but"> <view class="but" @click="kfz">
<image style="width: 96rpx;height: 96rpx;" src="@/static/img/bnb.png" mode=""></image> <image style="width: 96rpx;height: 96rpx;" src="@/static/img/bnb.png" mode=""></image>
<text class="butext">办年报</text> <text class="butext">办年报</text>
</view> </view>
@ -87,7 +90,7 @@
<image style="width: 40rpx;height: 40rpx;" src="@/static/img/tjhy.png" mode=""></image> <image style="width: 40rpx;height: 40rpx;" src="@/static/img/tjhy.png" mode=""></image>
<text class="text">推荐会员</text> <text class="text">推荐会员</text>
</view> </view>
<view class="more"> <view class="more" @click="kfz">
更多会员 > 更多会员 >
</view> </view>
</view> </view>
@ -95,7 +98,7 @@
<view class="hylist"> <view class="hylist">
<tabsComm :tabsData="filterTabs" @tabChange="handleTabSelect" /> <tabsComm :tabsData="filterTabs" @tabChange="handleTabSelect" />
<scroll-view scroll-y="auto" class="hyonne"> <scroll-view scroll-y="auto" class="hyonne">
<view class="hyCard" v-for="(item,index) in hyList" :key="index"> <view class="hyCard" v-for="(item,index) in hyList" :key="index" @click="kfz">
<view class="left"> <view class="left">
<u-avatar :src="item.img" size="64"></u-avatar> <u-avatar :src="item.img" size="64"></u-avatar>
<view class="textpart"> <view class="textpart">
@ -210,36 +213,6 @@
name: '韩梅梅', name: '韩梅梅',
company: '内蒙古数心法律资讯事务所' company: '内蒙古数心法律资讯事务所'
}, },
{
img: '/static/img/Frame.png',
name: '韩梅梅',
company: '内蒙古数心法律资讯事务所'
},
{
img: '/static/img/Frame.png',
name: '韩梅梅',
company: '内蒙古数心法律资讯事务所'
},
{
img: '/static/img/Frame.png',
name: '韩梅梅',
company: '内蒙古数心法律资讯事务所'
},
{
img: '/static/img/Frame.png',
name: '韩梅梅',
company: '内蒙古数心法律资讯事务所'
},
{
img: '/static/img/Frame.png',
name: '韩梅梅',
company: '内蒙古数心法律资讯事务所'
},
{
img: '/static/img/Frame.png',
name: '韩梅梅',
company: '内蒙古数心法律资讯事务所'
},
{ {
img: '/static/img/Frame.png', img: '/static/img/Frame.png',
name: '韩梅梅', name: '韩梅梅',
@ -289,6 +262,10 @@
} }
}) })
const kfz = () => {
uni.showToast({ title: '开发中。。。', icon: 'none' })
}
onLoad(()=> { onLoad(()=> {
// wx.getSetting({ // wx.getSetting({
// success(res) { // success(res) {

126
src/pages/index/shoppage/mtbmakeMessage.vue

@ -7,7 +7,8 @@
<u-input v-model="form.name" placeholder="请输入真实姓名" placeholderStyle="color: #D3D3D3;" /> <u-input v-model="form.name" placeholder="请输入真实姓名" placeholderStyle="color: #D3D3D3;" />
</u-form-item> </u-form-item>
<u-form-item label="标签" prop="type"> <u-form-item label="标签" prop="type">
<u-input v-model="form.type" placeholder="请选择" placeholderStyle="color: #D3D3D3;" suffixIcon="arrow-down" @focus="show=true" /> <u-input v-model="form.type" placeholder="请选择" placeholderStyle="color: #D3D3D3;"
suffixIcon="arrow-down" @focus="show=true" />
<u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="show=false"></u-picker> <u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="show=false"></u-picker>
</u-form-item> </u-form-item>
<u-form-item label="联系方式" prop="number"> <u-form-item label="联系方式" prop="number">
@ -17,25 +18,18 @@
<u-input v-model="form.emil" placeholder="请输入邮箱地址" placeholderStyle="color: #D3D3D3;" /> <u-input v-model="form.emil" placeholder="请输入邮箱地址" placeholderStyle="color: #D3D3D3;" />
</u-form-item> </u-form-item>
<u-form-item label="宣传封面" prop="img"> <u-form-item label="宣传封面" prop="img">
<up-upload <u-upload class="uploadbox" @afterRead="afterRead" :maxCount="1" :imageMode="'heightFix'"
:fileList="fileList" :width="auto" :height="144">
@afterRead="afterRead" <view class="yyzz" v-if="form.img === ''">
@delete="deletePic" <image style="width: 40rpx;height: 40rpx;" src="@/static/img/yyzz.png" mode=""></image>
name="6" 上传营业执照
multiple </view>
:maxCount="1" <image v-else style="width: 100%;height: 288rpx;margin-top: 12rpx;"
width="250" :src="baseurl+ '/' + form.img" mode="scaleToFill"></image>
height="150" </u-upload>
> </u-form-item>
<image src="https://cdn.uviewui.com/uview/demo/upload/positive.png" <u-form-item label="助企案例" prop="case">
mode="widthFix" style="width: 500rpx;height: 300rpx;"></image> <u-input v-model="form.case" placeholder="请输入真实案例" placeholderStyle="color: #D3D3D3;" />
</up-upload>
<!-- data 方法请参考 基本用法 -->
data(){
return{
fileList6: [],
}
}
</u-form-item> </u-form-item>
</u-form> </u-form>
</view> </view>
@ -48,7 +42,11 @@
</template> </template>
<script setup> <script setup>
import { ref } from 'vue'; import {
ref
} from 'vue';
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL)
// //
const form = ref({ const form = ref({
@ -56,6 +54,8 @@ const form = ref({
type: '', type: '',
number: '', number: '',
emil: '', emil: '',
img: '',
case: ''
}); });
@ -66,36 +66,58 @@ const columns = reactive([
// //
const rules = { const rules = {
name: [ name: [{
{
required: true, required: true,
message: '请输入姓名', message: '请输入姓名',
trigger: ['blur', 'change'], trigger: ['blur', 'change'],
}, }, ],
], type: [{
type: [
{
required: true, required: true,
message: '请输入标签', message: '请输入标签',
trigger: ['blur', 'change'], trigger: ['blur', 'change'],
}, }, ],
], number: [{
number: [
{
required: true, required: true,
message: '请输入联系方式', message: '请输入联系方式',
trigger: ['blur', 'change'], trigger: ['blur', 'change'],
}, }, ],
], emil: [{
emil: [
{
required: true, required: true,
message: '请输入邮箱地址', message: '请输入邮箱地址',
trigger: ['blur', 'change'], trigger: ['blur', 'change'],
}, }, ],
], img: [{
required: true,
message: '请上传宣传封面',
trigger: ['blur', 'change'],
}, ],
case: [{
required: true,
message: '请输入真实案例',
trigger: ['blur', 'change'],
}, ],
}; };
const afterRead = async (e) => {
console.log(e);
uni.uploadFile({
url: import.meta.env.VITE_APP_BASE_URL + '/api/file/image',
filePath: e.file.url,
name: 'file',
header: {
'token': uni.getStorageSync('access_token')
},
success: async (val) => {
if (JSON.parse(val.data).data.url) {
console.log(JSON.parse(val.data).data.url);
}
},
fail: (res) => {
console.log('失败', res);
}
})
}
// //
const uFormRef = ref(null); const uFormRef = ref(null);
@ -111,11 +133,11 @@ function submit() {
if (valid) { if (valid) {
uni.$u.toast('校验通过') uni.$u.toast('校验通过')
} else { } else {
uni.$u.toast('校验失败') uni.$u.toast('请填写完整')
} }
}).catch(() => { }).catch(() => {
// //
uni.$u.toast('校验失败') uni.$u.toast('请填写完整')
}); });
} }
</script> </script>
@ -132,6 +154,7 @@ function submit() {
background: #e9ecf3; background: #e9ecf3;
padding: 40rpx; padding: 40rpx;
box-sizing: border-box; box-sizing: border-box;
overflow-y: auto;
} }
.sumitbotton { .sumitbotton {
@ -167,12 +190,37 @@ function submit() {
} }
} }
} }
.yyzz {
margin-top: 12rpx;
width: 100%;
height: 288rpx;
border-radius: 16rpx;
background: #FFFFFF;
display: grid;
align-content: center;
justify-items: center;
font-family: Source Han Sans;
font-size: 30rpx;
font-weight: 350;
line-height: 70rpx;
letter-spacing: normal;
color: #CCCCCC;
}
:deep(.u-upload) {
.u-upload__wrap {
view {
width: 100%;
}
}
}
</style> </style>
<style> <style>
.u-input { .u-input {
background-color: #FFFFFF; background-color: #FFFFFF;
height: 100rpx !important; height: 100rpx !important;
} }
.u-form-item__body__left__content__label { .u-form-item__body__left__content__label {
white-space: nowrap; white-space: nowrap;
} }

84
src/pages/learningCenter/detail.vue

@ -1,8 +1,8 @@
<template> <template>
<view class="pagebox"> <view class="pagebox">
<view class="vidoepart" v-if="detailData.s_type === 1"> <view class="vidoepart" v-if="detailData.s_type === 1">
<video class="myVideo" :src="baseurl + detailData.video_path" <video class="myVideo" :src="baseurl + detailData.video_path" @error="videoErrorCallback"
@error="videoErrorCallback"></video> @timeupdate="onTimeUpdate"></video>
</view> </view>
<view class="main"> <view class="main">
<text class="title" v-if="detailData.s_type === 2">{{detailData.title}}</text> <text class="title" v-if="detailData.s_type === 2">{{detailData.title}}</text>
@ -13,7 +13,8 @@
<text class="num">{{detailData.watch_count}}</text> <text class="num">{{detailData.watch_count}}</text>
</view> </view>
<view class="left"> <view class="left">
<image style="width: 28rpx;height: 28rpx;" src="@/static/img/scrs.png" mode=""></image> <image style="width: 28rpx;height: 28rpx;" :src="issc?'/static/img/scrs.png':'/static/img/sc.png'"
mode="" @click="scClick"></image>
<text class="txt">收藏人数</text> <text class="txt">收藏人数</text>
<text class="num">{{detailData.collect_count}}</text> <text class="num">{{detailData.collect_count}}</text>
</view> </view>
@ -40,71 +41,120 @@
import { import {
studyCenterDetail, studyCenterDetail,
watchCount, watchCount,
studyRecord studyRecord,
isCollect,
collect,
removeCollect
} from '@/api/learningCenter' } from '@/api/learningCenter'
const baseurl = import.meta.env.VITE_APP_BASE_URL + '/' const baseurl = import.meta.env.VITE_APP_BASE_URL + '/'
const detailData = ref({}) const detailData = ref({})
const issc = ref(false)
const kcid = ref(0)
const videoErrorCallback = (e) => { const videoErrorCallback = (e) => {
uni.showModal({ uni.showModal({
content: e.target.errMsg, content: e.target.errMsg,
showCancel: false showCancel: false
}) })
} }
const scClick = async() => {
issc.value = !issc.value
if(issc.value) {
await collect({"item_id": kcid.value})
} else {
await removeCollect({"item_id": kcid.value})
}
}
const percent = ref('')
const onTimeUpdate = (e) => {
const currentTime = e.detail.currentTime;
const duration = e.detail.duration;
percent.value = (currentTime / duration * 100).toFixed(2); //
}
onLoad(async (param) => { onLoad(async (param) => {
await watchCount({'id':param.id}) detailData.value = []
kcid.value = param.id
await watchCount({
'id': param.id
})
await studyCenterDetail(param.id).then(async (res) => { await studyCenterDetail(param.id).then(async (res) => {
if (res.code === 1) { if (res.code === 1) {
detailData.value = res.data detailData.value = res.data
if (res.data.s_type === 1) { if (res.data.s_type === 1) {
} else { } else {
await studyRecord({'id': param.id,'progress': '100'}) await studyRecord({
'id': param.id,
'progress': '100'
})
} }
await isCollect({"id": param.id}).then((res1)=> {
issc.value = res1.data
})
} }
}) })
}) })
onBeforeUnmount(async ()=> {
if(detailData.value.s_type === 1) {
await studyRecord({
'id': kcid.value,
'progress': percent.value
})
}
})
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.pagebox { .pagebox {
height: 100vh; height: 100vh;
.vidoepart { .vidoepart {
.myVideo { .myVideo {
width: 100vw; width: 100vw;
} }
} }
.main { .main {
padding: 30rpx 40rpx; padding: 30rpx 40rpx;
box-sizing: border-box; box-sizing: border-box;
.peopnum { .peopnum {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-top: 40rpx; margin-top: 40rpx;
.left { .left {
display: flex; display: flex;
align-items: center; align-items: center;
.txt { .txt {
margin-left: 8rpx; margin-left: 8rpx;
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 28rpx; font-size: 28rpx;
font-weight: 350; font-weight: 350;
text-align: justify; /* 浏览器可能不支持 */ text-align: justify;
/* 浏览器可能不支持 */
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
/* 观看人数: */ /* 观看人数: */
color: #858494; color: #858494;
} }
.num { .num {
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 28rpx; font-size: 28rpx;
font-weight: 350; font-weight: 350;
text-align: justify; /* 浏览器可能不支持 */ text-align: justify;
/* 浏览器可能不支持 */
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
@ -113,32 +163,37 @@
} }
} }
} }
.shqy { .shqy {
display: grid; display: grid;
.head { .head {
margin-top: 48rpx; margin-top: 48rpx;
display: flex; display: flex;
align-items: center; align-items: center;
.text { .text {
margin-left: 18rpx; margin-left: 18rpx;
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 30rpx; font-size: 30rpx;
font-weight: 350; font-weight: 350;
text-align: justify; /* 浏览器可能不支持 */ text-align: justify;
/* 浏览器可能不支持 */
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #0072FF; color: #0072FF;
} }
} }
.cards { .cards {
margin-top: 32rpx; margin-top: 32rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 20rpx; gap: 20rpx;
.card { .card {
flex: 0 1 calc(50% - 10rpx); flex: 0 1 calc(50% - 13rpx);
width: 45%;
height: 144rpx; height: 144rpx;
border-radius: 24rpx; border-radius: 24rpx;
background: #FAFDFF; background: #FAFDFF;
@ -147,6 +202,7 @@
display: grid; display: grid;
justify-items: center; justify-items: center;
align-items: center; align-items: center;
.lcxb { .lcxb {
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 30rpx; font-size: 30rpx;
@ -154,6 +210,7 @@
letter-spacing: normal; letter-spacing: normal;
color: #007FFF; color: #007FFF;
} }
.bz { .bz {
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 28rpx; font-size: 28rpx;
@ -165,6 +222,7 @@
} }
} }
} }
.title { .title {
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 36rpx; font-size: 36rpx;
@ -173,12 +231,14 @@
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0C092A;
} }
.message { .message {
margin-top: 40rpx; margin-top: 40rpx;
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 30rpx; font-size: 30rpx;
font-weight: 300; font-weight: 300;
text-align: justify; /* 浏览器可能不支持 */ text-align: justify;
/* 浏览器可能不支持 */
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;

21
src/pages/learningCenter/index.vue

@ -12,9 +12,13 @@
<text class="hongzi"> {{learntime.minutes}}</text> <text class="hongzi"> {{learntime.minutes}}</text>
</view> </view>
<view class="xxls" v-if="xxList.length !== 0"> <view class="xxls" v-if="xxList.length !== 0">
<view class="xxone" v-for="(item,index) in xxList.slice(0,3)" :key="index" @click="kcClick(item)"> <view class="xxone" v-for="(item,index) in xxList.slice(0,3)" :key="index" @click="kcClick('h',item)">
<image style="width: 100%;height: 238rpx;border-radius: 16rpx;" <u-image style="width: 100%;height: 238rpx;border-radius: 16rpx;"
:src="baseurl + '/' +item.study_center_index_pic" mode=""></image> :src="baseurl + '/' +item.study_center_index_pic" mode="" width="100%" height="238rpx" radius="4">
<template v-slot:else>
<image v-if="item.s_type === 1" style="width: 55rpx;height: 55rpx;" src="@/static/img/bof.png" mode=""></image>
</template>
</u-image>
<view class="xxjd"> <view class="xxjd">
已学{{item.progress}}% 已学{{item.progress}}%
</view> </view>
@ -33,7 +37,7 @@
:showAction="false" height="40" margin="40rpx 24rpx 24rpx 24rpx"></u-search> :showAction="false" height="40" margin="40rpx 24rpx 24rpx 24rpx"></u-search>
<view class="KClist"> <view class="KClist">
<view class="kcone" v-for="(item,index) in kcList" :key="index" @click="kcClick(item)"> <view class="kcone" v-for="(item,index) in kcList" :key="index" @click="kcClick('l',item)">
<image class="img" :src="baseurl + item.index_pic" mode=""></image> <image class="img" :src="baseurl + item.index_pic" mode=""></image>
<view class="right"> <view class="right">
<text class="title">{{item.title}}</text> <text class="title">{{item.title}}</text>
@ -121,11 +125,17 @@
} }
} }
const kcClick = (item) => { const kcClick = (type,item) => {
if(type === 'h') {
uni.navigateTo({
url: '/pages/learningCenter/detail?id=' + item.study_center_id
})
} else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/learningCenter/detail?id=' + item.id url: '/pages/learningCenter/detail?id=' + item.id
}) })
} }
}
@ -264,6 +274,7 @@
width: 192rpx; width: 192rpx;
.xxjd { .xxjd {
z-index: 1;
margin-top: -34rpx; margin-top: -34rpx;
width: 100%; width: 100%;
height: 34rpx; height: 34rpx;

5
src/pages/login/login.vue

@ -81,7 +81,7 @@
<template> <template>
<view class="login"> <view class="login">
<!-- <image class="logo-img" src="@/static/logo.png" mode="widthFix" /> --> <!-- <image class="logo-img" src="@/static/logo.png" mode="widthFix" /> -->
<text>惠企欢迎您</text> <text>惠企欢迎您</text>
<view class="btn_box"> <view class="btn_box">
<u-button @getphonenumber="onGetPhoneNumber" text="手机号登录" icon-color="#fff" open-type="getPhoneNumber" <u-button @getphonenumber="onGetPhoneNumber" text="手机号登录" icon-color="#fff" open-type="getPhoneNumber"
color="linear-gradient(270deg, rgba(232, 123, 7, 1) 0%, rgba(247, 205, 77, 1) 100%)" shape="circle" /> color="linear-gradient(270deg, rgba(232, 123, 7, 1) 0%, rgba(247, 205, 77, 1) 100%)" shape="circle" />
@ -105,4 +105,7 @@
margin-bottom: 60rpx; margin-bottom: 60rpx;
} }
} }
.btn_box {
margin-top: 60rpx;
}
</style> </style>

162
src/pages/memberCenter/index.vue

@ -1,27 +1,31 @@
<template> <template>
<view class="container"> <view class="container">
<u-navbar title="会员中心" placeholder="true" bgColor="#F1F3F9" leftIcon="man-add-fill" leftIconSize="24" leftText="申请入会"
@leftClick="leftClick">
</u-navbar>
<u-search @search="search" @clickIcon="clickIcon" shape="square" placeholder="请输入搜索内容" <u-search @search="search" @clickIcon="clickIcon" shape="square" placeholder="请输入搜索内容"
placeholderColor="#2a98ff" v-model="keyword" searchIcon="/static/img/search.png" searchIconSize="14" placeholderColor="#2a98ff" v-model="keyword" searchIcon="/static/img/search.png" searchIconSize="14"
:showAction="false" height="40" margin="40rpx 24rpx 24rpx 24rpx" bgColor="#FFFFFF"></u-search> :showAction="false" height="40" margin="40rpx 24rpx 24rpx 24rpx" bgColor="#FFFFFF"></u-search>
<u-tabs :list="filterTabs" :activeStyle="{color: '#0C092A',fontsize: '30rpx'}" @click="handleTabSelect"></u-tabs>
<view class="main"> <view class="main">
<view class="ztone" v-for="(item,index) in ztList" :key="index" @click="godetail(item.id)"> <scroll-view scroll-y="auto" class="hyonne">
<image style="width: 150rpx;height: 150rpx;border-radius: 28rpx;flex: 1;" :src="item.img" mode=""> <view class="hyCard" v-for="(item,index) in hyList" :key="index" @click="godetail">
</image> <view class="left">
<view class="rightpart"> <u-avatar :src="item.img" size="64"></u-avatar>
<view class="splace"> <view class="textpart">
{{item.splace}} <view class="namepart">
<text class="name">{{item.name}}</text>
<image style="width: 110rpx;height: 40rpx;margin-left: 16rpx;"
src="@/static/img/lsdr.png" mode=""></image>
</view> </view>
<view class="titlepart"> <text class="company">{{item.company}}</text>
<text class="title">{{item.title}}</text>
<image style="width: 32rpx;height: 44rpx;" src="@/static/img/Icon.png" mode="aspectFill">
</image>
</view>
<view class="ms">
{{item.ms}}
</view> </view>
</view> </view>
<image style="width: 48rpx;height: 48rpx;" src="@/static/img/Icon.png" mode=""></image>
</view> </view>
</scroll-view>
</view> </view>
</view> </view>
@ -31,6 +35,7 @@
import { import {
ref ref
} from 'vue'; } from 'vue';
import tabsComm from '../index/tabsComm.vue'
@ -46,27 +51,51 @@
console.log(keyword.value); console.log(keyword.value);
} }
const ztList = ref([{ const hyList = ref([{
img: '/static/img/Frame.png',
name: '韩梅梅',
company: '内蒙古数心法律资讯事务所'
},
{
img: '/static/img/Frame.png',
name: '韩梅梅',
company: '内蒙古数心法律资讯事务所'
}
])
const currentTab = ref('全部');
// ""
const filterTabs = reactive([{
id: 0, id: 0,
img: '/static/img/image.png', name: '全部'
title: '这是一个标题',
time: '2025-04-16',
splace: '内蒙古数心科技',
ms: '描述描述描述描述描述描述'
}, },
{ {
id: 1, id: 1,
img: '/static/img/image.png', name: '法律'
title: '这是一个标题', },
time: '2025-04-16', {
splace: '内蒙古数心科技', id: 2,
ms: '描述描述描述描述描述描述' name: '媒体'
} }
]) ]);
const leftClick = () => {
uni.navigateTo({
url: '/pages/memberCenter/inpart'
})
}
//
const handleTabSelect = (tab) => {
currentTab.value = tab;
//
console.log('选择tab:', tab);
};
const godetail = (id) => { const godetail = (id) => {
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/shoppage/jrbDetail?id=' + id url: '/pages/index/shoppage/mediaDetail?id='+id
}) })
} }
@ -78,77 +107,70 @@
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
background: linear-gradient(0deg, #F1F3F9 72%, rgba(129, 179, 222, 0.5) 88%); background: linear-gradient(0deg, #F1F3F9 72%, rgba(129, 179, 222, 0.5) 88%);
height: 100vh; height: calc(100vh - 88rpx);
width: 100%; width: 100%;
overflow-y: auto; overflow-y: auto;
.main { .main {
margin-top: 10rpx;
width: 100%; width: 100%;
height: 100%; display: grid;
padding: 0 24rpx; padding: 0 24rpx;
box-sizing: border-box; box-sizing: border-box;
max-height: 79vh;
overflow-y: auto;
.ztone { .hyCard {
display: flex; margin-top: 24rpx;
align-items: center;
width: 100%; width: 100%;
height: 210rpx; height: 160rpx;
margin-top: 30rpx; border-radius: 24rpx;
padding: 30rpx;
border-radius: 20rpx;
background: #FFFFFF; background: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box; box-sizing: border-box;
border: 2rpx solid rgba(0, 127, 255, 0.12); padding: 0 20rpx;
.rightpart { .left {
width: 100%; display: flex;
margin-left: 40rpx; align-items: center;
flex: 3; box-sizing: border-box;
.textpart {
margin-left: 32rpx;
display: grid; display: grid;
justify-content: left;
.titlepart { .namepart {
width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; box-sizing: border-box;
.title { .name {
font-family: Poppins; font-family: Source Han Sans;
font-size: 24rpx; font-size: 30rpx;
font-weight: 600; font-weight: 350;
line-height: 34rpx; line-height: 150%;
letter-spacing: normal; letter-spacing: normal;
/* 外部/Colors/Dark/Base 1 */ /* 外部/Neutral/Black */
color: #161719; color: #0C092A;
margin-top: 13rpx;
} }
} }
.splace { .company {
font-family: Poppins; margin-top: 12rpx;
font-family: Source Han Sans;
font-size: 24rpx; font-size: 24rpx;
font-weight: normal; font-weight: 300;
line-height: 34rpx; line-height: 150%;
letter-spacing: normal; letter-spacing: normal;
/* 外部/Colors/Dark/Base 1 */ /* 外部/Neutral/Grey 2 */
color: #161719; color: #858494;
}
} }
.ms {
margin-top: 13rpx;
font-family: Poppins;
font-size: 20rpx;
font-weight: normal;
line-height: 28rpx;
letter-spacing: normal;
/* 外部/Colors/Light/Base 3 */
color: #91919F;
} }
} }
} }
:deep(.u-icon__icon) {
color: #007FFF !important;
} }
} }

222
src/pages/memberCenter/inpart.vue

@ -0,0 +1,222 @@
<template>
<view class="container">
<view class="formlist">
<u-form :model="form" ref="uFormRef" labelPosition="top" :rules="rules">
<u-form-item label="姓名" prop="name">
<u-input v-model="form.name" placeholder="请输入真实姓名" placeholderStyle="color: #D3D3D3;" />
</u-form-item>
<u-form-item label="会员标签" prop="type">
<u-input v-model="form.type" placeholder="请选择" placeholderStyle="color: #D3D3D3;"
suffixIcon="arrow-down" @focus="show=true" />
<u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="show=false"></u-picker>
</u-form-item>
<u-form-item label="个人介绍" prop="emil">
<u-textarea v-model="form.emil" placeholder="请输入个人介绍" placeholderStyle="color: #D3D3D3;" ></u-textarea>
</u-form-item>
<u-form-item label="个人二维码" prop="img">
<u-upload class="uploadbox" @afterRead="afterRead" :maxCount="1" :imageMode="'heightFix'"
:width="auto" :height="144">
<view class="yyzz" v-if="form.img === ''">
<image style="width: 40rpx;height: 40rpx;" src="@/static/img/yyzz.png" mode=""></image>
请上传可以联系到自己的微信二维码
</view>
<image v-else style="width: 100%;height: 288rpx;margin-top: 12rpx;"
:src="baseurl+ '/' + form.img" mode="scaleToFill"></image>
</u-upload>
</u-form-item>
</u-form>
</view>
<view class="sumitbotton">
<view class="button" @click="submit">
确认提交
</view>
</view>
</view>
</template>
<script setup>
import {
ref
} from 'vue';
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL)
//
const form = ref({
name: '',
type: '',
number: '',
emil: '',
img: '',
case: ''
});
const show = ref(false);
const columns = reactive([
['中国', '美国', '日本']
]);
//
const rules = {
name: [{
required: true,
message: '请输入姓名',
trigger: ['blur', 'change'],
}, ],
type: [{
required: true,
message: '请输入标签',
trigger: ['blur', 'change'],
}, ],
number: [{
required: true,
message: '请输入联系方式',
trigger: ['blur', 'change'],
}, ],
emil: [{
required: true,
message: '请输入邮箱地址',
trigger: ['blur', 'change'],
}, ],
img: [{
required: true,
message: '请上传宣传封面',
trigger: ['blur', 'change'],
}, ],
case: [{
required: true,
message: '请输入真实案例',
trigger: ['blur', 'change'],
}, ],
};
const afterRead = async (e) => {
console.log(e);
uni.uploadFile({
url: import.meta.env.VITE_APP_BASE_URL + '/api/file/image',
filePath: e.file.url,
name: 'file',
header: {
'token': uni.getStorageSync('access_token')
},
success: async (val) => {
if (JSON.parse(val.data).data.url) {
console.log(JSON.parse(val.data).data.url);
}
},
fail: (res) => {
console.log('失败', res);
}
})
}
//
const uFormRef = ref(null);
const confirm = (val) => {
console.log(val.value[0]);
form.value.type = val.value[0]
show.value = false
}
//
function submit() {
uFormRef.value.validate().then(valid => {
if (valid) {
uni.$u.toast('校验通过')
} else {
uni.$u.toast('请填写完整')
}
}).catch(() => {
//
uni.$u.toast('请填写完整')
});
}
</script>
<style scoped lang="scss">
.container {
background-color: #FFFFFF;
width: 100%;
height: 100vh;
overflow-y: hidden;
.formlist {
width: 100%;
max-height: calc(100vh - 168rpx);
background: #e9ecf3;
padding: 40rpx;
box-sizing: border-box;
overflow-y: auto;
}
.sumitbotton {
width: 100%;
height: 168rpx;
background: #FFFFFF;
/* 标签栏投影 */
box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.3);
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0;
.button {
width: 574rpx;
height: 96rpx;
border-radius: 248rpx;
background: linear-gradient(90deg, #007FFF 0%, #99CCFF 100%);
display: flex;
align-items: center;
justify-content: center;
font-family: Source Han Sans;
font-size: 36rpx;
font-weight: 350;
line-height: 32rpx;
text-align: justify;
/* 浏览器可能不支持 */
display: flex;
align-items: center;
letter-spacing: normal;
color: #FFFFFF;
}
}
}
.yyzz {
margin-top: 12rpx;
width: 100%;
height: 288rpx;
border-radius: 16rpx;
background: #FFFFFF;
display: grid;
align-content: center;
justify-items: center;
font-family: Source Han Sans;
font-size: 30rpx;
font-weight: 350;
line-height: 70rpx;
letter-spacing: normal;
color: #CCCCCC;
}
:deep(.u-upload) {
.u-upload__wrap {
view {
width: 100%;
}
}
}
</style>
<style>
.u-input {
background-color: #FFFFFF;
height: 100rpx !important;
}
.u-form-item__body__left__content__label {
white-space: nowrap;
}
</style>

12
src/pages/mine/completeInformation.vue

@ -38,7 +38,7 @@
ref ref
} from 'vue' } from 'vue'
import { import {
modifyField, modifyField1,
} from '@/api/mine' } from '@/api/mine'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL) const baseurl = ref(import.meta.env.VITE_APP_BASE_URL)
@ -95,10 +95,7 @@
}, },
success: async (val) => { success: async (val) => {
inputGroups.value[upclickindex.value].license = '' inputGroups.value[upclickindex.value].license = ''
console.log(val);
console.log(JSON.parse(val.data).data.url);
if (JSON.parse(val.data).data.url) { if (JSON.parse(val.data).data.url) {
console.log(upclickindex.value);
inputGroups.value[upclickindex.value].license = JSON.parse(val.data).data.url inputGroups.value[upclickindex.value].license = JSON.parse(val.data).data.url
} }
}, },
@ -116,14 +113,17 @@
data.push(obj) data.push(obj)
} }
}) })
await modifyField('enterprise',data.toString()).then((res) => { console.log(`'${JSON.stringify(data)}'`);
await modifyField1('enterprise',{"value":`${JSON.stringify(data)}`}).then((res) => {
if (res.code === 1) { if (res.code === 1) {
setTimeout(() => { setTimeout(() => {
uni.showToast({ uni.showToast({
title: '提交成功!', title: '提交成功!',
icon: 'success' icon: 'success'
}) })
uni.switchTab({
url: '/pages/mine/porsonalinfo'
})
}, 500) }, 500)
} else { } else {
uni.showToast({ uni.showToast({

35
src/pages/mine/myCourses.vue

@ -1,11 +1,11 @@
<template> <template>
<view class="classbox"> <view class="classbox">
<view class="classone" v-for="(item,index) in classList" :key="index"> <view class="classone" v-for="(item,index) in classList" :key="index">
<text class="title">{{item.title}}</text> <text class="title">{{item.study_center_title}}</text>
<text class="text">{{item.text}}</text> <text class="text">{{item.introduction}}</text>
<view class="jindu"> <view class="jindu">
<text class="learn">已学{{item.learn}}%</text> <text class="learn">已学 {{item.progress}}%</text>
<text class="time">{{item.time}}</text> <text class="time">{{item.update_time.slice(0,10)}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -13,24 +13,19 @@
<script setup> <script setup>
import { ref } from 'vue'; import { ref } from 'vue';
import {
myStudy
} from '@/api/learningCenter'
const classList = ref([ const classList = ref([])
{
id: 1, onShow(async () => {
title: '内蒙古数心科技有限公司', const res = await myStudy()
text: '小白必看!新手如何炒股票不被割韭菜?/书单推荐/股票基金避坑理财课靠谱吗?', if (res.code === 1) {
learn: 70, classList.value = res.data
time: '2025-04-17' }
}, })
{
id: 2,
title: '内蒙古数心科技有限公司',
text: '小白必看!新手如何炒股票不被割韭菜?/书单推荐/股票基金避坑理财课靠谱吗?',
learn: 70,
time: '2025-04-17'
},
])
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

BIN
src/static/img/bof.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/static/img/fd.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

BIN
src/static/img/sc.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

BIN
src/static/img/sx.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Loading…
Cancel
Save