Commit cf257520cada734441493395b8d1ea4ea5c4fa93

Authored by guzijian
1 parent fb77e9f7

feat: 压缩图片

garbage-removal/src/pages/home/index.vue
... ... @@ -114,12 +114,12 @@
114 114 <view class="empty-text-title">
115 115 {{ prompt }}
116 116 </view>
117   - <view class="empty-text-content" v-if="userType == '用户'">
  117 + <view class="empty-text-content">
118 118 房屋装饰装修过程中产生的砖瓦、木材、熟料等废弃物
119 119 </view>
120   - <view class="empty-text-box" v-if="userType == '用户'">
  120 + <view class="empty-text-box">
121 121 <view class=" empty-text-box-button">
122   - 立即清运
  122 + {{ userType == '用户' ? '立即清运' : '角色切换' }}
123 123 </view>
124 124 </view>
125 125 </view>
... ... @@ -137,11 +137,11 @@ import { useMainStore } from &quot;@/stores/index.js&quot;;
137 137 import { onLoad, onShow } from '@dcloudio/uni-app';
138 138 import { computed, ref } from 'vue';
139 139 const mainStore = useMainStore()
140   -const userType = computed(() => mainStore.userType)
  140 +const userType = computed(() => mainStore.userType);
141 141 const prompt = computed(() => userType.value == '用户' ? "请先添加地址" : '非用户无法下单')
142 142 // 定义最大积分
143 143 let maxScore = 5
144   -const maxStar = ref([])
  144 +const maxStar = ref([]);
145 145 const lightHeight = ref();//胶囊按钮信息
146 146 const topMargin = ref(null);//状态栏高度
147 147 const musicheadHeight = ref();
... ... @@ -309,7 +309,7 @@ const handleCleanClick = () =&gt; {
309 309 // 用户已登录但是没有清运地址的情况
310 310 if (userType.value == '用户') {
311 311 uni.showModal({
312   - title: '',
  312 + title: '提示',
313 313 content: prompt.value,
314 314 success: function (res) {
315 315 if (res.confirm) {
... ... @@ -321,6 +321,20 @@ const handleCleanClick = () =&gt; {
321 321 }
322 322 }
323 323 });
  324 + } else {
  325 + uni.showModal({
  326 + title: '提示',
  327 + content: '是否进行身份切换?',
  328 + success: function (res) {
  329 + if (res.confirm) {
  330 + uni.$u.route({
  331 + url: `pages/wode/choose/index?ruleVos= ${encodeURIComponent(JSON.stringify([{ userType: '用户' }, mainStore.userInfo]))}`,
  332 + })
  333 + } else if (res.cancel) {
  334 + console.log('用户点击取消');
  335 + }
  336 + }
  337 + });
324 338 }
325 339 }
326 340 return
... ...
garbage-removal/src/pages/wode/choose/index.vue
... ... @@ -106,11 +106,16 @@ const handlerClick = (val) =&gt; {
106 106 }
107 107 }
108 108 const submit = (userType) => {
109   - setRequestToken(store.tempToken)
  109 + // 临时token的作用是在用户为选择完身份时判断 如果用户为选择身份则不会把在请求中携带token
  110 + if (store.tempToken) {
  111 + setRequestToken(store.tempToken)
  112 + }
110 113 updateUserInfo({ garUserType: userType }).then(res => {
111 114 if (res.data.success) {
112   - store.token = store.tempToken
113   - store.tempToken = "";
  115 + if (store.tempToken) {
  116 + store.token = store.tempToken
  117 + store.tempToken = "";
  118 + }
114 119 store.userType = userType;
115 120 store.userInfo = unitInfo.value[userType]
116 121 uni.$u.route({
... ...
garbage-removal/src/pages/wode/index.vue
... ... @@ -15,7 +15,7 @@
15 15 </view>
16 16 </view>
17 17 </view>
18   - <view class="u-m-t-20">
  18 + <view class="u-m-t-20" style="background-color: white;">
19 19 <u-cell-group>
20 20 <u-cell icon="map" iconStyle="font-size:28rpx" @click="handleAddressManager" title="地 址 管 理"></u-cell>
21 21 </u-cell-group>
... ... @@ -30,7 +30,7 @@
30 30 </u-cell-group> -->
31 31 </view>
32 32  
33   - <view class="u-m-t-40">
  33 + <view class="u-m-t-40" style="background-color: white;">
34 34 <u-cell-group>
35 35 <u-cell class="logout-cell" icon="setting" iconStyle="font-size:28rpx" @click="handleLoginOut"
36 36 title="退 出 登 录"></u-cell>
... ... @@ -151,7 +151,7 @@ const handleLoginOut = () =&gt; {
151 151  
152 152 .manager-info-transport-company-name {
153 153 display: flex;
154   - color: white;
  154 + color: $u-main-color;
155 155 line-height: 80rpx;
156 156 }
157 157 </style>
... ...
garbage-removal/src/static/image/driver.png

68.5 KB | W: | H:

29.9 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
garbage-removal/src/static/image/garbage.png

55.1 KB | W: | H:

23.9 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
garbage-removal/src/static/image/handler.png

20.4 KB | W: | H:

12.6 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
garbage-removal/src/static/image/st_pic.png

2.76 KB | W: | H:

551 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
garbage-removal/src/static/image/user.png

125 KB | W: | H:

10.1 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin