| | |
| | | "quickapp" : {}, |
| | | /* 快应用特有相关 */ |
| | | "mp-weixin" : { |
| | | "appid" : "wx6d0ecc4e18710458", |
| | | "appid" : "wx1441324401626290", |
| | | "setting" : { |
| | | "urlCheck" : false, |
| | | "es6" : true, |
| | |
| | | "easycom": {
|
| | | "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
|
| | | },
|
| | | "pages": [{
|
| | | "path": "pages/login/supplier-login",
|
| | | "style": {
|
| | | "navigationBarTitleText": "登录",
|
| | | "enablePullDownRefresh": false,
|
| | | "navigationStyle": "custom"
|
| | | }
|
| | | },
|
| | | {
|
| | | "path": "pages/home/supplier-home",
|
| | | "style": {
|
| | | "navigationBarTitleText": "首页",
|
| | | "enablePullDownRefresh": true,
|
| | | "navigationStyle": "custom"
|
| | | }
|
| | | },
|
| | | "pages": [
|
| | | // #ifdef PUB_CUSTOMER
|
| | | {
|
| | | "path": "pages/home/home",
|
| | |
| | | "navigationBarTitleText": "收货地址"
|
| | | }
|
| | | },
|
| | | // #endif
|
| | | // #endif |
| | | { |
| | | "path": "pages/login/supplier-login", |
| | | "style": { |
| | | "navigationBarTitleText": "登录", |
| | | "enablePullDownRefresh": false, |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/home/supplier-home", |
| | | "style": { |
| | | "navigationBarTitleText": "首页", |
| | | "enablePullDownRefresh": true, |
| | | "navigationStyle": "custom" |
| | | } |
| | | },
|
| | | {
|
| | | "path": "pages/login/supplier-reg",
|
| | | "style": {
|
| | |
| | | <view class="label">理由</view> |
| | | <view class="value">{{item.reason}}</view> |
| | | </view> |
| | | <!-- #ifdef PUB_CUSTOMER --> |
| | | <view class="line-gray" v-if="item.status=='PENDING'"></view> |
| | | <view class="flex buttons" v-if="item.status=='PENDING'"> |
| | | <view class="button button-1 m-l-15 m-r-0" @click="cancelSale(item)">取消售后</view> |
| | | </view> |
| | | <!-- #endif --> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | uni.stopPullDownRefresh() |
| | | }, |
| | | methods: { |
| | | async cancelSale(item) { |
| | | await this.$message.confirm('是否取消售后') |
| | | this.$message.showLoading() |
| | | const { |
| | | code, |
| | | data |
| | | } = await this.$http.request('get', '/api/customer/sales/list/cancel', { |
| | | params: { |
| | | id: item.id |
| | | } |
| | | }) |
| | | this.$message.hideLoading() |
| | | if (code === 0) { |
| | | this.refreshList() |
| | | } |
| | | }, |
| | | changeIndex(index) { |
| | | if (this.tabIndex !== index) { |
| | | this.tabIndex = index |
| | |
| | | max-width: unset; |
| | | } |
| | | } |
| | | |
| | | .buttons { |
| | | display: flex; |
| | | margin-left: auto; |
| | | width: fit-content; |
| | | |
| | | .button { |
| | | // width: 216rpx; |
| | | padding: 10rpx 20rpx; |
| | | line-height: 34rpx; |
| | | font-size: 24rpx; |
| | | height: 34rpx; |
| | | background: #20613D; |
| | | text-align: center; |
| | | border-radius: 30rpx; |
| | | |
| | | } |
| | | |
| | | .button-1 { |
| | | background: #fff; |
| | | color: #333; |
| | | border: 2rpx solid #333; |
| | | |
| | | } |
| | | |
| | | .button-0 { |
| | | color: #fff; |
| | | border: 2rpx solid #20613D; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | </style> |
| | |
| | | }) |
| | | this.$message.hideLoading() |
| | | if (code === 0) { |
| | | this.$store.dispatch('sign_add','order') |
| | | this.refreshList() |
| | | } |
| | | } |
| | |
| | | console.log('pay success', res) |
| | | that.$message.showToast('支付成功') |
| | | setTimeout(() => { |
| | | that.$store.dispatch('sign_add','order') |
| | | that.refreshList() |
| | | }, 200) |
| | | }, |
| | |
| | | |
| | | // }, |
| | | case 'cancelOrder': { |
| | | this.$message.showToast('敬请期待') |
| | | }, |
| | | await this.$message.confirm('是否取消订单') |
| | | // 发送请求 |
| | | this.$message.showLoading() |
| | | const { |
| | | code |
| | | } = await this.$http.request('get', '/api/customer/order/cancel', { |
| | | params: { |
| | | id: item.id, |
| | | } |
| | | }) |
| | | this.$message.hideLoading() |
| | | if (code === 0) { |
| | | this.$store.dispatch('sign_add','order') |
| | | this.refreshList() |
| | | } |
| | | } |
| | | break |
| | | default: |
| | | break |
| | | } |
| | |
| | | </view>
|
| | | </view>
|
| | | <view class="flex order-icons-container">
|
| | | <view class="order-icons" @click="goto('/pages/order/order?status=PENDING',true)">
|
| | | <image src="../../static/images/customer/order/order-type-1.png" class="order-icon dfk"></image>
|
| | | <view class="order-icons" style="position: relative;" @click="goto('/pages/order/order?status=PENDING',true)">
|
| | | <image src="../../static/images/customer/order/order-type-1.png" class="order-icon dfk"
|
| | | style="position: relative;"> |
| | | <view class="image-shop-number">{{order_pendding_num||''}}</view> |
| | | </image>
|
| | | <view>待付款</view>
|
| | | </view>
|
| | | <view class="order-icons" @click="goto('/pages/order/order?status=SEND',true)">
|
| | |
| | | tel: '15974805814',
|
| | | tj: {},
|
| | | cacheUserId: '',
|
| | | order_pendding_num: 0,
|
| | |
|
| | | };
|
| | | },
|
| | |
| | | that.tj = res.data || {}
|
| | | }
|
| | | })
|
| | | //获取待支付数目
|
| | | this.$http.request('get', '/api/customer/order/count/pending', {
|
| | | params: {
|
| | | }
|
| | | }).then(res => {
|
| | | if (res.code === 0) {
|
| | | that.order_pendding_num = res.data || 0
|
| | |
|
| | | }
|
| | | })
|
| | |
|
| | |
|
| | | // #endif
|
| | | }, 200)
|
| | | }
|
| | |
| | | .user-customer-order-infos{ |
| | | padding-top: 0rpx; |
| | | .image-shop-number { |
| | | width: 30rpx; |
| | | height: 30rpx; |
| | | background: #F20000; |
| | | line-height: 30rpx; |
| | | text-align: center; |
| | | position: absolute; |
| | | right: 0rpx; |
| | | top: -6rpx; |
| | | color: #FFFFFF; |
| | | border-radius: 50%; |
| | | font-size: 24rpx; |
| | | } |
| | | |
| | | .more{ |
| | | font-weight: 400; |
| | | font-size: 24rpx; |
| | |
| | | msg: '' |
| | | }) |
| | | } else { |
| | | console.log('res',res.data) |
| | | console.log('res', res.data) |
| | | if (res.data.code == ('0')) { |
| | | resolve({ |
| | | data: res.data.data, |
| | | code: 0, |
| | | msg: '' |
| | | }) |
| | | } else if (res.data.code === '3000'||res.data&&res.data.code&&res.data.code.startsWith('3000')) { |
| | | } else if (res.data.code === '3000' || res.data && res.data.code && |
| | | res.data.code.startsWith('3000')) { |
| | | if (Array.isArray(res.data.data)) { |
| | | if (res.data.data.length > 0 && res.data.data[0] |
| | | .msg) { |
| | |
| | | code: parseInt(res.data.code), |
| | | msg: res.data.data || res.data.msg |
| | | }) |
| | | } else if (res.data.code === '4000'||res.data&&res.data.code&&res.data.code.startsWith('4000')) { |
| | | message.showToast('系统异常') |
| | | } else if (res.data.code === '4000' || res.data && res.data.code && |
| | | res.data.code.startsWith('4000')) { |
| | | message.showToast('系统异常') |
| | | } else if (res.data.code === '401' || res.data && res.data.code && |
| | | res.data.code.startsWith('401')) { |
| | | message.showToast('登录信息失效') |
| | | storage.removeItem('token') |
| | | reject({ |
| | | data: null, |
| | | code: 401, |
| | | msg: 'Unauthorized' |
| | | }) |
| | | // #ifdef PUB_CUSTOMER |
| | | uni.reLaunch({ |
| | | url: '/pages/user/supplier-user' |
| | | }) |
| | | // #endif |
| | | // #ifndef PUB_CUSTOMER |
| | | uni.reLaunch({ |
| | | url: '/pages/login/supplier-login' |
| | | }) |
| | | |
| | | } else { |
| | | if (res.data.data && typeof res.data.data === 'string') { |
| | | message.showToast(res.data.data) |
| | |
| | | }) |
| | | // #endif |
| | | |
| | | // if (!http.isShowMessage) { |
| | | // http.isShowMessage = true |
| | | // message.confirm('登录状态已失效,是否重新登录?').then(() => { |
| | | // uni.navigateTo({ |
| | | // url: '/pages/account/login' |
| | | // }) |
| | | // http.isShowMessage = false |
| | | // }).catch(() => { |
| | | // uni.reLaunch({ |
| | | // url: '/pages/home' |
| | | // }) |
| | | // http.isShowMessage = false |
| | | // }) |
| | | // } |
| | | } else if (res.statusCode === 403) { |
| | | message.showToast('请求被拒绝') |
| | | reject({ |
| | |
| | | if (res.statusCode === 200) { |
| | | const obj = JSON.parse(res.data) |
| | | console.log('res debug2', obj) |
| | | if (obj.code.startsWith('200')||obj.code==='0') { |
| | | if (obj.code.startsWith('200') || obj.code === '0') { |
| | | resolve({ |
| | | data: obj.data, |
| | | code: 0, |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | |
| | | async requestCode(method, url, options) { |
| | | try { |
| | | return await http.requestTemp(method, `${pre}/${version}`+ url, options) |
| | | return await http.requestTemp(method, `${pre}/${version}` + url, options) |
| | | } catch (e) { |
| | | return e |
| | | } |
| | |
| | | try { |
| | | return await http.uploadTemp(filePath, dto) |
| | | } catch (e) { |
| | | console.log('error',e) |
| | | console.log('error', e) |
| | | return e |
| | | } |
| | | }, |
| | |
| | | } |
| | | |
| | | |
| | | export default http |
| | | export default http |
| | |
| | | 'flower': 0, |
| | | 'shopping': 0, |
| | | 'follow': 0, |
| | | 'delivery': 0 |
| | | 'delivery': 0, |
| | | 'order':0 |
| | | }, |
| | | defaultaddress: {} |
| | | }, |
| | |
| | | </view>
|
| | | <view class="icon-container">
|
| | | <image src="../../../static/common/icon-shop.png" @click="toShopping(dto)" class="icon-shop">
|
| | | <view class="image-shop-number">{{shopnum||'1'}}</view>
|
| | | <view class="image-shop-number">{{shopnum||''}}</view>
|
| | | </image>
|
| | |
|
| | | </view>
|