Browse Source

修改需求

master
岳鹏龙 8 months ago
parent
commit
28ac396cb4
  1. 41
      package-lock.json
  2. 3
      package.json
  3. 10
      src/api/index.ts
  4. 7
      src/api/learningCenter.ts
  5. 4
      src/api/memberCenter.ts
  6. 1
      src/api/mine.ts
  7. 7
      src/api/shop.ts
  8. 6
      src/api/user.ts
  9. 20
      src/components/zh-scroll/interface.ts
  10. 86
      src/components/zh-scroll/zh-scroll.vue
  11. 8
      src/main.ts
  12. 68
      src/pages/index/ChatDialog.vue
  13. 26
      src/pages/index/active/activeDetail.vue
  14. 52
      src/pages/index/active/activelist.vue
  15. 242
      src/pages/index/index.vue
  16. 62
      src/pages/index/shoppage/financialAssistance.vue
  17. 85
      src/pages/index/shoppage/interactiveDetail.vue
  18. 61
      src/pages/index/shoppage/interactiveZone.vue
  19. 28
      src/pages/index/shoppage/jrbDetail.vue
  20. 58
      src/pages/index/shoppage/makeAssistance.vue
  21. 44
      src/pages/index/shoppage/mediaDetail.vue
  22. 83
      src/pages/index/shoppage/mediaHelp.vue
  23. 225
      src/pages/index/shoppage/mtbmakeMessage.vue
  24. 44
      src/pages/index/shoppage/shopHelp.vue
  25. 30
      src/pages/index/shoppage/shophelpDetail.vue
  26. 63
      src/pages/index/specialSubject.vue
  27. 37
      src/pages/index/tabsComm.vue
  28. 37
      src/pages/index/ztdetail.vue
  29. 64
      src/pages/learningCenter/detail.vue
  30. 142
      src/pages/learningCenter/index.vue
  31. 40
      src/pages/learningCenter/useTimeDiff.js
  32. 18
      src/pages/login/login.vue
  33. 117
      src/pages/memberCenter/index.vue
  34. 125
      src/pages/memberCenter/inpart.vue
  35. 31
      src/pages/mine/associatedDetail.vue
  36. 26
      src/pages/mine/associatedEnterprise.vue
  37. 93
      src/pages/mine/completeInformation.vue
  38. 49
      src/pages/mine/index.vue
  39. 57
      src/pages/mine/myApplication.vue
  40. 15
      src/pages/mine/myCourses.vue
  41. 110
      src/pages/mine/porsonalinfo.vue
  42. BIN
      src/static/img/aiback.png
  43. BIN
      src/static/img/aiimg.png
  44. BIN
      src/static/img/hdzq.png
  45. BIN
      src/static/img/xzs.png
  46. BIN
      src/static/tabbar/index_select.png
  47. 4
      src/store/user.ts
  48. 8
      src/utils/http.ts

41
package-lock.json

@ -28,6 +28,7 @@
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
"echarts": "^5.5.0", "echarts": "^5.5.0",
"pinia": "2.0.36", "pinia": "2.0.36",
"pnpm": "^10.14.0",
"sass": "^1.63.2", "sass": "^1.63.2",
"uview-plus": "^3.4.9", "uview-plus": "^3.4.9",
"vue": "^3.2.45", "vue": "^3.2.45",
@ -51,7 +52,6 @@
"eslint-plugin-prettier": "^5.0.0", "eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-vue": "^9.16.1", "eslint-plugin-vue": "^9.16.1",
"feng-uniapp-exploit": "^1.0.2", "feng-uniapp-exploit": "^1.0.2",
"husky": "^8.0.0",
"pinia-plugin-unistorage": "^0.0.17", "pinia-plugin-unistorage": "^0.0.17",
"prettier": "^3.0.0", "prettier": "^3.0.0",
"sass-loader": "^10.4.1", "sass-loader": "^10.4.1",
@ -7431,20 +7431,6 @@
"node": ">=10.17.0" "node": ">=10.17.0"
} }
}, },
"node_modules/husky": {
"version": "8.0.3",
"dev": true,
"license": "MIT",
"bin": {
"husky": "lib/bin.js"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/sponsors/typicode"
}
},
"node_modules/iconv-lite": { "node_modules/iconv-lite": {
"version": "0.4.24", "version": "0.4.24",
"dev": true, "dev": true,
@ -9840,6 +9826,22 @@
"node": ">=4.0.0" "node": ">=4.0.0"
} }
}, },
"node_modules/pnpm": {
"version": "10.14.0",
"resolved": "https://registry.npmjs.org/pnpm/-/pnpm-10.14.0.tgz",
"integrity": "sha512-rSenlkG0nD5IGhaoBbqnGBegS74Go40X5g4urug/ahRsamiBJfV5LkjdW6MOfaUqXNpMOZK5zPMz+c4iOvhHSA==",
"license": "MIT",
"bin": {
"pnpm": "bin/pnpm.cjs",
"pnpx": "bin/pnpx.cjs"
},
"engines": {
"node": ">=18.12"
},
"funding": {
"url": "https://opencollective.com/pnpm"
}
},
"node_modules/possible-typed-array-names": { "node_modules/possible-typed-array-names": {
"version": "1.1.0", "version": "1.1.0",
"dev": true, "dev": true,
@ -17687,10 +17689,6 @@
"version": "2.1.0", "version": "2.1.0",
"dev": true "dev": true
}, },
"husky": {
"version": "8.0.3",
"dev": true
},
"iconv-lite": { "iconv-lite": {
"version": "0.4.24", "version": "0.4.24",
"dev": true, "dev": true,
@ -19191,6 +19189,11 @@
"pngjs": { "pngjs": {
"version": "3.4.0" "version": "3.4.0"
}, },
"pnpm": {
"version": "10.14.0",
"resolved": "https://registry.npmjs.org/pnpm/-/pnpm-10.14.0.tgz",
"integrity": "sha512-rSenlkG0nD5IGhaoBbqnGBegS74Go40X5g4urug/ahRsamiBJfV5LkjdW6MOfaUqXNpMOZK5zPMz+c4iOvhHSA=="
},
"possible-typed-array-names": { "possible-typed-array-names": {
"version": "1.1.0", "version": "1.1.0",
"dev": true "dev": true

3
package.json

@ -42,7 +42,6 @@
"preinstall": "node ./auto/preinstall.js", "preinstall": "node ./auto/preinstall.js",
"lint": "eslint --ext .ts,.js,.vue ./src", "lint": "eslint --ext .ts,.js,.vue ./src",
"fix": "eslint --fix --ext .ts,.js,.vue ./src", "fix": "eslint --fix --ext .ts,.js,.vue ./src",
"prepare": "husky install",
"rm": "rm -rf node_modules package-lock.json pnpm-lock.yaml && pnpm install" "rm": "rm -rf node_modules package-lock.json pnpm-lock.yaml && pnpm install"
}, },
"dependencies": { "dependencies": {
@ -65,6 +64,7 @@
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
"echarts": "^5.5.0", "echarts": "^5.5.0",
"pinia": "2.0.36", "pinia": "2.0.36",
"pnpm": "^10.14.0",
"sass": "^1.63.2", "sass": "^1.63.2",
"uview-plus": "^3.4.9", "uview-plus": "^3.4.9",
"vue": "^3.2.45", "vue": "^3.2.45",
@ -88,7 +88,6 @@
"eslint-plugin-prettier": "^5.0.0", "eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-vue": "^9.16.1", "eslint-plugin-vue": "^9.16.1",
"feng-uniapp-exploit": "^1.0.2", "feng-uniapp-exploit": "^1.0.2",
"husky": "^8.0.0",
"pinia-plugin-unistorage": "^0.0.17", "pinia-plugin-unistorage": "^0.0.17",
"prettier": "^3.0.0", "prettier": "^3.0.0",
"sass-loader": "^10.4.1", "sass-loader": "^10.4.1",

10
src/api/index.ts

@ -37,7 +37,7 @@ export function activityList(data:any) {
export function activityInfo(id: string) { export function activityInfo(id: string) {
return request.http({ return request.http({
url: '/api/huiqitong/activity_info/' + id, url: '/api/huiqitong/activity_info/' + id,
method: 'GET', method: 'GET'
}) })
} }
@ -50,10 +50,11 @@ export function specialInfo(id: string) {
} }
//专题内容列表 //专题内容列表
export function specialList(id: string) { export function specialList(data: any) {
return request.http({ return request.http({
url: '/api/huiqitong/special_list?special_id=1&page=1&limit=10', url: '/api/huiqitong/special_list',
method: 'GET' method: 'GET',
data
}) })
} }
@ -73,4 +74,3 @@ export function ai(data: any) {
data data
}) })
} }

7
src/api/learningCenter.ts

@ -69,3 +69,10 @@ export function isCollect(data:any) {
}) })
} }
//学习中心分类
export function studyCenterCategory() {
return request.http({
url: '/api/huiqitong/study_center_category',
method: 'GET'
})
}

4
src/api/memberCenter.ts

@ -38,8 +38,6 @@ export function memberApply(data:any) {
export function myMemberApply() { export function myMemberApply() {
return request.http({ return request.http({
url: '/api/huiqitong/my_member_apply', url: '/api/huiqitong/my_member_apply',
method: 'POST', method: 'POST'
}) })
} }

1
src/api/mine.ts

@ -24,4 +24,3 @@ export function updataImage(data:any) {
data data
}) })
} }

7
src/api/shop.ts

@ -21,7 +21,7 @@ export function storeList(data:any) {
export function storeInfo(id: string) { export function storeInfo(id: string) {
return request.http({ return request.http({
url: '/api/huiqitong/store_info/' + id, url: '/api/huiqitong/store_info/' + id,
method: 'GET', method: 'GET'
}) })
} }
@ -134,9 +134,6 @@ export function isLikes(data:any) {
export function postsInfo(id: any) { export function postsInfo(id: any) {
return request.http({ return request.http({
url: '/api/huiqitong/posts/info/' + id, url: '/api/huiqitong/posts/info/' + id,
method: 'GET', method: 'GET'
}) })
} }

6
src/api/user.ts

@ -17,14 +17,12 @@ export interface dateListtype extends listType {
export function infoForOpenid() { export function infoForOpenid() {
return request.http({ return request.http({
url: '/api/huiqitong/member/info', url: '/api/huiqitong/member/info',
method: 'GET', method: 'GET'
}) })
} }
export function logout() { export function logout() {
return request.http({ return request.http({
url: '/api/huiqitong/logout', url: '/api/huiqitong/logout',
method: 'PUT', method: 'PUT'
}) })
} }

20
src/components/zh-scroll/interface.ts

@ -1,16 +1,16 @@
/* 左右联动props */ /* 左右联动props */
export interface ICateItem { export interface ICateItem {
id: number; id: number
name: string; name: string
icon: string; icon: string
goods_list: IGood[]; goods_list: IGood[]
[key: string]: any; [key: string]: any
} }
export interface IGood { export interface IGood {
id: number; id: number
content: string; content: string
name: string; name: string
images: string; images: string
[key: string]: any; [key: string]: any
} }

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

@ -2,17 +2,20 @@
<view class="zh-wrapper"> <view class="zh-wrapper">
<scroll-view class="menus" :scroll-into-view="menuScrollIntoView" scroll-with-animation scroll-y> <scroll-view class="menus" :scroll-into-view="menuScrollIntoView" scroll-with-animation scroll-y>
<view class="wrapper"> <view class="wrapper">
<view class="menu" :id="`menu-${item.id}`" :class="{'current': item.id == curCateId}" <view
v-for="(item, index) in goods" :key="index" @tap="handleMenuTap(item.id)"> class="menu"
<view class="changeicon" v-if="item.id == curCateId"> :id="`menu-${item.id}`"
:class="{ current: item.id == curCateId }"
</view> v-for="(item, index) in goods"
:key="index"
@tap="handleMenuTap(item.id)"
>
<view class="changeicon" v-if="item.id == curCateId"></view>
<text class="menutitle">{{ item.name }}</text> <text class="menutitle">{{ item.name }}</text>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<scroll-view class="goods" scroll-with-animation scroll-y :scroll-top="cateScrollTop" <scroll-view class="goods" scroll-with-animation scroll-y :scroll-top="cateScrollTop" @scroll="handleGoodsScroll">
@scroll="handleGoodsScroll">
<view class="wrapper"> <view class="wrapper">
<view class="list"> <view class="list">
<!-- category begin --> <!-- category begin -->
@ -47,29 +50,29 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, nextTick, getCurrentInstance, watch } from "vue"; import { ref, nextTick, getCurrentInstance, watch } from 'vue'
import { ICateItem } from "./interface"; import { ICateItem } from './interface'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/') const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/')
const props = defineProps<{ const props = defineProps<{
scrollList: ICateItem[], scrollList: ICateItem[]
searchVal: string, searchVal: string
}>() }>()
const instance = getCurrentInstance(); const instance = getCurrentInstance()
const menuScrollIntoView = ref(""); const menuScrollIntoView = ref('')
const cateScrollTop = ref(0); const cateScrollTop = ref(0)
// //
const sizeCalcState = ref(false); const sizeCalcState = ref(false)
const goods = ref<ICateItem[]>([]); const goods = ref<ICateItem[]>([])
const curCateId = ref(0); const curCateId = ref(0)
watch( watch(
() => props.scrollList, () => props.scrollList,
newVal => { (newVal) => {
goods.value = newVal; goods.value = newVal
curCateId.value = goods.value[0]?.id curCateId.value = goods.value[0]?.id
nextTick(() => { nextTick(() => {
if (newVal && newVal.length > 0) { if (newVal && newVal.length > 0) {
calcSize(); calcSize()
} }
}) })
}, },
@ -88,17 +91,14 @@
curCateId.value = id curCateId.value = id
nextTick(() => { nextTick(() => {
cateScrollTop.value = goods.value.find(item => item.id == id).top cateScrollTop.value = goods.value.find((item) => item.id == id).top
}) })
} }
function fuzzyMatchGoods(goodsArray, searchTerm) { function fuzzyMatchGoods(goodsArray, searchTerm) {
const term = searchTerm.trim().toLowerCase(); const term = searchTerm.trim().toLowerCase()
return goodsArray.filter(goodsItem => console.log(goodsArray)
goodsItem.children.some(child => return goodsArray.filter((goodsItem) => goodsItem.list.some((child) => (child.title?.toLowerCase() ?? '').includes(term)))
(child.name?.toLowerCase() ?? '').includes(term)
)
);
} }
// //
@ -108,8 +108,8 @@
} }
try { try {
nextTick(() => { nextTick(() => {
const arr = fuzzyMatchGoods(goods.value,search) const arr = fuzzyMatchGoods(goods.value, props.searchVal)
console.log(arr[0]); console.log(arr[0])
curCateId.value = arr[0]?.id curCateId.value = arr[0]?.id
cateScrollTop.value = arr[0].top cateScrollTop.value = arr[0].top
}) })
@ -127,7 +127,7 @@
} }
const { scrollTop } = detail const { scrollTop } = detail
// scrollTop + 1scrolltop // scrollTop + 1scrolltop
let tabs = goods.value.filter(item=> item.top <= (scrollTop + 1)).reverse() let tabs = goods.value.filter((item) => item.top <= scrollTop + 1).reverse()
if (tabs.length > 0) { if (tabs.length > 0) {
curCateId.value = tabs[0].id curCateId.value = tabs[0].id
} }
@ -136,15 +136,18 @@
function calcSize() { function calcSize() {
let h = 10 let h = 10
goods.value.forEach(item => { goods.value.forEach((item) => {
let view = uni.createSelectorQuery().in(instance).select(`#cate-${item.id}`) let view = uni.createSelectorQuery().in(instance).select(`#cate-${item.id}`)
view.fields({ view.fields(
{
size: true size: true
}, (data: any) => { },
(data: any) => {
item.top = h item.top = h
h += data.height h += data.height
item.bottom = h item.bottom = h
}).exec() }
).exec()
}) })
sizeCalcState.value = true sizeCalcState.value = true
} }
@ -174,7 +177,7 @@
width: 200rpx; width: 200rpx;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
background-color: #F1F3F9; background-color: #f1f3f9;
.wrapper { .wrapper {
width: 100%; width: 100%;
@ -186,7 +189,7 @@
justify-content: flex-start; justify-content: flex-start;
padding: 30rpx 20rpx; padding: 30rpx 20rpx;
font-size: 26rpx; font-size: 26rpx;
color: #3D3D3D; color: #3d3d3d;
position: relative; position: relative;
&:nth-last-child(1) { &:nth-last-child(1) {
@ -195,7 +198,7 @@
&.current { &.current {
background-color: #ffffff; background-color: #ffffff;
color: #0072FF; color: #0072ff;
} }
.dot { .dot {
@ -221,14 +224,14 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #3D3D3D; color: #3d3d3d;
} }
.changeicon { .changeicon {
width: 20rpx; width: 20rpx;
height: 40rpx; height: 40rpx;
border-radius: 0rpx 32rpx 32rpx 0rpx; border-radius: 0rpx 32rpx 32rpx 0rpx;
/* 蓝色渐变 */ /* 蓝色渐变 */
background: linear-gradient(0deg, #007FFF 0%, #99CCFF 100%); background: linear-gradient(0deg, #007fff 0%, #99ccff 100%);
position: fixed; position: fixed;
left: 0; left: 0;
} }
@ -259,7 +262,7 @@
padding: 10rpx 0; padding: 10rpx 0;
display: flex; display: flex;
align-items: center; align-items: center;
color: #0C092A; color: #0c092a;
.icon { .icon {
width: 38rpx; width: 38rpx;
@ -274,7 +277,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0c092a;
} }
} }
} }
@ -300,7 +303,6 @@
overflow: hidden; /* 隐藏溢出内容 */ overflow: hidden; /* 隐藏溢出内容 */
white-space: nowrap; /* 禁止换行 */ white-space: nowrap; /* 禁止换行 */
text-overflow: ellipsis; /* 显示省略号 */ text-overflow: ellipsis; /* 显示省略号 */
} }
.icon { .icon {
width: 38rpx; width: 38rpx;

8
src/main.ts

@ -12,13 +12,15 @@ export function createApp() {
app.use(fengUniappExploit) app.use(fengUniappExploit)
app.use(store) app.use(store)
app.mixin({ app.mixin({
onShareAppMessage() { // 分享给好友 onShareAppMessage() {
// 分享给好友
return { return {
title: '惠企帮', title: '惠企帮',
path: '/pages/index/index', path: '/pages/index/index'
} }
}, },
onShareTimeline() { // 分享朋友圈 onShareTimeline() {
// 分享朋友圈
return { title: '惠企帮' } return { title: '惠企帮' }
} }
}) })

68
src/pages/index/ChatDialog.vue

@ -3,9 +3,22 @@
<view class="dialog-mask" @click="close">×</view> <view class="dialog-mask" @click="close">×</view>
<view class="dialog-content" :style="{ height: isdx ? '88%' : '686rpx' }"> <view class="dialog-content" :style="{ height: isdx ? '88%' : '686rpx' }">
<view class="butss"> <view class="butss">
<image style="width: 40rpx;height: 40rpx;" @click="dxclick" :src="isdx?'/static/img/sx.png':'/static/img/fd.png'" mode=""></image> <image
style="width: 152rpx; margin-left: 20rpx; top: -120rpx; left: -2rpx; position: absolute"
src="@/static/img/aiimg.png"
mode="widthFix"
></image>
<view style="display: flex; align-items: center">
<view style="font-size: 50rpx; color: #007fff" @click="close">×</view>
<image
style="width: 40rpx; height: 40rpx; margin-left: 40rpx"
@click="dxclick"
:src="isdx ? '/static/img/sx.png' : '/static/img/fd.png'"
mode=""
></image>
</view> </view>
<scroll-view class="message-box" scroll-y> </view>
<scroll-view class="message-box" scroll-y :style="{ height: isdx ? '80%' : '70%' }">
<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]">
<image class="aicon" src="@/static/img/aiicon.png" mode=""></image> <image class="aicon" src="@/static/img/aiicon.png" mode=""></image>
@ -17,7 +30,7 @@
</view> </view>
<view class="cnxw" v-else> <view class="cnxw" v-else>
<view class="message assistant"> <view class="message assistant">
<image class="aicon" src="@/static/img/aiicon.png" mode=""></image> <image class="aicon" src="@/static/img/aiicon.png" mode="widthFix"></image>
<view class="bubble"> <view class="bubble">
<text class="cwtitle">猜你想问</text> <text class="cwtitle">猜你想问</text>
<u-line color="#99CCFF" margin="20rpx 0"></u-line> <u-line color="#99CCFF" margin="20rpx 0"></u-line>
@ -32,8 +45,7 @@
<button @click="send" :disabled="loading">发送</button> <button @click="send" :disabled="loading">发送</button>
</view> </view>
<view class="inputbox" @click="showfirst = true" v-else> <view class="inputbox" @click="showfirst = true" v-else>
<image style="width: 28rpx;height: 26rpx;margin-right: 8rpx;" src="@/static/img/daan.png" mode=""> <image style="width: 28rpx; height: 26rpx; margin-right: 8rpx" src="@/static/img/daan.png" mode=""></image>
</image>
找不到答案点此提问 找不到答案点此提问
</view> </view>
</view> </view>
@ -41,17 +53,13 @@
</template> </template>
<script setup> <script setup>
import { import { ref } from 'vue'
ref import { ai } from '@/api/index'
} from 'vue'
import {
ai
} from '@/api/index'
const showfirst = ref(false) const showfirst = ref(false)
const props = defineProps({ const props = defineProps({
visible: Boolean, visible: Boolean
}) })
const emit = defineEmits(['close']) const emit = defineEmits(['close'])
@ -75,10 +83,8 @@
loading.value = true loading.value = true
try { try {
const { const { data } = await ai({
data messages: question
} = await ai({
"messages": question
}) })
// AI // AI
@ -127,9 +133,9 @@
position: absolute; position: absolute;
width: 100%; width: 100%;
bottom: 0; bottom: 0;
background: #E7F3FF; background: #e7f3ff;
box-sizing: border-box; box-sizing: border-box;
border: 2rpx solid #FFFFFF; border: 2rpx solid #ffffff;
box-shadow: 0rpx -30rpx 20rpx 0rpx rgba(0, 0, 0, 0.2); box-shadow: 0rpx -30rpx 20rpx 0rpx rgba(0, 0, 0, 0.2);
border-radius: 96rpx 0rpx 0rpx 0rpx; border-radius: 96rpx 0rpx 0rpx 0rpx;
display: flex; display: flex;
@ -137,7 +143,6 @@
} }
.message-box { .message-box {
height: 85%;
padding: 30rpx 30rpx 10rpx 30rpx; padding: 30rpx 30rpx 10rpx 30rpx;
box-sizing: border-box; box-sizing: border-box;
} }
@ -175,12 +180,11 @@
.assistant { .assistant {
.aicon { .aicon {
width: 74rpx; width: 64rpx;
height: 64rpx;
} }
.bubble { .bubble {
background: #FFFFFF; background: #ffffff;
margin-left: 20rpx; margin-left: 20rpx;
text { text {
@ -199,12 +203,15 @@
} }
.input-box { .input-box {
height: 15%; width: 100%;
position: fixed;
bottom: 0;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 20rpx; padding: 25rpx;
box-sizing: border-box;
border-radius: 40rpx 40rpx 0rpx 0rpx; border-radius: 40rpx 40rpx 0rpx 0rpx;
background: #FFFFFF; background: #ffffff;
box-shadow: 0rpx -2rpx 12rpx 0rpx rgba(0, 0, 0, 0.05); box-shadow: 0rpx -2rpx 12rpx 0rpx rgba(0, 0, 0, 0.05);
} }
@ -231,7 +238,7 @@
} }
.cwtitle { .cwtitle {
color: #007FFF !important; color: #007fff !important;
} }
.cwtxt { .cwtxt {
@ -254,7 +261,7 @@
justify-content: center; justify-content: center;
padding: 20rpx; padding: 20rpx;
border-radius: 40rpx 40rpx 0rpx 0rpx; border-radius: 40rpx 40rpx 0rpx 0rpx;
background: #FFFFFF; background: #ffffff;
box-shadow: 0rpx -2rpx 12rpx 0rpx rgba(0, 0, 0, 0.05); box-shadow: 0rpx -2rpx 12rpx 0rpx rgba(0, 0, 0, 0.05);
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 24rpx; font-size: 24rpx;
@ -265,11 +272,14 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #007FFF; color: #007fff;
} }
.butss { .butss {
width: 100%; width: 100%;
text-align: end; display: flex;
align-items: center;
justify-content: flex-end;
padding: 20rpx; padding: 20rpx;
} }
</style> </style>

26
src/pages/index/active/activeDetail.vue

@ -1,5 +1,5 @@
<template> <template>
<image style="width: 100%;height: 352rpx;" :src="baseurl + detaildata.index_pic" mode=""></image> <image style="width: 100%; height: 352rpx" :src="baseurl + detaildata.index_pic" mode=""></image>
<view class="container"> <view class="container">
<text class="headtxt">{{ detaildata.title }}</text> <text class="headtxt">{{ detaildata.title }}</text>
<text class="address">活动地点{{ detaildata.address }}</text> <text class="address">活动地点{{ detaildata.address }}</text>
@ -22,15 +22,9 @@
</template> </template>
<script setup> <script setup>
import { import { onLoad } from '@dcloudio/uni-app'
onLoad import { ref } from 'vue'
} from '@dcloudio/uni-app'; import { activityInfo } from '@/api/index'
import {
ref
} from 'vue';
import {
activityInfo
} from '@/api/index'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/') const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/')
const detaildata = ref({}) const detaildata = ref({})
@ -46,7 +40,7 @@
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
background-color: #FFFFFF; background-color: #ffffff;
height: calc(100vh - 352rpx); height: calc(100vh - 352rpx);
width: 100%; width: 100%;
padding: 40rpx 40rpx 0 40rpx; padding: 40rpx 40rpx 0 40rpx;
@ -64,7 +58,7 @@
height: 32rpx; height: 32rpx;
border-radius: 0rpx 32rpx 32rpx 0rpx; border-radius: 0rpx 32rpx 32rpx 0rpx;
/* 蓝色渐变 */ /* 蓝色渐变 */
background: linear-gradient(0deg, #007FFF 0%, #99CCFF 100%); background: linear-gradient(0deg, #007fff 0%, #99ccff 100%);
} }
.title { .title {
@ -78,7 +72,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #0072FF; color: #0072ff;
} }
} }
@ -90,7 +84,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0c092a;
} }
.address { .address {
@ -142,7 +136,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #007FFF color: #007fff;
} }
} }
} }
@ -152,7 +146,7 @@
font-weight: normal; font-weight: normal;
line-height: 80rpx; line-height: 80rpx;
letter-spacing: normal; letter-spacing: normal;
color: #A1A1A1; color: #a1a1a1;
} }
} }
</style> </style>

