修复部分bug

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