Browse Source

上传

master
前端-胡立永 4 months ago
parent
commit
f8522fcfd8
6 changed files with 13 additions and 17 deletions
  1. +1
    -1
      config.js
  2. +4
    -3
      pages_order/auth/wxLogin.vue
  3. BIN
      static/logo.png
  4. +3
    -9
      utils/oss-upload/oss/index.js
  5. +1
    -1
      utils/oss-upload/oss/web.js
  6. +4
    -3
      utils/position.js

+ 1
- 1
config.js View File

@ -23,7 +23,7 @@ const config = {
// 默认配置
const defaultConfig = {
// 生产环境地图XHJBZ-JNL3U-LOHVO-G5LSQ-SPQ4S-AWFN4
mapKey : 'XHJBZ-JNL3U-LOHVO-G5LSQ-SPQ4S-AWFN4',
mapKey : 'XHJBZ-JNL3U-LOHVO-G5LSQ-SPQ4S-AWFN4',//已改成生产环境
aliOss : {
url : 'https://tennis-oss.xzaiyp.top/',
config : {


+ 4
- 3
pages_order/auth/wxLogin.vue View File

@ -1,7 +1,7 @@
<template>
<view class="login">
<view class="logo">
<!-- <image src="/static/image/login/logo.png" mode=""></image> -->
<image src="/static/logo.png" mode="aspectFill"></image>
</view>
<view class="title">
欢迎使用布周道
@ -94,8 +94,9 @@
background-color: #ddd;
border-radius: 30rpx;
image{
width: 80rpx;
height: 80rpx;
width: 100%;
height: 100%;
border-radius: 30rpx;
}
margin-bottom: 20rpx;
}


BIN
static/logo.png View File

Before After
Width: 72  |  Height: 72  |  Size: 3.9 KiB Width: 132  |  Height: 132  |  Size: 41 KiB

+ 3
- 9
utils/oss-upload/oss/index.js View File

@ -3,9 +3,9 @@
*/
import OSSConfig from "@/utils/oss-upload/oss/OSSConfig.js"
//支持web端
import {
uploadFileToOSS
} from '@/utils/oss-upload/oss/web.js'
// import {
// uploadFileToOSS
// } from '@/utils/oss-upload/oss/web.js'
import ossConfig from '@/config.js'
/**
@ -93,9 +93,6 @@ export function ossUploadImage({
count: 1,
sizeType,
success(res) {
// #ifdef H5
return uploadFileToOSS(res.tempFiles[0]).then(success).catch(fail)
// #endif
ossUpload(res.tempFilePaths[0], key, folder).then(success).catch(fail)
},
fail
@ -123,9 +120,6 @@ export function ossUploadVideo({
maxDuration,
camera,
success(res) {
// #ifdef H5
return uploadFileToOSS(res.tempFile).then(success).catch(fail)
// #endif
ossUpload(res.tempFilePath, key, folder).then(success).catch(fail)
},
fail


+ 1
- 1
utils/oss-upload/oss/web.js View File

@ -1,5 +1,5 @@
// 此方法适用于web
import OSS from "ali-oss"
// import OSS from "ali-oss"
import config from '@/config.js'
/**


+ 4
- 3
utils/position.js View File

@ -42,7 +42,8 @@ function getLocation(fn) { //获取用户经纬度
// })
uni.getFuzzyLocation({
type: 'wgs84',
type: 'gcj02',
// type: 'wgs84',
success (res) {
fn(res)
}
@ -149,8 +150,8 @@ function getUserAddressByIp(key) { //根据IP获取当前用户位置
//打开地图让用户选择位置
function selectAddress(longitude, latitude, successCallback) {
uni.chooseLocation({
longitude, //经度
latitude, //纬度
// longitude, //经度
// latitude, //纬度
success: function(res) {
successCallback && successCallback(res)
}


Loading…
Cancel
Save