Przeglądaj źródła

add 骑手端订单流转

tea 4 tygodni temu
rodzic
commit
a6deea914c

+ 2 - 2
kxmall-app-ui/pages/order/list.vue

@@ -132,7 +132,7 @@
           },
           {
             state: "14,16,20,30",
-            text: '待收货',
+            text: '已付款',
             loadingType: 'more',
             pageNo: 1,
             orderList: [],
@@ -140,7 +140,7 @@
           },
           {
             state: "40,50",
-            text: '待评价',
+            text: '已完成',
             loadingType: 'more',
             pageNo: 1,
             orderList: [],

+ 1 - 1
kxmall-app-ui/pages/user/about.vue

@@ -10,7 +10,7 @@
 		</view> -->
 		<view class="row b-b">
 			<text class="tit">邮箱</text>
-			<text class="tiv">hehefresh@163.com</text>
+			<text class="tiv">test@163.com</text>
 		</view>
 		<text class="tcp">由kxmll发展有限公司开发</text>
 	</view>

+ 52 - 52
kxmall-app-ui/pages/user/user.vue

@@ -124,26 +124,26 @@
                  style="width: 32rpx;height: 36rpx;"></image>
           <view class="padding-left-sm lem-text-black" style="font-size: 28rpx;">我的足迹</view>
         </view>
-        <view @click="navTo('/pages/user/promotion')" class="flex align-center padding">
-          <image src="../../static/user/promoter.png" mode="aspectFit"
-                 style="width: 32rpx;height: 36rpx;"></image>
-          <view class="padding-left-sm lem-text-black" style="font-size: 28rpx;">我的推广</view>
-        </view>
-        <view @click="navTo('/pages/user/about')" class="flex align-center padding">
-          <image src="../../static/user/tip_round@3x.png" mode="aspectFit"
-                 style="width: 32rpx;height: 36rpx;"></image>
-          <view class="padding-left-sm lem-text-black" style="font-size: 28rpx;">关于</view>
-        </view>
+<!--        <view @click="navTo('/pages/user/promotion')" class="flex align-center padding">-->
+<!--          <image src="../../static/user/promoter.png" mode="aspectFit"-->
+<!--                 style="width: 32rpx;height: 36rpx;"></image>-->
+<!--          <view class="padding-left-sm lem-text-black" style="font-size: 28rpx;">我的推广</view>-->
+<!--        </view>-->
+<!--        <view @click="navTo('/pages/user/about')" class="flex align-center padding">-->
+<!--          <image src="../../static/user/tip_round@3x.png" mode="aspectFit"-->
+<!--                 style="width: 32rpx;height: 36rpx;"></image>-->
+<!--          <view class="padding-left-sm lem-text-black" style="font-size: 28rpx;">关于</view>-->
+<!--        </view>-->
         <view @click="navTo('/pages/set/set')" class="flex align-center padding">
           <image src="../../static/user/setting@3x.png" mode="aspectFit"
                  style="width: 32rpx;height: 36rpx;"></image>
           <view class="padding-left-sm lem-text-black" style="font-size: 28rpx;">设置</view>
         </view>
-        <view @click="navTo('/pages/notice/notice')" class="flex align-center padding">
-          <image src="../../static/user/notice@3x.png" mode="aspectFit"
-                 style="width: 32rpx;height: 36rpx;"></image>
-          <view class="padding-left-sm lem-text-black" style="font-size: 28rpx;">通知</view>
-        </view>
+<!--        <view @click="navTo('/pages/notice/notice')" class="flex align-center padding">-->
+<!--          <image src="../../static/user/notice@3x.png" mode="aspectFit"-->
+<!--                 style="width: 32rpx;height: 36rpx;"></image>-->
+<!--          <view class="padding-left-sm lem-text-black" style="font-size: 28rpx;">通知</view>-->
+<!--        </view>-->
       </view>
     </view>
     <view v-else style="padding-top: 180rpx;padding-bottom: 180rpx;">
@@ -154,43 +154,43 @@
     </view>
     
     <!-- 猜您喜欢 -->
-    <view style="padding: 20rpx 12rpx 20rpx 30rpx;background-color: #f1f1f1;">
-      <view class="flex justify-between align-center" style="padding: 20rpx 0;">
-        <view style="font-size: 32rpx;font-weight: bold;color: #333;">猜您喜欢</view>
-        <view @click="refreshRecommend" style="font-size: 24rpx;color: #999;margin-right: 10px;">换一批</view>
-      </view>
-      
-      <view v-if="recommendList.length > 0 && storage" class="flex flex-wrap">
-        <view v-for="(item,index) in recommendList" :key="index"
-              class="margin-bottom-sm bg-white flex align-center justify-center flex-direction"
-              style="width: 335rpx;height: 520rpx;padding: 10rpx;margin-right: 18rpx;border-radius: 8rpx;"
-              @click="navToDetailPage(item.id)">
-          <image style="width: 280rpx;height: 280rpx;margin: 10rpx;" :src="JSON.parse(item.image)[0].url"
-                 mode="aspectFit"></image>
-          <view style="padding-top: 28rpx;">
-            <view class="text-cut"
-                  style="width: 294rpx;height: 40rpx;font-size: 28rpx;font-weight: Medium; color: #2D4454;">
-              {{ item.storeName }}
-            </view>
-            <view class="text-cut margin-tb-xs" style="width: 294rpx;height: 40rpx;font-size: 28rpx;color: #999999;">
-              {{ item.storeInfo }}
-            </view>
-            <view style="padding-top: 6rpx;" class="flex align-center justify-between">
-              <view style="width: 114rpx;height: 42rpx;line-height: 42rpx;font-size: 24rpx;color:#F62929;">
-                ¥{{ item.kxStockVo.price }}
-              </view>
-              <view style="color: #B0B0B0;font-size: 24rpx;">{{ item.unitName }}/份</view>
-              <image @click.stop="addCart(item)" style="width: 48rpx;height: 48rpx;"
-                     src="../../static/index/cart.png" mode="aspectFit" class="round"></image>
-            </view>
-          </view>
-        </view>
-      </view>
-      
-      <view v-else class="flex align-center justify-center" style="height: 200rpx;color: #999;">
-        暂无推荐商品
-      </view>
-    </view>
+<!--    <view style="padding: 20rpx 12rpx 20rpx 30rpx;background-color: #f1f1f1;">-->
+<!--      <view class="flex justify-between align-center" style="padding: 20rpx 0;">-->
+<!--        <view style="font-size: 32rpx;font-weight: bold;color: #333;">猜您喜欢</view>-->
+<!--        <view @click="refreshRecommend" style="font-size: 24rpx;color: #999;margin-right: 10px;">换一批</view>-->
+<!--      </view>-->
+<!--      -->
+<!--      <view v-if="recommendList.length > 0 && storage" class="flex flex-wrap">-->
+<!--        <view v-for="(item,index) in recommendList" :key="index"-->
+<!--              class="margin-bottom-sm bg-white flex align-center justify-center flex-direction"-->
+<!--              style="width: 335rpx;height: 520rpx;padding: 10rpx;margin-right: 18rpx;border-radius: 8rpx;"-->
+<!--              @click="navToDetailPage(item.id)">-->
+<!--          <image style="width: 280rpx;height: 280rpx;margin: 10rpx;" :src="JSON.parse(item.image)[0].url"-->
+<!--                 mode="aspectFit"></image>-->
+<!--          <view style="padding-top: 28rpx;">-->
+<!--            <view class="text-cut"-->
+<!--                  style="width: 294rpx;height: 40rpx;font-size: 28rpx;font-weight: Medium; color: #2D4454;">-->
+<!--              {{ item.storeName }}-->
+<!--            </view>-->
+<!--            <view class="text-cut margin-tb-xs" style="width: 294rpx;height: 40rpx;font-size: 28rpx;color: #999999;">-->
+<!--              {{ item.storeInfo }}-->
+<!--            </view>-->
+<!--            <view style="padding-top: 6rpx;" class="flex align-center justify-between">-->
+<!--              <view style="width: 114rpx;height: 42rpx;line-height: 42rpx;font-size: 24rpx;color:#F62929;">-->
+<!--                ¥{{ item.kxStockVo.price }}-->
+<!--              </view>-->
+<!--              <view style="color: #B0B0B0;font-size: 24rpx;">{{ item.unitName }}/份</view>-->
+<!--              <image @click.stop="addCart(item)" style="width: 48rpx;height: 48rpx;"-->
+<!--                     src="../../static/index/cart.png" mode="aspectFit" class="round"></image>-->
+<!--            </view>-->
+<!--          </view>-->
+<!--        </view>-->
+<!--      </view>-->
+<!--      -->
+<!--      <view v-else class="flex align-center justify-center" style="height: 200rpx;color: #999;">-->
+<!--        暂无推荐商品-->
+<!--      </view>-->
+<!--    </view>-->
   
   </view>
 </template>

+ 15 - 9
kxmall-rider-ui/main.js

@@ -6,7 +6,7 @@ import * as config from './config'
 const baseUrl = config.def().baseUrl
 Vue.config.productionTip = false
 
-Vue.prototype.request = function(method, endpoint, token, data = {}) {
+Vue.prototype.request = function(method, endpoint, token, data = {}, failCallback = undefined) {
   let netWork = ''
   uni.getNetworkType({
     success: function(res) {
@@ -21,6 +21,7 @@ Vue.prototype.request = function(method, endpoint, token, data = {}) {
     })
     return;
   }
+
   return new Promise((resolve, reject) => {
     let content = 'application/x-www-form-urlencoded; charset=UTF-8';
     if (method === 'post') {
@@ -32,6 +33,18 @@ Vue.prototype.request = function(method, endpoint, token, data = {}) {
     if (token) {
       header['Authorization'] = 'Bearer ' + token
     }
+
+    if (!failCallback) {
+      failCallback = function(err) {
+        if (showToast) {
+          uni.showToast({
+            title: '请稍后再试',
+            icon: 'none'
+          })
+        }
+        reject(err)
+      }
+    }
     uni.request({
       url: baseUrl + "/" + endpoint,
       method: method,
@@ -65,14 +78,7 @@ Vue.prototype.request = function(method, endpoint, token, data = {}) {
           reject(res.data)
         }
       },
-      fail: function(err) {
-        uni.showToast({
-          title: '请稍后再试',
-          icon: 'none'
-        })
-        reject(err)
-      }
-
+      fail: failCallback
     })
   })
 }

+ 1 - 3
kxmall-rider-ui/pages/order/order.vue

@@ -385,11 +385,9 @@ export default {
           var leave3 = leave2 % (60 * 1000)      //计算分钟数后剩余的毫秒数
           var seconds = Math.round(leave3 / 1000)
           that.preTime = days > 0 ? (days + ":" + hours + ":" + minutes + ":" + seconds) : (hours > 0 ? (hours + ":" + minutes + ":" + seconds) : (minutes + ":" + seconds))
-          //alert(" 相差 "+days+"天 "+hours+"小时 "+minutes+" 分钟"+seconds+" 秒")
         } else {
           that.preTime = 0
-          //console.log(that.flag)
-          if (that.flag == true) {
+          if (that.flag) {
             let nav_index = 2
             uni.redirectTo({
               url: '../task/task?nav_index=' + nav_index

Plik diff jest za duży
+ 491 - 415
kxmall-rider-ui/pages/task/task.vue


+ 47 - 47
kxmall-rider-ui/pages/user/user.vue

@@ -18,33 +18,33 @@
 		</view>
 
 		<!-- 钱包余额卡片 -->
-		<view class="wallet-card">
-			<view class="wallet-header">
-				<text class="title">我的钱包</text>
-				<text class="subtitle">实时更新</text>
-			</view>
-			<view class="balance-container">
-				<view class="balance-item">
-					<text class="label">可用余额</text>
-					<text class="value">¥{{formatMoney(walletBalance)}}</text>
-				</view>
-				<view class="balance-item">
-					<text class="label">待提现</text>
-					<text class="value">¥{{formatMoney(toBeWithdrawn)}}</text>
-				</view>
-			</view>
-		</view>
+<!--		<view class="wallet-card">-->
+<!--			<view class="wallet-header">-->
+<!--				<text class="title">我的钱包</text>-->
+<!--				<text class="subtitle">实时更新</text>-->
+<!--			</view>-->
+<!--			<view class="balance-container">-->
+<!--				<view class="balance-item">-->
+<!--					<text class="label">可用余额</text>-->
+<!--					<text class="value">¥{{formatMoney(walletBalance)}}</text>-->
+<!--				</view>-->
+<!--				<view class="balance-item">-->
+<!--					<text class="label">待提现</text>-->
+<!--					<text class="value">¥{{formatMoney(toBeWithdrawn)}}</text>-->
+<!--				</view>-->
+<!--			</view>-->
+<!--		</view>-->
 
 		<!-- 快捷功能区 -->
 		<view class="quick-actions">
-			<view class="action-item" @click="navTo('income')">
-				<image class="icon" src="@/static/icons/withdraw.png" mode="aspectFit"></image>
-				<text class="text">收益明细</text>
-			</view>
-			<view class="action-item" @click="navTo('withdraw')">
-				<image class="icon" src="@/static/icons/withdraw.png" mode="aspectFit"></image>
-				<text class="text">提现</text>
-			</view>
+<!--			<view class="action-item" @click="navTo('income')">-->
+<!--				<image class="icon" src="@/static/icons/withdraw.png" mode="aspectFit"></image>-->
+<!--				<text class="text">收益明细</text>-->
+<!--			</view>-->
+<!--			<view class="action-item" @click="navTo('withdraw')">-->
+<!--				<image class="icon" src="@/static/icons/withdraw.png" mode="aspectFit"></image>-->
+<!--				<text class="text">提现</text>-->
+<!--			</view>-->
 			<view class="action-item" @click="navTo('profile')">
 				<image class="icon" src="@/static/icons/profile.png" mode="aspectFit"></image>
 				<text class="text">资料填写</text>
@@ -56,29 +56,29 @@
 		</view>
 
 		<!-- 交易记录列表 -->
-		<view class="transaction-section">
-			<view class="section-header">
-				<text class="title">交易记录</text>
-				<text class="more" @click="viewAllTransactions">查看全部</text>
-			</view>
-
-			<view class="transaction-list">
-				<view class="transaction-item" v-for="item in transactions" :key="item.id" @click="viewDetail(item)">
-					<view class="left">
-						<view class="type">{{getTypeText(item.transactionType)}}</view>
-						<view class="time">{{item.createTime}}</view>
-					</view>
-					<view class="right" :class="{'income': item.amount > 0, 'expense': item.amount < 0}">
-						{{item.amount > 0 ? '+' : ''}}{{formatMoney(item.amount)}}
-					</view>
-				</view>
-
-				<view class="load-more" @click="loadMore" v-if="hasMore">
-					<text>{{loading ? '加载中...' : '加载更多'}}</text>
-					<image v-if="!loading" class="arrow" src="" mode="aspectFit"></image>
-				</view>
-			</view>
-		</view>
+<!--		<view class="transaction-section">-->
+<!--			<view class="section-header">-->
+<!--				<text class="title">交易记录</text>-->
+<!--				<text class="more" @click="viewAllTransactions">查看全部</text>-->
+<!--			</view>-->
+
+<!--			<view class="transaction-list">-->
+<!--				<view class="transaction-item" v-for="item in transactions" :key="item.id" @click="viewDetail(item)">-->
+<!--					<view class="left">-->
+<!--						<view class="type">{{getTypeText(item.transactionType)}}</view>-->
+<!--						<view class="time">{{item.createTime}}</view>-->
+<!--					</view>-->
+<!--					<view class="right" :class="{'income': item.amount > 0, 'expense': item.amount < 0}">-->
+<!--						{{item.amount > 0 ? '+' : ''}}{{formatMoney(item.amount)}}-->
+<!--					</view>-->
+<!--				</view>-->
+
+<!--				<view class="load-more" @click="loadMore" v-if="hasMore">-->
+<!--					<text>{{loading ? '加载中...' : '加载更多'}}</text>-->
+<!--					<image v-if="!loading" class="arrow" src="" mode="aspectFit"></image>-->
+<!--				</view>-->
+<!--			</view>-->
+<!--		</view>-->
 
 		<!-- 底部操作栏 -->
 		<view class="bottom-bar">

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików