uu
This commit is contained in:
parent
572f62a0de
commit
8b48fadb16
@ -16,7 +16,11 @@ const chooseFile = function (action = 'chooseImage', opt = {}) {
|
|||||||
...opts,
|
...opts,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||||
var tempFilePaths = res.tempFilePaths || [res.tempFilePath]
|
var tempFilePaths = res.tempFilePaths || [res.tempFilePath]debugger
|
||||||
|
if (tempFilePaths.length > opts.count) {
|
||||||
|
reject()
|
||||||
|
return showToast(`最多选择${opts.count}个`)
|
||||||
|
}
|
||||||
resolve(tempFilePaths)
|
resolve(tempFilePaths)
|
||||||
},
|
},
|
||||||
fail: function (res) {
|
fail: function (res) {
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
},
|
},
|
||||||
mode: {
|
mode: {
|
||||||
default () {
|
default () {
|
||||||
return 'widthFix'
|
return 'aspectFit' // aspectFit | widthFix
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scale: {
|
scale: {
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<view :class="contClass" style="margin-top: 0;">
|
<view :class="contClass" style="margin-top: 0;">
|
||||||
<u-row>
|
<u-row>
|
||||||
<view style="flex: 1;">
|
<view style="flex: 1;">
|
||||||
<u-text :text="leftText" size="28" :bold="true"></u-text>
|
<u-text :text="leftText" size="28"></u-text>
|
||||||
</view>
|
</view>
|
||||||
<u-row>
|
<u-row>
|
||||||
<u-icon size="22" :name="`${show?'arrow-up':'arrow-down'}`" color="#333"></u-icon>
|
<u-icon size="22" :name="`${show?'arrow-up':'arrow-down'}`" color="#333"></u-icon>
|
||||||
@ -16,38 +16,47 @@
|
|||||||
computed: {
|
computed: {
|
||||||
leftText() {
|
leftText() {
|
||||||
let str = ''
|
let str = ''
|
||||||
if(this.value) {
|
if (this.value) {
|
||||||
const curItem = this.list.filter(item=> item.val == this.value)[0] || {}
|
const curItem = this.list.filter(item => item.val == this.value)[0] || {}
|
||||||
curItem.title && (str = curItem.title)
|
curItem.title && (str = curItem.title)
|
||||||
} else {
|
} else {
|
||||||
str = this.placeholder
|
str = this.placeholder
|
||||||
}
|
}
|
||||||
return str
|
return str
|
||||||
},
|
},
|
||||||
|
contClass() {
|
||||||
|
let pre = ['radius-20']
|
||||||
|
if (this.isWhite) {
|
||||||
|
pre.push('blcok-white')
|
||||||
|
} else {
|
||||||
|
pre.push('blcok-grey')
|
||||||
|
}
|
||||||
|
return pre.join(" ")
|
||||||
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
contClass: {
|
isWhite: {
|
||||||
default(){
|
default () {
|
||||||
return 'blcok-grey radius-20 '
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
placeholder: {
|
placeholder: {
|
||||||
default(){
|
default () {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
show: {
|
show: {
|
||||||
default(){
|
default () {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
default(){
|
default () {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
list: {
|
list: {
|
||||||
default(){
|
default () {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -65,8 +74,7 @@
|
|||||||
},
|
},
|
||||||
destroyed() {},
|
destroyed() {},
|
||||||
|
|
||||||
methods: {
|
methods: {}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<view class="" style="position: relative;">
|
<view class="" style="position: relative;">
|
||||||
<view @click="handleSelectSwitch">
|
<view @click="handleSelectSwitch">
|
||||||
<slot v-if="customInput"></slot>
|
<slot v-if="customInput"></slot>
|
||||||
<default-select-input v-if="!customInput" :placeholder="placeholder" :show="show" :list="list" :value="value"></default-select-input>
|
<default-select-input v-if="!customInput" :placeholder="placeholder" :show="show" :list="list" :value="value" :isWhite="isWhite"></default-select-input>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="mode == modeEnum.sheet">
|
<view v-if="mode == modeEnum.sheet">
|
||||||
@ -41,6 +41,7 @@
|
|||||||
ContentItems, DefaultSelectInput
|
ContentItems, DefaultSelectInput
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
isWhite: {},
|
||||||
customInput: {
|
customInput: {
|
||||||
default () {
|
default () {
|
||||||
return false
|
return false
|
||||||
|
|||||||
@ -1,22 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view :style="`${customstyle}`">
|
||||||
<view v-if="!isSlot" @click="handleChooseFile" class="cam" style="">
|
<view v-if="list.length < maxLen">
|
||||||
<view class="">
|
<view v-if="!isSlot" @click="handleChooseFile" class="cam" style="">
|
||||||
<u-icon name="camera" size="50"></u-icon>
|
<view class="">
|
||||||
|
<u-icon name="camera" size="50"></u-icon>
|
||||||
|
</view>
|
||||||
|
<view class="font-22">
|
||||||
|
<text>上传</text>
|
||||||
|
<text v-if="fileType==fileTypeEnum.image">图片</text>
|
||||||
|
<text v-if="fileType==fileTypeEnum.video">视频</text>
|
||||||
|
<text v-if="fileType==fileTypeEnum.all">文件</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="font-22">
|
<view v-if="isSlot" @click="handleChooseFile">
|
||||||
<text>上传</text>
|
<slot></slot>
|
||||||
<text v-if="fileType==fileTypeEnum.image">照片</text>
|
|
||||||
<text v-if="fileType==fileTypeEnum.video">视频</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="isSlot" @click="handleChooseFile">
|
|
||||||
<slot></slot>
|
<view v-for="(item) in list" :style="`${itemstyle}`">
|
||||||
</view>
|
|
||||||
<view v-for="(item) in list" style="margin-top: 10rpx;">
|
|
||||||
<view class="cdimg" @click="handleItem" data-index="{{index}}">
|
<view class="cdimg" @click="handleItem" data-index="{{index}}">
|
||||||
<tpx-image v-if="fileType==fileTypeEnum.image" :src="item" :mode="mode" :scale="scale"></tpx-image>
|
<tpx-image v-if="fileType==fileTypeEnum.image" :src="item" :mode="mode"></tpx-image>
|
||||||
<video v-if="fileType==fileTypeEnum.video" :src="item"></video>
|
<video v-if="fileType==fileTypeEnum.video" :src="item"></video>
|
||||||
|
<view v-if="fileType==fileTypeEnum.all">{{item}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -28,7 +33,7 @@
|
|||||||
import { showToast } from "@/common/untool"
|
import { showToast } from "@/common/untool"
|
||||||
|
|
||||||
const fileTypeEnum = {
|
const fileTypeEnum = {
|
||||||
// all: "all",
|
all: "all",
|
||||||
image: "image",
|
image: "image",
|
||||||
video: "video",
|
video: "video",
|
||||||
}
|
}
|
||||||
@ -49,6 +54,21 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
customstyle: {
|
||||||
|
default () {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
itemstyle: {
|
||||||
|
default () {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
default () {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
value: {
|
value: {
|
||||||
default () {
|
default () {
|
||||||
return ''
|
return ''
|
||||||
@ -74,11 +94,6 @@
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scale: {
|
|
||||||
default () {
|
|
||||||
return [1, 1] // 宽高比
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isSlot: {
|
isSlot: {
|
||||||
default () {
|
default () {
|
||||||
return false
|
return false
|
||||||
|
|||||||
@ -12,18 +12,11 @@
|
|||||||
</u-row>
|
</u-row>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="blcok-white radius-20 mt-40">
|
<view class="mt-40">
|
||||||
<u-row>
|
<tpx-select placeholder="国家" v-model:value="country" :list="[]" :isWhite="true"
|
||||||
<view>
|
></tpx-select>
|
||||||
<u-text text="国家" size="28" :bold="true"></u-text>
|
|
||||||
</view>
|
|
||||||
<u-row custom-style="flex: 1;" justify="end" align="center">
|
|
||||||
<u-icon size="22" name="arrow-down" color="#333"></u-icon>
|
|
||||||
</u-row>
|
|
||||||
</u-row>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<view class="blcok-white radius-20">
|
<view class="blcok-white radius-20">
|
||||||
<view class="">
|
<view class="">
|
||||||
|
|
||||||
@ -38,15 +31,9 @@
|
|||||||
</u-row>
|
</u-row>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="blcok-grey radius-20">
|
<view class="mt-40">
|
||||||
<u-row>
|
<tpx-select placeholder="省市区" v-model:value="country" :list="[]"
|
||||||
<view style="flex: 1;">
|
></tpx-select>
|
||||||
<u-text text="省市区" size="28" :bold="true"></u-text>
|
|
||||||
</view>
|
|
||||||
<u-row>
|
|
||||||
<u-icon size="22" name="arrow-down" color="#333"></u-icon>
|
|
||||||
</u-row>
|
|
||||||
</u-row>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mt-30">
|
<view class="mt-30">
|
||||||
|
|||||||
@ -9,27 +9,14 @@
|
|||||||
<view class="mt-10">
|
<view class="mt-10">
|
||||||
<tpx-input v-model:value="submitParam.danhao" placeholder="运单号"></tpx-input>
|
<tpx-input v-model:value="submitParam.danhao" placeholder="运单号"></tpx-input>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="mt-30">
|
||||||
<view class="mt-30 blcok-grey radius-20">
|
<tpx-select placeholder="投诉网点" v-model:value="country" :list="[]"
|
||||||
<u-row>
|
></tpx-select>
|
||||||
<view style="flex: 1;">
|
|
||||||
<u-text text="投诉网点" size="30"></u-text>
|
|
||||||
</view>
|
|
||||||
<u-row>
|
|
||||||
<u-icon size="24" name="arrow-down" color="#333"></u-icon>
|
|
||||||
</u-row>
|
|
||||||
</u-row>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mt-30 blcok-grey radius-20">
|
<view class="mt-30">
|
||||||
<u-row>
|
<tpx-select placeholder="投诉原因" v-model:value="country" :list="[]"
|
||||||
<view style="flex: 1;">
|
></tpx-select>
|
||||||
<u-text text="投诉原因" size="30"></u-text>
|
|
||||||
</view>
|
|
||||||
<u-row>
|
|
||||||
<u-icon size="24" name="arrow-down" color="#333"></u-icon>
|
|
||||||
</u-row>
|
|
||||||
</u-row>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mt-30">
|
<view class="mt-30">
|
||||||
@ -55,16 +42,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import getCdnUrl from "@/common/getCdnUrl"
|
import getCdnUrl from "@/common/getCdnUrl"
|
||||||
import {
|
|
||||||
ordStaEnum,
|
|
||||||
ordStatusList,
|
|
||||||
payTypeEnum,
|
|
||||||
payTypeList,
|
|
||||||
dlvTypeEnum,
|
|
||||||
dlvTypeList,
|
|
||||||
dateTypeEnum,
|
|
||||||
dateTypeList
|
|
||||||
} from "@/common/enum"
|
|
||||||
import {
|
import {
|
||||||
goto, goBack
|
goto, goBack
|
||||||
} from "@/common/untool"
|
} from "@/common/untool"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user