Browse Source

国庆前

master
unknown 1 year ago
parent
commit
d85b681915
  1. 0
      config/new_file.js
  2. 2
      manifest.json
  3. 28
      pages/indexEntry/consult/pubConsult/pubConsult.vue
  4. 3
      pages/indexEntry/findShcool/findShcool.vue

0
config/new_file.js

2
manifest.json

@ -94,7 +94,7 @@
"proxy" : { "proxy" : {
"/api" : { "/api" : {
// "target" : "http://192.168.1.26:48080/", // "target" : "http://192.168.1.26:48080/",
"target" : "http://192.168.1.36:48080/",
"target" : "http://192.168.1.26:48080/",
"changeOrigin" : true, "changeOrigin" : true,
"secure" : true, "secure" : true,
"pathRewrite" : { "pathRewrite" : {

28
pages/indexEntry/consult/pubConsult/pubConsult.vue

@ -15,11 +15,11 @@
</view> </view>
<view class="phoneBox"> <view class="phoneBox">
<view class="imgBox"> <view class="imgBox">
<view class="img">
<view class="minusCircle">
<view class="img" v-for="(item,index) in imgArr" :key="item">
<view class="minusCircle" @click="deleteImg(item,index)">
<u-icon name="close-circle-fill" size="20" color="#b9061d"></u-icon> <u-icon name="close-circle-fill" size="20" color="#b9061d"></u-icon>
</view> </view>
<image src="../../../../static/logo.png" mode=""></image>
<image :src="item" mode=""></image>
</view> </view>
</view> </view>
<view class="phone" @click="chooseImages"> <view class="phone" @click="chooseImages">
@ -45,7 +45,7 @@
</template> </template>
<script> <script>
import { WX_API, H5_API } from '@/config/site.config.js';
import { WX_API, H5_API, prefix } from '@/config/site.config.js';
import { createconsult } from '@/config/api.js' import { createconsult } from '@/config/api.js'
var _url = H5_API+ WX_API var _url = H5_API+ WX_API
// let url = 'api' // let url = 'api'
@ -57,19 +57,22 @@
} }
}, },
onLoad() { onLoad() {
this.value = this.vuex_userInfo.mobile
}, },
methods: { methods: {
async submintFn() { async submintFn() {
let images = this.imgArr.join(',')
let obj = { let obj = {
images: 'abc.png',
images,
studentPhone: this.vuex_userInfo.mobile, studentPhone: this.vuex_userInfo.mobile,
type: 1, type: 1,
studentId: this.$store.state.user.vuex_loginInfo.userId
studentId: this.$store.state.user.vuex_loginInfo.userId,
content: this.value
} }
const {data: res} = await createconsult(obj) const {data: res} = await createconsult(obj)
}, },
deleteImg(item,index) {
this.imgArr.splice(index, 1)
},
// //
chooseImages(type) { chooseImages(type) {
let imgNum = 3 - (this.imgArr.length) let imgNum = 3 - (this.imgArr.length)
@ -89,16 +92,19 @@
}, },
uploadImgApi(filePath) { uploadImgApi(filePath) {
console.log(filePath) console.log(filePath)
let token = 'Bearer '+ this.$store.state.user.vuex_loginInfo.accessToken
// let token = 'Bearer '+ this.$store.state.user.vuex_loginInfo.accessToken
let token = 'Bearer 15409b4b67574665bbc4a3e16dd3debb'
let _this = this let _this = this
let name = new Date() * 1
// //
uni.uploadFile({ uni.uploadFile({
url: _url + 'infra/file/upload',//
url: _url + 'app-api/infra/file/upload',//
filePath: filePath,// filePath: filePath,//
name: 'file', name: 'file',
formData: { formData: {
fileType: 1,
path: 'complain/'+name,
type: 1,
fileSuffix: "png" fileSuffix: "png"
}, },
header: { header: {

3
pages/indexEntry/findShcool/findShcool.vue

@ -71,12 +71,11 @@
let vuex_cityInfo = this.$store.state.user.vuex_cityInfo let vuex_cityInfo = this.$store.state.user.vuex_cityInfo
if(!vuex_cityInfo.lat) { if(!vuex_cityInfo.lat) {
this.$store.dispatch('getCity') this.$store.dispatch('getCity')
return
}else { }else {
this.params.lat = vuex_cityInfo.lat this.params.lat = vuex_cityInfo.lat
this.params.lng = vuex_cityInfo.lng this.params.lng = vuex_cityInfo.lng
this.schoolPageFn()
} }
this.schoolPageFn()
uni.$on('screenConfirm',(obj)=>{ uni.$on('screenConfirm',(obj)=>{
this.params = Object.assign(this.params, obj) this.params = Object.assign(this.params, obj)
this.listInit() this.listInit()

Loading…
Cancel
Save