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. 179
      src/app/pages/votingElection/index.vue
  5. 3
      src/main.js
  6. 15
      src/pages.json
  7. 6
      src/types/global.d.ts

3
package.json

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

179
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>
<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="headpart">
<view class="title">
@ -30,43 +125,21 @@
<view class="buts">
</view>
</view>
</view> -->
</template>
<script setup>
import {
onMounted,
ref
} from 'vue';
const tpList = ref([
{
img: '/static/img/grxx.png',
name: '陈志远',
class: '现任财务总监',
}
])
</script>
<style scoped lang="scss">
.box {
width: 100%;
height: 100vh;
min-height: 100vh;
background-color: #F9FAFB;
.main {
width: 100%;
height: 90vh;
display: grid;
justify-items: center;
align-content: start;
.headpart {
width: 86%;
height: 194rpx;
border-radius: 24rpx;
background-color: #EFF6FF;
margin-top: 32rpx;
margin: 32rpx auto;
padding: 20rpx 3%;
.title {
@ -82,6 +155,15 @@
}
}
.main {
width: 100%;
height: 90vh;
display: grid;
justify-items: center;
align-content: start;
.tppart {
margin-top: 32rpx;
width: 100%;
@ -98,13 +180,58 @@
background-color: #FFFFFF;
border: 2rpx solid #F3F4F6;
box-shadow: 5rpx 5rpx 3rpx 0 rgba(212, 212, 212, 0.7);
.rightpart {
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 {
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;
}
}

3
src/main.js

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

15
src/pages.json

@ -1,5 +1,6 @@
{
"pages": [{
"pages": [
{
"path": "app/pages/votingElection/index",
"style": {
"navigationBarTitleText": "投票选举"
@ -85,7 +86,8 @@
"selectedColor": "#2563EB",
"borderStyle": "white",
"backgroundColor": "#F9FAFB",
"list": [{
"list": [
{
"pagePath": "app/pages/votingElection/index",
"iconPath": "static/img/tpxj.png",
"selectedIconPath": "static/img/tpxj-select.png",
@ -127,16 +129,19 @@
"^up-(.*)": "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",
"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": { //
"current": 0, //(list )
"list": [{
"list": [
{
"name": "", //
"path": "", //
"query": "" //onLoad
}]
}
]
},
"permission": {
"scope.userLocation": {

6
src/types/global.d.ts

@ -1,3 +1,9 @@
/// <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 {
url: string
mode?: 'switchTab' | 'navigateTo' | 'reLaunch' | 'redirectTo'

Loading…
Cancel
Save