From 0b19ef8de03de18815d759a965481e461ed5db37 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 22 八月 2025 20:58:07 +0800
Subject: [PATCH] 优化
---
small-program/App.vue | 3
small-program/pages/packaging-worker/packaging-worker.vue | 25 +
small-program/pages/demand-hall/demand-hall.vue | 27 +-
small-program/pages/sorting/sorting.vue | 1
admin/.env.production | 2
small-program/pages/withdrawal/withdrawal.vue | 40 ++-
small-program/pages/mine/mine.vue | 3
small-program/main.js | 3
small-program/pages/employment-certification/employment-certification.vue | 31 ++
small-program/store/index.js | 3
small-program/pages/using-workers/using-workers.vue | 57 +++--
small-program/pages/index/index.vue | 271 +++++++++++++++++-------
small-program/pages/order-details/order-details.vue | 63 ++++-
small-program/pages/freight/freight.vue | 118 ++++++----
14 files changed, 431 insertions(+), 216 deletions(-)
diff --git a/admin/.env.production b/admin/.env.production
index 27ab1a2..d6fbc62 100644
--- a/admin/.env.production
+++ b/admin/.env.production
@@ -5,4 +5,4 @@
VUE_APP_DEBUG = 'off'
# VUE_APP_API_URL = 'https://test.doumee.cn/jinkuai_admin'
-VUE_APP_API_URL = 'http://192.168.0.212/jinkuai_admin'
+VUE_APP_API_URL = 'https://jinkuai.832smartfarm.com/jinkuai_admin'
diff --git a/small-program/App.vue b/small-program/App.vue
index a57861a..bb12718 100644
--- a/small-program/App.vue
+++ b/small-program/App.vue
@@ -46,7 +46,8 @@
uni.getLocation({
type: 'wgs84',
success: (addr) => {
- const locParam = { latitude: addr.latitude, longitude: addr.longitude ,address:'鑾峰彇鍦板潃澶辫触'};
+ const locParam = { latitude: addr.latitude, longitude: addr.longitude };
+ uni.setStorageSync('address', locParam);
var address =null
const qqmapsdk = new QQMapWX({
key: '4PXBZ-JLBC7-LCLXG-P2SZX-C4HYE-LDBLQ' //鑵捐鍦板浘鐢宠鐨刱ey锛堝悗缁渶瑕佸叕鍙告彁渚涳紝涓汉寮�鍙戣�呴搴︽湁闄愶級
diff --git a/small-program/main.js b/small-program/main.js
index c6a73ff..19e0ac5 100644
--- a/small-program/main.js
+++ b/small-program/main.js
@@ -14,8 +14,9 @@
Vue.prototype.$isResolve = resolve;
})
-Vue.prototype.$baseUrl = 'http://192.168.1.54:10011/'
+// Vue.prototype.$baseUrl = 'http://192.168.1.54:10011/'
// Vue.prototype.$baseUrl = 'https://test.doumee.cn/jinkuai_web/'
+Vue.prototype.$baseUrl = 'https://jinkuai.832smartfarm.com/jinkuai_web/'
const app = new Vue({
store,
diff --git a/small-program/pages/demand-hall/demand-hall.vue b/small-program/pages/demand-hall/demand-hall.vue
index 0a4e6e9..c186875 100644
--- a/small-program/pages/demand-hall/demand-hall.vue
+++ b/small-program/pages/demand-hall/demand-hall.vue
@@ -102,16 +102,20 @@
<view class="eidt-phone" v-if="[2].includes(item.status)">鑱旂郴甯堝倕</view>
<view class="eidt-phone" v-if="item.status === 4 && item.commentStatus === 0">璇勪环璁㈠崟</view>
<view class="eidt-btn" v-if="[0,1,2].includes(item.status) && item.type !== 2" @click.stop="jumpEdit(item)">淇敼璁㈠崟</view>
- <view class="eidt-btn" v-if="(item.type === 2 && item.status === 0) || (item.type === 2 && item.status === 3)" @click.stop="jumpEdit(item)">缁х画鏀粯</view>
+ <view class="eidt-btn" v-if="(item.type !== 2 && item.status === 0) || (item.type !== 2 && item.status === 3)" @click.stop="jumpEdit(item)">缁х画鏀粯</view>
<!-- <view class="eidt-btn" v-if="item.status === 2" @click.stop="startJobs(item.id)">寮�濮嬩綔涓�</view> -->
- <view class="eidt-btn" v-if="item.status === 3" @click.stop="jumpDesc(item)">瀹屾垚骞舵敮浠�</view>
+ <view class="eidt-btn" v-if="item.type != 2 && item.status === 3" @click.stop="jumpDesc(item)">瀹屾垚骞舵敮浠�</view>
+ <view class="eidt-btn" v-if="item.type == 2 && item.status === 3" @click.stop="jumpDesc(item)">瀹屾垚浣滀笟</view>
</view>
</view>
</view>
</view>
<!-- 鎺ュ崟鏂� -->
<view class="index-list" v-if="typeViewId === 1">
- <view class="index-list-item" v-for="(item, index) in orderList" :key="index" @click="jumpDesc(item)">
+ <view class="index-list-wu" v-if="orderList.length === 0">
+ <text>宸插姞杞藉叏閮ㄦ暟鎹�</text>
+ </view>
+ <view class="index-list-item" v-for="(item, index) in orderList" :key="index" @click="jumpDesc(item)" v-else>
<view class="index-list-item-head">
<view class="index-list-item-head-l">
<view class="xoam"></view>
@@ -236,7 +240,7 @@
{ name: '宸叉帴鍗�', id: 2 },
{ name: '杩涜涓�', id: 3 },
{ name: '宸插畬鎴�', id: 4 },
- { name: '宸插彇娑�', id: 99 },
+ // { name: '宸插彇娑�', id: 99 },
],
list1: [
{ name: '鍏ㄩ儴', id: '' },
@@ -246,7 +250,7 @@
{ name: '杩涜涓�', id: 3 },
{ name: '宸插畬鎴�', id: 4 },
{ name: '宸插彇娑�', id: 99 },
- { name: '寰呰瘎浠�', id: [4, 0] }
+ { name: '寰呰瘎浠�', id: 5 }
],
orderId: null,
status: '',
@@ -346,7 +350,8 @@
page: this.page,
model: {
queryMyOrderType: this.userInfo.useIdentity,
- status: this.status,
+ status: this.status === 5 ? 4 : this.status,
+ commentStatus: this.status === 5 ? 0 : '',
queryLat: this.latitude,
queryLgt: this.longitude
}
@@ -374,13 +379,13 @@
})
},
clickOrderType(id) {
- if (typeof id === 'object') {
- this.status = id[0]
- this.commentStatus = id[1]
- } else {
+ // if (typeof id === 5) {
+ // this.status = 5
+ // // this.commentStatus = 0
+ // } else {
this.commentStatus = ''
this.status = id
- }
+ // }
this.orderList = []
this.next = true
this.page = 1
diff --git a/small-program/pages/employment-certification/employment-certification.vue b/small-program/pages/employment-certification/employment-certification.vue
index b633584..6f91d16 100644
--- a/small-program/pages/employment-certification/employment-certification.vue
+++ b/small-program/pages/employment-certification/employment-certification.vue
@@ -1,6 +1,12 @@
<template>
<view class="box">
- <view class="box-head" :style="{ backgroundImage: 'url(' + bgImg + ')' }">
+ <view class="box-head">
+ <!-- 鐢ㄥ伐 -->
+ <image class="box-head-bg" src="@/static/image/bg_renzheng_yonggong@2x.png" mode="widthFix" v-if="title === '鐢ㄥ伐璁よ瘉'"></image>
+ <!-- 璐ц繍 -->
+ <image class="box-head-bg" src="@/static/image/bg_renzheng_huoyun@2x.png" mode="widthFix" v-if="title === '璐ц繍璁よ瘉'"></image>
+ <!-- 鐢ㄩ -->
+ <image class="box-head-bg" src="@/static/image/bg_renzheng_gongcan@2x.png" mode="widthFix" v-if="title === '渚涢璁よ瘉'"></image>
<view class="box-head-info">
<text>{{title}}</text>
<text>璇锋寜瑕佹眰濉啓璁よ瘉淇℃伅</text>
@@ -205,7 +211,7 @@
},
data() {
return {
- bgImg: require('@/static/image/bg_renzheng_yonggong@2x.png'),
+ bgImg: null,
title: '鐢ㄦ埛璁よ瘉',
flag: null,
@@ -276,6 +282,7 @@
return false
},
applySubmit() {
+ console.log(this.loading)
if (this.loading) {
return
}
@@ -286,6 +293,7 @@
this.inNullParam(this.form.lgt) ||
this.inNullParam(this.form.location) ||
this.inNullParam(this.form.telephone)) {
+
uni.showToast({
title: '瀵逛笉璧凤紝璇锋寜瑕佹眰濉啓鐢宠淇℃伅1锛�',
icon: "none",
@@ -340,7 +348,7 @@
param.img2 = this.form.img21
}
uni.requestSubscribeMessage({
- tmplIds: ['4H9ztG4E9BxJLwMuYSZ6oiM7yb4KX7u7bYhkhYJP0-Y'],
+ tmplIds: ['VJho7-lf-4_WZFfOzenDndgwNDIA0EvCiE6vqBnExpQ'],
success(res) {
console.log('鎻愪氦鍙傛暟锛�', param)
that.$u.api.applyForIdentity(param).then(res => {
@@ -357,6 +365,9 @@
}).finally(() => {
that.loading = false
})
+ },
+ fail(err) {
+ console.log(err)
}
})
},
@@ -578,8 +589,18 @@
height: 300rpx;
padding: 34rpx 40rpx 0 40rpx;
box-sizing: border-box;
- background-repeat: no-repeat;
- background-size: 100% 100%;
+ // background-repeat: no-repeat;
+ // background-size: 100% 100%;
+ position: relative;
+
+ .box-head-bg {
+ width: 100%;
+ height: 300rpx;
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: -1;
+ }
.box-head-botton {
width: 100%;
diff --git a/small-program/pages/freight/freight.vue b/small-program/pages/freight/freight.vue
index b575336..22d39c4 100644
--- a/small-program/pages/freight/freight.vue
+++ b/small-program/pages/freight/freight.vue
@@ -91,8 +91,8 @@
<view class="list-item-row">
<view class="list-item-row-label">杩愯緭閲嶉噺/鏁伴噺<b>*</b></view>
<view class="list-item-row-val">
- <input type="text" v-model="form.transportNum" placeholder="璇疯緭鍏�" />
- <view @click="show4 = true" style="width: 100%; flex-shrink: 0; display: flex; align-items: center; justify-content: flex-end;">
+ <input type="text" style="flex: 1;" v-model="form.transportNum" placeholder="璇疯緭鍏�" />
+ <view @click="show4 = true" style="width: 100rpx; flex-shrink: 0; display: flex; align-items: center; justify-content: flex-end;">
<text>{{form.transportUnit}}</text>
<u-icon name="arrow-down" color="#111111" size="16"></u-icon>
</view>
@@ -222,6 +222,7 @@
<u-calendar
:show="show2"
color="#00BC12"
+ :allowSameDay="true"
mode="range"
@close="show2 = false"
@confirm="confirmDate" />
@@ -320,7 +321,9 @@
})
} else {
const res = uni.getStorageSync('carData');
+ console.log(res)
this.form.linkPhone = this.userInfo.telephone
+ this.form.linkName = this.userInfo.name
this.form.startDate = res.startDate
this.form.endDate = res.endDate
this.form.lat = res.lat
@@ -344,6 +347,7 @@
},
// 鎻愪氦璁㈠崟
submit() {
+ var that = this;
if (!this.form.carUnit) {
return uni.showToast({ title: '璇烽�夋嫨璐ц溅鍨嬪彿', icon: 'none' })
}
@@ -362,60 +366,69 @@
if (!this.form.linkPhone) {
return uni.showToast({ title: '璇疯緭鍏ヨ仈绯荤數璇�', icon: 'none' })
}
- if (!this.form.id) {
- this.$u.api.release({
- ...this.form,
- price: Number(this.form.price) * 100,
- wayInfoDTOList: [
- {
- lat: this.form.lat,
- lgt: this.form.lgt,
- location: this.form.location
- },
- ...this.form.wayInfoDTOList,
- {
- lat: this.form.latEnd,
- lgt: this.form.lgtEnd,
- location: this.form.locationEnd
- }
- ]
- }).then(res => {
- if (res.code == 200) {
- uni.navigateTo({
- url: `/pages/success/success?orderId=${res.data.id}`
+ if (!that.form.id) {
+ uni.requestSubscribeMessage({
+ tmplIds: ['oVjOBLcHxIlGzOMJsdInmgI5CHGXh-UTvMzQqfFOnIg'],
+ success(res) {
+ that.$u.api.release({
+ ...that.form,
+ price: Number(that.form.price) * 100,
+ wayInfoDTOList: [
+ {
+ lat: that.form.lat,
+ lgt: that.form.lgt,
+ location: that.form.location
+ },
+ ...that.form.wayInfoDTOList,
+ {
+ lat: that.form.latEnd,
+ lgt: that.form.lgtEnd,
+ location: that.form.locationEnd
+ }
+ ]
+ }).then(res => {
+ if (res.code == 200) {
+ uni.navigateTo({
+ url: `/pages/success/success?orderId=${res.data.id}`
+ })
+ }
})
}
})
} else {
- this.$u.api.updateOrder({
- ...this.form,
- price: Number(this.form.price) * 100,
- wayInfoDTOList: [
- {
- lat: this.form.lat,
- lgt: this.form.lgt,
- location: this.form.location
- },
- ...this.form.wayInfoDTOList,
- {
- lat: this.form.latEnd,
- lgt: this.form.lgtEnd,
- location: this.form.locationEnd
- }
- ]
- }).then(res => {
- if (res.code == 200) {
- uni.showToast({
- title: '缂栬緫鎴愬姛',
- icon: 'success',
- mask: true,
- duration: 2000
+ uni.requestSubscribeMessage({
+ tmplIds: ['3YSC7gouRlSjHXz4CrWOGFzPmGwEBtFj4snwdfMvKHk'],
+ success(res) {
+ that.$u.api.updateOrder({
+ ...that.form,
+ price: Number(that.form.price) * 100,
+ wayInfoDTOList: [
+ {
+ lat: that.form.lat,
+ lgt: that.form.lgt,
+ location: that.form.location
+ },
+ ...that.form.wayInfoDTOList,
+ {
+ lat: that.form.latEnd,
+ lgt: that.form.lgtEnd,
+ location: that.form.locationEnd
+ }
+ ]
+ }).then(res => {
+ if (res.code == 200) {
+ uni.showToast({
+ title: '缂栬緫鎴愬姛',
+ icon: 'success',
+ mask: true,
+ duration: 2000
+ })
+ setTimeout(() => {
+ uni.navigateBack({ delta: 1 });
+ // uni.$emit('refresh')
+ }, 1500)
+ }
})
- setTimeout(() => {
- uni.navigateBack({ delta: 1 });
- // uni.$emit('refresh')
- }, 1500)
-
}
})
}
@@ -502,7 +515,8 @@
confirmDate(e) {
this.form.startDate = e[0]
this.form.endDate = e[e.length - 1]
- this.form.priceNum1 = e.length;
+ let time = this.form.startDate == this.form.endDate ? 1 : 0
+ this.form.priceNum1 = e.length - time;
this.show2 = false
},
addAddr() {
diff --git a/small-program/pages/index/index.vue b/small-program/pages/index/index.vue
index 5b2c779..33003ec 100644
--- a/small-program/pages/index/index.vue
+++ b/small-program/pages/index/index.vue
@@ -1,7 +1,7 @@
<template>
<view class="index">
<!-- 鎺ュ崟鏂� -->
- <view class="index-j" v-if="typeViewId === 1">
+ <view class="index-j" v-if="userInfo && userInfo.useIdentity === 1">
<view class="index-j-head">
<view :style="{ width: '100%', height: statusbarHeight + 'px' }"></view>
<view class="index-c-title" :style="{ height: navHeight + 'px' }">
@@ -74,14 +74,15 @@
<text>楼{{item.estimatedAccount / 100}}</text>
</view>
<view class="eidt">
- <sunui-mverify @change="getaccept($event, item.id, index)"></sunui-mverify>
+ <!-- <sunui-mverify @change="getaccept($event, item.id, index)"></sunui-mverify> -->
+ <view class="eidt-btn" @click="show1 = true, orderId = item.id">鎶㈠崟</view>
</view>
</view>
</view>
</view>
- <!-- 鍙戝崟鏂� -->
- <view class="index-c" v-if="typeViewId === 0">
+ <!-- 鍙戝崟鏂� -->
+ <view class="index-c" v-if="!userInfo || userInfo.useIdentity === 0">
<view :style="{ width: '100%', height: statusbarHeight + 'px' }"></view>
<view class="index-c-title" :style="{ height: navHeight + 'px' }" @click="selectAddress(-1)">
<text class="index-c-title-logo">杩戝揩</text>
@@ -122,9 +123,10 @@
<view :class="child.active ? 'radio-item-list-item active' : 'radio-item-list-item'" v-for="(child, childIndex) in item.list" :key="childIndex" @click="selectMenu(index, childIndex)">{{child.price}}鍏�</view>
</view>
<view class="radio-item-list-data">
- <text>浠芥暟锛�</text>
+ <text style="flex-shrink: 0;">浠芥暟锛�</text>
<input type="number" v-model="item.num" placeholder="璇疯緭鍏�">
<text style="color: #999999;">浠�</text>
+ <view class="radio-item-list-data-btn" @click="clear(index)">鍙栨秷</view>
</view>
</view>
</view>
@@ -311,8 +313,9 @@
</view>
<!-- 閫夋嫨鏃ユ湡鑼冨洿 -->
- <u-calendar :show="show" color="#00BC12" mode="range" @close="show = false" @confirm="confirmDate"></u-calendar>
- <u-popup :show="showPhone" round="15" mode="bottom" @close="contactPhone()" :closeable="true" :closeOnClickOverlay="true">
+ <u-calendar :show="show" color="#00BC12" :allowSameDay="true" mode="range" @close="show = false" @confirm="confirmDate"></u-calendar>
+
+ <u-popup :show="showPhone" round="15" mode="bottom" :safeAreaInsetBottom="true" @close="contactPhone()" :closeable="true" :closeOnClickOverlay="true">
<view class="phone">
<view class="phone-head">
<view></view>
@@ -322,9 +325,25 @@
<view></view>
<text>{{item}}</text>
</view>
+ <view style="width: 100%; height: 30rpx;"></view>
<!-- <view class="phone-botton" @click="contactPhone()" >鍏抽棴</view> -->
</view>
</u-popup>
+
+ <u-modal
+ title="娓╅Θ鎻愮ず"
+ :show="show1"
+ closeOnClickOverlay
+ showCancelButton
+ >
+ <view class="slot-content">
+ 鏄惁纭鎶㈠崟锛�
+ </view>
+ <view slot="confirmButton" style="display: flex; justify-content: space-between; align-items: center; width: 100%;">
+ <view class="btn1" @click="show1 = false">鍙栨秷</view>
+ <view class="btn2" @click="getaccept1">纭</view>
+ </view>
+ </u-modal>
</view>
</template>
@@ -401,7 +420,8 @@
linkName: '',
linkPhone: '',
estimatedAccount: '',
- price: ''
+ price: '',
+ address: ''
},
sortType: 0,
orderList: [],
@@ -409,21 +429,24 @@
page: 1,
next: true,
- isOnce: true
+ isOnce: true,
+ show1: false,
+ orderId: null
}
},
async onLoad() {
await this.$onLaunched;
-
- if (this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}' && this.userInfo.useIdentity === 1) {
- this.getOrderList()
- }
+ console.log('2')
+ // if (this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}' && this.userInfo.useIdentity === 1) {
+ // this.getOrderList()
+ // }
this.getCategoryLists()
this.getDictInfo()
if (this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}') {
- this.form.linkPhone = this.userInfo.telephone
+ this.form.linkPhone = this.userInfo.telephone || ''
+ this.form.linkName = this.userInfo.name || ''
}
this.qqmapsdk = new QQMapWX({
@@ -443,11 +466,9 @@
this.form.locationRemark = ''
this.form.supplement = ''
this.form.multifileList = []
- this.form.linkName = ''
this.form.estimatedAccount = ''
this.form.price = ''
this.form.address = ''
- this.orderFood = []
})
// 鍒锋柊棣栭〉鏁版嵁
uni.$on('refresh', () => {
@@ -459,13 +480,18 @@
}
})
},
- onShow(options) {
- this.typeViewId = 0
+ async onShow(options) {
+ await this.$onLaunched;
+ console.log('2')
+
if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}') {
console.log('宸茬櫥闄�')
this.isLogin = true
- if (!this.isOnce && this.userInfo.useIdentity == 1) {
+ // this.typeViewId = this.userInfo.useIdentity
+ // !this.isOnce &&
+ if (this.userInfo.useIdentity === 1) {
+ console.log('宸茬櫥闄�111')
this.page = 1
this.next = true
this.orderList = []
@@ -476,16 +502,13 @@
this.isLogin = false
console.log('鏈櫥闄�')
}
-
- if (this.userInfo && this.userInfo.useIdentity == 1) {
- this.typeViewId = 1
- }
},
watch: {
typeId: {
handler(news, old) {
+ console.log('typeId')
this.form.startDate = ''
-
+ this.form.address = ''
this.form.endDate = ''
this.form.latitude = ''
this.form.longitude = ''
@@ -497,7 +520,6 @@
this.form.locationRemark = ''
this.form.supplement = ''
this.form.multifileList = []
- this.form.linkName = ''
this.form.estimatedAccount = ''
this.form.price = ''
this.viewStatus = false
@@ -535,6 +557,12 @@
}
},
methods: {
+ clear(index) {
+ this.orderFood[index].num = ''
+ this.orderFood[index].list.forEach(item => {
+ item.active = false
+ })
+ },
getDictInfo(){
var that = this;
this.$u.api.getPlatformAboutUs({}).then(res =>{
@@ -553,20 +581,33 @@
}
},
// 鎵嬪姩鎺ュ崟
- getaccept(e, orderId, index) {
- if (!e.msg) return;
- this.$u.api.accept({ orderId })
- .then(res => {
- if (res.code === 200) {
+ getaccept() {
+ var that = this;
+ that.$u.api.accept({ orderId: this.orderId })
+ .then(res1 => {
+ if (res1.code === 200) {
uni.showToast({ title: '鎶㈠崟鎴愬姛锛�', icon: 'success', duration: 2000 })
setTimeout(() => {
- this.page = 1
- this.next = true
- this.orderList = []
- this.getOrderList()
+ that.page = 1
+ that.next = true
+ that.orderList = []
+ that.getOrderList()
}, 2000)
}
})
+ },
+ getaccept1() {
+ var that = this;
+ this.show1 = false
+ uni.requestSubscribeMessage({
+ tmplIds: ['tDpYImlrdv-0d3euTrHbYZ1cEZvjVHTNlqHvV0tpLHg'],
+ success(res) {
+ that.getaccept()
+ },
+ fail(err) {
+ that.getaccept()
+ }
+ })
},
clickSort(id) {
this.sortType = id
@@ -592,8 +633,8 @@
queryMyOrderType: 2,
type: this.typeVal,
sortType: this.sortType,
- queryLat: this.latitude,
- queryLgt: this.longitude
+ queryLat: uni.getStorageSync('address').latitude,
+ queryLgt: uni.getStorageSync('address').longitude
}
}).then(res => {
if (res.code !== 200) return;
@@ -620,6 +661,7 @@
},
// 鎻愪氦璁㈠崟
submit() {
+ var that = this
if (!this.form.startDate) {
return uni.showToast({ title: '璇烽�夋嫨鐢ㄩ鏃堕棿', icon: 'none' })
}
@@ -632,52 +674,61 @@
if (!this.form.linkPhone) {
return uni.showToast({ title: '璇疯緭鍏ヨ仈绯荤數璇�', icon: 'none' })
}
- let cateringDTOList = []
- this.orderFood.forEach(item => {
- item.list.forEach(child => {
- if (child.active) {
- cateringDTOList.push({
- name: item.name,
- num: item.num,
- price: (Number(child.price) * Number(item.num)) * 100
- })
- }
- })
- })
- this.$u.api.release({
- ...this.form,
- type: 2,
- price: Number(this.form.price) * 100,
- priceNum1: this.form.days,
- location: this.form.address,
- lat: this.form.latitude,
- lgt: this.form.longitude,
- cateringDTOList
- }).then(res => {
- if (res.code == 200) {
- wx.requestPayment({
- timeStamp: res.data.object.timeStamp,
- nonceStr: res.data.object.nonceStr,
- package: res.data.object.packageVal,
- signType: res.data.object.signType,
- paySign: res.data.object.paySign,
- success (res1) {
- if (res1.errMsg = 'requestPayment:ok') {
- uni.showToast({ title: '鏀粯鎴愬姛', icon: 'success', duration: 2000 });
- setTimeout(() => {
- uni.navigateTo({
- url: `/pages/success/success?orderId=${res.data.id}`
- })
- }, 1500)
+ uni.requestSubscribeMessage({
+ tmplIds: ['oVjOBLcHxIlGzOMJsdInmgI5CHGXh-UTvMzQqfFOnIg'],
+ success(res) {
+ let cateringDTOList = []
+ that.orderFood.forEach(item => {
+ item.list.forEach(child => {
+ if (child.active) {
+ // (Number(child.price) * Number(item.num))
+ cateringDTOList.push({
+ name: item.name,
+ num: item.num,
+ price: child.price * 100
+ })
}
- },
- fail(err) {
- console.log(err)
+ })
+ })
+ that.$u.api.release({
+ ...that.form,
+ type: 2,
+ price: Number(that.form.price) * 100,
+ priceNum1: that.form.days,
+ location: that.form.address,
+ lat: that.form.latitude,
+ lgt: that.form.longitude,
+ cateringDTOList
+ }).then(res => {
+ if (res.code == 200) {
+ wx.requestPayment({
+ timeStamp: res.data.object.timeStamp,
+ nonceStr: res.data.object.nonceStr,
+ package: res.data.object.packageVal,
+ signType: res.data.object.signType,
+ paySign: res.data.object.paySign,
+ success (res1) {
+ if (res1.errMsg = 'requestPayment:ok') {
+ uni.showToast({ title: '鏀粯鎴愬姛', icon: 'success', duration: 2000 });
+ setTimeout(() => {
+ uni.navigateTo({
+ url: `/pages/success/success?orderId=${res.data.id}`
+ })
+ }, 1500)
+ }
+ },
+ fail(err) {
+ console.log(err)
+ }
+ })
}
})
+ console.log(cateringDTOList)
+ },
+ fail(err) {
+ console.log(err)
}
})
- console.log(cateringDTOList)
},
uploadImg() {
uni.chooseImage({
@@ -729,7 +780,10 @@
confirmDate(e) {
this.form.startDate = e[0]
this.form.endDate = e[e.length - 1]
- this.form.days = e.length;
+
+ let time = this.form.startDate == this.form.endDate ? 1 : 0
+
+ this.form.days = e.length - time;
this.show = false
if (this.typeId === 2) {
this.getPrice()
@@ -760,6 +814,12 @@
});
},
clickType(e) {
+ if (!this.token) {
+ uni.navigateTo({
+ url: '/pages/login/login'
+ })
+ return
+ }
this.typeId = e
if (e === 2) {
this.form.categoryId = this.car[0].id
@@ -895,6 +955,36 @@
<style lang="scss" scoped>
.index {
width: 100%;
+ .slot-content {
+ width: 100%;
+ text-align: center;
+ font-weight: 400;
+ font-size: 30rpx;
+ color: #333333;
+ margin: 30rpx 0;
+ }
+ .btn1 {
+ width: 264rpx;
+ height: 88rpx;
+ line-height: 88rpx;
+ text-align: center;
+ font-weight: 400;
+ font-size: 32rpx;
+ color: #666666;
+ border-radius: 44rpx;
+ border: 1rpx solid #B2B2B2;
+ }
+ .btn2 {
+ width: 264rpx;
+ height: 88rpx;
+ line-height: 88rpx;
+ text-align: center;
+ font-weight: 500;
+ font-size: 32rpx;
+ color: #FFFFFF;
+ background: #00BC12;
+ border-radius: 44rpx;
+ }
.index-j {
width: 100%;
.index-j-head {
@@ -1001,6 +1091,17 @@
display: flex;
align-items: center;
justify-content: center;
+ .eidt-btn {
+ width: 100%;
+ height: 88rpx;
+ line-height: 88rpx;
+ text-align: center;
+ background: #00BC12;
+ border-radius: 44rpx;
+ font-weight: 500;
+ font-size: 32rpx;
+ color: #FFFFFF;
+ }
// background: #00BC12;
// border-radius: 50rpx;
// text {
@@ -1270,7 +1371,7 @@
.radio-item {
width: 100%;
display: flex;
- align-items: self-end;
+ align-items: flex-start;
margin-bottom: 30rpx;
border-bottom: 1rpx solid #E5E5E5;
&:last-child {
@@ -1329,6 +1430,18 @@
justify-content: flex-end;
margin-top: 42rpx;
margin-bottom: 34rpx;
+ .radio-item-list-data-btn {
+ width: 110rpx;
+ height: 64rpx;
+ line-height: 64rpx;
+ margin-left: 20rpx;
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #666666;
+ text-align: center;
+ border: 1rpx solid #B2B2B2;
+ border-radius: 34rpx;
+ }
text {
font-weight: 400;
font-size: 30rpx;
diff --git a/small-program/pages/mine/mine.vue b/small-program/pages/mine/mine.vue
index a6fe7a9..3aa22eb 100644
--- a/small-program/pages/mine/mine.vue
+++ b/small-program/pages/mine/mine.vue
@@ -10,7 +10,7 @@
<view class="info-box-head" >
<view class="info-box-head-image" @click="jump(isLogin?1:5)">
<image v-if="userInfo.fullCoverImage&&userInfo.fullCoverImage !=''" :src="userInfo.fullCoverImage" mode="widthFix"></image>
- <image v-else src="/static/logo.png" mode="widthFix"></image>
+ <image v-else src="/static/icon/img@2x.png" mode="widthFix"></image>
</view>
<view class="info-box-head-info" v-if="isLogin">
<view class="info-box-head-info-name" @click="jump(1)">{{userInfo.nickName||'鍖垮悕'}}</view>
@@ -260,6 +260,7 @@
console.log(222,res)
if(res.code ===200){
that.userInfo.useIdentity = param.useIdentity
+ that.$store.commit('setUserInfo', that.userInfo)
uni.$emit('refresh')
}
}).finally(() => {
diff --git a/small-program/pages/order-details/order-details.vue b/small-program/pages/order-details/order-details.vue
index a6a75f6..98fb261 100644
--- a/small-program/pages/order-details/order-details.vue
+++ b/small-program/pages/order-details/order-details.vue
@@ -7,12 +7,12 @@
<view class="order-head-status">{{info.statusName || ''}}</view>
<view class="order-head-info">{{getStatusInfo()}}</view>
</view>
- <view class="order-quxiao" v-if="userInfo.useIdentity != 0">
+ <view class="order-quxiao">
<view class="order-quxiao-btn" @click="show = true" v-if="userInfo.id === info.acceptMemberId && info.status ===2">鍙栨秷璁㈠崟</view>
<view class="order-quxiao-btn" @click="show = true" v-if="userInfo.id === info.releaseMemberId && (info.status ===0 || info.status ===1|| info.status ===2)">鍙栨秷璁㈠崟</view>
<view class="order-quxiao-btn1" v-if="userInfo.id === info.releaseMemberId && (info.status ===0 || info.status ===1|| info.status ===2)" @click="jumpEdit()">淇敼璁㈠崟</view>
</view>
- <view class="order-user" v-if="userInfo.id === info.releaseMemberId && userInfo.useIdentity != 0">
+ <view class="order-user" v-if="userInfo.id === info.releaseMemberId && info.acceptMemberId">
<view class="order-user-info">
<view class="user-info-l">
<view class="user-info-l-image">
@@ -31,7 +31,7 @@
</view>
<view class="user-info-l-i-bottom-item">
<text>鍗曟暟锛�</text>
- <text>{{info.publishNum || 0}}</text>
+ <text>{{info.receiveNum ? info.receiveNum : 0}}</text>
</view>
</view>
</view>
@@ -98,8 +98,15 @@
</view>
<view class="price-row">
<view class="price-row-label">棰勪及鎬昏垂鐢�(鍏�)</view>
- <view class="price-row-val" style="color: #FF0000;">
+ <view class="price-row-val" :style="{color: userInfo.id !== info.acceptMemberId ? '#FF0000' : ''}">
楼{{((info.estimatedAccount||0)/100).toFixed(2) }}
+ </view>
+ </view>
+
+ <view class="price-row" v-if="userInfo.id === info.acceptMemberId">
+ <view class="price-row-label">瀹為檯鍒拌处(鍏�)</view>
+ <view class="price-row-val" style="color: #FF0000;">
+ 楼{{((info.estimatedAccount * (1 - (info.platformRata || 0))) / 100).toFixed(2) }}
</view>
</view>
</view>
@@ -108,7 +115,7 @@
<view class="order-info-title">
<text>璇勪环</text>
</view>
- <u-rate :count="count" activeColor="#FFC331" size="26" v-model="info.commentLevel"></u-rate>
+ <u-rate :count="count" readonly activeColor="#FFC331" size="26" v-model="info.commentLevel"></u-rate>
<view class="order-info-remark">
{{ info.commentInfo || '-'}}
</view>
@@ -176,7 +183,10 @@
<view class="order-footer-btn-a" @click="show = true" v-if="userInfo.id === info.acceptMemberId && info.status ===2">鍙栨秷璁㈠崟</view>
<view class="order-footer-btn-a" @click="show = true" v-if="userInfo.id === info.releaseMemberId && (info.status ===0 || info.status ===1|| info.status ===2)">鍙栨秷璁㈠崟</view>
<view class="order-footer-btn-b" @click="show2=true" v-if="userInfo.id === info.releaseMemberId && (info.status ===4 && info.commentStatus!=1)">鍘昏瘎浠�</view>
- <view class="order-footer-btn-b" v-if="userInfo.id === info.releaseMemberId &&((info.status ===3 && info.type !==2)|| (info.status ===0 && info.type===2))" @click="show1 = true">瀹屾垚骞舵敮浠�</view>
+ <view class="order-footer-btn-b" v-if="userInfo.id === info.releaseMemberId &&((info.status ===3 && info.type !==2)|| (info.status ===0 && info.type===2))" @click="show1 = true">{{info.type === 2 ? '缁х画鏀粯' : '瀹屾垚骞舵敮浠�'}}</view>
+
+ <view class="order-footer-btn-b" v-if="userInfo.id === info.releaseMemberId && ((info.status ===3 && info.type===2))" @click="payment1">瀹屾垚浣滀笟</view>
+
<view class="order-footer-btn-b" v-if="userInfo.id === info.releaseMemberId && (info.status ===0 || info.status ===1|| info.status ===2)" @click="jumpEdit()">淇敼璁㈠崟</view>
<view class="order-footer-btn-b" @click="show5 =true" v-if="userInfo.id === info.acceptMemberId && (info.isUpdate==1 && info.status ===2)">淇敼纭</view>
<view class="order-footer-btn-b" @click="startJobs()" v-if="userInfo.id === info.releaseMemberId && (info.status ===2)">寮�濮嬩綔涓�</view>
@@ -362,6 +372,16 @@
})
}
},
+ payment1() {
+ var that = this
+ this.$u.api.doneOrder({
+ orderId: this.info.id
+ }).then(res => {
+ if (res.code === 200) {
+ that.getOrderData()
+ }
+ })
+ },
payment() {
var that = this
// 璁㈤
@@ -466,18 +486,27 @@
},
cancelDo(){
var that = this
- var param ={ orderId:that.id}
- this.$u.api.cancelOrder(param).then(res =>{
- if(res.code ===200){
- that.show=false
- uni.showToast({ title: '璁㈠崟鍙栨秷鎴愬姛', icon: 'error', duration: 2000 });
- if(that.userInfo.id !== that.info.releaseMemberId){
- uni.navigateBack({ delta: 1 })
- }else{
- that.getOrderData()
- }
+ uni.requestSubscribeMessage({
+ tmplIds: ['AA97cHjvlPiNO4viMkVe4JifCf9TD5b5Eb7s6El3VS8'],
+ success(res) {
+ var param ={ orderId:that.id}
+ that.$u.api.cancelOrder(param).then(res =>{
+ if(res.code ===200){
+ that.show=false
+ uni.showToast({ title: '璁㈠崟鍙栨秷鎴愬姛', icon: 'error', duration: 2000 });
+ if(that.userInfo.id !== that.info.releaseMemberId){
+ uni.navigateBack({ delta: 1 })
+ }else{
+ that.getOrderData()
+ }
+ }
+ })
+ },
+ fail(err) {
+ console.log(err)
}
- })
+ })
+
},
previemImg(src){
uni.previewImage({
diff --git a/small-program/pages/packaging-worker/packaging-worker.vue b/small-program/pages/packaging-worker/packaging-worker.vue
index eb714bb..55137c7 100644
--- a/small-program/pages/packaging-worker/packaging-worker.vue
+++ b/small-program/pages/packaging-worker/packaging-worker.vue
@@ -84,10 +84,14 @@
<view :class="form.carType === item.id ? 'list-item-cate-item active' : 'list-item-cate-item'" v-for="(item, index) in settlementType" :key="index" @click="clickType(item.id)">{{item.name}}</view>
</view>
<view class="list-item-row">
- <view class="list-item-row-label">澶╂暟</view>
+ <view class="list-item-row-label" v-if="form.carType === 0">澶╂暟</view>
+ <view class="list-item-row-label" v-if="form.carType === 1">灏忔椂鏁�</view>
+ <view class="list-item-row-label" v-if="form.carType === 2">閲嶉噺</view>
<view class="list-item-row-val">
- <input v-model="form.priceNum1" disabled @blur="getPrice" type="number" placeholder="璇疯緭鍏�" />
- <text>澶�</text>
+ <input v-model="form.priceNum1" :disabled="form.carType === 0" @blur="getPrice" type="number" placeholder="璇疯緭鍏�" />
+ <text v-if="form.carType === 0">澶�</text>
+ <text v-if="form.carType === 1">灏忔椂</text>
+ <text v-if="form.carType === 2">鏂�</text>
</view>
</view>
<view class="list-item-row">
@@ -143,6 +147,7 @@
:show="show"
color="#00BC12"
mode="range"
+ :allowSameDay="true"
@close="show = false"
@confirm="confirmDate" />
@@ -198,11 +203,12 @@
},
settlementType: [
{ name: '鎸夊ぉ浠樿垂', id: 0 },
- { name: '鎸夋浠樿垂', id: 1 },
+ { name: '鎸夊皬鏃朵粯璐�', id: 1 },
{ name: '鎸夐噸閲忎粯璐�', id: 2 }
],
cateList: [],
- viewStatus: false
+ viewStatus: false,
+ workDays: 0
};
},
onLoad(option) {
@@ -296,7 +302,11 @@
confirmDate(e) {
this.form.startDate = e[0]
this.form.endDate = e[e.length - 1]
- this.form.priceNum1 = e.length;
+ let time = this.form.startDate == this.form.endDate ? 1 : 0
+ this.workDays = e.length - time;
+ if (this.form.carType === 0) {
+ this.form.priceNum1 = e.length - time;
+ }
this.show = false
this.getPrice()
},
@@ -313,10 +323,13 @@
this.form.carType = id
if (id === 0) {
this.form.priceUnit = '鍏�/浜�/澶�'
+ this.form.priceNum1 = this.workDays
} else if (id === 1) {
this.form.priceUnit = '鍏�/浜�/灏忔椂'
+ this.form.priceNum1 = ''
} else {
this.form.priceUnit = '鍏�/鏂�'
+ this.form.priceNum1 = ''
}
},
confirmCategary(e) {
diff --git a/small-program/pages/sorting/sorting.vue b/small-program/pages/sorting/sorting.vue
index f9d068f..6e86272 100644
--- a/small-program/pages/sorting/sorting.vue
+++ b/small-program/pages/sorting/sorting.vue
@@ -139,6 +139,7 @@
:show="show"
color="#00BC12"
mode="range"
+ :allowSameDay="true"
@close="show = false"
@confirm="confirmDate" />
diff --git a/small-program/pages/using-workers/using-workers.vue b/small-program/pages/using-workers/using-workers.vue
index 379a5c5..5d98873 100644
--- a/small-program/pages/using-workers/using-workers.vue
+++ b/small-program/pages/using-workers/using-workers.vue
@@ -135,6 +135,7 @@
:show="show"
color="#00BC12"
mode="range"
+ :allowSameDay="true"
@close="show = false"
@confirm="confirmDate" />
@@ -227,6 +228,7 @@
methods: {
// 鎻愪氦璁㈠崟
submit() {
+ var that = this;
if (!this.form.categoryId) {
return uni.showToast({ title: '璇烽�夋嫨閲囨憳鍝佺', icon: 'none' })
}
@@ -239,32 +241,41 @@
if (!this.form.linkPhone) {
return uni.showToast({ title: '璇疯緭鍏ヨ仈绯荤數璇�', icon: 'none' })
}
- if (!this.form.id) {
- this.$u.api.release({ ...this.form, price: Number(this.form.price) * 100 })
- .then(res => {
- if (res.code == 200) {
- uni.navigateTo({
- url: `/pages/success/success?orderId=${res.data.id}`
+ if (!that.form.id) {
+ uni.requestSubscribeMessage({
+ tmplIds: ['oVjOBLcHxIlGzOMJsdInmgI5CHGXh-UTvMzQqfFOnIg'],
+ success(res) {
+ that.$u.api.release({ ...that.form, price: Number(that.form.price) * 100 })
+ .then(res => {
+ if (res.code == 200) {
+ uni.navigateTo({
+ url: `/pages/success/success?orderId=${res.data.id}`
+ })
+ }
})
- }
- })
+ }
+ })
} else {
- this.$u.api.updateOrder({ ...this.form, price: Number(this.form.price) * 100 })
- .then(res => {
- if (res.code == 200) {
- uni.showToast({
- title: '缂栬緫鎴愬姛',
- icon: 'success',
- mask: true,
- duration: 2000
+ uni.requestSubscribeMessage({
+ tmplIds: ['3YSC7gouRlSjHXz4CrWOGFzPmGwEBtFj4snwdfMvKHk'],
+ success(res) {
+ that.$u.api.updateOrder({ ...that.form, price: Number(that.form.price) * 100 })
+ .then(res => {
+ if (res.code == 200) {
+ uni.showToast({
+ title: '缂栬緫鎴愬姛',
+ icon: 'success',
+ mask: true,
+ duration: 2000
+ })
+ setTimeout(() => {
+ uni.navigateBack({ delta: 1 });
+ // uni.$emit('refresh')
+ }, 1500)
+ }
})
- setTimeout(() => {
- uni.navigateBack({ delta: 1 });
- // uni.$emit('refresh')
- }, 1500)
-
- }
- })
+ }
+ })
}
},
// 璁$畻閲戦
diff --git a/small-program/pages/withdrawal/withdrawal.vue b/small-program/pages/withdrawal/withdrawal.vue
index 0f9b211..6e76dcd 100644
--- a/small-program/pages/withdrawal/withdrawal.vue
+++ b/small-program/pages/withdrawal/withdrawal.vue
@@ -102,7 +102,8 @@
fail: (res) => {
console.log("22222222222222",res)
uni.showToast({
- title:'瀵逛笉璧凤紝鎻愮幇澶辫触銆�'+res.err_msg
+ title:'瀵逛笉璧凤紝鎻愮幇澶辫触銆�',
+ icon: 'none'
})
},
});
@@ -122,6 +123,7 @@
); */
},
submit() {
+ var that = this;
if(!this.canTransfer){
uni.showToast({
title:'鎮ㄧ殑寰俊鐗堟湰杩囦綆锛岃鏇存柊鑷虫渶鏂扮増鏈娇鐢ㄨ鍔熻兘銆�'
@@ -142,22 +144,26 @@
this.changing1 = false
return
}
- this.changing1 = true
- var that = this
- var param ={amount:this.amount,name:this.name }
- that.$u.api.applyWithdrawal(param)
- .then(res =>{
- if(res.code ===200){
- that.wxMerchantTransfer(res.data);
- // uni.navigateTo({
- // url: '/pages/withdrawal-successful/withdrawal-successful'
- // })
- }
- }).finally(() => {
- that.changing1 = false
- that.tips=''
- that.amount =null
- })
+ uni.requestSubscribeMessage({
+ tmplIds: ['fNJy4545hcrH83bP3a1vszs7XEKWjXMsrfr2XCNsql0'],
+ success(res) {
+ this.changing1 = true
+ var param ={amount:that.amount,name:that.name }
+ that.$u.api.applyWithdrawal(param)
+ .then(res =>{
+ if(res.code ===200){
+ that.wxMerchantTransfer(res.data);
+ // uni.navigateTo({
+ // url: '/pages/withdrawal-successful/withdrawal-successful'
+ // })
+ }
+ }).finally(() => {
+ that.changing1 = false
+ that.tips=''
+ that.amount =null
+ })
+ }
+ })
},
}
diff --git a/small-program/store/index.js b/small-program/store/index.js
index af4c2ea..69f7da1 100644
--- a/small-program/store/index.js
+++ b/small-program/store/index.js
@@ -47,11 +47,10 @@
},
// 璁剧疆缁忕含搴�
setPosition(state, obj) {
- console.log(obj)
state.latitude = obj.latitude
state.longitude = obj.longitude
state.address = obj.address
- console.log("=====================",obj)
+ console.log("鍦板潃璁剧疆瀹屾垚")
},
// 娓呴櫎缂撳瓨鏁版嵁
empty(state) {
--
Gitblit v1.9.3