From 9287e9a02f9a9a85b0c4dc49f04d1426af4a0ede Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期六, 25 四月 2026 15:16:51 +0800
Subject: [PATCH] 支付宝支付ddd
---
admin/.env | 2
small-program/shop/pages/qualification/qualification.vue | 82 +++-
small-program/pages/delivery-order-detail/delivery-order-detail.vue | 14
small-program/pages/evaluate/evaluate.vue | 2
small-program/pages/itinerary/itinerary.vue | 84 ++++
small-program/utils/http.api.js | 20 +
small-program/shop/pages/store-info/store-info.vue | 260 ++++++++++++++-
admin/.env.production | 2
small-program/components/custom-tabbar/custom-tabbar.vue | 3
small-program/shop/pages/wallet/wallet.vue | 4
small-program/pages/mine/mine.vue | 4
/dev/null | 0
small-program/main.js | 5
small-program/manifest.json | 11
small-program/shop/pages/write-off/write-off.vue | 64 ++-
small-program/utils/http.interceptor.js | 19
small-program/shop/pages/store-home/store-home.vue | 259 ++++++++++++---
small-program/pages.json | 21 +
small-program/pages/index/index.vue | 31 +
admin/.env.development | 1
small-program/shop/pages/login/login.vue | 48 +-
21 files changed, 723 insertions(+), 213 deletions(-)
diff --git a/admin/.env b/admin/.env
index a7c48e5..09b1c26 100644
--- a/admin/.env
+++ b/admin/.env
@@ -10,4 +10,4 @@
VUE_APP_CONTEXT_PATH = './'
# 鎺ュ彛鍓嶇紑
-VUE_APP_API_PREFIX = '/jinkuai_admin'
+VUE_APP_API_PREFIX = '/nyx_admin'
diff --git a/admin/.env.development b/admin/.env.development
index a03598a..de2ac07 100644
--- a/admin/.env.development
+++ b/admin/.env.development
@@ -1,4 +1,3 @@
# 寮�鍙戠幆澧冮厤缃�
NODE_ENV = 'development'
VUE_APP_API_URL = 'http://192.168.1.4:10010'
-# VUE_APP_API_URL = 'https://jinkuai.832smartfarm.com/jinkuai_admin'
diff --git a/admin/.env.production b/admin/.env.production
index 47180b2..447c05c 100644
--- a/admin/.env.production
+++ b/admin/.env.production
@@ -4,4 +4,4 @@
# 鍏抽棴DEBUG
VUE_APP_DEBUG = 'off'
-VUE_APP_API_URL = 'https://jinkuai.832smartfarm.com/jinkuai_admin'
+VUE_APP_API_URL = 'https://llfc.lmpro.cn/nyx_admin'
diff --git a/small-program/components/custom-tabbar/custom-tabbar.vue b/small-program/components/custom-tabbar/custom-tabbar.vue
index 5af402a..b1147d9 100644
--- a/small-program/components/custom-tabbar/custom-tabbar.vue
+++ b/small-program/components/custom-tabbar/custom-tabbar.vue
@@ -107,6 +107,9 @@
}
} else {
if (currentPath !== item.pagePath) {
+ if(item.pagePath ==='/pages/itinerary/itinerary'){
+ uni.setStorageSync("orderStatus",-1)
+ }
uni.switchTab({
url: item.pagePath
})
diff --git a/small-program/main.js b/small-program/main.js
index 79ee827..a982dd6 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.4:10011'
-// Vue.prototype.$baseUrl = 'https://jinkuai.832smartfarm.com/jinkuai_web/'
+// Vue.prototype.$baseUrl = 'http://192.168.1.4:10011'
+
+Vue.prototype.$baseUrl = 'https://llfc.lmpro.cn/nyx_web/'
const app = new Vue({
store,
diff --git a/small-program/manifest.json b/small-program/manifest.json
index 246510e..7db6382 100644
--- a/small-program/manifest.json
+++ b/small-program/manifest.json
@@ -50,9 +50,9 @@
/* 蹇簲鐢ㄧ壒鏈夌浉鍏� */
"quickapp" : {},
/* 灏忕▼搴忕壒鏈夌浉鍏� */
- "optimization" : {
+ /* "optimization" : {
"subPackages" : true
- },
+ }, */
"mp-weixin" : {
"appid" : "wxb1b59320e803dc6c",
"setting" : {
@@ -87,5 +87,10 @@
"uniStatistics" : {
"enable" : false
},
- "vueVersion" : "2"
+ "vueVersion" : "2",
+ "h5" : {
+ "sdkConfigs" : {
+ "maps" : {}
+ }
+ }
}
diff --git a/small-program/pages.json b/small-program/pages.json
index bafd45c..8f8dccf 100644
--- a/small-program/pages.json
+++ b/small-program/pages.json
@@ -158,7 +158,13 @@
{
"path": "pages/write-off/write-off",
"style": {
- "navigationBarTitleText": "鎵嬪姩鏍搁獙"
+ "navigationBarTitleText": "璁㈠崟鏍搁獙"
+ }
+ },
+ {
+ "path": "pages/write-off-a/write-off-a",
+ "style": {
+ "navigationBarTitleText": "璁㈠崟鏍搁獙"
}
},
{
@@ -181,6 +187,19 @@
}
},
{
+ "path": "pages/orders/orders",
+ "style": {
+ "navigationBarTitleText": "闂ㄥ簵璁㈠崟"
+ }
+ },
+ {
+ "path": "pages/order-details/order-details",
+ "style": {
+ "navigationBarTitleText": "闂ㄥ簵璁㈠崟璇︽儏",
+ "navigationStyle": "custom"
+ }
+ },
+ {
"path": "pages/withdraw/withdraw",
"style": {
"navigationBarTitleText": "鎻愮幇"
diff --git a/small-program/pages/delivery-order-detail/delivery-order-detail.vue b/small-program/pages/delivery-order-detail/delivery-order-detail.vue
index d175095..a412a0a 100644
--- a/small-program/pages/delivery-order-detail/delivery-order-detail.vue
+++ b/small-program/pages/delivery-order-detail/delivery-order-detail.vue
@@ -215,8 +215,8 @@
<view class="tips" v-if="info.overdueStatus !==0">
<image src="/static/icon/ic_waring@2x.png" mode="widthFix"></image>
<text v-if="info.overdueStatus ===1">宸茶秴杩囧彇浠舵椂闂达紝宸蹭骇鐢熻秴鏃惰垂鐢細楼{{((info.overdueFee || 0)/100).toFixed(2)}}鍏�</text>
- <text v-if="info.overdueStatus ===2">宸茶秴杩囧彇浠舵椂闂达紝闇�瑕佹敮浠樿秴鏃惰垂鐢細楼{{((info.overdueFee || 0)/100).toFixed(2)}}鍏�</text>
- <text v-if="info.overdueStatus ===3">瓒呰繃鍙栦欢鏃堕棿锛屽凡鏀粯瓒呮椂璐圭敤锛毬{((info.overdueFee || 0)/100).toFixed(2)}}鍏�</text>
+ <text v-if="info.overdueStatus ===3">宸茶秴杩囧彇浠舵椂闂达紝闇�瑕佹敮浠樿秴鏃惰垂鐢細楼{{((info.overdueFee || 0)/100).toFixed(2)}}鍏�</text>
+ <text v-if="info.overdueStatus ===4">瓒呰繃鍙栦欢鏃堕棿锛屽凡鏀粯瓒呮椂璐圭敤锛毬{((info.overdueFee || 0)/100).toFixed(2)}}鍏�</text>
</view>
<view class="footer" v-if="info.type===0">
<view class="footer-btns">
@@ -226,7 +226,7 @@
<view class="btn you" @click="payOrder(info)" v-if="info.status ===0">绔嬪嵆鏀粯</view>
<!-- <view class="btn you" v-if="info.status >=1 &&info.status <7 " @click="openQrcode(info)" >鏍搁攢鐮�</view>
--> <view class="btn you" @click="evaluateOrder(info)" v-if="info.status ===7 && !info.commentStatus ">璇勪环璁㈠崟</view>
- <view class="btn you" @click="payOrderFee(info)" v-if="info.status ===5 && info.overdueStatus===2 ">绔嬪嵆鏀粯</view>
+ <view class="btn you" @click="payOrderFee(info)" v-if="info.status ===5 && info.overdueStatus===3 ">绔嬪嵆鏀粯</view>
</view>
</view>
<view class="footer" v-if="info.type===1">
@@ -241,7 +241,7 @@
<!-- <view class="btn you" v-if="info.status ===1 || (info.takeShopId && info.status ===5)" @click="openQrcode(info)" >鏍搁攢鐮�</view>
--> <view class="btn you" @click="doneOrder(info)" v-if="!info.takeShopId && info.status ===5">纭鏀惰揣</view>
<view class="btn you" @click="evaluateOrder(info)" v-if="info.status ===7 && !info.commentStatus ">璇勪环璁㈠崟</view>
- <view class="btn you" @click="payOrderFee(info)" v-if="info.status ===5 && info.overdueStatus ===2">绔嬪嵆鏀粯</view>
+ <view class="btn you" @click="payOrderFee(info)" v-if="info.status ===5 && info.overdueStatus ===3">绔嬪嵆鏀粯</view>
</view>
</view>
<u-popup :show="showPhone" round="15" mode="bottom" :safeAreaInsetBottom="true" @close="contactPhone()" :closeable="true" :closeOnClickOverlay="true">
@@ -343,6 +343,9 @@
}
},
onShow() {
+ },
+ onLoad(options) {
+ this.id = options.id
this.info={}
this.showDone=false
this.showCancel=false
@@ -352,9 +355,6 @@
this.showPhone=false
this.getUserDetail()
this.linkItem={title:'',linkname:'',linkphone:''}
- },
- onLoad(options) {
- this.id = options.id
},
methods:{
previewImage(images,index = 0) {
diff --git a/small-program/pages/evaluate/evaluate.vue b/small-program/pages/evaluate/evaluate.vue
index 75cfd80..5ec96b4 100644
--- a/small-program/pages/evaluate/evaluate.vue
+++ b/small-program/pages/evaluate/evaluate.vue
@@ -40,9 +40,7 @@
<text class="rate-text">{{ form.driverScore }}鏄�</text>
</view>
</view>
-
<view class="divider"></view>
-
<view class="rate-block" v-if="info.type ===1 && info.takeShopId ">
<view class="title-row">
<text class="title-label">鏀朵欢闂ㄥ簵锛�</text>
diff --git a/small-program/pages/index/index.vue b/small-program/pages/index/index.vue
index 97d7090..c597645 100644
--- a/small-program/pages/index/index.vue
+++ b/small-program/pages/index/index.vue
@@ -30,18 +30,18 @@
<view class="service-card deposit-card" @click="jumpxiadan">
<image class="service-image" src="/static/image/home_ic_jicun@2x.png" mode="aspectFit"></image>
</view>
- <view class="service-card retrieve-card">
+ <view class="service-card retrieve-card" @click="jumpOrderList(3)">
<image class="service-image" src="/static/image/home_ic_qujian@2x.png" mode="aspectFit"></image>
</view>
</view>
- <view class="notice-card">
+ <view class="notice-card" v-if="ingOrder && ingOrder.orderId" @click="jumpOrderDetail(ingOrder.orderId)">
<view class="notice-icon-wrap">
<image src="/static/icon/home_ic_daizhifu@2x.png" mode="aspectFit"></image>
</view>
<view class="notice-copy">
- <text class="notice-title">寰呮敮浠�</text>
- <text class="notice-text">璇峰湪 10 鍒嗛挓鍐呭畬鎴愭敮浠橈紝瓒呮椂璁㈠崟灏嗚嚜鍔ㄥ彇娑�</text>
+ <text class="notice-title">{{ingOrder.statusDesc || ''}}</text>
+ <text class="notice-text">{{ingOrder.tip || ''}}</text>
</view>
</view>
@@ -109,6 +109,7 @@
bannerList: [],
pointList: [],
page: 1,
+ ingOrder:null,
isRequest: true
}
},
@@ -119,12 +120,34 @@
await this.getNearbyShopList()
}
},
+ onShow() {
+ this.ingOrder =null
+ this.getIngorder()
+ },
onReachBottom() {
if (this.cityId && this.latitude && this.longitude) {
this.getNearbyShopList()
}
},
methods: {
+ jumpOrderDetail(id){
+ uni.navigateTo({
+ url:'/pages/delivery-order-detail/delivery-order-detail?userType=0&id='+id
+ })
+ },
+ async getIngorder(){
+ var that =this
+ let res = await that.$u.api.getActiveOrderTip()
+ if (res && res.code === 200) {
+ this.ingOrder = res.data
+ }
+ },
+ jumpOrderList(status){
+ uni.setStorageSync("orderStatus",status)
+ uni.switchTab({
+ url: '/pages/itinerary/itinerary'
+ })
+ },
jumpxiadan() {
if (!this.cityId) return uni.showToast({
title: '褰撳墠鍩庡競鏆傛湭寮�閫�',
diff --git a/small-program/pages/itinerary/itinerary.vue b/small-program/pages/itinerary/itinerary.vue
index 53bc3a8..2059d15 100644
--- a/small-program/pages/itinerary/itinerary.vue
+++ b/small-program/pages/itinerary/itinerary.vue
@@ -33,9 +33,15 @@
<text class="head-name text-ellipsis">{{ item.depositShopName||'' }}</text>
<text class="head-user">{{ item.takeUser ||'' }}</text>
</view>
- <text v-if="item.status < 7" class=" status-text status-orange">{{ item.statusName||'' }}</text>
- <text v-else-if="item.status ===7" class=" status-text status-grey">{{ item.statusName||'' }}</text>
- <text v-else-if="item.status >7" class=" status-text status-grey">{{ item.statusName||'' }}</text>
+ <view style="display: flex;flex-direction: column;">
+ <text v-if="item.status ===5 && item.overdueStatus ===1 " class="status-text" style="color: red;">瓒呮椂鏈彇浠�</text>
+ <text v-else-if="item.status ===5 && item.overdueStatus ===3 " class="status-text" style="color: red;">瓒呮椂鍒板簵鍙栦欢</text>
+ <text v-else-if="item.status < 7" class=" status-text status-orange">{{ item.statusName||'' }}</text>
+ <text v-else-if="item.status ===7" class=" status-text status-grey">{{ item.statusName||'' }}</text>
+ <text v-else class=" status-text status-grey">{{ item.statusName||'' }}</text>
+ <text v-if="item.status ===5 && item.overdueStatus ===1 " class="status-text" style="color: red;font-size: 24rpx;">閫炬湡璐圭敤楼{{((item.overdueFee || 0)/100).toFixed(2)}}</text>
+ <text v-if="item.status ===5 && item.overdueStatus ===3 " class="status-text" style="color: red;font-size: 24rpx;">閫炬湡璐圭敤楼{{((item.overdueFee || 0)/100).toFixed(2)}}</text>
+ </view>
</view>
<view v-else class="head-city">
<view class="head-copy city-left">
@@ -48,9 +54,15 @@
<view class="arrow-head"></view>
</view>
<view class="head-copy city-right align-right">
- <text v-if="item.status < 7" class=" status-text status-orange">{{ item.statusName||'' }}</text>
- <text v-else-if="item.status ===7" class="status-text status-grey" >{{ item.statusName||'' }}</text>
- <text v-else-if="item.status >7" class=" status-text status-grey">{{ item.statusName||'' }}</text>
+ <view style="display: flex;flex-direction: column;">
+ <text v-if="item.status ===5 && item.overdueStatus ===1 " class="status-text" style="color: red;">瓒呮椂鏈彇浠�</text>
+ <text v-else-if="item.status ===5 && item.overdueStatus ===3 " class="status-text" style="color: red;">瓒呮椂鍒板簵鍙栦欢</text>
+ <text v-else-if="item.status < 7" class=" status-text status-orange">{{ item.statusName||'' }}</text>
+ <text v-else-if="item.status ===7" class=" status-text status-grey">{{ item.statusName||'' }}</text>
+ <text v-else class=" status-text status-grey">{{ item.statusName||'' }}</text>
+ <text v-if="item.status ===5 && item.overdueStatus ===1 " class="status-text" style="color: red;font-size: 24rpx;">閫炬湡璐圭敤楼{{((item.overdueFee || 0)/100).toFixed(2)}}</text>
+ <text v-if="item.status ===5 && item.overdueStatus ===3 " class="status-text" style="color: red;font-size: 24rpx;">閫炬湡璐圭敤楼{{((item.overdueFee || 0)/100).toFixed(2)}}</text>
+ </view>
<text class="head-name text-ellipsis">{{ item.takeShopName || item.takeLocation||'' }}</text>
<text class="head-user">{{ item.takeUser||'' }}</text>
</view>
@@ -92,6 +104,7 @@
<view class="footer-btn contact-btn" v-if="item.status ===0 || item.status ===1" @click="cancelOrder(item)">鍙栨秷璁㈠崟</view>
<view class="footer-btn contact-btn" @click="deleteOrder(item)" v-if="item.status ===7 || item.status===96 || item.status == 99">鍒犻櫎璁㈠崟</view>
<view class="footer-btn primary-btn" @click="payOrder(item)" v-if="item.status ===0">绔嬪嵆鏀粯</view>
+ <view class="footer-btn primary-btn" @click="payOrderFee(item)" v-if="item.status ===5 && item.overdueStatus===3 ">绔嬪嵆鏀粯</view>
<view class="footer-btn primary-btn" v-if="item.status >=1 &&item.status <7 " @click="openQrcode(item)" >鏍搁攢鐮�</view>
<view class="footer-btn primary-btn" @click="evaluateOrder(item)" v-if="item.status ===7 && !item.commentStatus ">璇勪环璁㈠崟</view>
</view>
@@ -99,8 +112,9 @@
<view class="footer-btn contact-btn" @click="contactPhone(item,0)" v-if="item.status ===1 || item.status ==2">鑱旂郴闂ㄥ簵</view>
<view class="footer-btn contact-btn" @click="contactPhone(item,2)" v-if="item.status ===3 || item.status ===4 ">鑱旂郴楠戞墜</view>
<view class="footer-btn contact-btn" @click="contactPhone(item,1)" v-if="item.status ===5">鑱旂郴闂ㄥ簵</view>
- <view class="footer-btn contact-btn" v-if="item.status ===0" @click="cancelOrder(item)">鍙栨秷璁㈠崟</view>
- <view class="footer-btn primary-btn" @click="payOrder(item)" v-if="item.status ===0">绔嬪嵆鏀粯</view>
+ <view class="footer-btn contact-btn" v-if="item.status ===0" @click="cancelOrder(item)">鍙栨秷璁㈠崟</view>
+ <view class="footer-btn primary-btn" @click="payOrder(item)" v-if="item.status ===0">绔嬪嵆鏀粯</view>
+ <view class="footer-btn primary-btn" @click="payOrderFee(item)" v-if="item.status ===5 && item.overdueStatus===3 ">绔嬪嵆鏀粯</view>
<view class="footer-btn contact-btn" @click="deleteOrder(item)" v-if="item.status ===7 || item.status===96 || item.status == 99">鍒犻櫎璁㈠崟</view>
<view class="footer-btn primary-btn" @click="cancelOrder(item)" v-if="item.status ===1">鐢宠閫�娆�</view>
<view class="footer-btn primary-btn" v-if="item.status ===1 || (item.takeShopId && item.status ===5)" @click="openQrcode(item)" >鏍搁攢鐮�</view>
@@ -235,7 +249,7 @@
{ label: '寰呴厤閫�', value: 2 },
{ label: '寰呮敹璐�', value: 3},
{ label: '宸插畬鎴�', value: 4},
- { label: '宸查��娆�', value: 5}
+ { label: '宸插彇娑�', value: 5}
],
dataList: []
}
@@ -248,9 +262,9 @@
onLoad(options) {
console.log(options )
this.activeTab = -1
- if (options.status != null && options.status != undefined) {
+ /* if (options.status != null && options.status != undefined) {
this.activeTab = Number(options.status)
- }
+ } */
var that =this
uni.$on('updateOrder',function(data){
console.log('鐩戝惉鍒颁簨浠舵潵鑷� update 锛屾惡甯﹀弬鏁� msg 涓猴細' ,data);
@@ -271,6 +285,8 @@
})
},
onShow() {
+
+ this.activeTab = -1
this.showDone=false
this.showCancel=false
this.showDelete=false
@@ -283,16 +299,56 @@
this.linkItem={title:'',linkname:'',linkphone:''}
var orderStatus = uni.getStorageSync("orderStatus");
console.log(orderStatus,"==================")
- if (orderStatus != null &&orderStatus != undefined) {
- this.activeTab = Number(orderStatus)
+ if (orderStatus != null &&orderStatus != undefined ) {
+ if( Number(orderStatus) === -2){
+ this.activeTab = 0
+ } else{
+ this.activeTab = Number(orderStatus)
+ }
}
+ if(this.ac)
uni.clearStorageSync("orderStatus")
- // this.getFirstPageData()
+ this.getFirstPageData()
},
onReachBottom(){
this.getDataList();
},
methods: {
+ payOrderFee(info){
+ var that = this;
+ uni.showLoading({ title: '鍙戣捣鏀粯涓�...', mask: true })
+ this.$u.api.payOverdueFee({
+ orderId: info.id
+ }).then(res => {
+ uni.hideLoading()
+ if (res.code === 200 && res.data) {
+ let paymentData = res.data.response
+ uni.requestPayment({
+ provider: 'wxpay',
+ timeStamp: paymentData.timeStamp || '',
+ nonceStr: paymentData.nonceStr || '',
+ package: paymentData.package || '',
+ signType: paymentData.signType || 'MD5',
+ paySign: paymentData.paySign || '',
+ success: (res) => {
+ that.getFirstPageData()
+ },
+ fail: (err) => {
+ if (err.errMsg.includes('cancel')) {
+ uni.showToast({ title: '宸插彇娑堟敮浠�', icon: 'none' })
+ } else {
+ uni.showToast({ title: '鏀粯澶辫触', icon: 'none' })
+ }
+ }
+ })
+ } else {
+ uni.showToast({ title: res.msg || '鏀粯澶辫触', icon: 'none' })
+ }
+ }).catch(err => {
+ uni.hideLoading()
+ uni.showToast({ title: '鏀粯澶辫触', icon: 'none' })
+ })
+ },
payOrder(item){
var that = this;
uni.showLoading({ title: '鍙戣捣鏀粯涓�...', mask: true })
diff --git a/small-program/pages/mine/mine.vue b/small-program/pages/mine/mine.vue
index d9b2959..c27aff3 100644
--- a/small-program/pages/mine/mine.vue
+++ b/small-program/pages/mine/mine.vue
@@ -145,9 +145,9 @@
}
},
toOrderDetail(label) {
- uni.setStorageSync("orderStatus",label)
+ uni.setStorageSync("orderStatus",label===0?-2:label)
uni.switchTab({
- url: '/pages/itinerary/itinerary?status=' + label
+ url: '/pages/itinerary/itinerary'
})
},
toSetting() {
diff --git a/small-program/shop/images/ic_alipay@2x.png b/small-program/shop/images/ic_alipay@2x.png
deleted file mode 100644
index 3df4974..0000000
--- a/small-program/shop/images/ic_alipay@2x.png
+++ /dev/null
Binary files differ
diff --git a/small-program/shop/images/ic_saoma@2x.png b/small-program/shop/images/ic_saoma@2x.png
deleted file mode 100644
index 30bc367..0000000
--- a/small-program/shop/images/ic_saoma@2x.png
+++ /dev/null
Binary files differ
diff --git a/small-program/shop/pages/login/login.vue b/small-program/shop/pages/login/login.vue
index a139eb9..79b3d35 100644
--- a/small-program/shop/pages/login/login.vue
+++ b/small-program/shop/pages/login/login.vue
@@ -39,7 +39,7 @@
export default {
computed: {
- ...mapState(['openid', 'userInfo'])
+ ...mapState(['openid', 'userInfo','userType'])
},
data() {
return {
@@ -52,24 +52,38 @@
},
onLoad() {
// 闈欓粯鐧诲綍
+
if (this.userInfo.bindShopId) {
- this.$u.api.shopSilentLogin({})
- .then(async res => {
- if (res.code === 200) {
- this.$store.commit('setUserType', 1)
- this.$store.commit('setShopToken', res.data.token)
- // 鑾峰彇闂ㄥ簵淇℃伅
- const shopInfoRes = await this.$u.api.getShopInfo({})
- if (shopInfoRes.code === 200) {
- this.$store.commit('setShopInfo', shopInfoRes.data)
+ uni.showLoading({
+ title:'鐧诲綍涓�...'
+ })
+ try{
+ console.log(this.userType,"============================================")
+ this.$u.api.shopSilentLogin({})
+ .then( res => {
+ if (res.code === 200) {
+ this.$store.commit('setUserType', 1)
+ this.$store.commit('setShopToken', res.data.token)
+ // 鑾峰彇闂ㄥ簵淇℃伅
+ this.$u.api.getShopInfo({}).then( shopInfoRes => {
+ if (shopInfoRes.code === 200) {
+ this.$store.commit('setShopInfo', shopInfoRes.data)
+ }
+ uni.hideLoading();
+ // setTimeout(() => {
+ uni.reLaunch({
+ url: '/shop/pages/store-home/store-home'
+ });
+ // }, 1000)
+ })
}
- setTimeout(() => {
- uni.reLaunch({
- url: '/shop/pages/store-home/store-home'
- });
- }, 1000)
- }
- })
+ })
+ }catch(e){
+ uni.hideLoading()
+ }
+ setTimeout(() => {
+ uni.hideLoading()
+ }, 10000)
}
},
methods: {
diff --git a/small-program/shop/pages/qualification/qualification.vue b/small-program/shop/pages/qualification/qualification.vue
index e5bc62b..a1c4b94 100644
--- a/small-program/shop/pages/qualification/qualification.vue
+++ b/small-program/shop/pages/qualification/qualification.vue
@@ -1,40 +1,36 @@
<template>
<view class="qualification-page">
- <!-- <view class="type-tabs">
- <view class="tab-item" :class="{ active: currentType === 'personal' }" @tap="currentType = 'personal'">涓汉璧勮川</view>
- <view class="tab-item" :class="{ active: currentType === 'company' }" @tap="currentType = 'company'">浼佷笟璧勮川</view>
- </view> -->
<view class="card base-card">
<view class="store-row">
- <image class="store-cover" src="" mode="aspectFill"></image>
+ <image class="store-cover" @click="previewImage([info.shopAvatar],0)" :src="(info.shopAvatar)?info.shopAvatar:'/static/icon/default2.png'" mode="aspectFill"></image>
<view class="store-info">
- <text class="store-name">涓搧蹇繍鍗楃珯鏃楄埌搴�</text>
- <text class="store-line">鑱旂郴浜猴細鑻忕湢鐪�</text>
- <text class="store-line">鑱旂郴鐢佃瘽锛�18155114565</text>
+ <text class="store-name">{{info.name||''}}</text>
+ <text class="store-line">鑱旂郴浜猴細{{info.linkName || ''}}</text>
+ <text class="store-line">鑱旂郴鐢佃瘽锛歿{info.linkPhone || ''}}</text>
</view>
</view>
<view class="detail-block">
<view class="info-row">
<text class="info-label">鐪佸競鍖猴細</text>
- <text class="info-value">瀹夊窘鐪佸悎鑲ュ競缁忔祹鎶�鏈紑鍙戝尯</text>
+ <text class="info-value">{{info.provinceName || ''}}{{info.cityName || ''}}{{info.areaName || ''}}</text>
</view>
<view class="info-row">
<text class="info-label">闂ㄥ簵鍦板潃锛�</text>
- <text class="info-value">鑾茶姳璺�200鍙疯幉鑺变骇涓氬洯F鏍�401</text>
+ <text class="info-value">{{info.address || ''}}</text>
</view>
- <template v-if="currentType === 'personal'">
+ <template v-if="info.companyType === 0" >
<view class="info-row">
<text class="info-label">韬唤璇佸彿锛�</text>
- <text class="info-value">3401823742786473267</text>
+ <text class="info-value">{{info.idcard || ''}}</text>
</view>
<view class="material-row top-align">
<text class="info-label">韬唤璇侊細</text>
<view class="material-list double-list">
- <image class="material-image id-card" src="" mode="aspectFill"></image>
- <image class="material-image id-card" src="" mode="aspectFill"></image>
+ <image class="material-image id-card" @click="previewImage([info.idcardImgUrl],0)" :src="info.idcardImgUrl?info.idcardImgUrl:'/static/icon/default2.png'" mode="aspectFill"></image>
+ <image class="material-image id-card" @click="previewImage([info.idcardImgBackUrl],0)" :src="info.idcardImgBackUrl?info.idcardImgBackUrl:'/static/icon/default2.png'" mode="aspectFill"></image>
</view>
</view>
</template>
@@ -43,7 +39,7 @@
<view class="material-row top-align license-row">
<text class="info-label">钀ヤ笟鎵х収锛�</text>
<view class="material-list single-list">
- <image class="material-image license-image" src="" mode="aspectFill"></image>
+ <image class="material-image license-image" @click="previewImage([info.businessImgUrl],0)" :src="info.businessImgUrl?info.businessImgUrl:'/static/icon/default2.png'" mode="aspectFill"></image>
</view>
</view>
</template>
@@ -52,21 +48,19 @@
<view style="width: 100%; height: 20rpx; background-color: #F7F7F7;"></view>
- <view v-if="currentType === 'personal'" class="card subject-card">
+ <view v-if="info.companyType === 0" class="card subject-card">
<text class="section-title">涓讳綋璧勮川</text>
<view class="material-group">
<view class="material-row top-align">
- <text class="info-label">鏈夋晥鍔冲姩鍚堝悓锛�</text>
- <view class="material-list triple-list">
- <image class="material-image contract-image" src="" mode="aspectFill"></image>
- <image class="material-image contract-image" src="" mode="aspectFill"></image>
- <image class="material-image contract-image" src="" mode="aspectFill"></image>
+ <text class="info-label">鏈夋晥鍔冲姩鍚堝悓锛�</text>
+ <view v-if=" info.laborContractImgUrls" class="material-list triple-list" >
+ <image @click="previewImage(info.laborContractImgUrls,index)" v-for="(item,index) in info.laborContractImgUrls" :key="item" class="material-image contract-image" :src="item" mode="aspectFill"></image>
</view>
</view>
<view class="material-row top-align proof-row">
<text class="info-label">绀句繚缂寸撼璇佹槑锛�</text>
- <view class="material-list single-list">
- <image class="material-image proof-image" src="" mode="aspectFill"></image>
+ <view v-if=" info.socialSecurityImgUrls" class="material-list triple-list" >
+ <image @click="previewImage(info.socialSecurityImgUrls,index)" v-for="(item,index) in info.socialSecurityImgUrls" :key="item" class="material-image contract-image" :src="item" mode="aspectFill"></image>
</view>
</view>
</view>
@@ -77,21 +71,21 @@
<view class="detail-block legal-block">
<view class="info-row">
<text class="info-label">娉曚汉濮撳悕锛�</text>
- <text class="info-value">寮犲厜瀹�</text>
+ <text class="info-value">{{info.legalPersonName||''}}</text>
</view>
<view class="info-row">
<text class="info-label">娉曚汉鐢佃瘽锛�</text>
- <text class="info-value">181554462589</text>
+ <text class="info-value">{{info.legalPersonPhone ||''}}</text>
</view>
<view class="info-row">
<text class="info-label">韬唤璇佸彿锛�</text>
- <text class="info-value">3401823742786473267</text>
+ <text class="info-value">{{info.legalPersonCard || ''}}</text>
</view>
<view class="material-row top-align">
<text class="info-label">韬唤璇侊細</text>
<view class="material-list double-list">
- <image class="material-image id-card" src="" mode="aspectFill"></image>
- <image class="material-image id-card" src="" mode="aspectFill"></image>
+ <image class="material-image id-card" :src="info.idcardImgUrl?info.idcardImgUrl:'/static/icon/default2.png'" mode="aspectFill"></image>
+ <image class="material-image id-card" :src="info.idcardImgBackUrl?info.idcardImgBackUrl:'/static/icon/default2.png'" mode="aspectFill"></image>
</view>
</view>
</view>
@@ -100,10 +94,40 @@
</template>
<script>
+ import { mapState } from 'vuex'
export default {
+ computed: {
+ ...mapState(['navHeight', 'statusbarHeight','shopInfo','shopToken'])
+ },
data() {
return {
- currentType: 'personal'
+ id:null,
+ qrcodeImage:null,
+ showCancel:false,
+ info:{}
+ }
+ },
+ onShow() {
+ this.info ={}
+ this.getMyShop()
+ },
+ onLoad(options) {
+ },
+ methods:{
+ previewImage(images,index = 0) {
+ uni.previewImage({
+ current: index,
+ urls: images
+ });
+ },
+ async getMyShop(index){
+ var that =this
+ let res = await that.$u.api.getShopInfoDetail()
+ if (res.code === 200) {
+ this.info = res.data
+ console.log(this.info.laborContractImgUrls,this.info.laborContractImgUrls.length,"====================")
+ console.log(this.info,"====================")
+ }
}
}
}
diff --git a/small-program/shop/pages/store-home/store-home.vue b/small-program/shop/pages/store-home/store-home.vue
index 2769fe2..0118cee 100644
--- a/small-program/shop/pages/store-home/store-home.vue
+++ b/small-program/shop/pages/store-home/store-home.vue
@@ -15,11 +15,11 @@
<view class="stats-section" :style="{ backgroundImage: 'url(' + bgImg + ')' }">
<view class="stats-tabs">
<view class="stats-tabs-left">
- <text class="tab-item active">浠婃棩</text>
- <text class="tab-item">鏈湀</text>
- <text class="tab-item">涓婃湀</text>
+ <view :class="'tab-item '+(active ==0?'active':'')" @click="changeActive(0)">浠婃棩</view>
+ <view :class="'tab-item '+(active ==1?'active':'')" @click="changeActive(1)">鏈湀</view>
+ <view :class="'tab-item '+(active ==2?'active':'')" @click="changeActive(2)">涓婃湀</view>
</view>
- <text class="tab-item right">鍦ㄥ簱璁㈠崟: 10</text>
+ <text class="tab-item right">鍦ㄥ簱璁㈠崟: {{countData.storageCount||0}}</text>
</view>
<view class="stats-cards">
@@ -28,19 +28,19 @@
<text>閿�鍞(鍏�)</text>
<image class="stat-icon" src="/static/icon/ic_visible@2x.png"></image>
</view>
- <text class="stat-value">12,000.00</text>
+ <text class="stat-value">{{countData.salesAmount}}</text>
</view>
<view class="stat-card">
<view class="stat-label">
<text>缁撶畻鍒╂鼎(鍏�)</text>
</view>
- <text class="stat-value">1,200.00</text>
+ <text class="stat-value">{{countData.settlementProfit}}</text>
</view>
<view class="stat-card">
<view class="stat-label">
<text>璁㈠崟鏁�</text>
</view>
- <text class="stat-value">23</text>
+ <text class="stat-value">{{countData.orderCount||0}}</text>
</view>
</view>
</view>
@@ -48,16 +48,16 @@
<!-- 鍔熻兘鎸夐挳 -->
<view class="function-buttons">
- <view class="func-btn">
+ <view class="func-btn" @click="jumpHexiaoOrder">
<image class="func-icon" src="/static/icon/ic_zitihexiao@2x.png"></image>
<text class="func-text">闂ㄥ簵鍑哄叆搴�</text>
</view>
- <view class="func-btn">
+ <view class="func-btn" @click="jumpOrders()">
<image class="func-icon" src="/static/icon/ic_dingdanguanli@2x.png"></image>
<text class="func-text">璁㈠崟绠$悊</text>
</view>
<view class="func-btn" @click="goToStoreInfo">
- <image class="func-icon" src="/static/icon/ic_wodezizhi@2x.png"></image>
+ <image class="func-icon" src="/static/icon/ic_zhuanshuhaibao@2x.png"></image>
<text class="func-text">闂ㄥ簵淇℃伅</text>
</view>
<view class="func-btn" @click="goToQualification">
@@ -65,55 +65,54 @@
<text class="func-text">闂ㄥ簵璧勮川</text>
</view>
</view>
-
- <text class="section-title">寰呭鐞嗚鍗�(2)</text>
-
+ <text class="section-title">寰呭鐞嗚鍗�({{total||0}})</text>
<!-- 寰呭鐞嗚鍗� -->
<view class="orders-section">
- <view class="order-item">
- <view class="order-header">
+ <view class="order-item" v-for="(item,index) in dataList" :key="item.id">
+ <view class="order-header" @click="jumpOrderDetails(item.id)">
<view style="display: flex; align-items: center;">
- <view class="order-tag">灏卞湴瀵勫瓨</view>
- <text class="order-user">鏉庢槑 181****1898</text>
+ <view class="order-tag">{{item.type===1?'鍚屽煄閰嶉��':'灏卞湴瀵勫瓨'}}</view>
+ <text class="order-user">{{item.takeUser || ''}} {{item.takePhone||''}}</text>
</view>
- <text class="order-status">寰呮牳楠�</text>
+ <view style="display: flex;flex-direction: column;">
+ <text v-if="item.status ===5 && item.overdueStatus ===1 " class="order-status" style="color: red;">瓒呮椂鏈彇浠�</text>
+ <text v-else-if="item.status ===5 && item.overdueStatus ===3 " class="order-status" style="color: red;">瓒呮椂鍒板簵鍙栦欢</text>
+ <text v-else class="order-status">{{item.statusName || ''}}</text>
+ <text v-if="item.status ===5 && item.overdueStatus ===1 " class="order-status" style="color: red;font-size: 24rpx;">閫炬湡璐圭敤楼{{((item.overdueFee || 0)/100).toFixed(2)}}</text>
+ <text v-if="item.status ===5 && item.overdueStatus ===3 " class="order-status" style="color: red;font-size: 24rpx;">閫炬湡璐圭敤楼{{((item.overdueFee || 0)/100).toFixed(2)}}</text>
+ </view>
</view>
- <view class="order-items">
- <view class="order-product">
- <view class="product-info">
- <text class="product-name">澶т欢琛屾潕绠�</text>
- <text class="product-spec">24-28瀵�</text>
- </view>
- <view class="product-price-count">
- <text class="product-price">楼35</text>
- <text class="product-count">x1</text>
- </view>
- </view>
- <view class="order-product">
- <view class="product-info">
- <text class="product-name">涓欢琛屾潕绠�</text>
- <text class="product-spec">24-28瀵�</text>
- </view>
- <view class="product-price-count">
- <text class="product-price">楼35</text>
- <text class="product-count">x1</text>
- </view>
- </view>
+ <view class="order-items" @click="jumpOrderDetails(item.id)">
+ <view class="order-product" v-for="(item1,index1) in item.detailList" :key="item1.id">
+ <view class="product-info">
+ <text class="product-name">{{item1.luggageName || ''}}</text>
+ <text class="product-spec">{{item1.luggageDetail || ''}}</text>
+ </view>
+ <view class="product-price-count">
+ <text class="product-price">楼{{((item1.subtotal || 0)/100).toFixed(2) }}</text>
+ <text class="product-count">x{{ item1.num || 1}}</text>
+ </view>
+ </view>
</view>
<view class="order-footer">
<text class="total-price">
<text>瀹炰粯娆�: </text>
- <text>楼80.00</text>
+ <text>楼{{((item.estimatedAmount || 0)/100).toFixed(2) }}</text>
</text>
<view class="order-buttons">
- <button class="btn secondary">鑱旂郴瀹㈡埛</button>
- <button class="btn primary">鎵爜鏍搁攢</button>
- </view>
+ <button class="btn secondary" @click="contactPhoneDo(item.takePhone)">鑱旂郴瀹㈡埛</button>
+ <button class="btn secondary" @click="contactPhoneDo(item.driverPhone)" v-if="item.type ===1&&(item.status === 4 || item.status === 3)">鑱旂郴楠戞墜</button>
+ <button class="btn primary" v-if="item.status ===1 " @click="jumpHexiaoOrder(item)">鏀朵欢鏍搁攢</button>
+ <button class="btn primary" v-if="item.status ===5 &&(item.overdueStatus ==0 || item.overdueStatus == 1)" @click="jumpHexiaoOrder(item)">纭鍒板簵</button>
+ <button class="btn primary" v-if="item.status ===5 && (item.overdueStatus == 4 || item.overdueStatus == 2) " @click="jumpHexiaoOrder(item)">鍙栦欢鏍搁攢</button>
+ </view>
</view>
-
- <view class="order-note">璁㈠崟澶囨敞: 13:30鏉ュ瘎瀛�</view>
+ <view class="order-note" v-if="item.remark">璁㈠崟澶囨敞: <text>{{item.remark || '-'}}</text></view>
</view>
+ <view v-if="isLoadingMore" class="loading-text">鍔犺浇涓�...</view>
+ <view v-else-if="!hasNext && dataList.length" class="loading-text">娌℃湁鏇村浜�</view>
+ <view v-else-if="!hasNext && !dataList.length" class="loading-text">鏆傛棤鏁版嵁</view>
</view>
<custom-tabbar></custom-tabbar>
</view>
@@ -131,27 +130,158 @@
},
onReachBottom() {
console.log('store-home onReachBottom')
+ this.getDataList();
},
+ onShow() {
+ this.shop ={}
+ this.checkShopLogin()
+ this.active=0
+ this.shop = this.shopInfo || {}
+ this.getCountData(0)
+ this.total=0
+ this.hasNext=true
+ this.currentPage = 0
+ this.getFirstPageData()
+ },
methods: {
- goToStoreInfo() {
- uni.navigateTo({
- url: '/shop/pages/store-info/store-info'
- })
- },
- goToQualification() {
- uni.navigateTo({
- url: '/shop/pages/qualification/qualification'
- })
- },
- goToStore() {
- uni.switchTab({
- url: '/pages/index/index'
- })
- }
+ changeActive(index){
+ this.getCountData(index)
+ },
+ checkShopLogin(){
+ /* var that =this
+ if( this.shopInfo ==null || this.shopInfo.id==null || this.shopToken==null || this.shopToken==''){
+ this.jumpShopLogin()
+ } */
+ },
+ hexiaoOrder(item){
+ uni.navigateTo({
+ url:'/shop/pages/write-off-a/write-off-a?id='+item.id
+ })
+ },
+ jumpHexiaoOrder(){
+ uni.navigateTo({
+ url:'/shop/pages/write-off/write-off'
+ })
+ },
+ jumpOrders(){
+ uni.navigateTo({
+ url:'/shop/pages/orders/orders'
+ })
+ },
+ jumpOrderDetails(id){
+ uni.navigateTo({
+ url:'/shop/pages/order-details/order-details?id='+id
+ })
+ },
+ async getCountData(index){
+ var that =this
+ let res = await that.$u.api.shopSalesStats({ period: index, endDate: null, startDate: null, tokenType:1 })
+ if (res.code === 200) {
+ this.active = index
+ this.countData = res.data
+ this.countData.salesAmount = (this.countData.salesAmount||0.00 ).toFixed(2)
+ console.log(this.countData.salesAmount,'====================',1)
+ this.countData.settlementProfit = (this.countData.settlementProfit||0.00).toFixed(2)
+ this.countData.salesAmountNum = Math.floor(this.countData.salesAmount)
+
+ console.log(this.countData.salesAmountNum,'====================',2)
+ this.countData.settlementProfitNum = Math.floor( this.countData.settlementProfit)
+ var t1 =(this.countData.salesAmount - this.countData.salesAmountNum).toFixed(2)
+ console.log(t1,'====================',3)
+ var t2 =(this.countData.settlementProfit - this.countData.settlementProfitNum).toFixed(2)
+ this.countData.salesAmountFloat =( t1+'').slice(1, 4)
+
+ console.log(this.countData.salesAmountFloat,'====================',4)
+ this.countData.settlementProfitFloat = ( t2+'').slice(1, 4)
+ }
+ },
+ getFirstPageData(){
+ this.currentPage = 0
+ this.hasNext=true
+ this.total=0
+ this.dataList=[]
+ this.getDataList()
+ },
+ async getDataList(){
+ if(this.loading || !this.hasNext){
+ return
+ }
+ this.loading=true
+ this.currentPage = this.currentPage+1
+ if(this.currentPage == 1){
+ this.hasNext =true
+ this.dataList=[]
+ }
+ var that =this
+ let res = await that.$u.api.shopOrderPage({
+ capacity:this.pageSize,
+ model: {
+ combinedStatus: 7
+ },
+ page:this.currentPage
+ });
+ if (res.code === 200 ) {
+ if ( res.data && res.data.page ===this.currentPage) {
+ res.data.records = res.data.records||[]
+ that.dataList.push(...res.data.records)
+ that.total=res.data.total
+ if( this.currentPage >= res.data.pageCount||0){
+ that.hasNext=false
+ }else{
+ that.hasNext=true
+ }
+ }
+ }
+ this.loading=false
+ },
+ contactPhoneDo(phone){
+ if( phone!=null && phonee!=''){
+ uni.makePhoneCall({
+ phoneNumber: phone
+ })
+ }
+ },
+ goToStoreInfo() {
+ uni.navigateTo({
+ url: '/shop/pages/store-info/store-info'
+ })
+ },
+ goToQualification() {
+ uni.navigateTo({
+ url: '/shop/pages/qualification/qualification'
+ })
+ },
+ goToStore() {
+ uni.switchTab({
+ url: '/pages/index/index'
+ })
+ },
+ jumpShopLogin() {
+ uni.redirectTo({
+ url: '/shop/pages/login/login'
+ })
+ }
},
data() {
return {
bgImg: require('@/static/image/bg_card@2x.png'),
+ show:false,
+ showHaibao:false,
+ showQrcode:false,
+ active:0,
+ loading:false,
+ showMoney:false,
+ showPhone:false,
+ currentPage:1,
+ total:0,
+ hasNext:true,
+ pageSize: 10,
+ isLoadingMore: false,
+
+ dataList:[],
+ shop:{},
+ linkItem:{},
+ countData:{},
orders: [
{
id: 1,
@@ -192,7 +322,12 @@
background-color: $bg-color;
min-height: 100vh;
}
-
+.loading-text {
+ padding: 18rpx 0 8rpx;
+ text-align: center;
+ font-size: 22rpx;
+ color: #a5aab3;
+ }
/* 娓愬彉鑳屾櫙瀹瑰櫒 */
.gradient-background {
padding: 0 30rpx;
@@ -517,7 +652,7 @@
.order-note {
width: 100%;
font-size: 26rpx;
- color: #666666;
+ color: red;
background-color: #F8F9FB;
padding: 20rpx;
box-sizing: border-box;
diff --git a/small-program/shop/pages/store-info/store-info.vue b/small-program/shop/pages/store-info/store-info.vue
index 0a3ad4c..b593862 100644
--- a/small-program/shop/pages/store-info/store-info.vue
+++ b/small-program/shop/pages/store-info/store-info.vue
@@ -3,56 +3,58 @@
<view class="top-gradient"></view>
<view class="form-card">
<text class="page-title">闂ㄥ簵淇℃伅</text>
-
<view class="form-group">
<text class="label">闂ㄥ簵鍚嶇О</text>
- <input v-model="form.name" class="text-input align-left" type="text" placeholder="璇疯緭鍏ラ棬搴楀悕绉�" placeholder-style="color: #B2B2B2;" />
+ <text class="text-input align-left" style="font-weight: 600;margin-left: 30rpx;">{{info.name}}</text>
</view>
-
+ <view class="form-group">
+ <text class="label">闂ㄥ簵澶村儚</text>
+ <view class="upload-row" style="margin-top: 20rpx;">
+ <view class="upload-box" @click="chooseAndUploadImage(1)">
+ <view class="upload-plus">+</view>
+ <text class="upload-text">涓婁紶鐓х墖</text>
+ </view>
+ <view :key="index" class="photo-box" v-if="form.coverImgUrl">
+ <image class="photo-image" :src="form.coverImgUrl" mode="aspectFill"></image>
+ </view>
+ </view>
+ </view>
<view class="divider"></view>
-
<view class="form-group textarea-group">
<text class="label">闂ㄥ簵浠嬬粛</text>
- <input v-model="form.intro" class="text-input align-left" type="text" placeholder="璇疯緭鍏ラ棬搴椾粙缁�" placeholder-style="color: #B2B2B2;" />
+ <input v-model="form.content" class="text-input align-left" type="text" placeholder="璇疯緭鍏ラ棬搴椾粙缁�" placeholder-style="color: #B2B2B2;" />
</view>
-
<view class="divider"></view>
-
<view class="form-group switch-group">
<view class="label-row">
<text class="label">鏄惁鍏ㄥぉ钀ヤ笟</text>
<text class="required">*</text>
</view>
<view class="switch-row">
- <view class="switch-pill" :class="{ active: !form.fullTime }" @tap="form.fullTime = false">鏄�</view>
- <view class="switch-pill" :class="{ active: form.fullTime }" @tap="form.fullTime = true">鍚�</view>
+ <view class="switch-pill" :class="{ active: form.businessType ===1 }" @tap="form.businessType = 1">鏄�</view>
+ <view class="switch-pill" :class="{ active: form.businessType===0 }" @tap="form.businessType = 0">鍚�</view>
</view>
</view>
-
<view class="form-group">
<view class="label-row">
<text class="label">钀ヤ笟鏃堕棿</text>
<text class="required">*</text>
</view>
- <input v-model="form.businessHours" class="text-input align-left" type="text" placeholder="蹇呭~锛岃杈撳叆闂ㄥ簵钀ヤ笟鏃堕棿" placeholder-style="color: #B2B2B2;" />
+ <input v-model="form.shopHours" class="text-input align-left" type="text" placeholder="蹇呭~锛岃杈撳叆闂ㄥ簵钀ヤ笟鏃堕棿" placeholder-style="color: #B2B2B2;" />
</view>
-
<view class="divider"></view>
-
<view class="form-group">
<text class="label">瀵勫瓨绫诲瀷</text>
- <input v-model="form.storageType" class="text-input align-left" type="text" placeholder="璇疯緭鍏ュ彲瀵勫瓨绫诲瀷" placeholder-style="color: #B2B2B2;" />
+ <input v-model="form.depositTypes" class="text-input align-left" type="text" placeholder="璇疯緭鍏ュ彲瀵勫瓨绫诲瀷" placeholder-style="color: #B2B2B2;" />
</view>
-
<view class="divider"></view>
-
<view class="form-group">
<view class="label-row">
<text class="label">閰嶉�佽寖鍥�</text>
<text class="required">*</text>
</view>
<view class="input-with-unit">
- <input v-model="form.deliveryRange" class="text-input" type="digit" placeholder="蹇呭~锛岃杈撳叆" placeholder-style="color: #B2B2B2;" />
+ <input v-model="form.deliveryArea" class="text-input" type="digit" placeholder="蹇呭~锛岃杈撳叆" placeholder-style="color: #B2B2B2;" />
<text class="unit-text" style="font-size: 28rpx;">鍏噷</text>
</view>
</view>
@@ -64,35 +66,239 @@
<text class="label">鏀惰垂鏍囧噯</text>
<text class="required">*</text>
</view>
- <textarea v-model="form.chargeRule" class="text-area charge-area" placeholder="蹇呭~锛岃杈撳叆闂ㄥ簵鏀惰垂鏍囧噯" placeholder-style="color: #B2B2B2;" auto-height></textarea>
+ <textarea v-model="form.feeStandard" class="text-area charge-area" placeholder="蹇呭~锛岃杈撳叆闂ㄥ簵鏀惰垂鏍囧噯" placeholder-style="color: #B2B2B2;" auto-height></textarea>
</view>
</view>
<view class="save-wrap">
- <view class="save-btn">淇濆瓨</view>
+ <view class="save-btn" @click="maintainShop">淇濆瓨</view>
</view>
</view>
</template>
<script>
+ import { mapState } from 'vuex'
export default {
+ computed: {
+ ...mapState(['navHeight', 'statusbarHeight','shopInfo','shopToken'])
+ },
data() {
return {
- form: {
- name: '',
- intro: '',
- fullTime: true,
- businessHours: '',
- storageType: '',
- deliveryRange: '',
- chargeRule: ''
+ info:{},
+ form:{
+ coverImgUrl:"",
+ businessType: 0,
+ content: "",
+ coverImg: "",
+ deliveryArea: 0,
+ depositTypes:"" ,
+ feeStandard:"" ,
+ shopHours: ""
}
+ }
+ },
+ onShow() {
+ },
+ onLoad() {
+ this.info ={}
+ this.getMyShop()
+ },
+ methods:{
+ previewImage(images,index = 0) {
+ uni.previewImage({
+ current: index,
+ urls: images
+ });
+ },
+ async getMyShop(index){
+ var that =this
+ let res1 = await that.$u.api.getShopInfoDetail()
+ if (res1.code === 200) {
+ this.info = res1.data
+ }
+ let res = await that.$u.api.maintainInfo()
+ if (res.code === 200) {
+ if(res.data){
+ this.form ={
+ coverImgUrl:res.data.coverImgUrl || '',
+ businessType: res.data.businessType || 0,
+ content: res.data.content || '',
+ coverImg: res.data.coverImg || '',
+ deliveryArea: res.data.deliveryArea || 0,
+ depositTypes: res.data.depositTypes || '',
+ feeStandard:res.data.feeStandard || '',
+ shopHours: res.data.shopHours || '',
+ }
+ }
+ }
+ },
+ maintainShop(index){
+ if(this.loading){
+ return;
+ }
+ if(!this.form.shopHours){
+ uni.showToast({
+ title:"璇峰~鍐欒惀涓氭椂闂�",
+ icon:'none'
+ })
+ return
+ }
+ if(!this.form.deliveryArea){
+ uni.showToast({
+ title:"璇峰~鍐欓厤閫佽寖鍥�",
+ icon:'none'
+ })
+ return
+ }
+ if(!this.form.feeStandard){
+ uni.showToast({
+ title:"璇峰~鍐欐敹璐规爣鍑�",
+ icon:'none'
+ })
+ return
+ }
+ this.loading = true
+ try{
+ var that =this
+ that.$u.api.maintainShopInfo(this.form).then(res=>{
+ if (res.code === 200) {
+ uni.showToast({
+ title:"淇℃伅淇濆瓨鎴愬姛",
+ icon:'success'
+ })
+ }
+ this.loading =false
+ })
+ }catch(e){
+ this.loading =false
+ }
+ },
+ async uploadFiles(filePaths, maxCount =1) {
+ console.log("==================================1")
+ if (!filePaths || !filePaths.length) {
+ return null
+ }
+
+ console.log("==================================3")
+ const uploadTasks = filePaths.map(filePath => {
+ return new Promise((resolve, reject) => {
+ uni.uploadFile({
+ url: this.$baseUrl + '/web/public/upload',
+ filePath: filePath,
+ name: 'file',
+ formData: {
+ folder: 'shop'
+ },
+ success: (res) => {
+ if (res.statusCode === 200) {
+ const data = JSON.parse(res.data)
+ if (data.code === 200) {
+ resolve(data.data)
+ } else {
+
+ console.log("==================================6")
+ reject(new Error(data.msg || '涓婁紶澶辫触'))
+ }
+ } else {
+
+ console.log("==================================4")
+ reject(new Error('涓婁紶澶辫触'))
+ }
+ },
+ fail: (err) => {
+
+ console.log("==================================5",err)
+ reject(err)
+ }
+ })
+ })
+ })
+ try {
+ const results = await Promise.all(uploadTasks)
+ return results
+ } catch (error) {
+ uni.showToast({
+ title: '涓婁紶澶辫触',
+ icon: 'none'
+ })
+ throw error
+ }
+ },
+ async chooseAndUploadImage(maxCount = 1) {
+ var that = this
+ uni.chooseImage({
+ count: 1,
+ sizeType: ['compressed'],
+ sourceType: ['album', 'camera'],
+ success: async (res) => {
+ const tempFilePaths = res.tempFilePaths
+ uni.showLoading({
+ title: '涓婁紶涓�...',
+ mask: true
+ })
+ try {
+ const uploadResults = await that.uploadFiles(tempFilePaths, maxCount)
+
+ that.form.coverImgUrl = uploadResults.map(item => item.url || item.path || item)[0]
+ that.form.coverImg = uploadResults.map(item => item.imgaddr)[0]
+ console.log(that.form,"=====================================01")
+ uni.hideLoading()
+ uni.showToast({
+ title: '涓婁紶鎴愬姛',
+ icon: 'success'
+ })
+ } catch (error) {
+ uni.hideLoading()
+ }
+ }
+ })
}
}
}
</script>
<style lang="scss" scoped>
+ .upload-row {
+ display: flex;
+ align-items: flex-start;
+ gap: 10rpx;
+ margin-bottom: 22rpx;
+ }
+
+ .upload-box,
+ .photo-box {
+ width: 122rpx;
+ height: 122rpx;
+ border-radius: 0;
+ overflow: hidden;
+ position: relative;
+ box-sizing: border-box;
+ }
+
+ .upload-box {
+ border: 1rpx dashed #c8ccd4;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ }
+
+ .upload-plus {
+ font-size: 54rpx;
+ line-height: 1;
+ color: #999999;
+ }
+
+ .upload-text {
+ margin-top: 8rpx;
+ font-size: 24rpx;
+ color: #999999;
+ }
+
+ .photo-image {
+ width: 100%;
+ height: 100%;
+ }
.store-info-page {
position: relative;
height: 482rpx;
diff --git a/small-program/shop/pages/wallet/wallet.vue b/small-program/shop/pages/wallet/wallet.vue
index a1428ea..48857b8 100644
--- a/small-program/shop/pages/wallet/wallet.vue
+++ b/small-program/shop/pages/wallet/wallet.vue
@@ -81,11 +81,11 @@
</template>
</view>
<view class="info-a-price">
- <text>{{item.type==1?'-':'+'}}{{(item.num ||0).toFixed(2)}}</text>
+ <text>{{item.type==1?'-':'+'}}{{item.amountInfo || 0}}</text>
<text></text>
</view>
</view>
- <view class="info-b">
+ <view class="info-b" v-if="item.orderNo">
<text>璁㈠崟缂栧彿锛歿{item.orderNo || ''}}</text>
</view>
<view class="info-b">
diff --git a/small-program/shop/pages/write-off/write-off.vue b/small-program/shop/pages/write-off/write-off.vue
index e777cba..f001417 100644
--- a/small-program/shop/pages/write-off/write-off.vue
+++ b/small-program/shop/pages/write-off/write-off.vue
@@ -2,12 +2,12 @@
<view class="box">
<view class="title">杈撳叆鏍搁獙鐮�</view>
<view class="input">
- <input type="number" v-model="code" placeholder="璇疯緭鍏�6浣嶅彇浠剁爜" />
+ <input type="number" v-model="code" placeholder="璇疯緭鍏�6浣嶆牳楠岀爜" />
</view>
<view class="btn" v-if="!loading" @click="confirmDo">纭</view>
<view class="btn1" v-if="loading" >姝e湪鏌ヨ</view>
<view class="footer" @click="scanCodeDo">
- <image src="/shop/images/ic_saoma@2x.png" mode="widthFix"></image>
+ <image src="/shop/static/images/ic_saoma@2x.png" mode="widthFix"></image>
<text>鎵爜鏍搁攢</text>
</view>
<u-popup :show="show1" round="15" :safeAreaInsetBottom="false" mode="center">
@@ -15,7 +15,7 @@
<view class="tc-contemt">
<view class="tc-contemt-title">璁㈠崟鏌ヨ缁撴灉</view>
<view class="tc-contemt-nr">
- 璁㈠崟銆恵{info.code}}銆戜笉婊¤冻鏍搁攢鏉′欢锛�
+ 璇ヨ鍗曚笉婊¤冻鏍搁攢鏉′欢锛�
</view>
</view>
<view class="tc-btn">
@@ -30,7 +30,7 @@
import { mapState } from 'vuex'
export default {
computed: {
- ...mapState(['navHeight', 'statusbarHeight'])
+ ...mapState(['navHeight', 'statusbarHeight','shopInfo', 'shopToken'])
},
data() {
return {
@@ -42,11 +42,13 @@
};
},
onShow() {
- // this.loading =false
- // this.show1 =false
- // this.info={}
- // this.code =''
- // this.checkShopLogin()
+ this.loading =false
+ this.show1 =false
+ this.info={}
+ this.code =''
+ this.checkShopLogin()
+ },
+ onLoad(options) {
},
methods:{
scanCodeDo(){
@@ -73,10 +75,10 @@
this.getShopDetail()
}
},
- jumpWriteoffA(){
- if(this.info && this.info.orderId){
+ jumpWriteoffA(type){
+ if(this.info && this.info.id){
uni.navigateTo({
- url: '/pagesA/pages/write-off-a/write-off-a?id='+this.info.orderId
+ url: '/shop/pages/write-off-a/write-off-a?id='+this.info.id+'&type='+type
})
}
},
@@ -89,32 +91,32 @@
}
this.loading =true
var that =this
- that.$u.api.getOrderDetailByCode({exchangeCode:this.code,tokenType:1 })
- .then(res=>{
- console.log(res)
- if (res.code === 200) {
- that.info = res.data
- if(res.data.orderStatus == 1 && res.data.receiveType ==1){
- that.jumpWriteoffA()
- }else{
- this.show1 = !this.show1
- this.loading =false
- }
- }
- }).catch(e=>{
+ try{
+ that.$u.api.shopOrderDetail({verifyCode:this.code,tokenType:1 })
+ .then(res=>{
+ console.log(res)
+ if (res.code === 200) {
+ that.info = res.data
+ if(res.data.status === 1 || res.data.status === 5 || res.data.status === 3){
+ that.jumpWriteoffA(0)
+ } else{
+ this.show1 = !this.show1
+ }
+ }
+ this.loading =false
+ })
+ }catch(e){
this.loading =false
- }).finally(e=>{
- // this.loading =false
- })
+ }
},
checkShopLogin(){
var that =this
- if( this.shopInfo ==null || this.shopInfo.id==null || this.shopToken==null || this.shopToken==''){
+ if( this.shopInfo ==null || this.shopToken==null || this.shopToken == ''){
uni.navigateTo({
- url: '/pages/login/login'
+ url: '/shop/pages/login/login'
})
}
- },
+ }
}
}
</script>
diff --git a/small-program/utils/http.api.js b/small-program/utils/http.api.js
index 16841ce..fdb3259 100644
--- a/small-program/utils/http.api.js
+++ b/small-program/utils/http.api.js
@@ -48,8 +48,28 @@
let continuePayOrder = (data = {}) => vm.$u.http.post('web/order/continuePay/'+data.orderId, data); //缁х画鍙戣捣鏀粯
let orderComment = (data = {}) => vm.$u.http.post('web/order/comment', data); //璁㈠崟璇勪环
let payOverdueFee = (data = {}) => vm.$u.http.post('web/order/payOverdueFee/'+data.orderId, data); //缁х画鍙戣捣鏀粯
+ let shopSalesStats = (params = {}) => vm.$u.http.get('web/shopInfo/salesStats',{ params }); //闂ㄥ簵閿�鍞粺璁�
+ let shopOrderDetail = (params = {}) => vm.$u.http.get('web/order/shopDetail',{ params }); //闂ㄥ簵璁㈠崟璇︽儏
+ let shopVerifyOrder = (data = {}) => vm.$u.http.post('web/order/shopVerify',data); //闂ㄥ簵鏍搁攢鏀朵欢
+ let storeOutOrder = (data = {}) => vm.$u.http.post('web/order/storeOut',data); //闂ㄥ簵鏍搁攢鍑鸿揣
+ let confirmArrivedOrder = (data = {}) => vm.$u.http.post('web/order/confirmArrived',data); //纭鍒板簵
+ let getShopInfoDetail= (params = {}) => vm.$u.http.get('web/shopInfo/shopDetail',{ params }); // 鑾峰彇鎴戠殑搴楅摵淇℃伅
+ let logOutShop= (params = {}) => vm.$u.http.get('web/account/logOutShop',{ params }); // 闂ㄥ簵閫�鍑虹櫥褰�
+ let getActiveOrderTip= (params = {}) => vm.$u.http.get('web/config/getActiveOrderTip',{ params }); // 棣栭〉杩涜涓鍗曟彁绀�
+ let maintainInfo= (data = {}) => vm.$u.http.post('web/shopInfo/maintainInfo',data); // 鏌ヨ闂ㄥ簵缁存姢淇℃伅
+ let maintainShopInfo= (data = {}) => vm.$u.http.post('web/shopInfo/maintain',data); // 鏌ヨ闂ㄥ簵缁存姢淇℃伅
vm.$u.api = {
+ getActiveOrderTip,
+ logOutShop,
+ maintainShopInfo,
+ maintainInfo,
+ getShopInfoDetail,
+ storeOutOrder,
+ confirmArrivedOrder,
+ shopVerifyOrder,
+ shopOrderDetail,
+ shopSalesStats,
payOverdueFee,
orderComment,
confirmReceipt,
diff --git a/small-program/utils/http.interceptor.js b/small-program/utils/http.interceptor.js
index 137aac9..432fea0 100644
--- a/small-program/utils/http.interceptor.js
+++ b/small-program/utils/http.interceptor.js
@@ -2,15 +2,14 @@
// 璇锋眰鎷︽埅鍣�
uni.$u.http.interceptors.request.use((config) => {
uni.showLoading({ title: '鍔犺浇涓�' });
- let Headtoken = ''
- if (vm.$store.state.userType === 1) {
- Headtoken = vm.$store.state.shopToken || ''
- } else {
- Headtoken = vm.$store.state.token || ''
- }
+ let Headtoken = vm.$store.state.token || ''
+ let shopHeadtoken= vm.$store.state.shopToken || ''
// 鍒ゆ柇鏈夋棤token锛屾湁鍒欏姞鍏ヨ姹傚ご涓�
if (Headtoken) {
config.header['token'] = Headtoken;
+ }
+ if (shopHeadtoken) {
+ config.header['shopToken'] = shopHeadtoken;
}
return config;
}, config => {
@@ -20,12 +19,18 @@
// 鍝嶅簲鎷︽埅鍣�
uni.$u.http.interceptors.response.use((response) => {
uni.hideLoading();
- if (response.data.code === 5113) {
+ if (response.data.code === 5113 || response.data.code === 5112) {
uni.switchTab({
url: '/pages/index/index'
});
return
}
+ if (response.data.code === 51131|| response.data.code === 51121) {
+ uni.navigateTo({
+ url: '/shop/pages/login/login'
+ });
+ return
+ }
if (response.data.code !== 200) {
uni.showToast({
title: response.data.message,
--
Gitblit v1.9.3