Browse Source

代码调试

master
沈明 1 year ago
parent
commit
cf61fc82b4
  1. 3
      package.json
  2. 8312
      pnpm-lock.yaml
  3. 4
      src/app/pages/mine/index.vue
  4. 187
      src/app/pages/votingElection/index.vue
  5. 5
      src/main.js
  6. 15
      src/pages.json
  7. 32
      src/types/global.d.ts

3
package.json

@ -52,6 +52,7 @@
"@dcloudio/uni-mp-toutiao": "3.0.0-3080720230703001", "@dcloudio/uni-mp-toutiao": "3.0.0-3080720230703001",
"@dcloudio/uni-mp-weixin": "3.0.0-3080720230703001", "@dcloudio/uni-mp-weixin": "3.0.0-3080720230703001",
"@dcloudio/uni-quickapp-webview": "3.0.0-3080720230703001", "@dcloudio/uni-quickapp-webview": "3.0.0-3080720230703001",
"feng-uniapp-exploit": "^1.0.2",
"html2canvas": "^1.4.1", "html2canvas": "^1.4.1",
"image-tools": "^1.4.0", "image-tools": "^1.4.0",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
@ -59,7 +60,7 @@
"qrcode": "^1.5.1", "qrcode": "^1.5.1",
"qs": "6.7.0", "qs": "6.7.0",
"sortablejs": "^1.15.0", "sortablejs": "^1.15.0",
"uview-plus": "^3.1.29", "uview-plus": "^3.4.6",
"vue": "^3.3.0", "vue": "^3.3.0",
"vue-i18n": "^9.2.2", "vue-i18n": "^9.2.2",
"weixin-js-sdk": "^1.6.0" "weixin-js-sdk": "^1.6.0"

8312
pnpm-lock.yaml

File diff suppressed because it is too large

4
src/app/pages/mine/index.vue

@ -9,6 +9,4 @@ import { reactive, ref } from 'vue';
</script> </script>
<style> <style></style>
</style>

187
src/app/pages/votingElection/index.vue

@ -1,6 +1,101 @@
// <script setup lang="ts">
import {
onMounted,
ref
} from 'vue';
const tpList = ref([
{
img: '/static/img/grxx.png',
name: '陈志远',
class: '现任财务总监',
}
])
const doSearch = (_formData: { page: number; limit: number }, onSuccess: Function) => {
// const submitData = { ...formData }
// listApi(submitData, userStore.useType).then((res) => {
// const { data } = res as { data: { data: any; total: number } }
// onSuccess({ data })
// })
onSuccess({
data: {
data: [
{
id: 1,
name: '测试一',
phone: '17612341234',
address: '测试地址',
region_desc: '测试地址测试地址测试地址测试地址',
is_default: true
},
{
id: 2,
name: '测试一',
phone: '17612341234',
address: '测试地址',
region_desc: '测试地址测试地址测试地址测试地址'
},
{
id: 3,
name: '测试一',
phone: '17612341234',
address: '测试地址',
region_desc: '测试地址测试地址测试地址测试地址'
},
{
id: 4,
name: '测试一',
phone: '17612341234',
address: '测试地址',
region_desc: '测试地址测试地址测试地址测试地址'
}
],
total: 0
}
})
}
</script>
<template> <template>
<view class="box"> <view class="box">
<ex-header :leftShow="false" backgroundColor="#2563EB" textColor="#fff" title="地址管理" />
<ex-list ref="reListRef" custom-list-type="scroll" :on-form-search="doSearch" empty-text="暂无收货地址~"
customListType="custom">
<template v-slot="{ data }">
<view class="headpart">
<view class="title">
2024年度董事会成员选举
</view>
<view class="time">
投票开始时间2024年3月15日 18:00
</view>
<view class="time">
投票截止时间2024年3月15日 18:00
</view>
</view>
<view v-for="(row, index) of data" class="address-items flex" @click.stop="onChoose(row)">
<view class="flex1 left">
<view class="flex-center-start">
<text class="name">{{ row.name }}</text>
<text class="name">{{ row.phone }}</text>
<text v-if="row.is_default" class="isdefault">默认地址</text>
</view>
<view class="info text-ellipsis">{{ row.region_desc }}{{ row.address }}</view>
</view>
<view class="flex column right">
<text @click.stop="navto('pages/address/edit', { id: row.id, isadd: 0 })">编辑</text>
<text v-if="!row.is_default" style="margin-top: 14rpx"
@click.stop="setDefault(row, index)">设为默认</text>
</view>
</view>
</template>
</ex-list>
</view>
<!-- <view class="box">
<view class="main"> <view class="main">
<view class="headpart"> <view class="headpart">
<view class="title"> <view class="title">
@ -14,11 +109,11 @@
</view> </view>
</view> </view>
<view class="tppart"> <view class="tppart">
<view class="tpone" v-for="(item,index) in tpList" :key="index"> <view class="tpone" v-for="(item, index) in tpList" :key="index">
<img style="width: 96rpx;height: 96rpx; border-radius: 50%;" :src="item.img" alt="" /> <img style="width: 96rpx;height: 96rpx; border-radius: 50%;" :src="item.img" alt="" />
<view class="rightpart"> <view class="rightpart">
<view class="name"> <view class="name">
{{item.name}} {{ item.name }}
</view> </view>
<view class="class"> <view class="class">
@ -30,43 +125,21 @@
<view class="buts"> <view class="buts">
</view> </view>
</view> </view> -->
</template> </template>
<script setup>
import {
onMounted,
ref
} from 'vue';
const tpList = ref([
{
img: '/static/img/grxx.png',
name: '陈志远',
class: '现任财务总监',
}
])
</script>
<style scoped lang="scss"> <style scoped lang="scss">
.box { .box {
width: 100%; width: 100%;
height: 100vh; min-height: 100vh;
background-color: #F9FAFB; background-color: #F9FAFB;
.main {
width: 100%;
height: 90vh;
display: grid;
justify-items: center;
align-content: start;
.headpart { .headpart {
width: 86%; width: 86%;
height: 194rpx; height: 194rpx;
border-radius: 24rpx; border-radius: 24rpx;
background-color: #EFF6FF; background-color: #EFF6FF;
margin-top: 32rpx; margin: 32rpx auto;
padding: 20rpx 3%; padding: 20rpx 3%;
.title { .title {
@ -82,6 +155,15 @@
} }
} }
.main {
width: 100%;
height: 90vh;
display: grid;
justify-items: center;
align-content: start;
.tppart { .tppart {
margin-top: 32rpx; margin-top: 32rpx;
width: 100%; width: 100%;
@ -98,13 +180,58 @@
background-color: #FFFFFF; background-color: #FFFFFF;
border: 2rpx solid #F3F4F6; border: 2rpx solid #F3F4F6;
box-shadow: 5rpx 5rpx 3rpx 0 rgba(212, 212, 212, 0.7); box-shadow: 5rpx 5rpx 3rpx 0 rgba(212, 212, 212, 0.7);
.rightpart { .rightpart {
margin-left: 40rpx; margin-left: 40rpx;
.name {}
}
}
}
}
.address-items {
padding: 20rpx 15rpx 32rpx 28rpx;
background-color: #fff;
border-bottom: 2rpx solid #f5f5f5;
.left {
flex: 1;
overflow: hidden;
.name { .name {
font-size: 28rpx;
font-weight: 700;
color: #101010;
line-height: 40rpx;
margin-right: 16rpx;
}
.isdefault {
font-size: 20rpx;
font-weight: 400;
color: #fff;
padding: 4rpx 12rpx;
border-radius: 8rpx;
background: linear-gradient(90deg, #4778ff 0%, #4778ffb8 100%);
} }
.info {
width: 100%;
color: #666;
font-size: 24rpx;
font-weight: 400;
margin-top: 12rpx;
} }
} }
.right {
width: 140rpx;
padding-left: 32rpx;
font-size: 24rpx;
font-weight: 400;
color: #4979ff;
text-align: right;
} }
} }
@ -116,5 +243,5 @@
bottom: 0; bottom: 0;
border-top: 2rpx solid #ebebec; border-top: 2rpx solid #ebebec;
} }
} }
</style> </style>

5
src/main.js

@ -7,13 +7,16 @@ import '@/styles/index.scss'
import 'virtual:windi.css' import 'virtual:windi.css'
import { uniStorage } from './utils/storage' import { uniStorage } from './utils/storage'
import mixin from './utils/mixin' import mixin from './utils/mixin'
import fengUniappExploit from 'feng-uniapp-exploit'
export function createApp() { export function createApp () {
const app = createSSRApp(App) const app = createSSRApp(App)
app.use(Pinia.createPinia()) app.use(Pinia.createPinia())
app.use(locale) app.use(locale)
app.use(uviewPlus) app.use(uviewPlus)
app.use(mixin) app.use(mixin)
app.use(fengUniappExploit)
uniStorage() uniStorage()
return { return {
app, app,

15
src/pages.json

@ -1,5 +1,6 @@
{ {
"pages": [{ "pages": [
{
"path": "app/pages/votingElection/index", "path": "app/pages/votingElection/index",
"style": { "style": {
"navigationBarTitleText": "投票选举" "navigationBarTitleText": "投票选举"
@ -85,7 +86,8 @@
"selectedColor": "#2563EB", "selectedColor": "#2563EB",
"borderStyle": "white", "borderStyle": "white",
"backgroundColor": "#F9FAFB", "backgroundColor": "#F9FAFB",
"list": [{ "list": [
{
"pagePath": "app/pages/votingElection/index", "pagePath": "app/pages/votingElection/index",
"iconPath": "static/img/tpxj.png", "iconPath": "static/img/tpxj.png",
"selectedIconPath": "static/img/tpxj-select.png", "selectedIconPath": "static/img/tpxj-select.png",
@ -127,16 +129,19 @@
"^up-(.*)": "uview-plus/components/u-$1/u-$1.vue", "^up-(.*)": "uview-plus/components/u-$1/u-$1.vue",
"^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue", "^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue",
"diy-(\W.*)": "@/app/components/diy/$1/index.vue", "diy-(\W.*)": "@/app/components/diy/$1/index.vue",
"fixed-(\W.*)": "@/app/components/fixed/$1/index.vue" "fixed-(\W.*)": "@/app/components/fixed/$1/index.vue",
"^ex-(.*)": "feng-uniapp-exploit/components/ex-$1/ex-$1.vue",
} }
}, },
"condition": { // "condition": { //
"current": 0, //(list ) "current": 0, //(list )
"list": [{ "list": [
{
"name": "", // "name": "", //
"path": "", // "path": "", //
"query": "" //onLoad "query": "" //onLoad
}] }
]
}, },
"permission": { "permission": {
"scope.userLocation": { "scope.userLocation": {

32
src/types/global.d.ts

@ -1,21 +1,27 @@
/// <reference types="uview-plus/types/index" />
/// <reference types="feng-uniapp-exploit/types/index" />
declare module 'uview-plus'
declare module 'feng-uniapp-exploit'
declare interface redirectOptions { declare interface redirectOptions {
url : string url: string
mode ?: 'switchTab' | 'navigateTo' | 'reLaunch' | 'redirectTo' mode?: 'switchTab' | 'navigateTo' | 'reLaunch' | 'redirectTo'
param ?: AnyObject param?: AnyObject
success ?: () => {} success?: () => {}
fail ?: () => {} fail?: () => {}
complete ?: () => {} complete?: () => {}
} }
declare interface requestMobileParam { declare interface requestMobileParam {
mobile : string, mobile: string,
captcha_code : string, captcha_code: string,
captcha_key : string, captcha_key: string,
type : string type: string
} }
declare interface responseResult { declare interface responseResult {
code : number, code: number,
data : any, data: any,
msg : string msg: string
} }
Loading…
Cancel
Save