Compare commits

...

4 Commits

Author SHA1 Message Date
tianyi a734a7ea54 11 1 week ago
tianyi 5a19358a57 11 1 week ago
tianyi 8577b37779 11 1 week ago
tianyi 0e08627891 11 1 week ago
  1. 7
      components/tab-bar/myCenter.vue
  2. 68
      package1/myCenter/merchantCenter.vue
  3. 10
      package1/myCenter/shopOrderList.vue
  4. 123
      package2/partTimeJob/partTimeJobCenter.vue
  5. 148
      package2/shop/orderDetail.vue
  6. 12
      pages.json

7
components/tab-bar/myCenter.vue

@ -4,6 +4,7 @@
<view style="margin-top: 100px;" @click="navigatorTo('merchant')">商家入驻</view>
<view style="margin-top: 100px;" @click="navigatorTo('merchantCenter')">商家中心</view>
<view style="margin-top: 100px;" @click="navigatorTo('jianzhizhuce')">兼职注册</view>
<view style="margin-top: 100px;" @click="navigatorTo('jianzhizhuye')">兼职主页</view>
<!-- 未注册兼职弹窗 -->
<uni-popup ref="jianzhiPopup" background-color="rgba(2, 171, 255, 1)" borderRadius="40px 40px 40px 40px">
<view class="jianzhi-content" @tap="navigatorTo('partTimeReg')">
@ -49,6 +50,7 @@
uni.setStorageSync('shopId',item.id)
uni.setStorageSync('shopName',item.shopName)
uni.setStorageSync('shopIcon',item.shopIcon)
uni.setStorageSync('shopScore',item.shopScore)
uni.navigateTo({
url: '/package1/myCenter/merchantCenter'
})
@ -65,7 +67,10 @@
uni.setStorageSync('shopId',this.schoolShop[0].id)
uni.setStorageSync('shopName',this.schoolShop[0].shopName)
uni.setStorageSync('shopIcon',this.schoolShop[0].shopIcon)
uni.setStorageSync('shopScore',this.schoolShop[0].shopScore)
url = '/package1/myCenter/merchantCenter'
}else{
url = '/package1/myCenter/myMerchant'
}
}else if(e=='addType'){
url = '/package1/myCenter/addType'
@ -103,6 +108,8 @@
this.$refs.jianzhiPopup.open()
return
}
}else if(e=='jianzhizhuye'){
url = '/package2/partTimeJob/partTimeJobCenter'
}
uni.navigateTo({
url: url

68
package1/myCenter/merchantCenter.vue

@ -64,15 +64,23 @@
待消费
</view>
</view>
<view class="order33" @tap="goDetail('db',7)">
<view class="order44">
0
</view>
<view class="order55">
待退款
</view>
</view>
<view class="order33" @tap="goDetail('db',11)">
<view class="order44">
0
</view>
<view class="order55">
待退款/售后
待售后
</view>
</view>
<view class="order33" @tap="goDetail('db',5)">
<view class="order33" @tap="goDetail('pj')">
<view class="order44">
0
</view>
@ -171,6 +179,7 @@
</template>
<script>
import base from '@/utils/ossUploadFile/base64.js';
export default {
data() {
return {
@ -248,7 +257,14 @@
url = '/package1/myCenter/shopBill'
break;
case 'pj':
url = '/package1/group/shopEvaluate?item=' + JSON.stringify(uni.getStorageSync('schoolShop'))
let item = {
shopScore:uni.getStorageSync('shopScore'),
id:uni.getStorageSync('id')
}
url = '/package1/group/shopEvaluate?item=' + JSON.stringify(item)
break;
case 'hx':
this.scanCodeAdd()
break;
default:
}
@ -256,6 +272,52 @@
url: url
})
},
//
scanCodeAdd() {
let that = this;
uni.scanCode({
success: (res) => {
if (res.scanType == "QR_CODE") { //
console.log('二维码',res)
// let shopId = base.decode(res.result.split(',')[1])
// if (shopId == uni.getStorageSync('shopId').substring('10', '12')) {
// that.productId = base.decode(res.result.split(',')[0])
// that.toggle('bottom', base.decode(res.result.split(',')[0]));
// } else {
// that.tui.toast('')
// }
} else {
console.log('条形码',res)
// that.tui.request("/app/product/getByBarcode", "POST", {
// barcode: res.result
// }, false, true).then((res1) => {
// if (res1.code == 200) {
// that.productId = res1.result[0].id
// if (res1.result == '') {
// that.tui.toast('')
// } else {
// that.toggle('bottom', res1.result[0].id);
// }
// } else {
// that.tui.toast(res.message)
// }
// }).catch((res) => {
// that.tui.toast(res)
// })
}
},
fail: (res) => {
uni.showToast({
title: '扫描失败',
icon: 'none'
})
}
})
},
back() {
uni.navigateBack()
},

10
package1/myCenter/shopOrderList.vue

@ -15,7 +15,7 @@
:scroll-with-animation="true">
<view class="status-list">
<view v-for="(item, index) in statusList" :key="index" class="status-item"
:class="{ 'active': currentIndex === index }" @click="handleStatusClick(index,item.value)">
:class="{ 'active': currentIndex == item.value }" @click="handleStatusClick(item.value,item.value)">
<text class="status-text">{{ item.name }}</text>
</view>
</view>
@ -35,8 +35,8 @@
</view>
</view>
<view style="height: 120rpx;padding-top: 20rpx;">
<view style="height: 50rpx;line-height: 50rpx;font-size: 28rpx;font-weight: 700;">
商品 <text><text>{{item.goodsNum}}</text></text> <text style="color: red;">已出餐</text>
<view style="height: 50rpx;line-height: 50rpx;font-size: 28rpx;font-weight: 700;display: flex;">
商品 <text><text>{{item.goodsNum}}</text></text> <text style="color: red;flex: 1;text-align: right;">已出餐</text>
</view>
<view style="display: flex;" v-for="(item1,index1) in item.goodsList" :key="index">
<view style="flex: 1;">
@ -69,7 +69,7 @@
},
totalPages: 1,
orderList:[],
currentIndex: 0,
currentIndex: 10,
menuButtonInfo: {},
statusList: [{
name: '全部',
@ -195,7 +195,7 @@
},
goDetail(id){
uni.navigateTo({
url:'/package1/order/orderDetail?id=' + id
url:'/package2/shop/orderDetail?id=' + id
})
},
handleStatusClick(index,value) {

123
package2/partTimeJob/partTimeJobCenter.vue

@ -0,0 +1,123 @@
<template>
<view class="page1">
<view class="title">
<view class="title-sreach">
<view class="back-btn" @tap="back" :style="{'top': menuButtonInfo.top +'px'}">
<uni-icons type="left" size="28"></uni-icons>
</view>
<view class="title-name" :style="{'padding-top': menuButtonInfo.top +'px'}">
兼职主页
</view>
</view>
</view>
<view class="content">
<view class="box1" style="display: flex;">
<view class="">
待退款
</view>
</view>
<view class="box1" style="display: flex;">
<view class="">
待售后
</view>
</view>
<view class="box1" style="display: flex;">
<view class="">
已退款
</view>
</view>
<view class="box1" style="display: flex;">
<view class="">
已售后
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
menuButtonInfo: {},
}
},
filters:{
formatISOTime(isoString) {
const date = new Date(isoString);
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
const hours = date.getHours().toString().padStart(2, '0');
const minutes = date.getMinutes().toString().padStart(2, '0');
const seconds = date.getSeconds().toString().padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
},
onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
},
onLoad() {
},
methods: {
back() {
uni.navigateBack()
},
}
}
</script>
<style>
page {
width: 100%;
height: 100%;
font-size: 24rpx;
background: #F5F8F5;
color: #00231C;
}
.page1 {
width: 100%;
height: 100%;
font-size: 24rpx;
position: relative;
}
.title {
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/8bc15960c2dc40268e295d6dd23aecce.png') no-repeat;
width: 100%;
height: 20%;
}
.title-sreach {
width: 100%;
display: flex;
height: 200rpx;
position: relative;
}
.back-btn {
position: absolute;
bottom: 0;
left: 0;
}
.title-name {
padding-top: 110rpx;
font-size: 36rpx;
font-weight: 700;
flex: 1;
text-align: center;
}
.content{
margin: -100rpx auto;
}
.box1 {
width: 95%;
margin: 20rpx auto;
background: #fff;
border-radius: 20rpx;
padding: 20rpx;
}
</style>

148
package2/shop/orderDetail.vue

@ -0,0 +1,148 @@
<template>
<view class="page1">
<view class="title">
<view class="title-sreach">
<view class="back-btn" @tap="back" :style="{'top': menuButtonInfo.top +'px'}">
<uni-icons type="left" size="28"></uni-icons>
</view>
<view class="title-name" :style="{'padding-top': menuButtonInfo.top +'px'}">
订单详情
</view>
</view>
</view>
<view class="content">
<view class="box1" style="display: flex;">
<text>#0001</text>
<text>期望送达</text>
<text>明天 06:30</text>
<text>待消费</text>
</view>
<view class="box1" style="display: flex;">
<view class="">
配送
<!-- 自取 -->
</view>
<view class="">
<text>张三 16521011101</text>
<view class="">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/869a7af6a1c24bf3a0d523c4a18b55c6.png" alt="" />
</view>
</view>
</view>
<view class="box1" style="display: flex;">
<view class="">
<view class="">
收货人先生
</view>
<view class="">
河北省沧州市东川建设集团优先公司5楼右转右手边第一个门
</view>
</view>
<view class="">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/869a7af6a1c24bf3a0d523c4a18b55c6.png" alt="" />
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
menuButtonInfo: {},
}
},
filters:{
formatISOTime(isoString) {
const date = new Date(isoString);
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
const hours = date.getHours().toString().padStart(2, '0');
const minutes = date.getMinutes().toString().padStart(2, '0');
const seconds = date.getSeconds().toString().padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
},
onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
},
onLoad(option) {
this.shopId = option.id
this.getList()
},
methods: {
getList(){
let that = this
that.tui.request("/mall/order/page", "POST", this.searchForm, false, false).then((res) => {
that.loadStatus = 'nomore';
if (res.code == 200) {
} else {
that.tui.toast(res.message);
return;
}
uni.hideLoading();
}).catch((res) => {});
},
back() {
uni.navigateBack()
},
}
}
</script>
<style>
page {
width: 100%;
height: 100%;
font-size: 24rpx;
background: #F5F8F5;
color: #00231C;
}
.page1 {
width: 100%;
height: 100%;
font-size: 24rpx;
position: relative;
}
.title {
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/8bc15960c2dc40268e295d6dd23aecce.png') no-repeat;
width: 100%;
height: 20%;
}
.title-sreach {
width: 100%;
display: flex;
height: 200rpx;
position: relative;
}
.back-btn {
position: absolute;
bottom: 0;
left: 0;
}
.title-name {
padding-top: 110rpx;
font-size: 36rpx;
font-weight: 700;
flex: 1;
text-align: center;
}
.content{
margin: -100rpx auto;
}
.box1 {
width: 95%;
margin: 20rpx auto;
background: #fff;
border-radius: 20rpx;
padding: 20rpx;
}
</style>

12
pages.json

@ -257,6 +257,18 @@
"style": {
"navigationBarTitleText": "隐私政策"
}
},{
"path": "shop/orderDetail",
"style": {
"navigationBarTitleText": "商家订单详情",
"navigationStyle": "custom"
}
},{
"path": "partTimeJob/partTimeJobCenter",
"style": {
"navigationBarTitleText": "兼职主页",
"navigationStyle": "custom"
}
}]
}, {
"root": "package3",

Loading…
Cancel
Save