修复部分bug

parent a6adf4cd
......@@ -23,7 +23,6 @@
<script setup>
// infoType 1文图 2视频
import { defineProps } from "vue";
import { navigateTo } from "@/utils/utils";
import evn from "@/utils/config";
import dayjs from "dayjs";
const props = defineProps({
......@@ -45,6 +44,11 @@ const props = defineProps({
]
}
});
function navigateTo(url) {
xma.navigateTo({
url
});
}
</script>
<style lang="scss" scoped>
......
import './.rexma/lib';
import { createSSRApp } from "vue";
import App from "./App.vue";
import store from "./store";
......
......@@ -94,7 +94,9 @@
"path": "pages/policy/index",
"style": {
"navigationBarTitleText": "政策",
"navigationStyle": "custom"
"navigationStyle": "custom",
"enablePullDownRefresh": true,
"onReachBottomDistance": 50
}
},
{
......
......@@ -28,6 +28,13 @@ const login = () => {
xinhuaMpLogin({ encryptedData: info.data.uMobile, userType: "business" })
.then(data => {
res.value = data;
if (data.code == 200) {
xma.showToast({
title: "登录成功",
icon: "success",
duration: 2000
});
}
setToken(data.data.token);
console.log("data", data);
......
......@@ -6,7 +6,7 @@
v.name
}}</view>
</div>
<scroll-view :scroll-y="true" class="content" @scrolltolower="getData()">
<scroll-view :scroll-y="true" class="content" @scrolltolower="feedbackListFn">
<article-list :list="list"></article-list>
</scroll-view>
</div>
......@@ -23,33 +23,59 @@ getArticleTypesApi(1).then(res => {
});
const changeType = type => {
active.value = type.id;
pageNo = 1;
list.splice(0, list.length);
flag = false;
getData();
params.value.categoryId = type.id;
list.value.splice(0, list.length);
refresh().then(() => {
feedbackListFn();
});
};
/* 文章 */
// 判断是否还有数据
let pageNo = 1;
let flag = false;
const list = reactive([]);
const getData = () => {
if (flag) {
return;
}
getArticleListApi({
type: 1,
categoryId: active.value,
pageNo: pageNo++,
pageSize: 10
}).then(res => {
if (res.data.length < 10) {
flag = true;
const params = ref({
pageNo: 1,
pageSize: 10,
isEnd: false,
type: 1,
categoryId: active.value
});
const list = ref([]);
const refresh = () => {
return new Promise((resolve, reject) => {
list.value = [];
params.value.pageNo = 1;
params.value.isEnd = false;
resolve();
});
};
const feedbackListFn = () => {
if (params.value.isEnd === true)
return new Promise(resolve => {
resolve();
});
xma.showLoading({
title: "加载中...",
mask: true
});
return getArticleListApi(params.value).then(res => {
if (res.data.length < params.value.pageSize) {
params.value.isEnd = true;
}
list.push(...res.data);
params.value.pageNo += 1;
list.value = list.value.concat(res.data);
xma.hideLoading();
});
};
onPullDownRefresh(() => {
refresh().then(() => {
feedbackListFn().then(() => {
xma.stopPullDownRefresh();
});
});
});
// 触底加载
onReachBottom(() => {
feedbackListFn();
});
changeType({ id: "" });
</script>
......
......@@ -239,7 +239,7 @@ const bindDelivery = () => {
});
};
const navigateTo = url => {
uni.navigateTo({
xma.navigateTo({
url
});
};
......
......@@ -656,9 +656,9 @@ const editJob = ({ id, status }) => {
}
}
.release-postion {
position: absolute;
position: fixed;
right: 22rpx;
bottom: 12rpx;
bottom: 120rpx;
z-index: 1;
display: flex;
flex-direction: column;
......
......@@ -68,11 +68,20 @@ const submit = () => {
if (res.code == 200) {
uni.showToast({
title: "保存成功",
icon: "success"
icon: "success",
success: () => {
setTimeout(() => {
xma.navigateBack({
delta: 1
});
}, 1000);
}
});
setTimeout(() => {
uni.navigateBack();
}, 100);
} else {
xma.showToast({ title: res.message, icon: "none" });
}
});
};
......
<template>
<NavBar :showIcon="true" :showTitle="true" title="投诉建议" backgroundBox="#FFFFFF"></NavBar>
<view class="feedback-page">
<view class="title">问题描述</view>
<wd-textarea
......
......@@ -47,7 +47,7 @@ const navigateTo = (url, fn) => {
fn();
}
url &&
uni.navigateTo({
xma.navigateTo({
url
});
};
......
......@@ -138,7 +138,14 @@ const submit = () => {
if (res.code == 200) {
uni.showToast({
title: "保存成功",
icon: "success"
icon: "success",
success() {
setTimeout(() => {
uni.navigateBack({
delta: 1
});
}, 1000);
}
});
} else {
uni.showToast({
......
......@@ -10,6 +10,7 @@
<view class="image-wrap">
<div class="title" v-if="companyInfo.companyAudit.status == 2">重新提交</div>
<image
@click="chooseImage"
v-if="companyInfo.companyAudit.licensePath"
:src="evn.APP_IMAGE_BASE_API + companyInfo.companyAudit.licensePath"
mode=""
......@@ -17,21 +18,34 @@
<view>注:接受拍摄复印件,黑白复印需要加盖公章,大小不超过10M</view>
</view>
<view class="content-wrap">
<view class="item">
<view class="label"> 企业全称 </view>
<view class="content">
{{ companyInfo.companyAudit.companyName }}
</view>
<view class="item1">
<wd-input
type="text"
size="small"
v-model="companyInfo.companyAudit.companyName"
placeholder="请输入企业全称"
:use-label-slot="true"
@input="handleChange($event, 'companyName')"
>
<template #label>
<view class="label">企业全称</view>
</template></wd-input
>
</view>
<view class="item">
<view class="label"> 信用代码 </view>
<view class="content">
<input
:disabled="companyInfo.companyAudit.status != 2"
type="text"
v-model="companyInfo.companyAudit.creditCode"
/>
</view>
<view class="item1">
<wd-input
type="text"
size="small"
:disabled="companyInfo.companyAudit.status != 2"
v-model="companyInfo.companyAudit.creditCode"
placeholder="请输入信用代码"
:use-label-slot="true"
@input="handleChange($event, 'creditCode')"
>
<template #label>
<view class="label">信用代码</view>
</template></wd-input
>
</view>
<view class="item">
<view class="label"> 有效期 </view>
......@@ -71,25 +85,61 @@
<script setup>
import { useCompanyInfoStore } from "./companyInfo";
import evn from "@/utils/config";
import { uploadFiles } from "@/utils/fileUpload";
import { ref } from "vue";
import dayjs from "dayjs";
import { resubmitCompanyApi } from "@/api/user";
const { companyInfo } = useCompanyInfoStore();
const radio = ref(1);
const myCompanyName = ref("");
const myCreditCode = ref("");
if (companyInfo.licenseValidityPeriod == 4102329600000) {
radio.value = 1;
} else {
radio.value = 2;
}
onMounted(() => {
myCompanyName.value = companyInfo.companyAudit.companyName;
myCreditCode.value = companyInfo.companyAudit.creditCode;
});
/* 选择图片 */
const chooseImage = () => {
uni.chooseImage({
count: 1,
success: async ({ tempFiles }) => {
const res = await uploadFiles(tempFiles);
companyInfo.companyAudit.licensePath = res[0].key;
}
});
};
const handleChange = (event, type) => {
if (type == "companyName") {
myCompanyName.value = event.value;
} else {
myCreditCode.value = event.value;
console.log("event", myCreditCode.value);
}
};
const submit = () => {
console.log(companyInfo);
let { companyName: name, creditCode, licenseValidityPeriod, licensePath } = companyInfo.companyAudit;
creditCode = myCreditCode.value;
name = myCompanyName.value;
console.log("event", creditCode, name);
if (radio.value == 1) {
licenseValidityPeriod = "2099-12-31";
}
console.log("{ name, creditCode, licenseValidityPeriod, licensePath }", {
name,
creditCode,
licenseValidityPeriod,
licensePath
});
resubmitCompanyApi({ name, creditCode, licenseValidityPeriod, licensePath }).then(res => {
if (res.code == 200) {
uni.showToast({
......@@ -163,8 +213,12 @@ const submit = () => {
padding: 0 32rpx;
.item {
display: flex;
padding: 32rpx 0;
border-bottom: 2rpx solid #f3f4f8;
padding: 32rpx 0;
align-items: center;
:deep(.wd-input) {
padding: 0 0;
}
.label {
flex: 0 0 184rpx;
font-size: 24rpx;
......@@ -184,6 +238,24 @@ const submit = () => {
color: #cccccc;
}
}
.item1 {
border-bottom: 2rpx solid #f3f4f8;
padding: 32rpx 0;
align-items: center;
:deep(.wd-input) {
padding: 0 0;
}
:deep(.wd-input__label) {
flex: 0 0 184rpx;
margin-right: 0 !important
;
}
.label {
font-size: 24rpx;
line-height: 36rpx;
color: #77818f;
}
}
}
.btn-wrap {
padding: 16rpx 0;
......
......@@ -98,7 +98,6 @@ import { reactive, computed } from "vue";
import { getUserResumeApi, rejectApplicationApi, getApplicationByIdApi } from "@/api/postion";
import { getEnumText, getEumData } from "@/utils/utils.js";
import { navigateTo } from "@/utils/utils.js";
import evn from "@/utils/config.js";
import { useMessage } from "wot-design-uni";
let id = null;
......@@ -159,6 +158,12 @@ onLoad(({ userId, jobId, applicationId }) => {
id = applicationId;
getUserResume({ userId, jobId });
});
function navigateTo(url) {
xma.navigateTo({
url
});
}
/* 获取投递信息 */
const status = ref("");
const userPhone = ref("");
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment