Browse Source

上传

master
前端-胡立永 8 months ago
parent
commit
87bd9ddcb7
5 changed files with 133 additions and 53 deletions
  1. +54
    -0
      components/base/pickerHospital.vue
  2. +18
    -5
      components/user/callPhone.vue
  3. +2
    -2
      components/user/signInOnePopup.vue
  4. +6
    -1
      pages_order/components/list/gourmet/productSubmit.vue
  5. +53
    -45
      pages_order/post/addPost.vue

+ 54
- 0
components/base/pickerHospital.vue View File

@ -0,0 +1,54 @@
<template>
<uv-popup
ref="popup"
:round="30"
:customStyle="{height: '50vh'}">
<view class="content">
<uv-search
placeholder="请输入搜索内容"
v-model="queryParams[searchKey]"></uv-search>
</view>
</uv-popup>
</template>
<script>
import mixinsList from '@/mixins/list.js'
export default {
mixins: [mixinsList],
props: {
keyName : {//
default : 'name',
},
placeholder : {//
default : '请输入搜索内容'
},
isPage : {//
default : true,
},
searchKey : {//
default : 'name'
},
mixinsListApi : {
default : '',
},
},
data() {
return {
}
},
onLoad(option) {},
watch: {
},
methods: {
},
}
</script>
<style lang="scss" scoped>
.content{
padding: 0 20rpx 20rpx 20rpx;
}
</style>

+ 18
- 5
components/user/callPhone.vue View File

@ -7,6 +7,7 @@
<script> <script>
import mixinsSex from '@/mixins/sex.js' import mixinsSex from '@/mixins/sex.js'
import { mapState } from 'vuex'
export default { export default {
mixins: [mixinsSex], mixins: [mixinsSex],
props: ['phone', 'title', 'sexName', 'type', 'phoneTitle', 'pid'], props: ['phone', 'title', 'sexName', 'type', 'phoneTitle', 'pid'],
@ -15,6 +16,9 @@
} }
}, },
computed : {
...mapState(['priceMap']),
},
methods: { methods: {
callPhone(){ callPhone(){
@ -33,13 +37,22 @@
}) })
} }
this.$api('checkGivePhone', data, res => {
if(res.code == 200){
uni.makePhoneCall({
phoneNumber: this.phone
})
uni.showModal({
title: `确定消耗${this.priceMap.phone}积分呼叫吗?`,
success : (r) => {
if(r.confirm){
this.$api('checkGivePhone', data, res => {
if(res.code == 200){
uni.makePhoneCall({
phoneNumber: this.phone
})
}
})
}
} }
}) })
}, },
} }
} }


+ 2
- 2
components/user/signInOnePopup.vue View File

@ -4,7 +4,7 @@
<view class="content"> <view class="content">
<view class="title">今日签到获取积分</view> <view class="title">今日签到获取积分</view>
<view class="un">{{ headInfo.integral }}</view>
<view class="un">{{ priceMap.sign_points }}</view>
<view class="uni-color-btn" <view class="uni-color-btn"
@click="submit"> @click="submit">
@ -24,7 +24,7 @@
} }
}, },
computed : { computed : {
...mapState(['headInfo']),
...mapState(['headInfo', 'priceMap']),
}, },
mounted() { mounted() {
if(uni.getStorageSync('token')){ if(uni.getStorageSync('token')){


+ 6
- 1
pages_order/components/list/gourmet/productSubmit.vue View File

@ -52,7 +52,12 @@
</view> </view>
<view class="detail" v-if="totalPrice"> <view class="detail" v-if="totalPrice">
<view> <view>
应付款{{ totalPrice }}
<view class="">
应付款
</view>
<view class="">
{{ totalPrice }}
</view>
</view> </view>
<view> <view>


+ 53
- 45
pages_order/post/addPost.vue View File

@ -30,6 +30,7 @@
multiple multiple
width="150rpx" width="150rpx"
height="150rpx" height="150rpx"
name="fileList"
@delete="deleteImage" @delete="deleteImage"
@afterRead="afterRead" @afterRead="afterRead"
:previewFullImage="true"></uv-upload> :previewFullImage="true"></uv-upload>
@ -65,61 +66,49 @@
</view> </view>
</view> --> </view> -->
<view class="title-input box">
<view class="category"
v-if="categoryRole.includes('code')">
<view class="title">
上传二维码选填
</view>
<view class="images box">
<uv-upload
:fileList="codeFileList"
:maxCount="1"
multiple
width="150rpx"
height="150rpx"
name="codeFileList"
@delete="deleteImage"
@afterRead="afterRead"
:previewFullImage="true"></uv-upload>
</view>
</view>
<view class="title-input box"
v-if="categoryRole.includes('phone')">
<input type="text" placeholder="手机号码(选填)" v-model="form.phone"/> <input type="text" placeholder="手机号码(选填)" v-model="form.phone"/>
</view> </view>
<view class="title-input box" <view class="title-input box"
v-if="categoryRole.includes('address')"
@click="selectAddr"> @click="selectAddr">
<input type="text" <input type="text"
placeholder="选择位置(选填)"
placeholder="选择位置(选填)"
v-model="form.address"/> v-model="form.address"/>
<uv-icon <uv-icon
size="40rpx" size="40rpx"
name="map"></uv-icon> name="map"></uv-icon>
</view> </view>
<!-- <view class="upTop"
>
<view class="title">
<uv-icon name="pushpin-fill"></uv-icon>
是否置顶
</view>
<uv-radio-group v-model="form.topId">
<view class="list">
<view class="item">
<view class="left">
不需要置顶
</view>
<view class="right">
<uv-radio
size="35rpx"
icon-size="35rpx"
:disabled="!!id"
:name="0">
</uv-radio>
</view>
</view>
<view class="item"
v-for="(item, index) in upTopList"
:key="index">
<view class="left">
置顶{{ item.day }}{{ item.money }}
</view>
<view class="right">
<uv-radio
size="35rpx"
:disabled="!!id"
icon-size="35rpx"
:name="item.id">
</uv-radio>
</view>
</view>
</view>
</uv-radio-group>
</view> -->
<view class="title-input box"
v-if="categoryRole.includes('shop')">
<input type="text"
placeholder="关联店铺(选填)"
v-model="form.shop"/>
</view>
<view class="configBtn" <view class="configBtn"
@click="$refs.configPopup.open('getPublishPostNotice')"> @click="$refs.configPopup.open('getPublishPostNotice')">
@ -136,14 +125,20 @@
ref="configPopup" ref="configPopup"
/> />
<pickerHospital
mixinsListApi="getStorePage"
/>
</view> </view>
</template> </template>
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'
import Position from '@/utils/position.js' import Position from '@/utils/position.js'
import pickerHospital from '@/components/base/pickerHospital.vue'
export default { export default {
components : { components : {
pickerHospital,
}, },
data() { data() {
return { return {
@ -155,11 +150,24 @@
}, },
id : 0, id : 0,
fileList : [], fileList : [],
codeFileList : [],
imageMax : 9, imageMax : 9,
}; };
}, },
computed : { computed : {
...mapState(['cityList', 'category']), ...mapState(['cityList', 'category']),
categoryRole(){
if(!this.form.classId){
return []
}
for(let i = 0;i < this.category.length;i++){
let c = this.category[i]
if(c.id == this.form.classId){
return 'code,phone,address,shop'.split(',')
}
}
return []
},
}, },
onLoad(args) { onLoad(args) {
this.id = args.id this.id = args.id
@ -208,13 +216,13 @@
}) })
}, },
deleteImage(e){ deleteImage(e){
this.fileList.splice(e.index, 1)
this[e.name].splice(e.index, 1)
}, },
afterRead(e){ afterRead(e){
let self = this let self = this
e.file.forEach(file => { e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => { self.$Oss.ossUpload(file.url).then(url => {
self.fileList.push({
self[e.name].push({
url url
}) })
}) })


Loading…
Cancel
Save