52
src/pages/index/active/activelist.vue

@ -1,21 +1,31 @@
<template> <template>
<view class="container"> <view class="container">
<u-search @search="search" @clickIcon="clickIcon" @clear="clear" shape="square" placeholder="请输入搜索内容" <u-search
placeholderColor="#A9D4FF" v-model="keyword" searchIcon="/static/img/search.png" searchIconSize="14" @search="search"
:showAction="false" height="40" margin="40rpx 24rpx 24rpx 24rpx" bgColor="#FFFFFF"></u-search> @clickIcon="clickIcon"
@clear="clear"
shape="square"
placeholder="请输入搜索内容"
placeholder-color="#A9D4FF"
v-model="keyword"
search-icon="/static/img/search.png"
search-icon-size="14"
:show-action="false"
height="40"
margin="40rpx 24rpx 24rpx 24rpx"
bg-color="#FFFFFF"
></u-search>
<scroll-view scroll-y="auto" class="main" @scrolltolower="onloadmore"> <scroll-view scroll-y="auto" class="main" @scrolltolower="onloadmore">
<view class="ztone" v-for="(item, index) in ztList" :key="index" @click="godetail(item.id)"> <view class="ztone" v-for="(item, index) in ztList" :key="index" @click="godetail(item.id)">
<image style="width: 150rpx;height: 150rpx;border-radius: 8rpx;flex: 1;" :src="baseurl+item.index_pic" mode=""> <image style="width: 150rpx; height: 150rpx; border-radius: 8rpx; flex: 1" :src="baseurl + item.index_pic" mode=""></image>
</image>
<view class="rightpart"> <view class="rightpart">
<view class="splace"> <view class="splace">
{{ item.title }} {{ item.title }}
</view> </view>
<view class="titlepart"> <view class="titlepart">
<text class="title">{{ item.activity_time }}</text> <text class="title">{{ item.activity_time }}</text>
<image style="width: 32rpx;height: 44rpx;" src="@/static/img/Icon.png" mode="aspectFill"> <image style="width: 32rpx; height: 44rpx" src="@/static/img/Icon.png" mode="aspectFill"></image>
</image>
</view> </view>
<view class="ms"> <view class="ms">
{{ item.address }} {{ item.address }}
@ -27,17 +37,14 @@
</template> </template>
<script setup> <script setup>
import { import { ref } from 'vue'
ref
} from 'vue';
import { activityList } from '@/api/index' import { activityList } from '@/api/index'
import { onShow } from '@dcloudio/uni-app'; import { onShow } from '@dcloudio/uni-app'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/') const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/')
// //
const keyword = ref(''); const keyword = ref('')
const page = ref(1) const page = ref(1)
const pagesize = ref(7) const pagesize = ref(7)
@ -64,9 +71,9 @@
const onloadmore = async () => { const onloadmore = async () => {
page.value++ page.value++
let params = { let params = {
'title': keyword.value, title: keyword.value,
'page': page.value, page: page.value,
'limit': pagesize.value limit: pagesize.value
} }
await activityList(params).then((res) => { await activityList(params).then((res) => {
ztList.value = [...ztList.value, ...res.data.data] ztList.value = [...ztList.value, ...res.data.data]
@ -81,9 +88,9 @@
const getActivityList = async (name, page, limit) => { const getActivityList = async (name, page, limit) => {
let params = { let params = {
'title': name, title: name,
'page': page, page: page,
'limit': limit limit: limit
} }
await activityList(params).then((res) => { await activityList(params).then((res) => {
ztList.value = res.data.data ztList.value = res.data.data
@ -91,13 +98,14 @@
} }
onShow(async () => { onShow(async () => {
keyword.value = ''
await getActivityList('', 1, 7) await getActivityList('', 1, 7)
}) })
</script> </script>
<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: 100vh;
width: 100%; width: 100%;
overflow-y: hidden; overflow-y: hidden;
@ -116,7 +124,7 @@
margin-top: 20rpx; margin-top: 20rpx;
padding: 10rpx; padding: 10rpx;
border-radius: 8rpx; border-radius: 8rpx;
background: #FFFFFF; background: #ffffff;
box-sizing: border-box; box-sizing: border-box;
border: 2rpx solid rgba(0, 127, 255, 0.12); border: 2rpx solid rgba(0, 127, 255, 0.12);
@ -152,7 +160,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0c092a;
} }
.ms { .ms {

242
src/pages/index/index.vue

@ -1,29 +1,34 @@
<template> <template>
<u-navbar title="惠企帮" placeholder="true" bgColor="#F1F3F9" leftIcon="map" leftIconSize="24rpx" leftText="呼和浩特" <u-navbar
@leftClick="leftClick"> title="惠企帮"
</u-navbar> placeholder="true"
bg-color="#F1F3F9"
left-icon="map"
left-icon-size="24rpx"
left-text="呼和浩特"
@leftClick="leftClick"
></u-navbar>
<view class="container"> <view class="container">
<u-swiper :list="list5" @change="change" :autoplay="true" radius="0" height="260" keyName="pic_path" <u-swiper :list="list5" @change="change" :autoplay="true" radius="0" height="260" key-name="pic_path" @click="swiperClick">
@click="swiperClick" :displayMultipleItems="0">
<template #indicator> <template #indicator>
<view class="indicator"> <view class="indicator">
<view class="indicator__dot" v-for="(item, index) in list5" :key="index" <view
:class="index === current ? 'indicator__dotactive':''"> class="indicator__dot"
</view> v-for="(item, index) in list5"
:key="index"
:class="index === current ? 'indicator__dotactive' : ''"
></view>
</view> </view>
</template> </template>
</u-swiper> </u-swiper>
<view class="box"> <view class="box">
<image class="zuanti" :src="url + '/' + ztdata.home_img" mode="scaleToFill" @click="goZT(ztdata.id)"> <image class="zuanti" :src="url + '/' + ztdata.home_img" mode="scaleToFill" @click="goZT(ztdata.id)"></image>
</image>
<view class="titlebox"> <view class="titlebox">
<view class="left"> <view class="left">
<image style="width: 28rpx;height: 28rpx;" src="@/static/img/yaohuodong.png" mode=""></image> <image style="width: 28rpx; height: 28rpx" src="@/static/img/yaohuodong.png" mode=""></image>
<text class="text">要活动</text> <text class="text">最近活动</text>
</view>
<view class="more" @click="gohdList">
更多活动 >
</view> </view>
<view class="more" @click="gohdList">更多活动 ></view>
</view> </view>
<scroll-view class="scroll-view_H" scroll-x="true"> <scroll-view class="scroll-view_H" scroll-x="true">
@ -44,28 +49,28 @@
</scroll-view> </scroll-view>
<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="gokdb">
<text class="btext">开店帮</text> <text class="btext">开店帮</text>
<image style="height: 32px;width: 80rpx;" src="@/static/img/kdb.png" mode=""></image> <image style="height: 64rpx; width: 80rpx" src="@/static/img/kdb.png" mode=""></image>
</view> </view>
<view class="bangone2" @click="kfz"> <view class="bangone2" @click="kfz">
<text class="btext">企业帮</text> <text class="btext">企业帮</text>
<image style="height: 32px;width: 80rpx;" src="@/static/img/qyb.png" mode=""></image> <image style="height: 64rpx; width: 80rpx" src="@/static/img/qyb.png" mode=""></image>
</view> </view>
<view class="bangone3" @click="gojrb"> <view class="bangone3" @click="gojrb">
<text class="btext">金融帮</text> <text class="btext">金融帮</text>
<image style="height: 32px;width: 80rpx;" src="@/static/img/jrb.png" mode=""></image> <image style="height: 64rpx; width: 80rpx" src="@/static/img/jrb.png" mode=""></image>
</view> </view>
<view class="bangone4" @click="gomtb"> <view class="bangone4" @click="gomtb">
<text class="btext">媒体帮</text> <text class="btext">媒体帮</text>
<image style="height: 32px;width: 80rpx;" src="@/static/img/mtb.png" mode=""></image> <image style="height: 64rpx; width: 80rpx" src="@/static/img/mtb.png" mode=""></image>
</view> </view>
</view> </view>
</view> </view>
<view class="buttonCard"> <!-- <view class="buttonCard">
<view class="but" @click="kfz"> <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>
@ -82,67 +87,62 @@
<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>
</view> </view> -->
<view class="tjback">
<view class="titlebox"> <view class="titlebox">
<view class="left"> <view class="left">
<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 class="more" @click="gohyList">
更多会员 >
</view> </view>
<view class="more" @click="gohyList">更多会员 ></view>
</view> </view>
<view class="hylist"> <view class="hylist">
<tabsComm :tabsData="filterTabs" @tabChange="handleTabSelect" /> <tabsComm :tabs-data="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.slice(0,6)" :key="index" <view class="hyCard" v-for="(item, index) in hyList.slice(0, 6)" :key="index" @click="gohydetail(item.id)">
@click="gohydetail(item.id)">
<view class="left"> <view class="left">
<u-avatar :src="url+ '/' +item.head_pic" size="64"></u-avatar> <u-avatar :src="url + '/' + item.head_pic" size="45"></u-avatar>
<view class="textpart"> <view class="textpart">
<view class="namepart"> <view class="namepart">
<text class="name">{{ item.name }}</text> <text class="name">{{ item.name }}</text>
<view class="biaoq" <view
:style="{background: `linear-gradient(0deg, ${item.member_tag_color} 0%, #dcdcdc70 100%)`}"> class="biaoq"
:style="{ background: `linear-gradient(0deg, ${item.member_tag_color} 0%, #dcdcdc70 100%)` }"
>
{{ item.member_tag_title }} {{ item.member_tag_title }}
</view> </view>
</view> </view>
<text class="company">{{ item.enterprise ? item.enterprise[0].title : '无' }}</text> <text class="company">{{ item.enterprise ? item.enterprise[0].title : '无' }}</text>
</view> </view>
</view> </view>
<image style="width: 48rpx;height: 48rpx;" src="@/static/img/Icon.png" mode=""></image> <image style="width: 48rpx; height: 48rpx" src="@/static/img/Icon.png" mode=""></image>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
</view> </view>
<liuDragButton :widthPx="'145rpx'"> </view>
<liuDragButton :width-px="'145rpx'">
<view class="showtitle" v-if="showtitle">
<view class="tit">
{{ showtitvalue }}
</view>
</view>
<!-- <image class="xzs" v-if="showtypeChat" src="@/static/img/aiicon.png" mode="aspectFit" <!-- <image class="xzs" v-if="showtypeChat" src="@/static/img/aiicon.png" mode="aspectFit"
@click="showtypeChat = false"></image> --> @click="showtypeChat = false"></image> -->
<image class="xzs1" :style="{right: showtypeChat?'-145rpx': '-30rpx'}" v-show="!showChat" <view class="xzs1" :style="{ right: showtypeChat ? '-170rpx' : '-30rpx' }" v-if="!showChat" @click="clickchat">小惠助手</view>
src="@/static/img/xzs.png" mode="widthFix" @click="clickchat"></image>
</liuDragButton> </liuDragButton>
<chatdialog :visible="showChat" @close="showChat = false" /> <chatdialog :visible="showChat" @close="showChat = false" />
</template> </template>
<script setup> <script setup>
import { import { ref, watch } from 'vue'
ref,
watch
} from 'vue'
import tabsComm from '../index/tabsComm.vue' import tabsComm from '../index/tabsComm.vue'
import { import { homeSpecial, bannerList, activityList } from '@/api/index'
homeSpecial,
bannerList,
activityList
} from '@/api/index'
import chatdialog from '@/pages/index/ChatDialog.vue' import chatdialog from '@/pages/index/ChatDialog.vue'
import { import { memberTagList, memberCenter } from '@/api/memberCenter'
memberTagList,
memberCenter
} from '@/api/memberCenter'
import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue' import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue'
@ -154,10 +154,12 @@
const current = ref(0) const current = ref(0)
const ztdata = ref({}) const ztdata = ref({})
const list5 = ref([]); const list5 = ref([])
const showChat = ref(false) const showChat = ref(false)
const showtitle = ref(false)
const showtypeChat = ref(true) const showtypeChat = ref(true)
const showtitvalue = ref('有问题可以问我哦!')
const change = (val) => { const change = (val) => {
current.value = val.current current.value = val.current
@ -168,7 +170,8 @@
}) })
} }
const hdList = ref([{ const hdList = ref([
{
pic: '/static/logo.png', pic: '/static/logo.png',
title: '小微企业培训小微企业培训', title: '小微企业培训小微企业培训',
time: '2025-02-14 12:00', time: '2025-02-14 12:00',
@ -192,28 +195,27 @@
time: '2025-02-14 12:00', time: '2025-02-14 12:00',
splace: '内蒙古呼和浩特科创中内蒙古呼和浩特科创中' splace: '内蒙古呼和浩特科创中内蒙古呼和浩特科创中'
} }
]) ])
const currentTab = ref(''); const currentTab = ref('')
// "" // ""
const filterTabs = ref([]); const filterTabs = ref([])
// //
const handleTabSelect = async (tab) => { const handleTabSelect = async (tab) => {
currentTab.value = tab; currentTab.value = tab
if (tab === 'all') { if (tab === 'all') {
await getMemberCenter('') await getMemberCenter('')
} else { } else {
await getMemberCenter(currentTab.value) await getMemberCenter(currentTab.value)
} }
// //
console.log('选择tab:', tab); console.log('选择tab:', tab)
}; }
const leftClick = () => { const leftClick = () => {
console.log(111); console.log(111)
} }
const hyList = ref([]) const hyList = ref([])
@ -277,10 +279,10 @@
const getMemberCenter = async (id) => { const getMemberCenter = async (id) => {
let params = { let params = {
'member_tag_id': id, member_tag_id: id,
'name': '', name: '',
'page': 1, page: 1,
'limit': 120 limit: 120
} }
await memberCenter(params).then((res) => { await memberCenter(params).then((res) => {
hyList.value = res.data.data hyList.value = res.data.data
@ -308,7 +310,6 @@
} }
}) })
const kfz = () => { const kfz = () => {
uni.showToast({ uni.showToast({
title: '开发中。。。', title: '开发中。。。',
@ -329,7 +330,7 @@
} }
} }
let intervalId; let intervalId
function myPeriodicFunction() { function myPeriodicFunction() {
if (!showChat.value) { if (!showChat.value) {
@ -337,14 +338,29 @@
clickcount.value = 0 clickcount.value = 0
} }
} }
let intervalId1
function myPeriodicFunction1() {
showtitle.value = true
setTimeout(() => {
showtitle.value = false
showtitle.value = true
showtitvalue.value = '我是可以上下移动的呦!'
}, 4000)
setTimeout(() => {
showtitle.value = false
}, 8000)
}
onMounted(() => { onMounted(() => {
intervalId = setInterval(myPeriodicFunction, 5000); intervalId = setInterval(myPeriodicFunction, 3000)
}); intervalId1 = setInterval(myPeriodicFunction1, 120000)
})
onUnmounted(() => { onUnmounted(() => {
clearInterval(intervalId); clearInterval(intervalId)
}); clearInterval(intervalId1)
})
onLoad(async () => { onLoad(async () => {
// //
@ -353,12 +369,11 @@
currentTab.value = '' currentTab.value = ''
await getMemberCenter(currentTab.value) await getMemberCenter(currentTab.value)
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
background-color: #F1F3F9; background-color: #f1f3f9;
height: calc(100vh - 182rpx); height: calc(100vh - 182rpx);
padding-bottom: 90rpx; padding-bottom: 90rpx;
@ -396,7 +411,6 @@
background-color: rgba(255, 255, 255, 0.35); background-color: rgba(255, 255, 255, 0.35);
margin: 0 10rpx; margin: 0 10rpx;
transition: background-color 0.3s; transition: background-color 0.3s;
} }
.indicator__dotactive { .indicator__dotactive {
@ -405,10 +419,10 @@
} }
.box { .box {
margin-top: -70px; margin-top: -140rpx;
position: relative; position: relative;
border-radius: 85rpx 85rpx 0 0; border-radius: 85rpx 85rpx 0 0;
background-color: #F1F3F9; background-color: #f1f3f9;
padding: 0 24rpx; padding: 0 24rpx;
.zuanti { .zuanti {
@ -428,10 +442,11 @@
width: 248rpx; width: 248rpx;
height: 340rpx; height: 340rpx;
border-radius: 16rpx; border-radius: 16rpx;
background: #FFFFFF; background: #ffffff;
margin-right: 20rpx; margin-right: 20rpx;
.img { .img {
border-radius: 16rpx 16rpx 0 0;
width: 100%; width: 100%;
height: 196rpx; height: 196rpx;
} }
@ -444,7 +459,7 @@
font-size: 26rpx; font-size: 26rpx;
font-weight: 350; font-weight: 350;
/* 文本/正文 */ /* 文本/正文 */
color: #1D2129; color: #1d2129;
max-width: 180rpx; max-width: 180rpx;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
@ -487,7 +502,7 @@
box-sizing: border-box; box-sizing: border-box;
height: 366rpx; height: 366rpx;
border-radius: 24rpx; border-radius: 24rpx;
background-color: #FFFFFF; background-color: #ffffff;
.xdb { .xdb {
font-family: Source Han Sans; font-family: Source Han Sans;
@ -511,8 +526,8 @@
height: 108rpx; height: 108rpx;
border-radius: 24rpx; border-radius: 24rpx;
box-sizing: border-box; box-sizing: border-box;
border: 0.4rpx solid #007FFF; border: 0.4rpx solid #007fff;
background: #EDF5FF; background: #edf5ff;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
@ -523,8 +538,8 @@
height: 108rpx; height: 108rpx;
border-radius: 24rpx; border-radius: 24rpx;
box-sizing: border-box; box-sizing: border-box;
border: 0.4rpx solid #FF2228; border: 0.4rpx solid #ff2228;
background: #FFF1F3; background: #fff1f3;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
@ -536,8 +551,8 @@
height: 108rpx; height: 108rpx;
border-radius: 24rpx; border-radius: 24rpx;
box-sizing: border-box; box-sizing: border-box;
border: 0.4rpx solid #FD8702; border: 0.4rpx solid #fd8702;
background: #FFE7CE; background: #ffe7ce;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
@ -549,8 +564,8 @@
height: 108rpx; height: 108rpx;
border-radius: 24rpx; border-radius: 24rpx;
box-sizing: border-box; box-sizing: border-box;
border: 0.4rpx solid #08B4BD; border: 0.4rpx solid #08b4bd;
background: #E5FEFF; background: #e5feff;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
@ -565,7 +580,7 @@
text-align: center; text-align: center;
letter-spacing: normal; letter-spacing: normal;
/* 文本/正文 */ /* 文本/正文 */
color: #1A1A1A; color: #1a1a1a;
} }
} }
} }
@ -592,7 +607,7 @@
line-height: normal; line-height: normal;
letter-spacing: normal; letter-spacing: normal;
/* 文本/正文 */ /* 文本/正文 */
color: #1A1A1A; color: #1a1a1a;
margin-top: 8rpx; margin-top: 8rpx;
} }
} }
@ -604,16 +619,16 @@
justify-content: center; justify-content: center;
.hyCard { .hyCard {
border: 2rpx solid #f1f3f9;
margin-top: 24rpx; margin-top: 24rpx;
width: 100%; width: 100%;
height: 160rpx;
border-radius: 24rpx; border-radius: 24rpx;
background: #FFFFFF; background: #ffffff;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
box-sizing: border-box; box-sizing: border-box;
padding: 0 20rpx; padding: 20rpx 28rpx;
.left { .left {
display: flex; display: flex;
@ -632,17 +647,17 @@
.name { .name {
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 30rpx; font-size: 24rpx;
font-weight: 350; font-weight: 350;
line-height: 150%; line-height: 150%;
letter-spacing: normal; letter-spacing: normal;
/* 外部/Neutral/Black */ /* 外部/Neutral/Black */
color: #0C092A; color: #0c092a;
} }
.biaoq { .biaoq {
padding: 10rpx; padding: 10rpx;
height: 40.5rpx; height: 28rpx;
border-radius: 0rpx 4rpx 20rpx 0rpx; border-radius: 0rpx 4rpx 20rpx 0rpx;
margin-left: 16rpx; margin-left: 16rpx;
font-family: YouSheBiaoTiHei; font-family: YouSheBiaoTiHei;
@ -651,7 +666,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #FFFFFF; color: #ffffff;
text-shadow: 0rpx 4rpx 4rpx rgba(0, 0, 0, 0.2); text-shadow: 0rpx 4rpx 4rpx rgba(0, 0, 0, 0.2);
} }
} }
@ -672,8 +687,16 @@
} }
} }
.titlebox { .tjback {
margin-top: 40rpx; margin-top: 40rpx;
background: #ffffff;
border-radius: 24rpx;
padding: 20rpx 30rpx;
box-sizing: border-box;
width: 100%;
}
.titlebox {
margin-top: 20rpx;
width: 100%; width: 100%;
display: inline-flex; display: inline-flex;
justify-content: space-between; justify-content: space-between;
@ -705,13 +728,22 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #007FFF; color: #007fff;
} }
} }
.xzs1 { .xzs1 {
width: 250rpx; width: 298rpx;
height: 148rpx;
position: fixed; position: fixed;
background-image: url(@/static/img/xzs.png);
background-size: 100% 100%;
font-size: 32rpx;
color: #ffffff;
padding: 0 0 20rpx 90rpx;
display: flex;
align-items: center;
justify-content: center;
// top: 70%; // top: 70%;
} }
@ -721,4 +753,18 @@
// right: -24rpx; // right: -24rpx;
// top: 70%; // top: 70%;
} }
.showtitle {
position: relative;
top: -102rpx;
left: -137rpx;
background-image: url(@/static/img/aiback.png);
background-size: 100% 100%;
padding: 20rpx 10rpx;
.tit {
white-space: nowrap;
color: #2563eb;
font-size: 28rpx;
display: flex;
}
}
</style> </style>

62
src/pages/index/shoppage/financialAssistance.vue

@ -1,23 +1,32 @@
<template> <template>
<u-navbar title="金融帮" placeholder="true" bgColor="#F1F3F9" :autoBack="true"> <u-navbar title="金融帮" placeholder="true" bg-color="#F1F3F9" :auto-back="true"></u-navbar>
</u-navbar>
<view class="container"> <view class="container">
<u-search @search="search" @clickIcon="clickIcon" @clear="clear" shape="square" placeholder="请输入搜索内容" <u-search
placeholderColor="#A9D4FF" v-model="keyword" searchIcon="/static/img/search.png" searchIconSize="14" @search="search"
:showAction="false" height="40" margin="40rpx 24rpx 24rpx 24rpx" bgColor="#FFFFFF"></u-search> @clickIcon="clickIcon"
@clear="clear"
shape="square"
placeholder="请输入搜索内容"
placeholder-color="#A9D4FF"
v-model="keyword"
search-icon="/static/img/search.png"
search-icon-size="14"
:show-action="false"
height="40"
margin="40rpx 24rpx 24rpx 24rpx"
bg-color="#FFFFFF"
></u-search>
<view class="main"> <view class="main">
<scroll-view scroll-y="auto" class="hyonne" @scrolltolower="onloadmore"> <scroll-view scroll-y="auto" class="hyonne" @scrolltolower="onloadmore">
<view class="ztone" v-for="(item, index) in ztList" :key="index" @click="godetail(item.id)"> <view class="ztone" v-for="(item, index) in ztList" :key="index" @click="godetail(item.id)">
<image style="width: 150rpx;height: 150rpx;border-radius: 28rpx;flex: 1;" :src="baseurl+item.index_pic" mode=""> <image style="width: 150rpx; height: 150rpx; border-radius: 28rpx; flex: 1" :src="baseurl + item.index_pic" mode=""></image>
</image>
<view class="rightpart"> <view class="rightpart">
<view class="splace"> <view class="splace">
{{ item.bank }} {{ item.bank }}
</view> </view>
<view class="titlepart"> <view class="titlepart">
<text class="title">{{ item.name }}</text> <text class="title">{{ item.name }}</text>
<image style="width: 32rpx;height: 44rpx;" src="@/static/img/Icon.png" mode="aspectFill"> <image style="width: 32rpx; height: 44rpx" src="@/static/img/Icon.png" mode="aspectFill"></image>
</image>
</view> </view>
<view class="ms"> <view class="ms">
{{ item.branch }} {{ item.branch }}
@ -27,28 +36,23 @@
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
<liuDragButton :widthPx="'145rpx'"> <liuDragButton :width-px="'145rpx'">
<image class="hdzq" src="@/static/img/hdzq.png" mode="" @click="gohdzq"></image> <image class="hdzq" src="@/static/img/hdzq.png" mode="" @click="gohdzq"></image>
</liuDragButton> </liuDragButton>
</template> </template>
<script setup> <script setup>
import { import { ref } from 'vue'
ref import { financeList } from '@/api/shop'
} from 'vue';
import {
financeList
} from '@/api/shop'
import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue' import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/') const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/')
// //
const keyword = ref(''); const keyword = ref('')
const page = ref(1) const page = ref(1)
const pagesize = ref(6) const pagesize = ref(6)
const search = async (val) => { const search = async (val) => {
page.value = 1 page.value = 1
pagesize.value = 6 pagesize.value = 6
@ -83,9 +87,9 @@
const getfinanceList = async (name, page, limit) => { const getfinanceList = async (name, page, limit) => {
let params = { let params = {
'keyword': name, keyword: name,
'page': page, page: page,
'limit': limit limit: limit
} }
await financeList(params).then((res) => { await financeList(params).then((res) => {
ztList.value = res.data.data ztList.value = res.data.data
@ -95,9 +99,9 @@
const onloadmore = async () => { const onloadmore = async () => {
page.value++ page.value++
let params = { let params = {
'keyword': keyword.value, keyword: keyword.value,
'page': page.value, page: page.value,
'limit': pagesize.value limit: pagesize.value
} }
await financeList(params).then((res) => { await financeList(params).then((res) => {
ztList.value = [...ztList.value, ...res.data.data] ztList.value = [...ztList.value, ...res.data.data]
@ -111,7 +115,7 @@
<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: calc(100vh - 178rpx); height: calc(100vh - 178rpx);
width: 100%; width: 100%;
overflow-y: hidden; overflow-y: hidden;
@ -135,7 +139,7 @@
margin-top: 30rpx; margin-top: 30rpx;
padding: 30rpx; padding: 30rpx;
border-radius: 20rpx; border-radius: 20rpx;
background: #FFFFFF; background: #ffffff;
box-sizing: border-box; box-sizing: border-box;
border: 2rpx solid rgba(0, 127, 255, 0.12); border: 2rpx solid rgba(0, 127, 255, 0.12);
@ -181,7 +185,7 @@
line-height: 28rpx; line-height: 28rpx;
letter-spacing: normal; letter-spacing: normal;
/* 外部/Colors/Light/Base 3 */ /* 外部/Colors/Light/Base 3 */
color: #91919F; color: #91919f;
} }
} }
} }
@ -189,8 +193,8 @@
} }
.hdzq { .hdzq {
width: 182rpx; width: 212rpx;
height: 80rpx; height: 86rpx;
position: fixed; position: fixed;
right: 0; right: 0;
top: 70%; top: 70%;

85
src/pages/index/shoppage/interactiveDetail.vue

@ -1,12 +1,10 @@
<template> <template>
<u-navbar :title="'帖子详情'" placeholder="true" bgColor="#F1F3F9" :autoBack="true" /> <u-navbar :title="'帖子详情'" placeholder="true" bg-color="#F1F3F9" :auto-back="true" />
<view class="container"> <view class="container">
<scroll-view class="cardbox"> <scroll-view class="cardbox" style="max-height: 80vh" scroll-y="true">
<view class="dhone"> <view class="dhone">
<view class="head"> <view class="head">
<image style="height: 96rpx;width: 96rpx;border-radius: 50%;" <image style="height: 96rpx; width: 96rpx; border-radius: 50%" :src="baseurl + '/' + listdata.member_head_pic" mode=""></image>
:src="baseurl + '/' + listdata.member_head_pic" mode="">
</image>
<view class="namepart"> <view class="namepart">
<text class="name">{{ listdata.member_nickname }}</text> <text class="name">{{ listdata.member_nickname }}</text>
<text class="date">{{ listdata.create_time }}</text> <text class="date">{{ listdata.create_time }}</text>
@ -15,31 +13,38 @@
<text class="pl">{{ listdata.content }}</text> <text class="pl">{{ listdata.content }}</text>
<view class="bottom"> <view class="bottom">
<view class="left"> <view class="left">
<image style="width: 36rpx;height: 34rpx;" <image
style="width: 36rpx; height: 34rpx"
:src="listdata.is_like ? '/static/img/ydz.png' : '/static/img/dz.png'" :src="listdata.is_like ? '/static/img/ydz.png' : '/static/img/dz.png'"
@click="dzClick(listdata.is_like,listdata.posts_id)" mode=""> @click="dzClick(listdata.is_like, listdata.posts_id)"
</image> mode=""
></image>
<text class="value">{{ listdata.like_count }}</text> <text class="value">{{ listdata.like_count }}</text>
</view> </view>
<view class="right"> <view class="right">
<image style="width: 36rpx;height: 36rpx;" src="@/static/img/pl.png" mode=""></image> <image style="width: 36rpx; height: 36rpx" src="@/static/img/pl.png" mode=""></image>
<text class="value">{{ listdata.comment_count }}</text> <text class="value">{{ listdata.comment_count }}</text>
</view> </view>
</view> </view>
<scroll-view style="max-height: 60vh;" scroll-y="true" @scrolltolower="scrolltolower"> <scroll-view @scrolltolower="scrolltolower">
<view class="ypl" v-for="(item, index) in pllist" :key="index"> <view class="ypl" v-for="(item, index) in pllist" :key="index">
<view class="head"> <view class="head">
<view class="left"> <view class="left">
<image style="height: 40rpx;width: 40rpx;border-radius: 50%;" <image
:src="baseurl + '/' + item.member_head_pic" mode=""></image> style="height: 40rpx; width: 40rpx; border-radius: 50%"
:src="baseurl + '/' + item.member_head_pic"
mode=""
></image>
<text class="name">{{ item.member_nickname }}</text> <text class="name">{{ item.member_nickname }}</text>
</view> </view>
<view class="right"> <view class="right">
<text class="value">{{ item.like_count }}</text> <text class="value">{{ item.like_count }}</text>
<image style="width: 24rpx;height: 24rpx;margin-left: 8rpx;" <image
style="width: 24rpx; height: 24rpx; margin-left: 8rpx"
:src="item.is_like ? '/static/img/ydz.png' : '/static/img/dz.png'" :src="item.is_like ? '/static/img/ydz.png' : '/static/img/dz.png'"
@click="pldzClick(item.is_like,item.comments_id)" mode=""> @click="pldzClick(item.is_like, item.comments_id)"
</image> mode=""
></image>
</view> </view>
</view> </view>
<text class="pl">{{ item.content }}</text> <text class="pl">{{ item.content }}</text>
@ -48,25 +53,16 @@
</view> </view>
</scroll-view> </scroll-view>
<view class="plpart"> <view class="plpart">
<u-textarea class="textarea" v-model="plvalue" height="20" placeholder="请输入内容" autoHeight></u-textarea> <u-textarea class="textarea" v-model="plvalue" height="20" placeholder="请输入内容" auto-height></u-textarea>
<view class="butt" @click="pullmess">发布</view> <view class="butt" @click="pullmess">发布</view>
</view> </view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { import { onLoad } from '@dcloudio/uni-app'
onLoad import { ref } from 'vue'
} from '@dcloudio/uni-app'; import { postsInfo, commentsList, likesPosts, commentsPosts } from '@/api/shop'
import {
ref
} from 'vue';
import {
postsInfo,
commentsList,
likesPosts,
commentsPosts
} from '@/api/shop'
import useUserStore from '@/store/user' import useUserStore from '@/store/user'
const userStore = useUserStore() const userStore = useUserStore()
@ -154,7 +150,17 @@
await postsInfo(postsid.value).then((res) => { await postsInfo(postsid.value).then((res) => {
listdata.value = res.data listdata.value = res.data
}) })
await getplList() page.value = 1
limit.value = 6
await commentsList({
page: page.value,
limit: limit.value,
posts_id: postsid.value
}).then((res) => {
if (res.code === 1) {
pllist.value = res.data.data
}
})
} }
}) })
} }
@ -174,13 +180,12 @@
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
overflow-y: hidden; overflow-y: hidden;
background-color: #FFFFFF; background-color: #ffffff;
height: calc(100vh - 182rpx); height: calc(100vh - 182rpx);
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
.cardbox { .cardbox {
.dhone { .dhone {
margin-top: 30rpx; margin-top: 30rpx;
width: 100%; width: 100%;
@ -188,7 +193,7 @@
display: grid; display: grid;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
background: #FFFFFF; background: #ffffff;
.head { .head {
display: flex; display: flex;
@ -204,7 +209,7 @@
font-weight: 350; font-weight: 350;
line-height: 26rpx; line-height: 26rpx;
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0c092a;
} }
.date { .date {
@ -227,7 +232,7 @@
text-align: justify; text-align: justify;
/* 浏览器可能不支持 */ /* 浏览器可能不支持 */
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0c092a;
} }
.bottom { .bottom {
@ -276,7 +281,7 @@
.ypl { .ypl {
width: 100%; width: 100%;
border-radius: 8rpx; border-radius: 8rpx;
background: #F8F9FA; background: #f8f9fa;
padding: 24rpx; padding: 24rpx;
margin-top: 22rpx; margin-top: 22rpx;
@ -305,7 +310,6 @@
align-items: center; align-items: center;
.value { .value {
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 24rpx; font-size: 24rpx;
font-weight: 350; font-weight: 350;
@ -326,7 +330,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0c092a;
} }
} }
} }
@ -340,15 +344,16 @@
display: flex; display: flex;
align-items: center; align-items: center;
.textarea {} .textarea {
}
.butt { .butt {
margin-left: 10px; margin-left: 10px;
padding: 9px 8px; padding: 9px 8px;
box-sizing: border-box; box-sizing: border-box;
background-color: #5AC725; background-color: #5ac725;
border-radius: 5px; border-radius: 5px;
color: #FFFFFF; color: #ffffff;
} }
} }
</style> </style>

61
src/pages/index/shoppage/interactiveZone.vue

@ -1,12 +1,11 @@
<template> <template>
<u-navbar :title="'互动专区'" placeholder="true" bgColor="#F1F3F9" :autoBack="true" /> <u-navbar :title="'互动专区'" placeholder="true" bg-color="#F1F3F9" :auto-back="true" />
<view class="container"> <view class="container">
<u-tabs :list="list1" @click="click"></u-tabs> <u-tabs :list="list1" @click="click"></u-tabs>
<scroll-view class="cardbox" scroll-y="true" @scrolltolower="scrolltolower"> <scroll-view class="cardbox" scroll-y="true" @scrolltolower="scrolltolower">
<view class="dhone" v-for="(item, index) in datalist" :key="index"> <view class="dhone" v-for="(item, index) in datalist" :key="index">
<view class="head"> <view class="head">
<image style="height: 96rpx;width: 96rpx;border-radius: 50%;" :src="url + '/' + item.member_head_pic" mode=""> <image style="height: 96rpx; width: 96rpx; border-radius: 50%" :src="url + '/' + item.member_head_pic" mode=""></image>
</image>
<view class="namepart"> <view class="namepart">
<text class="name">{{ item.member_nickname }}</text> <text class="name">{{ item.member_nickname }}</text>
<text class="date">{{ item.create_time }}</text> <text class="date">{{ item.create_time }}</text>
@ -16,35 +15,44 @@
<view class="ypl" v-if="item.comments"> <view class="ypl" v-if="item.comments">
<view class="head"> <view class="head">
<view class="left"> <view class="left">
<image style="height: 40rpx;width: 40rpx;border-radius: 50%;" :src="url + '/' + item.comments?.member_head_pic" <image
mode=""></image> style="height: 40rpx; width: 40rpx; border-radius: 50%"
:src="url + '/' + item.comments?.member_head_pic"
mode=""
></image>
<text class="name">{{ item.comments?.member_nickname }}</text> <text class="name">{{ item.comments?.member_nickname }}</text>
</view> </view>
<view class="right"> <view class="right">
<text class="value">{{ item.comments?.like_count }}</text> <text class="value">{{ item.comments?.like_count }}</text>
<image style="width: 24rpx;height: 24rpx;margin-left: 8rpx;" :src="item.comments.is_like?'/static/img/ydz.png':'/static/img/dz.png'" <image
mode="" @click="pldzClick(item.posts_id,item.comments.is_like,item.comments.comments_id)"></image> style="width: 24rpx; height: 24rpx; margin-left: 8rpx"
:src="item.comments.is_like ? '/static/img/ydz.png' : '/static/img/dz.png'"
mode=""
@click="pldzClick(item.posts_id, item.comments.is_like, item.comments.comments_id)"
></image>
</view> </view>
</view> </view>
<text class="pl">{{ item.comments?.content }}</text> <text class="pl">{{ item.comments?.content }}</text>
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="left"> <view class="left">
<image style="width: 36rpx;height: 34rpx;" <image
:src="item.is_like?'/static/img/ydz.png':'/static/img/dz.png'" @click="dzClick(item.is_like,item.posts_id)" mode=""> style="width: 36rpx; height: 34rpx"
</image> :src="item.is_like ? '/static/img/ydz.png' : '/static/img/dz.png'"
@click="dzClick(item.is_like, item.posts_id)"
mode=""
></image>
<text class="value">{{ item.like_count }}</text> <text class="value">{{ item.like_count }}</text>
</view> </view>
<view class="right"> <view class="right">
<image style="width: 36rpx;height: 36rpx;" src="@/static/img/pl.png" mode="" <image style="width: 36rpx; height: 36rpx" src="@/static/img/pl.png" mode="" @click="godetail(item.posts_id)"></image>
@click="godetail(item.posts_id)"></image>
<text class="value">{{ item.comment_count }}</text> <text class="value">{{ item.comment_count }}</text>
</view> </view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<liuDragButton :widthPx="'145rpx'"> <liuDragButton :width-px="'145rpx'">
<image class="hdzq" src="@/static/img/fbhd.png" mode="" @click="goxzhdzq"></image> <image class="hdzq" src="@/static/img/fbhd.png" mode="" @click="goxzhdzq"></image>
</liuDragButton> </liuDragButton>
</template> </template>
@ -57,9 +65,9 @@
const url = ref(import.meta.env.VITE_APP_BASE_URL) const url = ref(import.meta.env.VITE_APP_BASE_URL)
// //
const list1 = reactive([{ const list1 = reactive([
{
name: '小店帮', name: '小店帮',
id: 1 id: 1
}, },
@ -75,8 +83,7 @@
name: '企业帮', name: '企业帮',
id: 4 id: 4
} }
]); ])
const typeid = ref(1) const typeid = ref(1)
// //
@ -87,7 +94,6 @@
await getpostsList() await getpostsList()
} }
const dzClick = (like, id) => { const dzClick = (like, id) => {
if (userStore.userInfo.moblie === undefined) { if (userStore.userInfo.moblie === undefined) {
uni.showToast({ uni.showToast({
@ -161,20 +167,17 @@
} }
} }
onLoad(async (e) => { onLoad(async (e) => {
page.value = 1 page.value = 1
datalist.value = [] datalist.value = []
await getpostsList() await getpostsList()
console.log(userStore.cometype); console.log(userStore.cometype)
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
background-color: #F1F3F9; background-color: #f1f3f9;
height: calc(100vh - 96px); height: calc(100vh - 96px);
overflow: hidden; overflow: hidden;
width: 100%; width: 100%;
@ -189,7 +192,7 @@
display: grid; display: grid;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
background: #FFFFFF; background: #ffffff;
.head { .head {
display: flex; display: flex;
@ -205,7 +208,7 @@
font-weight: 350; font-weight: 350;
line-height: 26rpx; line-height: 26rpx;
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0c092a;
} }
.date { .date {
@ -228,7 +231,7 @@
text-align: justify; text-align: justify;
/* 浏览器可能不支持 */ /* 浏览器可能不支持 */
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0c092a;
} }
.bottom { .bottom {
@ -277,7 +280,7 @@
.ypl { .ypl {
width: 100%; width: 100%;
border-radius: 8rpx; border-radius: 8rpx;
background: #F8F9FA; background: #f8f9fa;
padding: 24rpx; padding: 24rpx;
margin-top: 22rpx; margin-top: 22rpx;
@ -306,7 +309,6 @@
align-items: center; align-items: center;
.value { .value {
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 24rpx; font-size: 24rpx;
font-weight: 350; font-weight: 350;
@ -327,7 +329,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0c092a;
} }
} }
} }
@ -339,5 +341,4 @@
right: 0; right: 0;
top: 75%; top: 75%;
} }
</style> </style>

28
src/pages/index/shoppage/jrbDetail.vue

@ -1,11 +1,11 @@
<template> <template>
<u-navbar :title="'金融帮'" placeholder="true" bgColor="#F1F3F9" :autoBack="true" /> <u-navbar :title="'金融帮'" placeholder="true" bg-color="#F1F3F9" :auto-back="true" />
<view class="container"> <view class="container">
<view class="titlepart"> <view class="titlepart">
<view class="icon"></view> <view class="icon"></view>
<text class="title">产品说明</text> <text class="title">产品说明</text>
</view> </view>
<image style="width: 100%;height: 286rpx;margin-top: 40rpx;" :src="baseurl + listdata.index_pic" mode=""></image> <image style="width: 100%; height: 286rpx; margin-top: 40rpx" :src="baseurl + listdata.index_pic" mode=""></image>
<u-parse :content="listdata.content"></u-parse> <u-parse :content="listdata.content"></u-parse>
<view class="titlepart"> <view class="titlepart">
<view class="icon"></view> <view class="icon"></view>
@ -18,20 +18,14 @@
<view class="icon"></view> <view class="icon"></view>
<text class="title">微信二维码</text> <text class="title">微信二维码</text>
</view> </view>
<image style="width: 338rpx;height: 338rpx;margin-top: 28rpx;margin-left: 24%;" :src="baseurl+listdata.code_pic" mode=""></image> <image style="width: 338rpx; height: 338rpx; margin-top: 28rpx; margin-left: 24%" :src="baseurl + listdata.code_pic" mode=""></image>
</view> </view>
</template> </template>
<script setup> <script setup>
import { import { onLoad } from '@dcloudio/uni-app'
onLoad import { ref } from 'vue'
} from '@dcloudio/uni-app'; import { financeInfo } from '@/api/shop'
import {
ref
} from 'vue';
import {
financeInfo
} from '@/api/shop'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/') const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/')
@ -46,7 +40,7 @@
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
background-color: #FFFFFF; background-color: #ffffff;
height: calc(100vh - 182rpx); height: calc(100vh - 182rpx);
width: 100%; width: 100%;
padding: 40rpx 40rpx 0 40rpx; padding: 40rpx 40rpx 0 40rpx;
@ -60,7 +54,7 @@
height: 32rpx; height: 32rpx;
border-radius: 0rpx 32rpx 32rpx 0rpx; border-radius: 0rpx 32rpx 32rpx 0rpx;
/* 蓝色渐变 */ /* 蓝色渐变 */
background: linear-gradient(0deg, #007FFF 0%, #99CCFF 100%); background: linear-gradient(0deg, #007fff 0%, #99ccff 100%);
} }
.title { .title {
margin-left: 18rpx; margin-left: 18rpx;
@ -72,7 +66,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #0072FF; color: #0072ff;
} }
} }
.message { .message {
@ -85,7 +79,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #3D3D3D; color: #3d3d3d;
} }
.people { .people {
margin-top: 28rpx; margin-top: 28rpx;
@ -99,7 +93,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #3D3D3D; color: #3d3d3d;
} }
} }
} }

58
src/pages/index/shoppage/makeAssistance.vue

@ -2,23 +2,36 @@
<view class="boxhdzq"> <view class="boxhdzq">
<view class="xzzq"> <view class="xzzq">
<view class="left"> <view class="left">
<image style="width: 28rpx;height: 28rpx;" src="@/static/img/xzzq.png" mode=""></image> <image style="width: 28rpx; height: 28rpx" src="@/static/img/xzzq.png" mode=""></image>
<text class="txt">选择专区</text> <text class="txt">选择专区</text>
</view> </view>
<view class="right"> <view class="right">
<input style="text-align: end;" v-model="xzvalue" type="text" placeholder="请选择您要提问的专区" <input
placeholder-class="placlass" disabled @tap="showxz = true" /> style="text-align: end"
<u-action-sheet :actions="list" @select="selectClick" @close="showxz = false" :show="showxz" v-model="xzvalue"
closeOnClickOverlay="true"></u-action-sheet> type="text"
<image style="width: 16rpx;height: 28rpx;margin-left: 8rpx;" src="@/static/img/right.png" mode=""> placeholder="请选择您要提问的专区"
</image> placeholder-class="placlass"
disabled
@tap="showxz = true"
/>
<u-action-sheet
:actions="list"
@select="selectClick"
@close="showxz = false"
:show="showxz"
close-on-click-overlay="true"
></u-action-sheet>
<image style="width: 16rpx; height: 28rpx; margin-left: 8rpx" src="@/static/img/right.png" mode=""></image>
</view> </view>
</view> </view>
<u-textarea v-model="nrvalue" placeholder="请输入您的内容...." count autoHeight maxlength="200" height="266" <u-textarea v-model="nrvalue" placeholder="请输入您的内容...." count auto-height maxlength="200" height="266" border="none"></u-textarea>
border="none"></u-textarea>
<view class="buts"> <view class="buts">
<view class="button" @click="submit" <view
:style="nrvalue===''?'background: linear-gradient(90deg, rgba(0, 127, 255, 0.3) 0%, rgba(153, 204, 255, 0.3) 100%)':''"> class="button"
@click="submit"
:style="nrvalue === '' ? 'background: linear-gradient(90deg, rgba(0, 127, 255, 0.3) 0%, rgba(153, 204, 255, 0.3) 100%)' : ''"
>
发布 发布
</view> </view>
</view> </view>
@ -26,12 +39,11 @@
</template> </template>
<script setup> <script setup>
import { import { ref } from 'vue'
ref
} from 'vue';
import { addPosts } from '@/api/shop' import { addPosts } from '@/api/shop'
const list = ref([{ const list = ref([
{
name: '小店帮', name: '小店帮',
id: 1 id: 1
}, },
@ -47,7 +59,7 @@
name: '企业帮', name: '企业帮',
id: 4 id: 4
} }
]); ])
const showxz = ref(false) const showxz = ref(false)
const xzvalue = ref('') const xzvalue = ref('')
@ -58,7 +70,7 @@
xzvalue.value = index.name xzvalue.value = index.name
xzid.value = index.id xzid.value = index.id
showxz.value = false showxz.value = false
}; }
const submit = () => { const submit = () => {
if (nrvalue.value !== '') { if (nrvalue.value !== '') {
@ -89,15 +101,15 @@
.boxhdzq { .boxhdzq {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
background: #F1F3F9; background: #f1f3f9;
.xzzq { .xzzq {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 28rpx 40rpx; padding: 28rpx 40rpx;
background: #FFFFFF; background: #ffffff;
border-bottom: 4rpx solid #F1F3F9; border-bottom: 4rpx solid #f1f3f9;
.left { .left {
display: flex; display: flex;
@ -129,7 +141,7 @@
.button { .button {
margin-top: 108rpx; margin-top: 108rpx;
border-radius: 248rpx; border-radius: 248rpx;
background: linear-gradient(90deg, #007FFF 0%, #99CCFF 100%); background: linear-gradient(90deg, #007fff 0%, #99ccff 100%);
width: 576rpx; width: 576rpx;
height: 96rpx; height: 96rpx;
font-family: Source Han Sans; font-family: Source Han Sans;
@ -141,7 +153,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #FFFFFF; color: #ffffff;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -157,6 +169,6 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #D3D3D3; color: #d3d3d3;
} }
</style> </style>

44
src/pages/index/shoppage/mediaDetail.vue

@ -1,7 +1,7 @@
<template> <template>
<u-navbar :title="'媒体帮'" placeholder="true" bgColor="#F1F3F9" :autoBack="true" /> <u-navbar :title="'媒体帮'" placeholder="true" bg-color="#F1F3F9" :auto-back="true" />
<view class="container"> <view class="container">
<image style="width: 100%;height: 300rpx;" src="@/static/img/ztback.png" mode=""></image> <image style="width: 100%; height: 300rpx" src="@/static/img/ztback.png" mode=""></image>
<view class="main"> <view class="main">
<view class="head"> <view class="head">
<image class="toux" :src="baseurl + userData.head_pic" mode=""></image> <image class="toux" :src="baseurl + userData.head_pic" mode=""></image>
@ -26,24 +26,28 @@
<view class="icon"></view> <view class="icon"></view>
<text class="title">微信二维码</text> <text class="title">微信二维码</text>
</view> </view>
<image style="width: 338rpx;height: 338rpx;margin-top: 28rpx;margin-left: 24%;" v-if="userData.wx_code" :src="baseurl + userData.wx_code" mode=""></image> <image
<image style="width: 338rpx;height: 338rpx;margin-top: 28rpx;margin-left: 24%;" v-if="userData.code_pic" :src="baseurl + userData.code_pic" mode=""></image> style="width: 338rpx; height: 338rpx; margin-top: 28rpx; margin-left: 24%"
v-if="userData.wx_code"
:src="baseurl + userData.wx_code"
mode=""
></image>
<image
style="width: 338rpx; height: 338rpx; margin-top: 28rpx; margin-left: 24%"
v-if="userData.code_pic"
:src="baseurl + userData.code_pic"
mode=""
></image>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { import { onLoad } from '@dcloudio/uni-app'
onLoad import { ref } from 'vue'
} from '@dcloudio/uni-app';
import {
ref
} from 'vue';
import { memberCenterInfo } from '@/api/memberCenter' import { memberCenterInfo } from '@/api/memberCenter'
import { import { mediumInfo } from '@/api/shop'
mediumInfo
} from '@/api/shop'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/') const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/')
@ -58,7 +62,7 @@
}) })
} else { } else {
await memberCenterInfo(param.id).then((res) => { await memberCenterInfo(param.id).then((res) => {
console.log(res); console.log(res)
if (res.code === 1) { if (res.code === 1) {
userData.value = res.data userData.value = res.data
} }
@ -69,7 +73,7 @@
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
background-color: #FFFFFF; background-color: #ffffff;
height: calc(100vh - 182rpx); height: calc(100vh - 182rpx);
width: 100%; width: 100%;
.main { .main {
@ -85,7 +89,7 @@
box-sizing: border-box; box-sizing: border-box;
border-radius: 50%; border-radius: 50%;
/* White */ /* White */
border: 8rpx solid #FFFFFF; border: 8rpx solid #ffffff;
box-shadow: 0rpx 8rpx 40rpx 0rpx rgba(101, 101, 101, 0.15); box-shadow: 0rpx 8rpx 40rpx 0rpx rgba(101, 101, 101, 0.15);
} }
.name { .name {
@ -124,7 +128,7 @@
height: 32rpx; height: 32rpx;
border-radius: 0rpx 32rpx 32rpx 0rpx; border-radius: 0rpx 32rpx 32rpx 0rpx;
/* 蓝色渐变 */ /* 蓝色渐变 */
background: linear-gradient(0deg, #007FFF 0%, #99CCFF 100%); background: linear-gradient(0deg, #007fff 0%, #99ccff 100%);
} }
.title { .title {
margin-left: 18rpx; margin-left: 18rpx;
@ -136,7 +140,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #0072FF; color: #0072ff;
} }
} }
.message { .message {
@ -149,7 +153,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #3D3D3D; color: #3d3d3d;
} }
.people { .people {
margin-top: 28rpx; margin-top: 28rpx;
@ -163,7 +167,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #3D3D3D; color: #3d3d3d;
} }
} }
} }

83
src/pages/index/shoppage/mediaHelp.vue

@ -1,65 +1,65 @@
<template> <template>
<view class="container"> <view class="container">
<u-navbar title="媒体帮" placeholder="true" bgColor="#F1F3F9" :autoBack="true"> <u-navbar title="媒体帮" placeholder="true" bg-color="#F1F3F9" :auto-back="true"></u-navbar>
</u-navbar> <u-search
<u-search @search="search" @clickIcon="clickIcon" @clear="clear" shape="square" placeholder="请输入搜索内容" @search="search"
placeholderColor="#a4c7ff" v-model="keyword" searchIcon="/static/img/search.png" searchIconSize="14" @clickIcon="clickIcon"
:showAction="false" height="40" margin="40rpx 24rpx 24rpx 24rpx"></u-search> @clear="clear"
shape="square"
placeholder="请输入搜索内容"
placeholder-color="#a4c7ff"
v-model="keyword"
search-icon="/static/img/search.png"
search-icon-size="14"
:show-action="false"
height="40"
margin="40rpx 24rpx 24rpx 24rpx"
></u-search>
<scroll-view scroll-y="auto" class="mtlist" @scrolltolower="onloadmore"> <scroll-view scroll-y="auto" class="mtlist" @scrolltolower="onloadmore">
<view class="mtone" v-for="(item, index) in mtList" :key="index" @click="gomtbdetail(item.id)"> <view class="mtone" v-for="(item, index) in mtList" :key="index" @click="gomtbdetail(item.id)">
<view class="headpart"> <view class="headpart">
<u-avatar :src="baseurl + item.head_pic" size="44"></u-avatar> <u-avatar :src="baseurl + item.head_pic" size="44"></u-avatar>
<view class="right"> <view class="right">
<text class="name">{{ item.name }}</text> <text class="name">{{ item.name }}</text>
<view class="tab"> <view class="tab" v-if="item.tag_name !== ''">
{{ item.tag_name }} {{ item.tag_name }}
</view> </view>
</view> </view>
</view> </view>
<image style="width: 100%;height: 400rpx;margin-top: 30rpx;" :src="baseurl+item.publicize_pic" mode=""> <image style="width: 100%; height: 400rpx; margin-top: 30rpx" :src="baseurl + item.publicize_pic" mode=""></image>
</image>
<view class="bottompart"> <view class="bottompart">
<view class="part"> <view class="part">
<image style="width: 22rpx;height: 24rpx;" src="@/static/img/dh.png" mode=""></image> <image style="width: 22rpx; height: 24rpx" src="@/static/img/dh.png" mode=""></image>
<text class="text">{{ item.tel }}</text> <text class="text">{{ item.tel }}</text>
</view> </view>
<view class="part"> <view class="part">
<image style="width: 22rpx;height: 24rpx;" src="@/static/img/yx.png" mode=""></image> <image style="width: 22rpx; height: 24rpx" src="@/static/img/yx.png" mode=""></image>
<text class="text">{{item.email}}</text> <view class="text">{{ item.email }}</view>
</view> </view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<view class="fbxxbutton"> <view class="fbxxbutton">
<view class="button" @click="gofbxx"> <view class="button" @click="gofbxx">发布信息</view>
发布信息
</view> </view>
</view> </view>
</view> <liuDragButton :width-px="'145rpx'">
<liuDragButton :widthPx="'145rpx'">
<image class="hdzq" src="@/static/img/hdzq.png" mode="" @click="gohdzq"></image> <image class="hdzq" src="@/static/img/hdzq.png" mode="" @click="gohdzq"></image>
</liuDragButton> </liuDragButton>
</template> </template>
<script setup> <script setup>
import { import { ref } from 'vue'
ref import { mediumList } from '@/api/shop'
} from 'vue';
import {
mediumList
} from '@/api/shop'
import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue' import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/') const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/')
// //
const keyword = ref(''); const keyword = ref('')
const page = ref(1) const page = ref(1)
const pagesize = ref(2) const pagesize = ref(2)
const search = async (val) => { const search = async (val) => {
page.value = 1 page.value = 1
pagesize.value = 2 pagesize.value = 2
@ -100,9 +100,9 @@
const getmediumList = async (name, page, limit) => { const getmediumList = async (name, page, limit) => {
let params = { let params = {
'name': name, name: name,
'page': page, page: page,
'limit': limit limit: limit
} }
await mediumList(params).then((res) => { await mediumList(params).then((res) => {
mtList.value = res.data.data mtList.value = res.data.data
@ -112,9 +112,9 @@
const onloadmore = async () => { const onloadmore = async () => {
page.value++ page.value++
let params = { let params = {
'name': keyword.value, name: keyword.value,
'page': page.value, page: page.value,
'limit': pagesize.value limit: pagesize.value
} }
await mediumList(params).then((res) => { await mediumList(params).then((res) => {
mtList.value = [...mtList.value, ...res.data.data] mtList.value = [...mtList.value, ...res.data.data]
@ -128,7 +128,7 @@
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
background: linear-gradient(0deg, #F1F3F9 72%, rgba(62, 146, 249, 0.2) 88%); background: linear-gradient(0deg, #f1f3f9 72%, rgba(62, 146, 249, 0.2) 88%);
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
.mtlist { .mtlist {
@ -145,7 +145,7 @@
width: 100%; width: 100%;
height: 666rpx; height: 666rpx;
border-radius: 24rpx; border-radius: 24rpx;
background: #FFFFFF; background: #ffffff;
display: grid; display: grid;
padding: 40rpx 24rpx; padding: 40rpx 24rpx;
box-sizing: border-box; box-sizing: border-box;
@ -167,20 +167,20 @@
align-items: center; align-items: center;
text-transform: capitalize; text-transform: capitalize;
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0c092a;
} }
.tab { .tab {
margin-top: 8rpx; margin-top: 8rpx;
padding: 6rpx 20rpx; padding: 6rpx 20rpx;
border-radius: 0rpx 4rpx 20rpx 0rpx; border-radius: 0rpx 4rpx 20rpx 0rpx;
background: linear-gradient(70deg, #312984 -45%, #867BF5 99%); background: linear-gradient(70deg, #312984 -45%, #867bf5 99%);
font-family: YouSheBiaoTiHei; font-family: YouSheBiaoTiHei;
font-size: 24rpx; font-size: 24rpx;
font-weight: normal; font-weight: normal;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
color: #FFFFFF; color: #ffffff;
text-shadow: 0rpx 4rpx 4rpx rgba(0, 0, 0, 0.2); text-shadow: 0rpx 4rpx 4rpx rgba(0, 0, 0, 0.2);
} }
} }
@ -203,7 +203,6 @@
line-height: 33.6rpx; line-height: 33.6rpx;
display: flex; display: flex;
align-items: center; align-items: center;
text-transform: capitalize;
letter-spacing: normal; letter-spacing: normal;
color: #606266; color: #606266;
} }
@ -214,8 +213,8 @@
} }
.hdzq { .hdzq {
width: 182rpx; width: 212rpx;
height: 80rpx; height: 86rpx;
position: fixed; position: fixed;
right: 0; right: 0;
top: 70%; top: 70%;
@ -227,7 +226,7 @@
height: 168rpx; height: 168rpx;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
background: #FFFFFF; background: #ffffff;
/* 标签栏投影 */ /* 标签栏投影 */
box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.3); box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.3);
display: flex; display: flex;
@ -238,7 +237,7 @@
width: 574rpx; width: 574rpx;
height: 96rpx; height: 96rpx;
border-radius: 248rpx; border-radius: 248rpx;
background: linear-gradient(90deg, #007FFF 0%, #99CCFF 100%); background: linear-gradient(90deg, #007fff 0%, #99ccff 100%);
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 36rpx; font-size: 36rpx;
font-weight: 500; font-weight: 500;
@ -248,7 +247,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #FFFFFF; color: #ffffff;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;

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

@ -1,75 +1,83 @@
<template> <template>
<u-navbar :title="'媒体帮'" placeholder="true" bgColor="#F1F3F9" :autoBack="true" /> <u-navbar :title="'媒体帮'" placeholder="true" bg-color="#F1F3F9" :auto-back="true" />
<view class="container"> <view class="container">
<view class="formlist"> <view class="formlist">
<u-form :model="form" ref="uFormRef" labelPosition="top" :rules="rules"> <u-form :model="form" ref="uFormRef" label-position="top" :rules="rules">
<u-form-item label="头像" prop="head_pic"> <u-form-item label="头像" prop="head_pic">
<u-upload class="uploadbox" @afterRead="txafterRead" :maxCount="1" :imageMode="'heightFix'" <u-upload class="uploadbox" @afterRead="txafterRead" :max-count="1" :image-mode="'heightFix'" :width="auto" :height="144">
:width="auto" :height="144">
<view class="yyzz" v-if="form.head_pic === ''"> <view class="yyzz" v-if="form.head_pic === ''">
<image style="width: 40rpx;height: 40rpx;" src="@/static/img/yyzz.png" mode=""></image> <image style="width: 40rpx; height: 40rpx" src="@/static/img/yyzz.png" mode=""></image>
上传头像 上传头像
</view> </view>
<image v-else style="width: 100%;height: 288rpx;margin-top: 12rpx;" <image
:src="baseurl+ '/' + form.head_pic" mode="scaleToFill"></image> v-else
style="width: 100%; height: 288rpx; margin-top: 12rpx"
:src="baseurl + '/' + form.head_pic"
mode="scaleToFill"
></image>
</u-upload> </u-upload>
</u-form-item> </u-form-item>
<u-form-item label="姓名" prop="name"> <u-form-item label="姓名" prop="name">
<u-input v-model="form.name" placeholder="请输入真实姓名" placeholderStyle="color: #D3D3D3;" /> <u-input v-model="form.name" placeholder="请输入真实姓名" placeholder-style="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;" <u-input
suffixIcon="arrow-down" @focus="show=true" /> v-model="form.type"
<u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="show=false" keyName="name"></u-picker> placeholder="请选择"
placeholder-style="color: #D3D3D3;"
suffix-icon="arrow-down"
@focus="show = true"
/>
<u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="show = false" key-name="name"></u-picker>
</u-form-item> </u-form-item>
<u-form-item label="联系方式" prop="tel"> <u-form-item label="联系方式" prop="tel">
<u-input v-model="form.tel" placeholder="请输入联系方式" placeholderStyle="color: #D3D3D3;" /> <u-input v-model="form.tel" placeholder="请输入联系方式" placeholder-style="color: #D3D3D3;" />
</u-form-item> </u-form-item>
<u-form-item label="微信二维码" prop="code_pic"> <u-form-item label="微信二维码" prop="code_pic">
<u-upload class="uploadbox" @afterRead="codeafterRead" :maxCount="1" :imageMode="'heightFix'" <u-upload class="uploadbox" @afterRead="codeafterRead" :max-count="1" :image-mode="'heightFix'" :width="auto" :height="144">
:width="auto" :height="144">
<view class="yyzz" v-if="form.code_pic === ''"> <view class="yyzz" v-if="form.code_pic === ''">
<image style="width: 40rpx;height: 40rpx;" src="@/static/img/yyzz.png" mode=""></image> <image style="width: 40rpx; height: 40rpx" src="@/static/img/yyzz.png" mode=""></image>
上传微信二维码 上传微信二维码
</view> </view>
<image v-else style="width: 100%;height: 288rpx;margin-top: 12rpx;" <image
:src="baseurl+ '/' + form.code_pic" mode="scaleToFill"></image> v-else
style="width: 100%; height: 288rpx; margin-top: 12rpx"
:src="baseurl + '/' + form.code_pic"
mode="scaleToFill"
></image>
</u-upload> </u-upload>
</u-form-item> </u-form-item>
<u-form-item label="邮箱" prop="email"> <u-form-item label="邮箱" prop="email">
<u-input v-model="form.email" placeholder="请输入邮箱地址" placeholderStyle="color: #D3D3D3;" /> <u-input v-model="form.email" placeholder="请输入邮箱地址" placeholder-style="color: #D3D3D3;" />
</u-form-item> </u-form-item>
<u-form-item label="宣传封面" prop="publicize_pic"> <u-form-item label="宣传封面" prop="publicize_pic">
<u-upload class="uploadbox" @afterRead="afterRead" :maxCount="1" :imageMode="'heightFix'" <u-upload class="uploadbox" @afterRead="afterRead" :max-count="1" :image-mode="'heightFix'" :width="auto" :height="144">
:width="auto" :height="144">
<view class="yyzz" v-if="form.publicize_pic === ''"> <view class="yyzz" v-if="form.publicize_pic === ''">
<image style="width: 40rpx;height: 40rpx;" src="@/static/img/yyzz.png" mode=""></image> <image style="width: 40rpx; height: 40rpx" src="@/static/img/yyzz.png" mode=""></image>
上传宣传封面 上传宣传封面
</view> </view>
<image v-else style="width: 100%;height: 288rpx;margin-top: 12rpx;" <image
:src="baseurl+ '/' + form.publicize_pic" mode="scaleToFill"></image> v-else
style="width: 100%; height: 288rpx; margin-top: 12rpx"
:src="baseurl + '/' + form.publicize_pic"
mode="scaleToFill"
></image>
</u-upload> </u-upload>
</u-form-item> </u-form-item>
<u-form-item label="助企案例" prop="content"> <u-form-item label="助企案例" prop="content">
<u-input v-model="form.content" placeholder="请输入真实案例" placeholderStyle="color: #D3D3D3;" /> <u-input v-model="form.content" placeholder="请输入真实案例" placeholder-style="color: #D3D3D3;" />
</u-form-item> </u-form-item>
</u-form> </u-form>
</view> </view>
<view class="sumitbotton"> <view class="sumitbotton">
<view class="button" @click="submit"> <view class="button" @click="submit">确认提交</view>
确认提交
</view>
</view> </view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { import { ref } from 'vue'
ref import { mediumAdd } from '@/api/shop'
} from 'vue';
import {
mediumAdd
} from '@/api/shop'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL) const baseurl = ref(import.meta.env.VITE_APP_BASE_URL)
@ -83,94 +91,112 @@
publicize_pic: '', publicize_pic: '',
content: '', content: '',
code_pic: '', code_pic: '',
head_pic: '', head_pic: ''
}); })
const show = ref(false); const show = ref(false)
const columns = reactive([[{ const columns = reactive([
'id': 1, [
'name': '自媒体' {
id: 1,
name: '自媒体'
}, },
{ {
'id': 2, id: 2,
'name': '达人' name: '达人'
}, },
{ {
'id': 3, id: 3,
'name': '网红' name: '网红'
}, },
{ {
'id': 4, id: 4,
'name': '孵化机构' name: '孵化机构'
}, },
{ {
'id': 5, id: 5,
'name': '陪跑机构' name: '陪跑机构'
}] }
]); ]
])
// //
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']
}, ], }
tel: [{ ],
tel: [
{
required: true, required: true,
message: '请输入联系方式', message: '请输入联系方式',
trigger: ['blur', 'change'], trigger: ['blur', 'change']
}, ], }
email: [{ ],
email: [
{
required: true, required: true,
message: '请输入邮箱地址', message: '请输入邮箱地址',
trigger: ['blur', 'change'], trigger: ['blur', 'change']
}, ], }
publicize_pic: [{ ],
publicize_pic: [
{
required: true, required: true,
message: '请上传宣传封面', message: '请上传宣传封面',
trigger: ['blur', 'change'], trigger: ['blur', 'change']
}, ], }
code_pic: [{ ],
code_pic: [
{
required: true, required: true,
message: '请上传微信二维码', message: '请上传微信二维码',
trigger: ['blur', 'change'], trigger: ['blur', 'change']
}, ], }
head_pic: [{ ],
head_pic: [
{
required: true, required: true,
message: '请上传头像', message: '请上传头像',
trigger: ['blur', 'change'], trigger: ['blur', 'change']
}, ], }
content: [{ ],
content: [
{
required: true, required: true,
message: '请输入真实案例', message: '请输入真实案例',
trigger: ['blur', 'change'], trigger: ['blur', 'change']
}, ], }
}; ]
}
const afterRead = async (e) => { const afterRead = async (e) => {
console.log(e); console.log(e)
uni.uploadFile({ uni.uploadFile({
url: import.meta.env.VITE_APP_BASE_URL + '/api/file/image', url: import.meta.env.VITE_APP_BASE_URL + '/api/file/image',
filePath: e.file.url, filePath: e.file.url,
name: 'file', name: 'file',
header: { header: {
'token': uni.getStorageSync('access_token') token: uni.getStorageSync('access_token')
}, },
success: async (val) => { success: async (val) => {
if (JSON.parse(val.data).data.url) { if (JSON.parse(val.data).data.url) {
console.log(JSON.parse(val.data).data.url); console.log(JSON.parse(val.data).data.url)
form.value.publicize_pic = JSON.parse(val.data).data.url form.value.publicize_pic = JSON.parse(val.data).data.url
} }
}, },
fail: (res) => { fail: (res) => {
console.log('失败', res); console.log('失败', res)
} }
}) })
} }
@ -181,16 +207,16 @@
filePath: e.file.url, filePath: e.file.url,
name: 'file', name: 'file',
header: { header: {
'token': uni.getStorageSync('access_token') token: uni.getStorageSync('access_token')
}, },
success: async (val) => { success: async (val) => {
if (JSON.parse(val.data).data.url) { if (JSON.parse(val.data).data.url) {
console.log(JSON.parse(val.data).data.url); console.log(JSON.parse(val.data).data.url)
form.value.head_pic = JSON.parse(val.data).data.url form.value.head_pic = JSON.parse(val.data).data.url
} }
}, },
fail: (res) => { fail: (res) => {
console.log('失败', res); console.log('失败', res)
} }
}) })
} }
@ -201,25 +227,25 @@
filePath: e.file.url, filePath: e.file.url,
name: 'file', name: 'file',
header: { header: {
'token': uni.getStorageSync('access_token') token: uni.getStorageSync('access_token')
}, },
success: async (val) => { success: async (val) => {
if (JSON.parse(val.data).data.url) { if (JSON.parse(val.data).data.url) {
console.log(JSON.parse(val.data).data.url); console.log(JSON.parse(val.data).data.url)
form.value.code_pic = JSON.parse(val.data).data.url form.value.code_pic = JSON.parse(val.data).data.url
} }
}, },
fail: (res) => { fail: (res) => {
console.log('失败', res); console.log('失败', res)
} }
}) })
} }
// //
const uFormRef = ref(null); const uFormRef = ref(null)
const confirm = (val) => { const confirm = (val) => {
console.log(val.value[0]); console.log(val.value[0])
form.value.type = val.value[0].name form.value.type = val.value[0].name
form.value.tag = val.value[0].id form.value.tag = val.value[0].id
show.value = false show.value = false
@ -227,7 +253,9 @@
// //
function submit() { function submit() {
uFormRef.value.validate().then(valid => { uFormRef.value
.validate()
.then((valid) => {
if (valid) { if (valid) {
uni.$u.toast('校验通过') uni.$u.toast('校验通过')
delete form.value.type delete form.value.type
@ -239,16 +267,17 @@
} else { } else {
uni.$u.toast('请填写完整') uni.$u.toast('请填写完整')
} }
}).catch(() => { })
.catch(() => {
// //
uni.$u.toast('请填写完整') uni.$u.toast('请填写完整')
}); })
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
background-color: #FFFFFF; background-color: #ffffff;
width: 100%; width: 100%;
overflow-y: hidden; overflow-y: hidden;
@ -264,7 +293,7 @@
.sumitbotton { .sumitbotton {
width: 100%; width: 100%;
height: 168rpx; height: 168rpx;
background: #FFFFFF; background: #ffffff;
/* 标签栏投影 */ /* 标签栏投影 */
box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.3); box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.3);
display: flex; display: flex;
@ -277,7 +306,7 @@
width: 574rpx; width: 574rpx;
height: 96rpx; height: 96rpx;
border-radius: 248rpx; border-radius: 248rpx;
background: linear-gradient(90deg, #007FFF 0%, #99CCFF 100%); background: linear-gradient(90deg, #007fff 0%, #99ccff 100%);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -290,7 +319,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #FFFFFF; color: #ffffff;
} }
} }
} }
@ -300,7 +329,7 @@
width: 100%; width: 100%;
height: 288rpx; height: 288rpx;
border-radius: 16rpx; border-radius: 16rpx;
background: #FFFFFF; background: #ffffff;
display: grid; display: grid;
align-content: center; align-content: center;
justify-items: center; justify-items: center;
@ -309,7 +338,7 @@
font-weight: 350; font-weight: 350;
line-height: 70rpx; line-height: 70rpx;
letter-spacing: normal; letter-spacing: normal;
color: #CCCCCC; color: #cccccc;
} }
:deep(.u-upload) { :deep(.u-upload) {
@ -322,7 +351,7 @@
</style> </style>
<style> <style>
.u-input { .u-input {
background-color: #FFFFFF; background-color: #ffffff;
height: 100rpx !important; height: 100rpx !important;
} }

44
src/pages/index/shoppage/shopHelp.vue

@ -1,31 +1,38 @@
<template> <template>
<u-navbar title="小店帮" placeholder="true" bgColor="#F1F3F9" :autoBack="true"> <u-navbar title="开店帮" placeholder="true" bg-color="#F1F3F9" :auto-back="true"></u-navbar>
</u-navbar>
<view class="container"> <view class="container">
<u-search @search="search" @clickIcon="clickIcon" shape="square" placeholder="请输入搜索内容" <u-search
placeholderColor="#a4c7ff" v-model="keyword" searchIcon="/static/img/search.png" searchIconSize="14" @search="search"
:showAction="false" height="40" margin="40rpx 24rpx 24rpx 24rpx"></u-search> @clickIcon="clickIcon"
<zh-scroll ref="zhscrollRel" :scrollList="goods" :searchVal="keyword"></zh-scroll> shape="square"
placeholder="请输入搜索内容"
placeholder-color="#a4c7ff"
v-model="keyword"
search-icon="/static/img/search.png"
search-icon-size="14"
:show-action="false"
height="40"
margin="40rpx 24rpx 24rpx 24rpx"
></u-search>
<zh-scroll ref="zhscrollRel" :scroll-list="goods" :search-val="keyword"></zh-scroll>
</view> </view>
<liuDragButton :widthPx="'145rpx'"> <liuDragButton :width-px="'145rpx'">
<image class="hdzq" src="@/static/img/hdzq.png" mode="" @click="gohdzq"></image> <image class="hdzq" src="@/static/img/hdzq.png" mode="aspectFill" @click="gohdzq"></image>
</liuDragButton> </liuDragButton>
</template> </template>
<script setup> <script setup>
import { import { ref } from 'vue'
ref
} from 'vue';
import zhScroll from '@/components/zh-scroll/zh-scroll.vue'; import zhScroll from '@/components/zh-scroll/zh-scroll.vue'
import { storeList } from '@/api/shop' import { storeList } from '@/api/shop'
import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue' import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue'
const zhscrollRel = ref(null) const zhscrollRel = ref(null)
// //
const keyword = ref(''); const keyword = ref('')
const goods = ref([]); const goods = ref([])
const search = (val) => { const search = (val) => {
zhscrollRel.value.searchleMenuTap(keyword.value) zhscrollRel.value.searchleMenuTap(keyword.value)
@ -41,19 +48,16 @@
}) })
} }
onShow(async () => { onShow(async () => {
await storeList({}).then((res) => { await storeList({}).then((res) => {
goods.value = res.data goods.value = res.data
}) })
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
background-color: #FFFFFF; background-color: #ffffff;
height: calc(100vh - 254rpx); height: calc(100vh - 254rpx);
width: 100%; width: 100%;
@ -63,8 +67,8 @@
} }
.hdzq { .hdzq {
width: 182rpx; width: 212rpx;
height: 80rpx; height: 86rpx;
position: fixed; position: fixed;
right: 0; right: 0;
top: 70%; top: 70%;

30
src/pages/index/shoppage/shophelpDetail.vue

@ -1,17 +1,17 @@
<template> <template>
<u-navbar :title="'店帮'" placeholder="true" bgColor="#F1F3F9" :autoBack="true" /> <u-navbar :title="'店帮'" placeholder="true" bg-color="#F1F3F9" :auto-back="true" />
<view class="container"> <view class="container">
<text class="title">{{ xdbData.title }}</text> <text class="title">{{ xdbData.title }}</text>
<text class="fbr">发布人{{ xdbData.publisher }}</text> <text class="fbr">发布人{{ xdbData.publisher }}</text>
<view class="readtime"> <view class="readtime">
<text class="time">{{ xdbData.create_time }}</text> <text class="time">{{ xdbData.create_time }}</text>
<view class="readnum"> <view class="readnum">
阅读量<text class="num">{{xdbData.count}}</text> 阅读量
<text class="num">{{ xdbData.count }}</text>
</view> </view>
</view> </view>
<view class="nrxq"> <view class="nrxq">
<view class="icon"> <view class="icon"></view>
</view>
<text class="nrtitle">内容详情</text> <text class="nrtitle">内容详情</text>
</view> </view>
<u-parse :content="xdbData.content"></u-parse> <u-parse :content="xdbData.content"></u-parse>
@ -19,15 +19,9 @@
</template> </template>
<script setup> <script setup>
import { import { onLoad } from '@dcloudio/uni-app'
onLoad import { ref } from 'vue'
} from '@dcloudio/uni-app'; import { storeInfo } from '@/api/shop'
import {
ref
} from 'vue';
import {
storeInfo
} from '@/api/shop'
const xdbData = ref({}) const xdbData = ref({})
@ -42,7 +36,7 @@
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
background-color: #FFFFFF; background-color: #ffffff;
height: calc(100vh - 182rpx); height: calc(100vh - 182rpx);
width: 100%; width: 100%;
padding: 60rpx 40rpx 0 40rpx; padding: 60rpx 40rpx 0 40rpx;
@ -56,7 +50,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0c092a;
} }
.fbr { .fbr {
@ -112,7 +106,7 @@
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
/* 2 */ /* 2 */
color: #007FFF; color: #007fff;
} }
} }
} }
@ -128,7 +122,7 @@
height: 32rpx; height: 32rpx;
border-radius: 0rpx 32rpx 32rpx 0rpx; border-radius: 0rpx 32rpx 32rpx 0rpx;
/* 蓝色渐变 */ /* 蓝色渐变 */
background: linear-gradient(0deg, #007FFF 0%, #99CCFF 100%); background: linear-gradient(0deg, #007fff 0%, #99ccff 100%);
} }
.nrtitle { .nrtitle {
@ -142,7 +136,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #0072FF; color: #0072ff;
} }
} }

63
src/pages/index/specialSubject.vue

@ -1,6 +1,5 @@
<template> <template>
<u-navbar :title="'“'+ titleData.title +'”'+'专题'" placeholder="true" bgColor="#F1F3F9" :autoBack="true"> <u-navbar :title="'“' + titleData.title + '”' + '专题'" placeholder="true" bg-color="#F1F3F9" :auto-back="true"></u-navbar>
</u-navbar>
<view class="container"> <view class="container">
<!-- <view class="headpart"> <!-- <view class="headpart">
<view class="lefttxt"> <view class="lefttxt">
@ -13,7 +12,7 @@
<image style="width: 298rpx;height: 160rpx;" src="@/static/img/zticon.png" mode=""></image> <image style="width: 298rpx;height: 160rpx;" src="@/static/img/zticon.png" mode=""></image>
</view> --> </view> -->
<image class="headpart" :src="url + '/' + titleData.top_img" mode=""></image> <image class="headpart" :src="url + '/' + titleData.top_img" mode=""></image>
<view class="main"> <view class="main" v-if="ztList.length !== 0">
<u-box height="400rpx" gap="24rpx"> <u-box height="400rpx" gap="24rpx">
<template #left> <template #left>
<view class="leftmk" @click="godetail(ztList[0]?.id)"> <view class="leftmk" @click="godetail(ztList[0]?.id)">
@ -61,8 +60,7 @@
</u-box> </u-box>
<view class="ztlist"> <view class="ztlist">
<view class="ztone" v-for="(item, index) in ztList.slice(3)" :key="index" @click="godetail(item.id)"> <view class="ztone" v-for="(item, index) in ztList.slice(3)" :key="index" @click="godetail(item.id)">
<image style="width: 112rpx;height: 112rpx;border-radius: 20rpx;flex: 1;" :src="url + '/' + item.index_pic" mode=""> <image style="width: 112rpx; height: 112rpx; border-radius: 20rpx; flex: 1" :src="url + '/' + item.index_pic" mode=""></image>
</image>
<view class="rightpart"> <view class="rightpart">
<view class="titlepart"> <view class="titlepart">
<text class="title">{{ item.title }}</text> <text class="title">{{ item.title }}</text>
@ -82,16 +80,9 @@
</template> </template>
<script setup> <script setup>
import { import { onLoad } from '@dcloudio/uni-app'
onLoad import { ref } from 'vue'
} from '@dcloudio/uni-app'; import { specialInfo, specialList } from '@/api/index'
import {
ref
} from 'vue';
import {
specialInfo,
specialList
} from '@/api/index'
const url = ref(import.meta.env.VITE_APP_BASE_URL) const url = ref(import.meta.env.VITE_APP_BASE_URL)
@ -117,7 +108,7 @@
const res1 = await specialList(params) const res1 = await specialList(params)
if (res1.code === 1) { if (res1.code === 1) {
ztList.value = res1.data.data ztList.value = res1.data.data
console.log(ztList.value); console.log(ztList.value)
} }
}) })
@ -128,7 +119,7 @@
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
background-color: #F1F3F9; background-color: #f1f3f9;
height: calc(100vh - 182rpx); height: calc(100vh - 182rpx);
width: 100%; width: 100%;
@ -188,7 +179,7 @@
.main { .main {
margin-top: -60rpx; margin-top: -60rpx;
border-radius: 40rpx 40rpx 0rpx 0rpx; border-radius: 40rpx 40rpx 0rpx 0rpx;
background: #FFFFFF; background: #ffffff;
width: 100%; width: 100%;
height: 69vh; height: 69vh;
padding: 40rpx 24rpx 0 24rpx; padding: 40rpx 24rpx 0 24rpx;
@ -220,7 +211,7 @@
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
line-height: 48rpx; line-height: 48rpx;
color: #FEFEFE; color: #fefefe;
overflow: hidden; overflow: hidden;
/* 隐藏溢出内容 */ /* 隐藏溢出内容 */
white-space: nowrap; white-space: nowrap;
@ -235,7 +226,7 @@
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
line-height: 48rpx; line-height: 48rpx;
color: #FEFEFE; color: #fefefe;
} }
} }
@ -247,7 +238,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #FEFEFE; color: #fefefe;
} }
} }
@ -260,7 +251,7 @@
font-weight: 300; font-weight: 300;
line-height: 48rpx; line-height: 48rpx;
letter-spacing: normal; letter-spacing: normal;
color: #FEFEFE; color: #fefefe;
max-width: 300rpx; max-width: 300rpx;
overflow: hidden; overflow: hidden;
display: -webkit-box; display: -webkit-box;
@ -279,7 +270,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: rgba(254, 254, 254, 0.6); color: rgba(254, 254, 254);
} }
} }
} }
@ -310,7 +301,7 @@
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
line-height: 48rpx; line-height: 48rpx;
color: #FEFEFE; color: #fefefe;
overflow: hidden; overflow: hidden;
/* 隐藏溢出内容 */ /* 隐藏溢出内容 */
white-space: nowrap; white-space: nowrap;
@ -325,7 +316,7 @@
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
line-height: 48rpx; line-height: 48rpx;
color: #FEFEFE; color: #fefefe;
} }
} }
@ -337,7 +328,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #FEFEFE; color: #fefefe;
} }
} }
@ -352,7 +343,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #FEFEFE; color: #fefefe;
max-width: 300rpx; max-width: 300rpx;
overflow: hidden; overflow: hidden;
display: -webkit-box; display: -webkit-box;
@ -371,7 +362,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: rgba(254, 254, 254, 0.6); color: rgba(254, 254, 254);
} }
} }
} }
@ -402,7 +393,7 @@
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
line-height: 48rpx; line-height: 48rpx;
color: #FEFEFE; color: #fefefe;
overflow: hidden; overflow: hidden;
/* 隐藏溢出内容 */ /* 隐藏溢出内容 */
white-space: nowrap; white-space: nowrap;
@ -417,7 +408,7 @@
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
line-height: 48rpx; line-height: 48rpx;
color: #FEFEFE; color: #fefefe;
} }
} }
@ -429,7 +420,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #FEFEFE; color: #fefefe;
} }
} }
@ -444,7 +435,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #FEFEFE; color: #fefefe;
max-width: 300rpx; max-width: 300rpx;
overflow: hidden; overflow: hidden;
display: -webkit-box; display: -webkit-box;
@ -463,7 +454,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: rgba(254, 254, 254, 0.6); color: rgba(254, 254, 254);
} }
} }
} }
@ -477,7 +468,7 @@
align-items: center; align-items: center;
margin-top: 40rpx; margin-top: 40rpx;
padding-bottom: 24rpx; padding-bottom: 24rpx;
border-bottom: 2rpx solid #F2F0F0; border-bottom: 2rpx solid #f2f0f0;
.rightpart { .rightpart {
width: 100%; width: 100%;
@ -497,7 +488,7 @@
font-weight: 500; font-weight: 500;
line-height: 48rpx; line-height: 48rpx;
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0c092a;
overflow: hidden; overflow: hidden;
/* 隐藏溢出内容 */ /* 隐藏溢出内容 */
white-space: nowrap; white-space: nowrap;
@ -516,7 +507,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: rgba(133, 132, 148, 0.8); color: rgba(133, 132, 148);
} }
} }

37
src/pages/index/tabsComm.vue

@ -1,13 +1,7 @@
<template> <template>
<view class="tabs-wrapper"> <view class="tabs-wrapper">
<!-- 固定显示的'全部'标签 --> <!-- 固定显示的'全部'标签 -->
<view <view class="tab-item" :class="{ active: activeTab === 'all' }" @click="handleTabSelect('all')">全部</view>
class="tab-item"
:class="{ 'active': activeTab === 'all' }"
@click="handleTabSelect('all')"
>
全部
</view>
<!-- 主显示区域 --> <!-- 主显示区域 -->
<!-- <scroll-view <!-- <scroll-view
@ -19,7 +13,7 @@
v-for="(tab, index) in visibleTabs" v-for="(tab, index) in visibleTabs"
:key="tab.id" :key="tab.id"
class="tab-item" class="tab-item"
:class="{ 'active': activeTab === tab.id }" :class="{ active: activeTab === tab.id }"
@click="handleTabSelect(tab.id)" @click="handleTabSelect(tab.id)"
> >
{{ tab.title.slice(0, 2) }} {{ tab.title.slice(0, 2) }}
@ -27,13 +21,9 @@
<!-- </scroll-view> --> <!-- </scroll-view> -->
<!-- 更多按钮及下拉菜单 --> <!-- 更多按钮及下拉菜单 -->
<view <view v-if="showMoreButton" class="tab-item" @click.stop="show = true">
v-if="showMoreButton"
class="tab-item"
@click.stop="show=true"
>
<text>更多 {{ dropdownVisible ? '▲' : '▼' }}</text> <text>更多 {{ dropdownVisible ? '▲' : '▼' }}</text>
<u-picker :show="show" :columns="hiddenTabs" keyName="title" @cancel="show=false" @confirm="confirm"></u-picker> <u-picker :show="show" :columns="hiddenTabs" key-name="title" @cancel="show = false" @confirm="confirm"></u-picker>
<!-- <view <!-- <view
v-show="dropdownVisible" v-show="dropdownVisible"
class="dropdown-menu" class="dropdown-menu"
@ -71,16 +61,16 @@ const activeTab = ref('all')
const dropdownVisible = ref(false) const dropdownVisible = ref(false)
const dropdownRight = ref(0) const dropdownRight = ref(0)
const containerWidth = ref(375) // const containerWidth = ref(375) //
const show = ref(false); const show = ref(false)
// //
const visibleTabs = computed(() => { const visibleTabs = computed(() => {
const filtered = props.tabsData.filter(t => t.id !== 'all') const filtered = props.tabsData.filter((t) => t.id !== 'all')
return filtered.length <= 3 ? filtered : filtered.slice(0, 2) return filtered.length <= 3 ? filtered : filtered.slice(0, 2)
}) })
const hiddenTabs = computed(() => { const hiddenTabs = computed(() => {
const filtered = props.tabsData.filter(t => t.id !== 'all') const filtered = props.tabsData.filter((t) => t.id !== 'all')
return [filtered.length > 3 ? filtered.slice(2) : []] return [filtered.length > 3 ? filtered.slice(2) : []]
}) })
@ -103,7 +93,7 @@ const toggleDropdown = () => {
uni.getSystemInfo({ uni.getSystemInfo({
success: (res) => { success: (res) => {
containerWidth.value = res.windowWidth containerWidth.value = res.windowWidth
dropdownRight.value = (res.windowWidth - 80) // dropdownRight.value = res.windowWidth - 80 //
} }
}) })
} }
@ -134,7 +124,6 @@ onUnmounted(() => {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 16rpx 0; padding: 16rpx 0;
border-bottom: 1rpx solid #eee;
:last-child { :last-child {
margin-right: 0 !important; margin-right: 0 !important;
} }
@ -152,10 +141,10 @@ onUnmounted(() => {
width: 25%; width: 25%;
box-sizing: border-box; box-sizing: border-box;
height: 60rpx; height: 60rpx;
padding: 0 42rpx; padding: 0 34rpx;
margin-right: 38rpx; margin-right: 38rpx;
border-radius: 124rpx; border-radius: 124rpx;
background: #FFFFFF; background: #f1f3f9;
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 28rpx; font-size: 28rpx;
font-weight: 350; font-weight: 350;
@ -164,11 +153,11 @@ onUnmounted(() => {
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #007FFF; color: #007fff;
&.active { &.active {
background: #007FFF; background: #007fff;
color: #FFFFFF; color: #ffffff;
} }
} }

37
src/pages/index/ztdetail.vue

@ -1,10 +1,14 @@
<template> <template>
<u-navbar :title="titleData.special_id_name?'“'+ titleData.special_id_name +'”'+'专题':''" placeholder="true" bgColor="#F1F3F9" :autoBack="true"> <u-navbar
</u-navbar> :title="titleData.special_id_name ? '“' + titleData.special_id_name + '”' + '专题' : ''"
placeholder="true"
bg-color="#F1F3F9"
:auto-back="true"
></u-navbar>
<view class="container"> <view class="container">
<view class="titlepart"> <view class="titlepart">
<image style="width: 8rpx;height: 1em;" src="@/static/img/Fill1.png" mode=""></image> <image style="width: 8rpx; height: 1em" src="@/static/img/Fill1.png" mode=""></image>
<image style="width: 8rpx;height: 1em;margin-left: 6rpx;" src="@/static/img/Fill2.png" mode=""></image> <image style="width: 8rpx; height: 1em; margin-left: 6rpx" src="@/static/img/Fill2.png" mode=""></image>
<text class="title">{{ titleData.title }}</text> <text class="title">{{ titleData.title }}</text>
</view> </view>
<!-- <image style="width: 100%;height: 436rpx;margin-top: 48rpx;" src="@/static/img/Bitmap.png" mode=""></image> --> <!-- <image style="width: 100%;height: 436rpx;margin-top: 48rpx;" src="@/static/img/Bitmap.png" mode=""></image> -->
@ -14,20 +18,12 @@
</template> </template>
<script setup> <script setup>
import { import { onLoad } from '@dcloudio/uni-app'
onLoad import { ref } from 'vue'
} from '@dcloudio/uni-app'; import { specialListInfo, bannerInfo } from '@/api/index'
import {
ref
} from 'vue';
import {
specialListInfo,
bannerInfo
} from '@/api/index'
const titleData = ref([]) const titleData = ref([])
onLoad(async (param) => { onLoad(async (param) => {
if (param.type === 'zt') { if (param.type === 'zt') {
const res = await specialListInfo(param.id) const res = await specialListInfo(param.id)
@ -37,16 +33,17 @@
} else { } else {
const res = await bannerInfo(param.id) const res = await bannerInfo(param.id)
if (res.code === 1) { if (res.code === 1) {
console.log(res); console.log(res)
titleData.value = res.data titleData.value = res.data
} }
} }
titleData.value.content = titleData.value.content.replace(/<img/g, '<img style="width: 100%; max-width: 100%; height: auto;"')
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
background-color: #FFFFFF; background-color: #ffffff;
height: calc(100vh - 182rpx); height: calc(100vh - 182rpx);
width: 100%; width: 100%;
padding: 48rpx; padding: 48rpx;
@ -59,7 +56,7 @@
font-family: Source Han Sans; font-family: Source Han Sans;
font-weight: 550; font-weight: 550;
font-size: 36rpx; font-size: 36rpx;
color: #0C092A; color: #0c092a;
margin-left: 20rpx; margin-left: 20rpx;
} }
} }
@ -70,7 +67,7 @@
font-weight: 300; font-weight: 300;
line-height: 60rpx; line-height: 60rpx;
letter-spacing: normal; letter-spacing: normal;
color: #3D3D3D; color: #3d3d3d;
} }
.fbtime { .fbtime {
font-family: Roboto; font-family: Roboto;
@ -80,7 +77,7 @@
letter-spacing: normal; letter-spacing: normal;
/* 外部/SCMP Grey/nobel */ /* 外部/SCMP Grey/nobel */
/* 样式描述:06 Small Grey txt */ /* 样式描述:06 Small Grey txt */
color: #A1A1A1; color: #a1a1a1;
} }
} }
</style> </style>

64
src/pages/learningCenter/detail.vue

@ -1,27 +1,30 @@
<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" @error="videoErrorCallback" <video class="myVideo" :src="baseurl + detailData.video_path" @error="videoErrorCallback" @timeupdate="onTimeUpdate"></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>
<view class="peopnum"> <view class="peopnum">
<view class="left"> <view class="left">
<image style="width: 26rpx;height: 28rpx;" src="@/static/img/gkrs.png" mode=""></image> <image style="width: 26rpx; height: 28rpx" src="@/static/img/gkrs.png" mode=""></image>
<text class="txt">观看人数</text> <text class="txt">观看人数</text>
<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="issc?'/static/img/scrs.png':'/static/img/sc.png'" <image
mode="" @click="scClick"></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>
</view> </view>
<view class="shqy"> <view class="shqy">
<view class="head"> <view class="head">
<image style="width: 12rpx;height: 32rpx;" src="@/static/img/shqy.png" mode=""></image> <image style="width: 12rpx; height: 32rpx" src="@/static/img/shqy.png" mode=""></image>
<text class="text">适合企业</text> <text class="text">适合企业</text>
</view> </view>
<view class="cards"> <view class="cards">
@ -38,14 +41,7 @@
</template> </template>
<script setup> <script setup>
import { import { studyCenterDetail, watchCount, studyRecord, isCollect, collect, removeCollect } from '@/api/learningCenter'
studyCenterDetail,
watchCount,
studyRecord,
isCollect,
collect,
removeCollect
} from '@/api/learningCenter'
const baseurl = import.meta.env.VITE_APP_BASE_URL + '/' const baseurl = import.meta.env.VITE_APP_BASE_URL + '/'
@ -65,36 +61,37 @@
const scClick = async () => { const scClick = async () => {
issc.value = !issc.value issc.value = !issc.value
if (issc.value) { if (issc.value) {
await collect({"item_id": kcid.value}) detailData.value.collect_count += 1
await collect({ item_id: kcid.value })
} else { } else {
await removeCollect({"item_id": kcid.value}) detailData.value.collect_count -= 1
await removeCollect({ item_id: kcid.value })
} }
} }
const percent = ref('') const percent = ref('')
const onTimeUpdate = (e) => { const onTimeUpdate = (e) => {
const currentTime = e.detail.currentTime; const currentTime = e.detail.currentTime
const duration = e.detail.duration; const duration = e.detail.duration
percent.value = (currentTime / duration * 100).toFixed(2); // percent.value = ((currentTime / duration) * 100).toFixed(2) //
} }
onLoad(async (param) => { onLoad(async (param) => {
detailData.value = [] detailData.value = []
kcid.value = param.id kcid.value = param.id
await watchCount({ await watchCount({
'id': param.id 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({ await studyRecord({
'id': param.id, id: param.id,
'progress': '100' progress: '100'
}) })
} }
await isCollect({"id": param.id}).then((res1)=> { await isCollect({ id: param.id }).then((res1) => {
issc.value = res1.data issc.value = res1.data
}) })
} }
@ -103,12 +100,11 @@
onBeforeUnmount(async () => { onBeforeUnmount(async () => {
if (detailData.value.s_type === 1) { if (detailData.value.s_type === 1) {
await studyRecord({ await studyRecord({
'id': kcid.value, id: kcid.value,
'progress': percent.value progress: percent.value
}) })
} }
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -159,7 +155,7 @@
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
/* 观看人数: */ /* 观看人数: */
color: #007FFF; color: #007fff;
} }
} }
} }
@ -182,7 +178,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #0072FF; color: #0072ff;
} }
} }
@ -196,9 +192,9 @@
flex: 0 1 calc(50% - 13rpx); flex: 0 1 calc(50% - 13rpx);
height: 144rpx; height: 144rpx;
border-radius: 24rpx; border-radius: 24rpx;
background: #FAFDFF; background: #fafdff;
box-sizing: border-box; box-sizing: border-box;
border: 8rpx solid #DBEDFF; border: 8rpx solid #dbedff;
display: grid; display: grid;
justify-items: center; justify-items: center;
align-items: center; align-items: center;
@ -208,7 +204,7 @@
font-size: 30rpx; font-size: 30rpx;
font-weight: normal; font-weight: normal;
letter-spacing: normal; letter-spacing: normal;
color: #007FFF; color: #007fff;
} }
.bz { .bz {
@ -229,7 +225,7 @@
font-weight: 350; font-weight: 350;
line-height: 80rpx; line-height: 80rpx;
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0c092a;
} }
.message { .message {
@ -242,7 +238,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #3D3D3D; color: #3d3d3d;
line-height: 60rpx; line-height: 60rpx;
} }
} }

142
src/pages/learningCenter/index.vue

@ -1,40 +1,61 @@
<template> <template>
<view class="container"> <view class="container">
<view class="xxqd"> <view class="xxqd">
<view class="head"> <view class="head">你的学习清单</view>
你的学习清单
</view>
<view class="main"> <view class="main">
<view class="text"> <view class="text">
距离上次学习已经 距离上次学习已经
<text class="hongzi"> {{learntime.days}}</text> <text class="hongzi">{{ learntime.days }}</text>
<text class="hongzi"> {{learntime.hours}}</text>
<text class="hongzi"> {{learntime.minutes}}</text> <text class="hongzi">{{ learntime.hours }}</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('h', item)"> <view class="xxone" v-for="(item, index) in xxList.slice(0, 3)" :key="index" @click="kcClick('h', item)">
<u-image style="width: 100%;height: 238rpx;border-radius: 16rpx;" <u-image
:src="baseurl + '/' +item.study_center_index_pic" mode="" width="100%" height="238rpx" radius="4"> style="width: 100%; height: 238rpx; border-radius: 16rpx"
:src="baseurl + '/' + item.study_center_index_pic"
mode=""
width="100%"
height="238rpx"
radius="4"
>
<template v-slot:else> <template v-slot:else>
<image v-if="item.s_type === 1" style="width: 55rpx;height: 55rpx;" src="@/static/img/bof.png" mode=""></image> <image v-if="item.s_type === 1" style="width: 55rpx; height: 55rpx" src="@/static/img/bof.png" mode=""></image>
</template> </template>
</u-image> </u-image>
<view class="xxjd"> <view class="xxjd">已学{{ item.progress }}%</view>
已学{{item.progress}}%
</view>
</view> </view>
</view> </view>
<view class="xxls" v-else> <view class="xxls" v-else>无学习历史记录</view>
无学习历史记录
</view> </view>
</view> </view>
</view> <u-tabs
<u-tabs :list="tabList" :lineWidth="34" :lineHeight="4" lineColor="#007FFF" :list="tabList"
:activeStyle="{color: '#0C092A',fontWeight: '600',fontSize: '34rpx'}" :line-width="34"
:inactiveStyle="{color: '#858494',fontWeight: '350',fontSize: '30rpx'}" @click="tabClick"></u-tabs> :line-height="4"
<u-search @search="search" @clickIcon="clickIcon" @clear="clear" shape="square" placeholder="请输入搜索内容" line-color="#007FFF"
placeholderColor="#088cff" v-model="keyword" searchIcon="/static/img/search.png" searchIconSize="14" key-name="title"
:showAction="false" height="40" margin="40rpx 24rpx 24rpx 24rpx"></u-search> :active-style="{ color: '#0C092A', fontWeight: '600', fontSize: '34rpx' }"
:inactive-style="{ color: '#858494', fontWeight: '350', fontSize: '30rpx' }"
@click="tabClick"
></u-tabs>
<u-search
@search="search"
@clickIcon="clickIcon"
@clear="clear"
shape="square"
placeholder="请输入搜索内容"
placeholder-color="#088cff"
v-model="keyword"
search-icon="/static/img/search.png"
search-icon-size="14"
:show-action="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('l', item)"> <view class="kcone" v-for="(item, index) in kcList" :key="index" @click="kcClick('l', item)">
@ -53,14 +74,8 @@
</template> </template>
<script setup> <script setup>
import { import { ref, watch } from 'vue'
ref, import { myStudy, studyCenter, studyCenterCategory } from '@/api/learningCenter'
watch
} from 'vue'
import {
myStudy,
studyCenter
} from '@/api/learningCenter'
const baseurl = import.meta.env.VITE_APP_BASE_URL + '/' const baseurl = import.meta.env.VITE_APP_BASE_URL + '/'
@ -74,30 +89,24 @@
const keyword = ref('') const keyword = ref('')
const tabIndex = ref('') const tabIndex = ref('')
const tabList = ref([{ const tabList = ref([
name: '推荐'
},
{
name: '视频课'
},
{ {
name: '图文课' id: '',
title: '推荐'
} }
]) ])
const kcList = ref([]) const kcList = ref([])
const tabClick = (item) => { const tabClick = (item) => {
keyword.value = '' keyword.value = ''
if (item.index === 0) { if (item.index === 0) {
tabIndex.value = '' tabIndex.value = ''
getcenterList(1, keyword.value, tabIndex.value, 1, 10) getcenterList(1, keyword.value, tabIndex.value, 1, 10)
} else { } else {
tabIndex.value = item.index tabIndex.value = item.id
getcenterList('', keyword.value, tabIndex.value, 1, 10) getcenterList('', keyword.value, tabIndex.value, 1, 10)
} }
} }
const search = (val) => { const search = (val) => {
@ -137,20 +146,18 @@
} }
} }
const useTimeDiff = (targetDateStr) => { const useTimeDiff = (targetDateStr) => {
const days = ref(0); const days = ref(0)
const hours = ref(0); const hours = ref(0)
const minutes = ref(0); const minutes = ref(0)
const targetDate = new Date(targetDateStr.replace(/-/g, '/')); const targetDate = new Date(targetDateStr.replace(/-/g, '/'))
const now = new Date(); const now = new Date()
const diffMs = now - targetDate; const diffMs = now - targetDate
days.value = Math.max(0, Math.floor(diffMs / 86400000)); days.value = Math.max(0, Math.floor(diffMs / 86400000))
hours.value = Math.max(0, Math.floor((diffMs % 86400000) / 3600000)); hours.value = Math.max(0, Math.floor((diffMs % 86400000) / 3600000))
minutes.value = Math.max(0, Math.floor((diffMs % 3600000) / 60000)); minutes.value = Math.max(0, Math.floor((diffMs % 3600000) / 60000))
return { return {
days, days,
@ -171,17 +178,12 @@
return val.splice(f, l) return val.splice(f, l)
} }
onShow(async () => { onShow(async () => {
const res = await myStudy() const res = await myStudy()
if (res.code === 1) { if (res.code === 1) {
xxList.value = res.data xxList.value = res.data
if (res.data.length !== 0) { if (res.data.length !== 0) {
const { const { days, hours, minutes } = useTimeDiff(res.data[0]?.update_time)
days,
hours,
minutes
} = useTimeDiff(res.data[0]?.update_time);
learntime.value.days = days.value learntime.value.days = days.value
learntime.value.hours = hours.value learntime.value.hours = hours.value
learntime.value.minutes = minutes.value learntime.value.minutes = minutes.value
@ -192,13 +194,17 @@
} else { } else {
getcenterList(1, keyword.value, tabIndex.value, 1, 10) getcenterList(1, keyword.value, tabIndex.value, 1, 10)
} }
studyCenterCategory().then((rre) => {
tabList.value = [...tabList.value, ...rre.data]
})
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
padding: 24rpx; padding: 24rpx;
background: linear-gradient(0deg, #F1F3F9 72%, rgba(241, 243, 249, 0.2) 88%); background: linear-gradient(0deg, #f1f3f9 72%, rgba(241, 243, 249, 0.2) 88%);
height: 100vh; height: 100vh;
box-sizing: border-box; box-sizing: border-box;
overflow-y: auto; overflow-y: auto;
@ -223,7 +229,7 @@
font-weight: 350; font-weight: 350;
line-height: 30rpx; line-height: 30rpx;
letter-spacing: normal; letter-spacing: normal;
color: #FFFFFF; color: #ffffff;
z-index: 1; z-index: 1;
} }
@ -231,9 +237,9 @@
width: 100%; width: 100%;
height: 410rpx; height: 410rpx;
border-radius: 48rpx; border-radius: 48rpx;
background: #FFFAF7; background: #fffaf7;
box-sizing: border-box; box-sizing: border-box;
border: 12rpx solid #DBEDFF; border: 12rpx solid #dbedff;
padding: 60rpx 24rpx 54rpx 24rpx; padding: 60rpx 24rpx 54rpx 24rpx;
margin-top: -40rpx; margin-top: -40rpx;
display: grid; display: grid;
@ -249,7 +255,7 @@
line-height: 28rpx; line-height: 28rpx;
letter-spacing: normal; letter-spacing: normal;
/* 距离上次学习已经 */ /* 距离上次学习已经 */
color: #0C092A; color: #0c092a;
} }
.hongzi { .hongzi {
@ -260,7 +266,7 @@
line-height: 28rpx; line-height: 28rpx;
letter-spacing: normal; letter-spacing: normal;
/* 距离上次学习已经 */ /* 距离上次学习已经 */
color: #FE0000; color: #fe0000;
} }
.xxls { .xxls {
@ -287,7 +293,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #FFFFFF; color: #ffffff;
display: grid; display: grid;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@ -304,7 +310,7 @@
width: 100%; width: 100%;
height: 284rpx; height: 284rpx;
border-radius: 32rpx; border-radius: 32rpx;
background: #FFFFFF; background: #ffffff;
display: flex; display: flex;
margin-top: 30rpx; margin-top: 30rpx;
box-sizing: border-box; box-sizing: border-box;
@ -334,7 +340,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0c092a;
} }
.txt { .txt {
@ -365,7 +371,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #007FFF; color: #007fff;
} }
.data { .data {
@ -389,12 +395,12 @@
} }
.u-search__content { .u-search__content {
background-color: #FFFFFF !important; background-color: #ffffff !important;
border-radius: 16rpx !important; border-radius: 16rpx !important;
height: 90rpx !important; height: 90rpx !important;
} }
.u-search__content__input { .u-search__content__input {
background-color: #FFFFFF !important; background-color: #ffffff !important;
} }
</style> </style>

40
src/pages/learningCenter/useTimeDiff.js

@ -1,31 +1,27 @@
import { ref, onMounted, onUnmounted } from 'vue'
import { ref, onMounted, onUnmounted } from 'vue';
export default function useTimeDiff(targetDateStr) { export default function useTimeDiff(targetDateStr) {
const days = ref(0); const days = ref(0)
const hours = ref(0); const hours = ref(0)
const minutes = ref(0); const minutes = ref(0)
const calculateDiff = () => { const calculateDiff = () => {
const targetDate = new Date(targetDateStr.replace(/-/g, '/')); const targetDate = new Date(targetDateStr.replace(/-/g, '/'))
const now = new Date(); const now = new Date()
const diffMs = now - targetDate; const diffMs = now - targetDate
days.value = Math.max(0, Math.floor(diffMs / 86400000))
days.value = Math.max(0, Math.floor(diffMs / 86400000)); hours.value = Math.max(0, Math.floor((diffMs % 86400000) / 3600000))
hours.value = Math.max(0, Math.floor((diffMs % 86400000) / 3600000)); minutes.value = Math.max(0, Math.floor((diffMs % 3600000) / 60000))
minutes.value = Math.max(0, Math.floor((diffMs % 3600000) / 60000)); }
};
let timer;
let timer
onMounted(() => { onMounted(() => {
calculateDiff(); calculateDiff()
timer = setInterval(calculateDiff, 60000); timer = setInterval(calculateDiff, 60000)
}); })
onUnmounted(() => { onUnmounted(() => {
clearInterval(timer); clearInterval(timer)
}); })
return { days, hours, minutes }; return { days, hours, minutes }
} }

18
src/pages/login/login.vue

@ -73,9 +73,7 @@
url: '/pages/index/index' url: '/pages/index/index'
}) })
} }
onLoad((options : any) => { onLoad((options: any) => {})
})
onShow(() => { onShow(() => {
// if (userStore.mobile) { // if (userStore.mobile) {
@ -88,11 +86,15 @@
<!-- <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
color="linear-gradient(270deg, rgba(232, 123, 7, 1) 0%, rgba(247, 205, 77, 1) 100%)" shape="circle" /> @getphonenumber="onGetPhoneNumber"
<view class="backindex" @click="goback"> text="手机号登录"
返回主页 icon-color="#fff"
</view> open-type="getPhoneNumber"
color="linear-gradient(270deg, rgba(232, 123, 7, 1) 0%, rgba(247, 205, 77, 1) 100%)"
shape="circle"
/>
<view class="backindex" @click="goback">返回主页</view>
</view> </view>
</view> </view>
</template> </template>

117
src/pages/memberCenter/index.vue

@ -1,14 +1,37 @@
<template> <template>
<view class="container"> <view class="container">
<u-navbar title="会员中心" placeholder="true" bgColor="#F1F3F9" leftIcon="man-add-fill" leftIconSize="24" <u-navbar
leftText="申请入会" @leftClick="leftClick"> title="会员中心"
</u-navbar> placeholder="true"
<u-search @search="search" @clickIcon="clickIcon" @clear="clear" shape="square" placeholder="请输入搜索内容" bg-color="#F1F3F9"
placeholderColor="#A9D4FF" v-model="keyword" searchIcon="/static/img/search.png" searchIconSize="14" left-icon="man-add-fill"
:showAction="false" height="40" margin="40rpx 24rpx 24rpx 24rpx" bgColor="#FFFFFF"></u-search> left-icon-size="24"
left-text="申请入会"
<u-tabs :list="filterTabs" :activeStyle="{color: '#0C092A',fontsize: '30rpx'}" keyName="title" @leftClick="leftClick"
@click="handleTabSelect"></u-tabs> ></u-navbar>
<u-search
@search="search"
@clickIcon="clickIcon"
@clear="clear"
shape="square"
placeholder="请输入搜索内容"
placeholder-color="#A9D4FF"
v-model="keyword"
search-icon="/static/img/search.png"
search-icon-size="14"
:show-action="false"
height="40"
margin="40rpx 24rpx 24rpx 24rpx"
bg-color="#FFFFFF"
></u-search>
<u-tabs
:list="filterTabs"
:current="current"
:active-style="{ color: '#0C092A', fontsize: '30rpx' }"
key-name="title"
@click="handleTabSelect"
></u-tabs>
<view class="main"> <view class="main">
<scroll-view scroll-y="auto" class="hyonne" @scrolltolower="onloadmore"> <scroll-view scroll-y="auto" class="hyonne" @scrolltolower="onloadmore">
<view class="hyCard" v-for="(item, index) in hyList" :key="index" @click="godetail(item.id)"> <view class="hyCard" v-for="(item, index) in hyList" :key="index" @click="godetail(item.id)">
@ -17,70 +40,62 @@
<view class="textpart"> <view class="textpart">
<view class="namepart"> <view class="namepart">
<text class="name">{{ item.name }}</text> <text class="name">{{ item.name }}</text>
<view class="biaoq" <view class="biaoq" :style="{ background: `linear-gradient(0deg, ${item.member_tag_color} 0%, #dcdcdc70 100%)` }">
:style="{background: `linear-gradient(0deg, ${item.member_tag_color} 0%, #dcdcdc70 100%)`}">
{{ item.member_tag_title }} {{ item.member_tag_title }}
</view> </view>
</view> </view>
<text class="company">{{ item.enterprise ? item.enterprise[0].title : '无' }}</text> <text class="company">{{ item.enterprise ? item.enterprise[0].title : '无' }}</text>
</view> </view>
</view> </view>
<image style="width: 48rpx;height: 48rpx;" src="@/static/img/Icon.png" mode=""></image> <image style="width: 48rpx; height: 48rpx" src="@/static/img/Icon.png" mode=""></image>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { import { ref } from 'vue'
ref
} from 'vue';
import tabsComm from '../index/tabsComm.vue' import tabsComm from '../index/tabsComm.vue'
import { import { memberTagList, memberCenter } from '@/api/memberCenter'
memberTagList,
memberCenter
} from '@/api/memberCenter'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/') const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/')
// //
const keyword = ref(''); const keyword = ref('')
const page = ref(1) const page = ref(1)
const pagesize = ref(6) const pagesize = ref(6)
const current = ref(0)
const search = async (val) => { const search = async (val) => {
page.value = 1 page.value = 1
pagesize.value = 6 pagesize.value = 6
await getMemberCenter(currentTab.value.id, keyword.value, page.value, pagesize.value) await getMemberCenter(currentTab.value, keyword.value, page.value, pagesize.value)
} }
const clickIcon = async () => { const clickIcon = async () => {
page.value = 1 page.value = 1
pagesize.value = 6 pagesize.value = 6
await getMemberCenter(currentTab.value.id, keyword.value, page.value, pagesize.value) await getMemberCenter(currentTab.value, keyword.value, page.value, pagesize.value)
} }
const clear = async () => { const clear = async () => {
page.value = 1 page.value = 1
pagesize.value = 6 pagesize.value = 6
await getMemberCenter(currentTab.value.id, keyword.value, page.value, pagesize.value) await getMemberCenter(currentTab.value, keyword.value, page.value, pagesize.value)
} }
const hyList = ref([]) const hyList = ref([])
const currentTab = ref('全部'); const currentTab = ref('0')
// "" // ""
const filterTabs = ref([{ const filterTabs = ref([
{
id: 0, id: 0,
title: '全部' title: '全部'
}]); }
])
const leftClick = () => { const leftClick = () => {
if (uni.getStorageSync('access_token') === '') { if (uni.getStorageSync('access_token') === '') {
@ -99,10 +114,10 @@
const handleTabSelect = async (tab) => { const handleTabSelect = async (tab) => {
page.value = 1 page.value = 1
pagesize.value = 6 pagesize.value = 6
currentTab.value = tab; currentTab.value = tab.id
// //
await getMemberCenter(tab.id, '', page.value, pagesize.value) await getMemberCenter(tab.id, '', page.value, pagesize.value)
}; }
const godetail = (id) => { const godetail = (id) => {
uni.navigateTo({ uni.navigateTo({
@ -111,22 +126,24 @@
} }
const getbqlist = async () => { const getbqlist = async () => {
filterTabs.value = [{ filterTabs.value = [
{
id: 0, id: 0,
title: '全部' title: '全部'
}] }
]
await memberTagList().then((res) => { await memberTagList().then((res) => {
filterTabs.value = [...filterTabs.value, ...res.data] filterTabs.value = [...filterTabs.value, ...res.data]
console.log(res.data); console.log(res.data)
}) })
} }
const getMemberCenter = async (id, name, page, limit) => { const getMemberCenter = async (id, name, page, limit) => {
let params = { let params = {
'member_tag_id': id, member_tag_id: id,
'name': name, name: name,
'page': page, page: page,
'limit': limit limit: limit
} }
await memberCenter(params).then((res) => { await memberCenter(params).then((res) => {
hyList.value = res.data.data hyList.value = res.data.data
@ -136,17 +153,17 @@
const onloadmore = async () => { const onloadmore = async () => {
page.value++ page.value++
let params = { let params = {
'member_tag_id': currentTab.value.id, member_tag_id: currentTab.value.id,
'name': keyword.value, name: keyword.value,
'page': page.value, page: page.value,
'limit': pagesize.value limit: pagesize.value
} }
await memberCenter(params).then((res) => { await memberCenter(params).then((res) => {
hyList.value = [...hyList.value, ...res.data.data] hyList.value = [...hyList.value, ...res.data.data]
}) })
} }
onShow(async () => { onLoad(async () => {
await getbqlist() await getbqlist()
await getMemberCenter('', '', page.value, pagesize.value) await getMemberCenter('', '', page.value, pagesize.value)
}) })
@ -154,7 +171,7 @@
<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: 100vh;
width: 100%; width: 100%;
overflow-y: auto; overflow-y: auto;
@ -171,7 +188,7 @@
width: 100%; width: 100%;
height: 160rpx; height: 160rpx;
border-radius: 24rpx; border-radius: 24rpx;
background: #FFFFFF; background: #ffffff;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
@ -200,7 +217,7 @@
line-height: 150%; line-height: 150%;
letter-spacing: normal; letter-spacing: normal;
/* 外部/Neutral/Black */ /* 外部/Neutral/Black */
color: #0C092A; color: #0c092a;
} }
.biaoq { .biaoq {
@ -214,7 +231,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #FFFFFF; color: #ffffff;
text-shadow: 0rpx 4rpx 4rpx rgba(0, 0, 0, 0.2); text-shadow: 0rpx 4rpx 4rpx rgba(0, 0, 0, 0.2);
} }
} }
@ -235,7 +252,7 @@
} }
:deep(.u-icon__icon) { :deep(.u-icon__icon) {
color: #007FFF !important; color: #007fff !important;
} }
} }

125
src/pages/memberCenter/inpart.vue

@ -1,45 +1,69 @@
<template> <template>
<view class="container"> <view class="container">
<view class="formlist"> <view class="formlist">
<u-form :model="form" ref="uFormRef" labelPosition="top" :rules="rules"> <u-form :model="form" ref="uFormRef" label-position="top" :rules="rules">
<u-form-item label="姓名" prop="name"> <u-form-item label="姓名" prop="name">
<u-input v-model="form.name" placeholder="请输入真实姓名" placeholderStyle="color: #D3D3D3;" /> <u-input v-model="form.name" placeholder="请输入真实姓名" placeholder-style="color: #D3D3D3;" />
</u-form-item> </u-form-item>
<u-form-item label="会员标签" prop="member_tag_id"> <u-form-item label="会员标签" prop="member_tag_id">
<u-input v-model="member_tag_name" placeholder="请选择" placeholderStyle="color: #D3D3D3;" disabled disabledColor="#ffffff" <u-input
suffixIcon="arrow-down" @tap="show=true"/> v-model="member_tag_name"
<u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="show=false" placeholder="请选择"
keyName="title"></u-picker> placeholderStyle="color: #D3D3D3;"
disabled
disabled-color="#ffffff"
suffixIcon="arrow-down"
@tap="show = true"
/>
<u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="show = false" keyName="title"></u-picker>
</u-form-item> </u-form-item>
<u-form-item label="身份类型" prop="identity"> <u-form-item label="身份类型" prop="identity">
<u-input v-model="identityname" placeholder="请选择" placeholderStyle="color: #D3D3D3;" disabled disabledColor="#ffffff" <u-input
suffixIcon="arrow-down" @tap="idshow=true" /> v-model="identityname"
<u-picker :show="idshow" :columns="idcolumns" @confirm="idconfirm" placeholder="请选择"
@cancel="idshow=false"></u-picker> placeholderStyle="color: #D3D3D3;"
disabled
disabled-color="#ffffff"
suffixIcon="arrow-down"
@tap="idshow = true"
/>
<u-picker :show="idshow" :columns="idcolumns" @confirm="idconfirm" @cancel="idshow = false"></u-picker>
</u-form-item> </u-form-item>
<view class="cardbox" v-if="ishowcommany"> <view class="cardbox" v-if="ishowcommany">
<view v-for="(group, index) in inputGroups" :key="index" class="input-group"> <view v-for="(group, index) in inputGroups" :key="index" class="input-group">
<view class="inputs" @click="beforeRead(index)"> <view class="inputs" @click="beforeRead(index)">
公司性质 公司性质
<input class="inputclass" placeholder-class="inputplacla" disabled disabledColor="#ffffff" <input
:value="group.type==1 ? '其他(自由职业者等)' : (group.type===2 ? '个体工商户' : (group.type===3 ? '民营企业' : '') )" class="inputclass"
placeholder="民营企业、个体工商户、其它(自由职业者等)" @tap="qyshow = true" /> placeholder-class="inputplacla"
<u-action-sheet :actions="qylist" title="请选择关联企业类型" :show="qyshow" @select="qyClick" disabled
@close="qyshow = false"></u-action-sheet> disabledColor="#ffffff"
:value="group.type == 1 ? '其他(自由职业者等)' : group.type === 2 ? '个体工商户' : group.type === 3 ? '民营企业' : ''"
placeholder="民营企业、个体工商户、其它(自由职业者等)"
@tap="qyshow = true"
/>
<u-action-sheet
:actions="qylist"
title="请选择关联企业类型"
:show="qyshow"
@select="qyClick"
@close="qyshow = false"
></u-action-sheet>
公司名称 公司名称
<input class="inputclass" placeholder-class="inputplacla" v-model="group.title" <input class="inputclass" placeholder-class="inputplacla" v-model="group.title" placeholder="请输入真实公司名称" />
placeholder="请输入真实公司名称" />
营业执照 营业执照
<u-upload class="uploadbox" @afterRead="afterRead" :maxCount="1" :imageMode="'heightFix'" <u-upload class="uploadbox" @afterRead="afterRead" :maxCount="1" :imageMode="'heightFix'" :width="auto" :height="144">
:width="auto" :height="144">
<view class="yyzz" v-if="group.license === ''"> <view class="yyzz" v-if="group.license === ''">
<image style="width: 40rpx;height: 40rpx;" src="@/static/img/yyzz.png" mode=""> <image style="width: 40rpx; height: 40rpx" src="@/static/img/yyzz.png" mode=""></image>
</image>
上传营业执照 上传营业执照
</view> </view>
<image v-else @click="beforeRead(index)" <image
style="width: 100%;height: 288rpx;margin-top: 12rpx;" v-else
:src="baseurl+ '/' + group.license" mode="scaleToFill"></image> @click="beforeRead(index)"
style="width: 100%; height: 288rpx; margin-top: 12rpx"
:src="baseurl + '/' + group.license"
mode="scaleToFill"
></image>
</u-upload> </u-upload>
</view> </view>
<view v-if="index > 0" class="remove-btn" @click="removeGroup(index)">-</view> <view v-if="index > 0" class="remove-btn" @click="removeGroup(index)">-</view>
@ -47,26 +71,26 @@
<button @click="addGroup" class="add-btn">+ 添加一组</button> <button @click="addGroup" class="add-btn">+ 添加一组</button>
</view> </view>
<u-form-item label="个人介绍" prop="introduce"> <u-form-item label="个人介绍" prop="introduce">
<u-textarea v-model="form.introduce" autoHeight placeholder="请输入个人介绍" <u-textarea v-model="form.introduce" autoHeight placeholder="请输入个人介绍" placeholderStyle="color: #D3D3D3;"></u-textarea>
placeholderStyle="color: #D3D3D3;"></u-textarea>
</u-form-item> </u-form-item>
<u-form-item label="个人二维码" prop="wx_code"> <u-form-item label="个人二维码" prop="wx_code">
<u-upload class="uploadbox" @afterRead="afterRead1" :maxCount="1" :imageMode="'heightFix'" <u-upload class="uploadbox" @afterRead="afterRead1" :maxCount="1" :imageMode="'heightFix'" :width="auto" :height="144">
:width="auto" :height="144">
<view class="yyzz" v-if="form.wx_code === ''"> <view class="yyzz" v-if="form.wx_code === ''">
<image style="width: 40rpx;height: 40rpx;" src="@/static/img/yyzz.png" mode=""></image> <image style="width: 40rpx; height: 40rpx" src="@/static/img/yyzz.png" mode=""></image>
请上传可以联系到自己的微信二维码 请上传可以联系到自己的微信二维码
</view> </view>
<image v-else style="width: 100%;height: 600rpx;margin-top: 12rpx;" <image
:src="baseurl+ '/' + form.wx_code" mode="scaleToFill"></image> v-else
style="width: 100%; height: 600rpx; margin-top: 12rpx"
:src="baseurl + '/' + form.wx_code"
mode="scaleToFill"
></image>
</u-upload> </u-upload>
</u-form-item> </u-form-item>
</u-form> </u-form>
</view> </view>
<view class="sumitbotton"> <view class="sumitbotton">
<view class="button" @click="submit"> <view class="button" @click="submit">确认提交</view>
确认提交
</view>
</view> </view>
</view> </view>
</template> </template>
@ -100,7 +124,6 @@
const ishowcommany = ref(false) const ishowcommany = ref(false)
const show = ref(false); const show = ref(false);
const columns = ref([]); const columns = ref([]);
@ -117,8 +140,7 @@
{ {
id: 3, id: 3,
text: '民营企业' text: '民营企业'
} }]
]
]); ]);
// //
@ -176,8 +198,7 @@
{ {
id: 3, id: 3,
name: '民营企业', name: '民营企业',
} }]);
]);
const qyClick = async (val) => { const qyClick = async (val) => {
inputGroups.value[upclickindex.value].type = val.id inputGroups.value[upclickindex.value].type = val.id
} }
@ -296,7 +317,7 @@
} }
} }
} }
})
}).catch(() => { }).catch(() => {
// //
uni.$u.toast('请填写完整') uni.$u.toast('请填写完整')
@ -316,7 +337,7 @@
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
background-color: #FFFFFF; background-color: #ffffff;
width: 100%; width: 100%;
height: 100vh; height: 100vh;
overflow-y: hidden; overflow-y: hidden;
@ -381,7 +402,7 @@
.add-btn { .add-btn {
width: auto; width: auto;
padding: 0 30rpx; padding: 0 30rpx;
background: #4CAF50; background: #007fff;
color: white; color: white;
margin-bottom: 60rpx; margin-bottom: 60rpx;
} }
@ -392,7 +413,7 @@
margin-right: 0 !important; margin-right: 0 !important;
height: 100rpx !important; height: 100rpx !important;
border-radius: 10rpx; border-radius: 10rpx;
background: #FFFFFF; background: #ffffff;
} }
:deep(.inputplacla) { :deep(.inputplacla) {
@ -401,7 +422,7 @@
font-weight: 350; font-weight: 350;
line-height: 32.76rpx; line-height: 32.76rpx;
letter-spacing: normal; letter-spacing: normal;
color: #D3D3D3; color: #d3d3d3;
} }
.yyzz { .yyzz {
@ -409,7 +430,7 @@
width: 100%; width: 100%;
height: 288rpx; height: 288rpx;
border-radius: 16rpx; border-radius: 16rpx;
background: #FFFFFF; background: #ffffff;
display: grid; display: grid;
align-content: center; align-content: center;
justify-items: center; justify-items: center;
@ -418,7 +439,7 @@
font-weight: 350; font-weight: 350;
line-height: 70rpx; line-height: 70rpx;
letter-spacing: normal; letter-spacing: normal;
color: #CCCCCC; color: #cccccc;
} }
:deep(.u-upload) { :deep(.u-upload) {
@ -433,7 +454,7 @@
.sumitbotton { .sumitbotton {
width: 100%; width: 100%;
height: 168rpx; height: 168rpx;
background: #FFFFFF; background: #ffffff;
/* 标签栏投影 */ /* 标签栏投影 */
box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.3); box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.3);
display: flex; display: flex;
@ -446,7 +467,7 @@
width: 574rpx; width: 574rpx;
height: 96rpx; height: 96rpx;
border-radius: 248rpx; border-radius: 248rpx;
background: linear-gradient(90deg, #007FFF 0%, #99CCFF 100%); background: linear-gradient(90deg, #007fff 0%, #99ccff 100%);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -459,7 +480,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #FFFFFF; color: #ffffff;
} }
} }
} }
@ -469,7 +490,7 @@
width: 100%; width: 100%;
height: 288rpx; height: 288rpx;
border-radius: 16rpx; border-radius: 16rpx;
background: #FFFFFF; background: #ffffff;
display: grid; display: grid;
align-content: center; align-content: center;
justify-items: center; justify-items: center;
@ -478,7 +499,7 @@
font-weight: 350; font-weight: 350;
line-height: 70rpx; line-height: 70rpx;
letter-spacing: normal; letter-spacing: normal;
color: #CCCCCC; color: #cccccc;
} }
:deep(.u-upload) { :deep(.u-upload) {
@ -491,7 +512,7 @@
</style> </style>
<style> <style>
.u-input { .u-input {
background-color: #FFFFFF; background-color: #ffffff;
height: 100rpx !important; height: 100rpx !important;
} }

31
src/pages/mine/associatedDetail.vue

@ -5,28 +5,23 @@
<view class="icon"></view> <view class="icon"></view>
<text class="title">公司简介</text> <text class="title">公司简介</text>
</view> </view>
<image style="width: 100%;height: 400rpx;margin-top: 40rpx;" src="@/static/img/Bitmap.png" mode=""></image> <image style="width: 100%; height: 400rpx; margin-top: 40rpx" src="@/static/img/Bitmap.png" mode=""></image>
<text class="message">说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明</text> <text class="message">
说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明说明
</text>
</view> </view>
</template> </template>
<script setup> <script setup>
import { import { onLoad } from '@dcloudio/uni-app'
onLoad import { ref } from 'vue'
} from '@dcloudio/uni-app';
import {
ref
} from 'vue';
onLoad(() => {})
onLoad(() => {
})
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
background-color: #FFFFFF; background-color: #ffffff;
height: calc(100vh - 182rpx); height: calc(100vh - 182rpx);
width: 100%; width: 100%;
padding: 40rpx 40rpx 0 40rpx; padding: 40rpx 40rpx 0 40rpx;
@ -40,7 +35,7 @@
height: 32rpx; height: 32rpx;
border-radius: 0rpx 32rpx 32rpx 0rpx; border-radius: 0rpx 32rpx 32rpx 0rpx;
/* 蓝色渐变 */ /* 蓝色渐变 */
background: linear-gradient(0deg, #007FFF 0%, #99CCFF 100%); background: linear-gradient(0deg, #007fff 0%, #99ccff 100%);
} }
.title { .title {
margin-left: 18rpx; margin-left: 18rpx;
@ -52,7 +47,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #0072FF; color: #0072ff;
} }
} }
.texttitle { .texttitle {
@ -60,7 +55,7 @@
font-size: 36rpx; font-size: 36rpx;
font-weight: normal; font-weight: normal;
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0c092a;
} }
.message { .message {
margin-top: 36rpx; margin-top: 36rpx;
@ -72,7 +67,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #3D3D3D; color: #3d3d3d;
} }
.people { .people {
margin-top: 28rpx; margin-top: 28rpx;
@ -86,7 +81,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #3D3D3D; color: #3d3d3d;
} }
} }
} }

26
src/pages/mine/associatedEnterprise.vue

@ -8,27 +8,13 @@
</template> </template>
<script setup> <script setup>
import { import { ref } from 'vue'
ref import { onShow } from '@dcloudio/uni-app'
} from 'vue';
import {
onShow
} from '@dcloudio/uni-app';
import useUserStore from '@/store/user' import useUserStore from '@/store/user'
const userStore = useUserStore() const userStore = useUserStore()
const classList = ref([{ const classList = ref([])
id: 1,
title: '内蒙古数心科技有限公司',
time: '2025-04-17'
},
{
id: 2,
title: '内蒙古数心科技有限公司',
time: '2025-04-17'
},
])
const goDetail = (id) => { const goDetail = (id) => {
uni.navigateTo({ uni.navigateTo({
@ -44,7 +30,7 @@
<style scoped lang="scss"> <style scoped lang="scss">
.classbox { .classbox {
height: 100vh; height: 100vh;
background: linear-gradient(0deg, #F1F3F9 72%, rgb(202 202 204 / 20%) 88%); background: linear-gradient(0deg, #f1f3f9 72%, rgb(202 202 204 / 20%) 88%);
padding: 6rpx 24rpx 40rpx 24rpx; padding: 6rpx 24rpx 40rpx 24rpx;
box-sizing: border-box; box-sizing: border-box;
overflow-y: auto; overflow-y: auto;
@ -53,7 +39,7 @@
width: 100%; width: 100%;
height: 144rpx; height: 144rpx;
border-radius: 20rpx; border-radius: 20rpx;
background: #FFFFFF; background: #ffffff;
display: grid; display: grid;
align-items: center; align-items: center;
padding: 32rpx 28rpx; padding: 32rpx 28rpx;
@ -68,7 +54,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0c092a;
} }
.text { .text {

93
src/pages/mine/completeInformation.vue

@ -4,21 +4,37 @@
<view v-for="(group, index) in inputGroups" :key="index" class="input-group"> <view v-for="(group, index) in inputGroups" :key="index" class="input-group">
<view class="inputs" @click="beforeRead(index)"> <view class="inputs" @click="beforeRead(index)">
公司性质 公司性质
<input class="inputclass" placeholder-class="inputplacla" :value="group.type==1 ? '其他(自由职业者等)' : (group.type===2 ? '个体工商户' : (group.type===3 ? '民营企业' : '') )" <input
placeholder="民营企业、个体工商户、其它(自由职业者等)" disabled disabledColor="#ffffff" @tap="qyshow = true" /> class="inputclass"
<u-action-sheet :actions="qylist" title="请选择关联企业类型" :show="qyshow" @select="qyClick" placeholder-class="inputplacla"
@close="qyshow = false"></u-action-sheet> :value="group.type == 1 ? '其他(自由职业者等)' : group.type === 2 ? '个体工商户' : group.type === 3 ? '民营企业' : ''"
placeholder="民营企业、个体工商户、其它(自由职业者等)"
disabled
disabledColor="#ffffff"
@tap="qyshow = true"
/>
<u-action-sheet
:actions="qylist"
title="请选择关联企业类型"
:show="qyshow"
@select="qyClick"
@close="qyshow = false"
></u-action-sheet>
公司名称 公司名称
<input class="inputclass" placeholder-class="inputplacla" v-model="group.title" <input class="inputclass" placeholder-class="inputplacla" v-model="group.title" placeholder="请输入真实公司名称" />
placeholder="请输入真实公司名称" />
营业执照 营业执照
<u-upload class="uploadbox" @afterRead="afterRead" :maxCount="1" <u-upload class="uploadbox" @afterRead="afterRead" :max-count="1" :image-mode="'heightFix'" :width="auto" :height="144">
:imageMode="'heightFix'" :width="auto" :height="144">
<view class="yyzz" v-if="group.license === ''"> <view class="yyzz" v-if="group.license === ''">
<image style="width: 40rpx;height: 40rpx;" src="@/static/img/yyzz.png" mode=""></image> <image style="width: 40rpx; height: 40rpx" src="@/static/img/yyzz.png" mode=""></image>
上传营业执照 上传营业执照
</view> </view>
<image v-else @click="beforeRead(index)" style="width: 100%;height: 288rpx;margin-top: 12rpx;" :src="baseurl+ '/' + group.license" mode="scaleToFill"></image> <image
v-else
@click="beforeRead(index)"
style="width: 100%; height: 288rpx; margin-top: 12rpx"
:src="baseurl + '/' + group.license"
mode="scaleToFill"
></image>
</u-upload> </u-upload>
</view> </view>
<view v-if="index > 0" class="remove-btn" @click="removeGroup(index)">-</view> <view v-if="index > 0" class="remove-btn" @click="removeGroup(index)">-</view>
@ -27,27 +43,23 @@
</view> </view>
</view> </view>
<view class="buts"> <view class="buts">
<view class="but" @click="submit"> <view class="but" @click="submit">确认提交</view>
确认提交
</view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { import { ref } from 'vue'
ref import { modifyField1 } from '@/api/mine'
} from 'vue'
import {
modifyField1,
} from '@/api/mine'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL) const baseurl = ref(import.meta.env.VITE_APP_BASE_URL)
const inputGroups = ref([{ const inputGroups = ref([
{
type: '', type: '',
title: '', title: '',
license: '' license: ''
}]) }
])
const addGroup = () => { const addGroup = () => {
inputGroups.value.push({ inputGroups.value.push({
@ -58,19 +70,20 @@
} }
const qyshow = ref(false) const qyshow = ref(false)
const qylist = ref([{ const qylist = ref([
{
id: 1, id: 1,
name: '其他(自由职业者等)', name: '其他(自由职业者等)'
}, },
{ {
id: 2, id: 2,
name: '个体工商户', name: '个体工商户'
}, },
{ {
id: 3, id: 3,
name: '民营企业', name: '民营企业'
} }
]); ])
const qyClick = async (val) => { const qyClick = async (val) => {
inputGroups.value[upclickindex.value].type = val.id inputGroups.value[upclickindex.value].type = val.id
} }
@ -90,7 +103,7 @@
filePath: e.file.url, filePath: e.file.url,
name: 'file', name: 'file',
header: { header: {
'token': uni.getStorageSync('access_token') token: uni.getStorageSync('access_token')
}, },
success: async (val) => { success: async (val) => {
inputGroups.value[upclickindex.value].license = '' inputGroups.value[upclickindex.value].license = ''
@ -99,7 +112,7 @@
} }
}, },
fail: (res) => { fail: (res) => {
console.log('失败', res); console.log('失败', res)
} }
}) })
} }
@ -115,9 +128,9 @@
data.push(obj) data.push(obj)
} }
}) })
console.log(data); console.log(data)
if (data.length !== 0) { if (data.length !== 0) {
await modifyField1('enterprise',{"value":`${JSON.stringify(data)}`}).then((res) => { await modifyField1('enterprise', { value: `${JSON.stringify(data)}` }).then((res) => {
if (res.code === 1) { if (res.code === 1) {
setTimeout(() => { setTimeout(() => {
uni.showToast({ uni.showToast({
@ -134,9 +147,7 @@
icon: 'fail' icon: 'fail'
}) })
} }
}) })
} }
} }
</script> </script>
@ -145,7 +156,7 @@
.container { .container {
height: calc(100vh - 168rpx); height: calc(100vh - 168rpx);
width: 100%; width: 100%;
background: #F1F3F9; background: #f1f3f9;
overflow-y: auto; overflow-y: auto;
.cardbox { .cardbox {
@ -200,7 +211,7 @@
.add-btn { .add-btn {
width: auto; width: auto;
padding: 0 30rpx; padding: 0 30rpx;
background: #4CAF50; background: #4caf50;
color: white; color: white;
margin-bottom: 60rpx; margin-bottom: 60rpx;
} }
@ -211,7 +222,7 @@
position: fixed; position: fixed;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
background: #FFFFFF; background: #ffffff;
/* 标签栏投影 */ /* 标签栏投影 */
box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.3); box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.3);
display: flex; display: flex;
@ -222,7 +233,7 @@
width: 574rpx; width: 574rpx;
height: 96rpx; height: 96rpx;
border-radius: 248rpx; border-radius: 248rpx;
background: linear-gradient(90deg, #007FFF 0%, #99CCFF 100%); background: linear-gradient(90deg, #007fff 0%, #99ccff 100%);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -235,7 +246,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #FFFFFF; color: #ffffff;
} }
} }
@ -245,7 +256,7 @@
margin-right: 0 !important; margin-right: 0 !important;
height: 100rpx !important; height: 100rpx !important;
border-radius: 10rpx; border-radius: 10rpx;
background: #FFFFFF; background: #ffffff;
} }
:deep(.inputplacla) { :deep(.inputplacla) {
@ -254,7 +265,7 @@
font-weight: 350; font-weight: 350;
line-height: 32.76rpx; line-height: 32.76rpx;
letter-spacing: normal; letter-spacing: normal;
color: #D3D3D3; color: #d3d3d3;
} }
.yyzz { .yyzz {
@ -262,7 +273,7 @@
width: 100%; width: 100%;
height: 288rpx; height: 288rpx;
border-radius: 16rpx; border-radius: 16rpx;
background: #FFFFFF; background: #ffffff;
display: grid; display: grid;
align-content: center; align-content: center;
justify-items: center; justify-items: center;
@ -271,7 +282,7 @@
font-weight: 350; font-weight: 350;
line-height: 70rpx; line-height: 70rpx;
letter-spacing: normal; letter-spacing: normal;
color: #CCCCCC; color: #cccccc;
} }
:deep(.u-upload) { :deep(.u-upload) {

49
src/pages/mine/index.vue

@ -1,39 +1,42 @@
<template> <template>
<view class="container"> <view class="container">
<image style="width: 100%;" src="@/static/img/ztback.png" mode="widthFix"></image> <image style="width: 100%" src="@/static/img/ztback.png" mode="widthFix"></image>
<view class="main"> <view class="main">
<view class="head"> <view class="head">
<view class="left"> <view class="left">
<u-avatar v-if="userStore.userInfo.moblie" <u-avatar v-if="userStore.userInfo.moblie" :src="url + '/' + userStore.userInfo.head_pic" :size="72"></u-avatar>
:src="url + '/' + userStore.userInfo.head_pic" <img v-else style="width: 72px; height: 72px; border-radius: 50%" src="@/static/img/qdl.png" alt="" />
:size="72"></u-avatar>
<img v-else style="width: 72px;height: 72px;border-radius: 50%;" src="@/static/img/qdl.png" alt="" />
<text class="name">{{ userStore.userInfo.name }}</text> <text class="name">{{ userStore.userInfo.name }}</text>
</view> </view>
<image v-if="userStore.userInfo.moblie" style="width: 48rpx;height: 48rpx;" src="@/static/img/setting.png" mode="" <image
@click="goeditinfo('')"></image> v-if="userStore.userInfo.moblie"
style="width: 48rpx; height: 48rpx"
src="@/static/img/setting.png"
mode=""
@click="goeditinfo('')"
></image>
</view> </view>
<view class="editlist"> <view class="editlist">
<view class="editone" @click="goeditinfo('关联企业')"> <view class="editone" @click="goeditinfo('关联企业')">
<view class="left"> <view class="left">
<image style="width: 74rpx;height: 74rpx;" src="@/static/img/glqy.png" mode=""></image> <image style="width: 74rpx; height: 74rpx" src="@/static/img/glqy.png" mode=""></image>
<text class="txt">关联企业</text> <text class="txt">关联企业</text>
</view> </view>
<image style="width: 14.14rpx;height: 14.14rpx;" src="@/static/img/Group13.png" mode=""></image> <image style="width: 14.14rpx; height: 14.14rpx" src="@/static/img/Group13.png" mode=""></image>
</view> </view>
<view class="editone" @click="goeditinfo('我的申请')"> <view class="editone" @click="goeditinfo('我的申请')">
<view class="left"> <view class="left">
<image style="width: 74rpx;height: 74rpx;" src="@/static/img/wdsq.png" mode=""></image> <image style="width: 74rpx; height: 74rpx" src="@/static/img/wdsq.png" mode=""></image>
<text class="txt">我的申请</text> <text class="txt">我的申请</text>
</view> </view>
<image style="width: 14.14rpx;height: 14.14rpx;" src="@/static/img/Group13.png" mode=""></image> <image style="width: 14.14rpx; height: 14.14rpx" src="@/static/img/Group13.png" mode=""></image>
</view> </view>
<view class="editone" @click="goeditinfo('我的课程')"> <view class="editone" @click="goeditinfo('我的课程')">
<view class="left"> <view class="left">
<image style="width: 74rpx;height: 74rpx;" src="@/static/img/wdkc.png" mode=""></image> <image style="width: 74rpx; height: 74rpx" src="@/static/img/wdkc.png" mode=""></image>
<text class="txt">我的课程</text> <text class="txt">我的课程</text>
</view> </view>
<image style="width: 14.14rpx;height: 14.14rpx;" src="@/static/img/Group13.png" mode=""></image> <image style="width: 14.14rpx; height: 14.14rpx" src="@/static/img/Group13.png" mode=""></image>
</view> </view>
</view> </view>
<view class="buts"> <view class="buts">
@ -46,12 +49,8 @@
</template> </template>
<script setup> <script setup>
import { import { onLoad } from '@dcloudio/uni-app'
onLoad import { ref } from 'vue'
} from '@dcloudio/uni-app';
import {
ref
} from 'vue';
import useUserStore from '@/store/user' import useUserStore from '@/store/user'
const userStore = useUserStore() const userStore = useUserStore()
@ -93,14 +92,14 @@
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
background-color: #FFFFFF; background-color: #ffffff;
height: 100vh; height: 100vh;
width: 100%; width: 100%;
display: grid; display: grid;
.main { .main {
border-radius: 60rpx 60rpx 0rpx 0rpx; border-radius: 60rpx 60rpx 0rpx 0rpx;
background: #FFFFFF; background: #ffffff;
margin-top: -350rpx; margin-top: -350rpx;
height: calc(100vh - 350rpx); height: calc(100vh - 350rpx);
padding: 0 40rpx; padding: 0 40rpx;
@ -124,7 +123,7 @@
text-align: center; text-align: center;
letter-spacing: normal; letter-spacing: normal;
/* 文本/正文 */ /* 文本/正文 */
color: #1A1A1A; color: #1a1a1a;
margin-left: 30rpx; margin-left: 30rpx;
} }
} }
@ -136,7 +135,7 @@
.editone { .editone {
width: 100%; width: 100%;
height: 120rpx; height: 120rpx;
background: #FFFFFF; background: #ffffff;
border-bottom: 2rpx solid #f3f3f3; border-bottom: 2rpx solid #f3f3f3;
display: flex; display: flex;
align-items: center; align-items: center;
@ -169,7 +168,7 @@
width: 574rpx; width: 574rpx;
height: 96rpx; height: 96rpx;
border-radius: 248rpx; border-radius: 248rpx;
background: linear-gradient(90deg, #007FFF 0%, #99CCFF 100%); background: linear-gradient(90deg, #007fff 0%, #99ccff 100%);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -181,7 +180,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #FFFFFF; color: #ffffff;
} }
} }
} }

57
src/pages/mine/myApplication.vue

@ -1,29 +1,24 @@
<template> <template>
<view class="classbox"> <view class="classbox">
<view class="pass"> <view class="pass">
<view class="head"> <view class="head">申请通过</view>
申请通过
</view>
<view class="main"> <view class="main">
<view class="classone" v-for="(item, index) in passList" :key="index"> <view class="classone" v-for="(item, index) in passList" :key="index">
<text class="title">{{ item.name }}</text> <text class="title">{{ item.name }}</text>
<view class="jindu"> <view class="jindu">
<image style="width: 32rpx;height: 32rpx;" src="@/static/img/timeicon.png" mode=""></image> <image style="width: 32rpx; height: 32rpx" src="@/static/img/timeicon.png" mode=""></image>
<text class="time">{{ item.create_time }}</text> <text class="time">{{ item.create_time }}</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="reject"> <view class="reject">
<view class="head"> <view class="head">申请驳回</view>
申请驳回
</view>
<view class="main"> <view class="main">
<view class="classone" v-for="(item, index) in rejectList" :key="index"> <view class="classone" v-for="(item, index) in rejectList" :key="index">
<text class="title">{{ item.name }}</text> <text class="title">{{ item.name }}</text>
<view class="jindu"> <view class="jindu">
<image style="width: 32rpx;height: 32rpx;" src="@/static/img/timeicon.png" mode=""></image> <image style="width: 32rpx; height: 32rpx" src="@/static/img/timeicon.png" mode=""></image>
<text class="time">{{ item.create_time }}</text> <text class="time">{{ item.create_time }}</text>
</view> </view>
<text class="result">{{ item.remark || item.reject_reason }}</text> <text class="result">{{ item.remark || item.reject_reason }}</text>
@ -34,18 +29,11 @@
</template> </template>
<script setup> <script setup>
import { import { ref } from 'vue'
ref import { myMemberApply } from '@/api/memberCenter'
} from 'vue'; import { myMedium } from '@/api/shop'
import {
myMemberApply
} from '@/api/memberCenter'
import {
myMedium
} from '@/api/shop'
import { onShow } from '@dcloudio/uni-app';
import { onShow } from '@dcloudio/uni-app'
const passList = ref([]) const passList = ref([])
@ -56,19 +44,17 @@
res.data.forEach((ele) => { res.data.forEach((ele) => {
if (ele.status === 2) { if (ele.status === 2) {
passList.value.push(ele) passList.value.push(ele)
} } else if (ele.status === 3) {
else if(ele.status === 3) {
rejectList.value.push(ele) rejectList.value.push(ele)
} }
}) })
}) })
await myMedium().then((res) => { await myMedium().then((res) => {
console.log(res,55555); console.log(res, 55555)
res.data.data.forEach((ele) => { res.data.data.forEach((ele) => {
if (ele.status === 1) { if (ele.status === 1) {
passList.value.push(ele) passList.value.push(ele)
} } else if (ele.status === 2) {
else if(ele.status === 2) {
rejectList.value.push(ele) rejectList.value.push(ele)
} }
}) })
@ -79,7 +65,7 @@
<style scoped lang="scss"> <style scoped lang="scss">
.classbox { .classbox {
height: 100vh; height: 100vh;
background: #FFFFFF; background: #ffffff;
padding: 40rpx 34rpx; padding: 40rpx 34rpx;
box-sizing: border-box; box-sizing: border-box;
overflow-y: auto; overflow-y: auto;
@ -92,7 +78,7 @@
height: 72rpx; height: 72rpx;
display: flex; display: flex;
align-items: center; align-items: center;
background: #007FFF; background: #007fff;
font-family: Lato; font-family: Lato;
font-size: 32rpx; font-size: 32rpx;
font-weight: normal; font-weight: normal;
@ -100,13 +86,13 @@
align-items: center; align-items: center;
letter-spacing: 0.76rpx; letter-spacing: 0.76rpx;
/* System Background Primary Light */ /* System Background Primary Light */
color: #FFFFFF; color: #ffffff;
padding-left: 32rpx; padding-left: 32rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.main { .main {
background: #F1F3F9; background: #f1f3f9;
padding: 5rpx 16rpx 24rpx 16rpx; padding: 5rpx 16rpx 24rpx 16rpx;
box-sizing: border-box; box-sizing: border-box;
border-radius: 0rpx 0rpx 24rpx 24rpx; border-radius: 0rpx 0rpx 24rpx 24rpx;
@ -122,7 +108,7 @@
height: 72rpx; height: 72rpx;
display: flex; display: flex;
align-items: center; align-items: center;
background: #FFC36F; background: #ffc36f;
font-family: Lato; font-family: Lato;
font-size: 32rpx; font-size: 32rpx;
font-weight: normal; font-weight: normal;
@ -130,25 +116,24 @@
align-items: center; align-items: center;
letter-spacing: 0.76rpx; letter-spacing: 0.76rpx;
/* System Background Primary Light */ /* System Background Primary Light */
color: #FFFFFF; color: #ffffff;
padding-left: 32rpx; padding-left: 32rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.main { .main {
background: #F1F3F9; background: #f1f3f9;
padding: 5rpx 16rpx 24rpx 16rpx; padding: 5rpx 16rpx 24rpx 16rpx;
box-sizing: border-box; box-sizing: border-box;
border-radius: 0rpx 0rpx 24rpx 24rpx; border-radius: 0rpx 0rpx 24rpx 24rpx;
} }
} }
} }
.classone { .classone {
width: 100%; width: 100%;
border-radius: 16rpx; border-radius: 16rpx;
background: #FFFFFF; background: #ffffff;
display: grid; display: grid;
align-items: center; align-items: center;
padding: 16rpx 32rpx; padding: 16rpx 32rpx;
@ -162,7 +147,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: 0.76rpx; letter-spacing: 0.76rpx;
color: #0C092A; color: #0c092a;
} }
.jindu { .jindu {
@ -190,7 +175,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: 0.76rpx; letter-spacing: 0.76rpx;
color: #FE0000; color: #fe0000;
} }
} }
</style> </style>

15
src/pages/mine/myCourses.vue

@ -12,11 +12,8 @@
</template> </template>
<script setup> <script setup>
import { ref } from 'vue'; import { ref } from 'vue'
import { import { myStudy } from '@/api/learningCenter'
myStudy
} from '@/api/learningCenter'
const classList = ref([]) const classList = ref([])
@ -37,7 +34,7 @@ import { ref } from 'vue';
<style scoped lang="scss"> <style scoped lang="scss">
.classbox { .classbox {
height: 100vh; height: 100vh;
background: linear-gradient(0deg, #F1F3F9 72%, rgb(202 202 204 / 20%) 88%); background: linear-gradient(0deg, #f1f3f9 72%, rgb(202 202 204 / 20%) 88%);
padding: 6rpx 24rpx 40rpx 24rpx; padding: 6rpx 24rpx 40rpx 24rpx;
box-sizing: border-box; box-sizing: border-box;
overflow-y: auto; overflow-y: auto;
@ -45,7 +42,7 @@ import { ref } from 'vue';
.classone { .classone {
width: 100%; width: 100%;
border-radius: 20rpx; border-radius: 20rpx;
background: #FFFFFF; background: #ffffff;
display: grid; display: grid;
align-items: center; align-items: center;
padding: 30rpx 28rpx; padding: 30rpx 28rpx;
@ -58,7 +55,7 @@ import { ref } from 'vue';
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0c092a;
} }
.text { .text {
margin-top: 16rpx; margin-top: 16rpx;
@ -84,7 +81,7 @@ import { ref } from 'vue';
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #007FFF; color: #007fff;
display: flex; display: flex;
align-items: center; align-items: center;
} }

110
src/pages/mine/porsonalinfo.vue

@ -3,13 +3,12 @@
<view class="editbox"> <view class="editbox">
<view class="editone"> <view class="editone">
<view class="left"> <view class="left">
<image style="width: 32rpx;height: 32rpx;" src="@/static/img/tx.png" mode=""></image> <image style="width: 32rpx; height: 32rpx" src="@/static/img/tx.png" mode=""></image>
<text class="txt">头像</text> <text class="txt">头像</text>
</view> </view>
<view class="right"> <view class="right">
<u-upload :fileList="form.fileList" @afterRead="afterRead" :maxCount="1" :accept="'file'"> <u-upload :file-list="form.fileList" @afterRead="afterRead" :max-count="1">
<image :src='url + `/` + userStore.userInfo.head_pic' mode="" <image :src="url + `/` + userStore.userInfo.head_pic" mode="" style="width: 80rpx; height: 80rpx; border-radius: 50%"></image>
style="width: 80rpx;height: 80rpx;border-radius: 50%;"></image>
</u-upload> </u-upload>
<!-- <image style="width: 18rpx;height: 18rpx;margin-left: 16rpx;" src="@/static/img/Group13.png" <!-- <image style="width: 18rpx;height: 18rpx;margin-left: 16rpx;" src="@/static/img/Group13.png"
mode=""></image> --> mode=""></image> -->
@ -17,7 +16,7 @@
</view> </view>
<view class="editone"> <view class="editone">
<view class="left"> <view class="left">
<image style="width: 32rpx;height: 32rpx;" src="@/static/img/yhm.png" mode=""></image> <image style="width: 32rpx; height: 32rpx" src="@/static/img/yhm.png" mode=""></image>
<text class="txt">用户名</text> <text class="txt">用户名</text>
</view> </view>
<view class="right" @click="openpopup('用户名')"> <view class="right" @click="openpopup('用户名')">
@ -26,66 +25,67 @@
<text class="title">{{ popupTitle }}</text> <text class="title">{{ popupTitle }}</text>
<u-input type="text" v-model="userValue" /> <u-input type="text" v-model="userValue" />
<view class="buts"> <view class="buts">
<view class="jujue" @click="usershow = false"> <view class="jujue" @click="usershow = false">取消</view>
取消 <view class="yunxu" @click="sureClick(typeValue)">确认</view>
</view>
<view class="yunxu" @click="sureClick(typeValue)">
确认
</view>
</view> </view>
</view> </view>
</u-popup> </u-popup>
<text class="value">{{ userStore.userInfo.nickname }}</text> <text class="value">{{ userStore.userInfo.nickname }}</text>
<image style="width: 18rpx;height: 18rpx;margin-left: 16rpx;" src="@/static/img/Group13.png" mode="" <image style="width: 18rpx; height: 18rpx; margin-left: 16rpx" src="@/static/img/Group13.png" mode=""></image>
></image>
</view> </view>
</view> </view>
<view class="editone"> <view class="editone">
<view class="left"> <view class="left">
<image style="width: 32rpx;height: 32rpx;" src="@/static/img/xb.png" mode=""></image> <image style="width: 32rpx; height: 32rpx" src="@/static/img/xb.png" mode=""></image>
<text class="txt">性别</text> <text class="txt">性别</text>
</view> </view>
<view class="right" @click="sexshow = true"> <view class="right" @click="sexshow = true">
<text class="value">{{ userStore.userInfo.sex_name }}</text> <text class="value">{{ userStore.userInfo.sex_name }}</text>
<u-action-sheet :actions="sexlist" title="请选择性别" :show="sexshow" @select="selectClick" <u-action-sheet
@close="sexshow = false"></u-action-sheet> :actions="sexlist"
<image style="width: 18rpx;height: 18rpx;margin-left: 16rpx;" src="@/static/img/Group13.png" mode="" title="请选择性别"
></image> :show="sexshow"
@select="selectClick"
@close="sexshow = false"
></u-action-sheet>
<image style="width: 18rpx; height: 18rpx; margin-left: 16rpx" src="@/static/img/Group13.png" mode=""></image>
</view> </view>
</view> </view>
<view class="editone"> <view class="editone">
<view class="left"> <view class="left">
<image style="width: 32rpx;height: 32rpx;" src="@/static/img/sjh.png" mode=""></image> <image style="width: 32rpx; height: 32rpx" src="@/static/img/sjh.png" mode=""></image>
<text class="txt">绑定手机号</text> <text class="txt">绑定手机号</text>
</view> </view>
<view class="right" @click="openpopup('手机号')"> <view class="right" @click="openpopup('手机号')">
<text class="value">{{ userStore.userInfo.moblie }}</text> <text class="value">{{ userStore.userInfo.moblie }}</text>
<image style="width: 18rpx;height: 18rpx;margin-left: 16rpx;" src="@/static/img/Group13.png" mode="" <image style="width: 18rpx; height: 18rpx; margin-left: 16rpx" src="@/static/img/Group13.png" mode=""></image>
></image>
</view> </view>
</view> </view>
<view class="editone"> <view class="editone">
<view class="left"> <view class="left">
<image style="width: 32rpx;height: 32rpx;" src="@/static/img/zsxm.png" mode=""></image> <image style="width: 32rpx; height: 32rpx" src="@/static/img/zsxm.png" mode=""></image>
<text class="txt">真实姓名</text> <text class="txt">真实姓名</text>
</view> </view>
<view class="right" @click="openpopup('姓名')"> <view class="right" @click="openpopup('姓名')">
<text class="value">{{ userStore.userInfo.name }}</text> <text class="value">{{ userStore.userInfo.name }}</text>
<image style="width: 18rpx;height: 18rpx;margin-left: 16rpx;" src="@/static/img/Group13.png" mode="" <image style="width: 18rpx; height: 18rpx; margin-left: 16rpx" src="@/static/img/Group13.png" mode=""></image>
></image>
</view> </view>
</view> </view>
<view class="editone"> <view class="editone">
<view class="left"> <view class="left">
<image style="width: 32rpx;height: 32rpx;" src="@/static/img/szqy.png" mode=""></image> <image style="width: 32rpx; height: 32rpx" src="@/static/img/szqy.png" mode=""></image>
<text class="txt">关联企业</text> <text class="txt">关联企业</text>
</view> </view>
<view class="right" @click="qyshow = true"> <view class="right" @click="qyshow = true">
<text class="value">{{ userStore.userInfo.identity_name }}</text> <text class="value">{{ userStore.userInfo.identity_name }}</text>
<u-action-sheet :actions="qylist" title="请选择关联企业类型" :show="qyshow" @select="qyClick" <u-action-sheet
@close="qyshow = false"></u-action-sheet> :actions="qylist"
<image style="width: 18rpx;height: 18rpx;margin-left: 16rpx;" src="@/static/img/Group13.png" mode="" title="请选择关联企业类型"
></image> :show="qyshow"
@select="qyClick"
@close="qyshow = false"
></u-action-sheet>
<image style="width: 18rpx; height: 18rpx; margin-left: 16rpx" src="@/static/img/Group13.png" mode=""></image>
</view> </view>
</view> </view>
</view> </view>
@ -93,25 +93,22 @@
</template> </template>
<script setup> <script setup>
import { import { ref } from 'vue'
ref import { modifyField } from '@/api/mine'
} from 'vue';
import {
modifyField
} from '@/api/mine'
import useUserStore from '@/store/user' import useUserStore from '@/store/user'
const userStore = useUserStore() const userStore = useUserStore()
const url = ref(import.meta.env.VITE_APP_BASE_URL) const url = ref(import.meta.env.VITE_APP_BASE_URL)
const sexshow = ref(false) const sexshow = ref(false)
const sexlist = ref([{ const sexlist = ref([
name: '男',
},
{ {
name: '女', name: '男'
}, },
]); {
name: '女'
}
])
const selectClick = async (val) => { const selectClick = async (val) => {
await modifyField('sex', val.name === '男' ? 1 : 2).then((res) => { await modifyField('sex', val.name === '男' ? 1 : 2).then((res) => {
if (res.code === 1) { if (res.code === 1) {
@ -129,24 +126,24 @@
icon: 'fail' icon: 'fail'
}) })
} }
}) })
} }
const qyshow = ref(false) const qyshow = ref(false)
const qylist = ref([{ const qylist = ref([
{
id: 1, id: 1,
name: '其他(自由职业者等)', name: '其他(自由职业者等)'
}, },
{ {
id: 2, id: 2,
name: '个体工商户', name: '个体工商户'
}, },
{ {
id: 3, id: 3,
name: '民营企业', name: '民营企业'
} }
]); ])
const qyClick = async (val) => { const qyClick = async (val) => {
await modifyField('identity', val.id).then((res) => { await modifyField('identity', val.id).then((res) => {
if (res.code === 1) { if (res.code === 1) {
@ -169,15 +166,12 @@
icon: 'fail' icon: 'fail'
}) })
} }
}) })
} }
const usershow = ref(false) const usershow = ref(false)
const popupTitle = ref('') const popupTitle = ref('')
const userValue = ref('') const userValue = ref('')
const typeValue = ref('') const typeValue = ref('')
@ -229,14 +223,13 @@
} }
} }
const afterRead = async (e) => { const afterRead = async (e) => {
uni.uploadFile({ uni.uploadFile({
url: import.meta.env.VITE_APP_BASE_URL + '/api/file/image', url: import.meta.env.VITE_APP_BASE_URL + '/api/file/image',
filePath: e.file.url, filePath: e.file.url,
name: 'file', name: 'file',
header: { header: {
'token': uni.getStorageSync('access_token') token: uni.getStorageSync('access_token')
}, },
success: async (val) => { success: async (val) => {
await modifyField('head_pic', JSON.parse(val.data).data.url).then((res) => { await modifyField('head_pic', JSON.parse(val.data).data.url).then((res) => {
@ -255,11 +248,10 @@
icon: 'fail' icon: 'fail'
}) })
} }
}) })
}, },
fail: (res) => { fail: (res) => {
console.log('失败',res); console.log('失败', res)
} }
}) })
} }
@ -269,18 +261,18 @@
.container { .container {
height: 100vh; height: 100vh;
width: 100%; width: 100%;
background: #F1F3F9; background: #f1f3f9;
.editbox { .editbox {
background: #FFFFFF; background: #ffffff;
padding: 0 72rpx 0 62rpx; padding: 0 72rpx 0 62rpx;
.editone { .editone {
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
height: 120rpx; height: 120rpx;
background: #FFFFFF; background: #ffffff;
border-bottom: 2rpx solid #EBEBEB; border-bottom: 2rpx solid #ebebeb;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
@ -345,7 +337,7 @@
width: 180rpx; width: 180rpx;
height: 70rpx; height: 70rpx;
border-radius: 10rpx; border-radius: 10rpx;
background: #07C160; background: #07c160;
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 28rpx; font-size: 28rpx;
text-align: justify; text-align: justify;
@ -353,7 +345,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
color: #FFFFFF; color: #ffffff;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;

BIN
src/static/img/aiback.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 925 B

BIN
src/static/img/aiimg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

BIN
src/static/img/hdzq.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
src/static/img/xzs.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
src/static/tabbar/index_select.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 750 B

After

Width:  |  Height:  |  Size: 680 B

4
src/store/user.ts

@ -40,11 +40,9 @@ export default defineStore(
.catch((err) => { .catch((err) => {
reject(err) reject(err)
}) })
}) })
} }
function logOut() { function logOut() {
if (uni.getStorageSync('access_token') === '') { if (uni.getStorageSync('access_token') === '') {
uni.navigateTo({ uni.navigateTo({
@ -54,7 +52,7 @@ export default defineStore(
userInfo.value = {} userInfo.value = {}
uni.clearStorageSync() uni.clearStorageSync()
const res = logout() const res = logout()
console.log(res,uni.getStorageSync('access_token')); console.log(res, uni.getStorageSync('access_token'))
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',

8
src/utils/http.ts

@ -28,10 +28,10 @@ export const request = {
url = import.meta.env.VITE_APP_BASE_URL + url url = import.meta.env.VITE_APP_BASE_URL + url
// #endif // #endif
const header = Object.assign({ 'content-type': 'application/json', const header = Object.assign(
Authorization: '', { 'content-type': 'application/json', Authorization: '', token: uni.getStorageSync('access_token') || '' },
'token': uni.getStorageSync('access_token') || '', headers
}, headers) )
uni.request({ uni.request({
url, url,

Loading…
Cancel
Save