cyl/master-0819
wangxia 3 months ago
parent eaf24d316b
commit 195216e2f1

@ -34,7 +34,7 @@ export function createApp () {
app.config.productionTip = false; app.config.productionTip = false;
app.component('g-empty', gEmpty); app.component('g-empty', gEmpty);
app.component('g-tabbar', gTabbar); app.component('g-tabbar', gTabbar);
app.component('g-loading', gLoading); app.component('g-loading', gLoading);
app.component('g-button', gButton); app.component('g-button', gButton);
app.component('g-list-job', gListJob); app.component('g-list-job', gListJob);
@ -99,7 +99,7 @@ export function createApp () {
uni.setStorageSync("apply-agencyId", res.user.agencyId); // 单独存储 -- 代理id方便获取 uni.setStorageSync("apply-agencyId", res.user.agencyId); // 单独存储 -- 代理id方便获取
uni.setStorageSync("apply-supplierAccount", res.supplierAccount); // 单独存储 -- 是否是发单号,方便获取 0.不是发单号 1.是发单号 uni.setStorageSync("apply-supplierAccount", res.supplierAccount); // 单独存储 -- 是否是发单号,方便获取 0.不是发单号 1.是发单号
if (res.agencyId) { if (res.agencyId) {
// if (res.agencyStatus == 1) { // if (res.agencyStatus == 1) {
G.Get(apiInfo.login_agencyInfo, {}, (aRes) => { G.Get(apiInfo.login_agencyInfo, {}, (aRes) => {
uni.setStorageSync("agencyInfo", aRes.agency); // 1是创建者 2是普通成员 uni.setStorageSync("agencyInfo", aRes.agency); // 1是创建者 2是普通成员
uni.setStorageSync("IS_CREATOR", aRes.agency.userId == res.user.id || res.admin == true ? 1 : 2); // 1是创建者 2是普通成员 uni.setStorageSync("IS_CREATOR", aRes.agency.userId == res.user.id || res.admin == true ? 1 : 2); // 1是创建者 2是普通成员
@ -167,7 +167,19 @@ export function createApp () {
}); });
}, $sourceType); }, $sourceType);
}, },
/**
* 上传到oss
*/
uploadImgToOss (callback = () => { }, type = 'default', $num = 1, $sourceType = ['album', 'camera']) {
G.uploadImage($num, (imgRes) => {
uni.showLoading({
title: '上传中...',
})
G.Get(apiInfo.getOssInfo, {}, (res) => {
console.log('uploadImgToOssresresresres', res);
})
})
},
/* /*
*/ */
uploadImgByCamera (callback = () => { }, type = 'default', $num = 1, $sourceType = ['camera']) { uploadImgByCamera (callback = () => { }, type = 'default', $num = 1, $sourceType = ['camera']) {

@ -1,10 +1,12 @@
<template> <template>
<div style="" class="g_bg_f_5 g_h_all"> <div style="" class="g_bg_f_5 g_h_all">
<view class="g_h_all"> <view class="g_h_all">
<view class="m-tabs" v-if="isLogin" style="position: fixed; width: 100%; z-index: 999"> <!-- <view class="m-tabs" v-if="isLogin" style="position: fixed; width: 100%; z-index: 999">
<u-tabs :list="typeGroup" :is-scroll="false" v-model="current" @change="updateType" item-width="126" :active-color="globalData.themeColor" bar-width="60" bar-height="6" font-size="32" :gutter="22" duration="0.1" itemWidth="auto" height="84"></u-tabs> <u-tabs :list="typeGroup" :is-scroll="false" v-model="current" @change="updateType" item-width="126" :active-color="globalData.themeColor" bar-width="60" bar-height="6" font-size="32" :gutter="22" duration="0.1" itemWidth="auto" height="84"></u-tabs>
</view> </view> -->
<scroll-view @scroll="getScrollInfo" :scroll-top="resetScroll" :style="{ height: `calc(100vh - ${isLogin ? tabbarHeight + 43 : 0}px)`, 'padding-top': isLogin ? '43px' : '' }" :scroll-y="true" v-if="isLogin"> <!-- - ${isLogin ? tabbarHeight + 43 : 0}px -->
<!-- isLogin ? '43px' : -->
<scroll-view @scroll="getScrollInfo" :scroll-top="resetScroll" :style="{ height: `calc(100vh - ${tabbarHeight})`, 'padding-top': '10px' }" :scroll-y="true" v-if="isLogin">
<view class="" v-show="current == 0"> <view class="" v-show="current == 0">
<view class="g_bg_f"> <view class="g_bg_f">
<ConversationList ref="contactList" /> <ConversationList ref="contactList" />
@ -54,7 +56,6 @@ const G = getCurrentInstance().appContext.app.config.globalProperties.G;
import gEmpty from "@/components/empty.vue"; import gEmpty from "@/components/empty.vue";
// import gMessageCell from "@/components/panel/messageCell.vue"; // import gMessageCell from "@/components/panel/messageCell.vue";
// import servicePopup from "@/components/servicePopup.vue"; // import servicePopup from "@/components/servicePopup.vue";
const globalData = ref(getApp().globalData); const globalData = ref(getApp().globalData);
const wyyxTabGroup = ref([]); const wyyxTabGroup = ref([]);
const corpUserFlag = ref(false); const corpUserFlag = ref(false);

@ -73,6 +73,8 @@ export default {
}, },
setAvatar($type) { setAvatar($type) {
let that = this; let that = this;
// that.G.uploadImgToOss()
// return
that.G.uploadImg( that.G.uploadImg(
(res) => { (res) => {
console.log("获取数据", res); console.log("获取数据", res);

Loading…
Cancel
Save