diff --git a/components/kxj-previewImage/kxj-previewImage.vue b/components/kxj-previewImage/kxj-previewImage.vue
new file mode 100644
index 0000000..e4e49ec
--- /dev/null
+++ b/components/kxj-previewImage/kxj-previewImage.vue
@@ -0,0 +1,372 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ index + 1 }} / {{ imgs.length }}
+
+ 保存
+ 旋转
+ {{ descs[index] }}
+
+
+
+
+
+
+
diff --git a/http/login.js b/http/login.js
index 13a350f..a79f93c 100644
--- a/http/login.js
+++ b/http/login.js
@@ -1,5 +1,13 @@
import http from './interface'
-
+// 登录权限
+export const checkLogin = (data) => {
+ return http.request({
+ url: '/user/artwork/login',
+ method: 'POST',
+ data
+ })
+}
+//
// 签到
export const goLogin = (data) => {
return http.request({
@@ -30,6 +38,7 @@ export const getDetail = (data) => {
export default {
goLogin,
code,
- getDetail
+ getDetail,
+ checkLogin
}
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 1f18c53..d1b180b 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -30,7 +30,7 @@
v-show="showCode"
v-model="code"
space="11"
- @finish="goLogin"
+ @finish="checkLogin"
:maxlength="6"
>
-
+
{{ showCode ? tips : "" }}
{{
@@ -78,7 +78,7 @@
v-if="loginType === 'pwd'"
type="primary"
class="search"
- @click="goLogin"
+ @click="checkLogin"
>登录
画作名称
{{ detailData.ArtworkName }}
-
+
+
+
+
@@ -38,7 +45,9 @@
画作类型
- {{ artworkTyoeDict[detailData.ArtworkType] }}
+ {{
+ artworkTyoeDict[detailData.ArtworkType]
+ }}
@@ -116,13 +125,41 @@
>
+
+ 返回
提交
+ 提交
+ 已提交
+ 已提交
+
@@ -132,6 +169,8 @@
export default {
data() {
return {
+ hasSubmit: false,
+ hasSubmitrepair: false,
detailData: {},
tabList: [
{
@@ -160,6 +199,11 @@ export default {
changeTab(e) {
this.actName = e.name;
},
+ goback() {
+ this.$router.push({
+ path: "/",
+ });
+ },
uploadFilePromise(url) {
return new Promise((resolve, reject) => {
const Authorization = uni.getStorageSync("repari-token");
@@ -248,7 +292,7 @@ export default {
}
},
// 提交
- async goSubmit() {
+ async goSubmit(val) {
// 如果图片和备注都为空,不允许提交
if (
this.fileList < 1 &&
@@ -275,6 +319,7 @@ export default {
RepairedRemark: this.RepairedRemark,
ArtworkUuid: this.detailData.ArtworkUuid,
CreateSource: 2,
+ RepairType: val,
};
let res = await this.$api.management.update(data);
if (res.status == 0) {
@@ -287,11 +332,11 @@ export default {
safeAreaInsetTop: true,
});
this.loading = false;
- setTimeout(() => {
- this.$router.push({
- path: "/",
- });
- }, 1000);
+ if (val == 1) {
+ this.hasSubmit = true;
+ } else {
+ this.hasSubmitrepair = true;
+ }
} else {
this.loading = false;
this.$refs.uNotify.show({
@@ -419,8 +464,17 @@ page {
.artwork-image {
width: 380rpx;
+ text-align: center;
+ display: flex;
+ justify-content: center;
+ align-items: center;
height: 180rpx;
border-radius: 8rpx;
+ uni-img {
+ width: 380rpx;
+ height: 180rpx;
+ border-radius: 8rpx;
+ }
}
.repair {
margin-top: 20rpx;
@@ -442,7 +496,7 @@ page {
}
}
.search {
- margin-top: 70rpx;
+ margin-left: 20rpx;
width: 60%;
border: 0;
font-size: 34rpx;
diff --git a/pages/start/start.vue b/pages/start/start.vue
index 1ea81b4..7db663e 100644
--- a/pages/start/start.vue
+++ b/pages/start/start.vue
@@ -15,7 +15,7 @@
+
diff --git a/uni_modules/uon-preview/package.json b/uni_modules/uon-preview/package.json
new file mode 100644
index 0000000..a7974a6
--- /dev/null
+++ b/uni_modules/uon-preview/package.json
@@ -0,0 +1,87 @@
+{
+ "id": "uon-preview",
+ "displayName": "uon-preview 图片预览组件",
+ "version": "2.1.0",
+ "description": "图片可以放大缩小、拖拽移动,自适应图片展示居中,支持多张图片预览和长图预览,可自定义内容插槽",
+ "keywords": [
+ "图片预览",
+ "预览组件",
+ "长图预览",
+ "放大缩小",
+ "拖动预览"
+],
+ "repository": "",
+ "engines": {
+ "HBuilderX": "^3.99"
+ },
+"dcloudext": {
+ "type": "component-vue",
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": "791529212"
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": ""
+ },
+ "uni_modules": {
+ "dependencies": [],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y",
+ "alipay": "y"
+ },
+ "client": {
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ },
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "n",
+ "app-uvue": "n"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y",
+ "钉钉": "y",
+ "快手": "y",
+ "飞书": "y",
+ "京东": "y"
+ },
+ "快应用": {
+ "华为": "y",
+ "联盟": "y"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/uni_modules/uon-preview/readme.md b/uni_modules/uon-preview/readme.md
new file mode 100644
index 0000000..5bfd59e
--- /dev/null
+++ b/uni_modules/uon-preview/readme.md
@@ -0,0 +1,63 @@
+# 使用方法
+
+```html
+
+
+
+
+
+
+ 点击预览长图
+
+
+
+
+
+ {{ 'list--预览图片----' + index }}
+
+
+
+
+
+
+ {{ item.label + index }}
+
+
+
+
+```
+```js
+
+```
+
+
+# 组件属性
+
+| 属性名 | 类型 | 默认值 | 说明 | 是否必填 |
+| :-----: | :--: | :-------: | :--: | :----: |
+| src | String | - | 图片资源地址 | 必填 |
+| mode | String | widthFix | 图片裁剪、缩放的模式,与 image 组件用法相同,仅对默认展示图片有效 | 否 |
+| width | String | auto | 默认展示图片的宽度 | 否 |
+| height | String | auto | 默认展示图片的高度 | 否 |
+| preview | Boolean | true | 是否开启预览模式 | 否 |
+| list | Array | [] | 可以是 string[] 也可以是 object[],object[]时必须设置对应的图片 key 值 | 否 |
+| imgIndex | Number | -1 | 当前显示图片的索引值 | 否 |
+| keyName | String | undefined | 对象数组中对应的图片 key 值 | 否 |
\ No newline at end of file