wangfukang 3 weeks ago
parent
commit
5016c332e5
  1. 6
      components/tab-bar/myCenter.vue
  2. 6
      package1/group/shopEvaluate.vue
  3. 4
      package1/myCenter/addGoods.vue
  4. 132
      package1/myCenter/goodsList.vue
  5. 353
      package1/myCenter/merchantCenter.vue
  6. 6
      pages.json

6
components/tab-bar/myCenter.vue

@ -1,10 +1,8 @@
<template> <template>
<view class="page1"> <view class="page1">
<view>22222222</view> <view>22222222</view>
<view style="margin-top: 100px;" @click="navigatorTo('addgoods')">新增商品</view>
<view style="margin-top: 100px;" @click="navigatorTo('addType')">新增分类</view>
<view style="margin-top: 100px;" @click="navigatorTo('goodsList')">商品列表</view>
<view style="margin-top: 100px;" @click="navigatorTo('merchant')">商家入驻</view> <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('jianzhizhuce')">兼职注册</view>
<!-- 未注册兼职弹窗 --> <!-- 未注册兼职弹窗 -->
<uni-popup ref="jianzhiPopup" background-color="rgba(2, 171, 255, 1)" borderRadius="40px 40px 40px 40px"> <uni-popup ref="jianzhiPopup" background-color="rgba(2, 171, 255, 1)" borderRadius="40px 40px 40px 40px">
@ -39,6 +37,8 @@
let url = "" let url = ""
if(e=='addgoods'){ if(e=='addgoods'){
url = '/package1/myCenter/addGoods' url = '/package1/myCenter/addGoods'
}else if(e=='merchantCenter'){
url = '/package1/myCenter/merchantCenter'
}else if(e=='addType'){ }else if(e=='addType'){
url = '/package1/myCenter/addType' url = '/package1/myCenter/addType'
}else if(e=='goodsList'){ }else if(e=='goodsList'){

6
package1/group/shopEvaluate.vue

@ -50,6 +50,12 @@
</view> </view>
</view> </view>
<view class="eval-content"> <view class="eval-content">
<view style="display: flex;height: 25px;line-height: 25px;font-size: 12px;">
商品
<view style="padding: 6px 0 0 5px;">
<uni-rate v-model="item.score" size="12" />
</view>
</view>
<view class="eval-text"> <view class="eval-text">
{{item.remark}} {{item.remark}}
</view> </view>

4
package1/myCenter/addGoods.vue

@ -46,9 +46,9 @@
<input class="content-input" v-model="item.specNum" style="padding-right: 10px;" @click="changecount(index)" placeholder="商品库存"/> <input class="content-input" v-model="item.specNum" style="padding-right: 10px;" @click="changecount(index)" placeholder="商品库存"/>
<button @click="deldantiaoguige(index)" v-if="formData.attributeListPrice.length>1" style="width: 120px;height: 30px;line-height: 30px;color: red;border:none;background: #fff;">删除</button> <button @click="deldantiaoguige(index)" v-if="formData.attributeListPrice.length>1" style="width: 120px;height: 30px;line-height: 30px;color: red;border:none;background: #fff;">删除</button>
</view> </view>
<view @click="checkSpec('guige')" style="margin-top: 5px;width: 80px;height: 30px;text-align: center;line-height: 30px;background: rgba(0, 35, 28, 1);border-radius: 30px;color: rgba(166, 255, 234, 1);"> <!-- <view @click="checkSpec('guige')" style="margin-top: 5px;width: 80px;height: 30px;text-align: center;line-height: 30px;background: rgba(0, 35, 28, 1);border-radius: 30px;color: rgba(166, 255, 234, 1);">
选择规格 选择规格
</view> </view> -->
</view> </view>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="拼团信息" name="productGroupBuyPrices"> <uni-forms-item label="拼团信息" name="productGroupBuyPrices">

132
package1/myCenter/goodsList.vue

@ -50,24 +50,24 @@
</view> </view>
</view> </view>
</view> </view>
<view class="show-box" v-if="item.isShow"> <view class="show-box" v-show="item.isShow">
<view class="show-text" @tap="goDetail('goods',item)" style="border-right: 1px solid #fff;"> <view class="show-text" @tap="goDetail('goods',item)" style="border-right: 1px solid #fff;">
<uni-icons type="compose" size="18"></uni-icons> <uni-icons type="compose" size="18"></uni-icons>
编辑 编辑
</view> </view>
<view class="show-text" style="border-right: 1px solid #fff;"> <view class="show-text" @tap="isPush('shopList',index,item,item.isPush==1?0:1)" style="border-right: 1px solid #fff;">
<uni-icons type="hand-up" size="18"></uni-icons> <uni-icons type="hand-up" size="18"></uni-icons>
设为推荐 {{item.isPush == 0?'设为推荐':'取消推荐'}}
</view> </view>
<view class="show-text" style="border-right: 1px solid #fff;"> <view class="show-text" @tap="isMust('shopList',index,item,item.isMust==1?0:1)" style="border-right: 1px solid #fff;">
<uni-icons type="star" size="18"></uni-icons> <uni-icons type="star" size="18"></uni-icons>
设为必点 {{item.isMust == 0?'设为必点':'取消必点'}}
</view> </view>
<view class="show-text" style="border-right: 1px solid #fff;"> <view class="show-text" @tap="upDown('shopList',index,item,item.delFlag==1?0:1)" style="border-right: 1px solid #fff;">
<uni-icons type="upload" size="18"></uni-icons> <uni-icons type="upload" size="18"></uni-icons>
上架 {{item.delFlag == 1?'下架':'上架'}}
</view> </view>
<view class="show-text"> <view class="show-text" @tap="remove(item)">
<uni-icons type="trash" size="18"></uni-icons> <uni-icons type="trash" size="18"></uni-icons>
删除 删除
</view> </view>
@ -103,20 +103,24 @@
</view> </view>
</view> </view>
</view> </view>
<view class="show-box" v-if="item.isShow"> <view class="show-box" v-show="item.isShow">
<view class="show-text" @tap="goDetail('goods',item)" style="border-right: 1px solid #fff;"> <view class="show-text" @tap="goDetail('goods',item)" style="border-right: 1px solid #fff;">
编辑 编辑
</view> </view>
<view class="show-text" style="border-right: 1px solid #fff;"> <view class="show-text" @tap="isPush('shopList1',index,item,item.isPush==1?0:1)" style="border-right: 1px solid #fff;">
设为推荐 <uni-icons type="hand-up" size="18"></uni-icons>
{{item.isPush == 0?'设为推荐':'取消推荐'}}
</view> </view>
<view class="show-text" style="border-right: 1px solid #fff;"> <view class="show-text" @tap="isMust('shopList1',index,item,item.isMust==1?0:1)" style="border-right: 1px solid #fff;">
设为必点 <uni-icons type="star" size="18"></uni-icons>
{{item.isMust == 0?'设为必点':'取消必点'}}
</view> </view>
<view class="show-text" style="border-right: 1px solid #fff;"> <view class="show-text" @tap="upDown('shopList1',index,item,item.delFlag==1?0:1)" style="border-right: 1px solid #fff;">
上架 <uni-icons type="upload" size="18"></uni-icons>
{{item.delFlag == 1?'下架':'上架'}}
</view> </view>
<view class="show-text" style="border-right: 1px solid #fff;"> <view class="show-text" @tap="remove(item)" style="border-right: 1px solid #fff;">
<uni-icons type="trash" size="18"></uni-icons>
删除 删除
</view> </view>
</view> </view>
@ -190,9 +194,101 @@
console.log("1111",type) console.log("1111",type)
if(type == 'shopList'){ if(type == 'shopList'){
this.shopList[index].isShow = !this.shopList[index].isShow this.shopList[index].isShow = !this.shopList[index].isShow
console.log(this.shopList[index])
}else{ }else{
this.shopList1[index].isShow = !this.shopList1[index].isShow this.shopList1[index].isShow = !this.shopList1[index].isShow
console.log(this.shopList1[index])
} }
this.$forceUpdate()
},
isPush(type,index,item,value) {
this.tui.request("/app/product/isPush", "POST", {
id: item.id,
isPush:value
}, false, true).then((res) => {
if (res.code == 200) {
if(type == 'shopList'){
this.shopList[index].isPush = value
}else{
this.shopList1[index].isPush = value
}
this.tui.toast('设置成功')
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
},
remove(v) {
let that = this;
uni.showModal({
title: '提示',
content: '确定要删除该商品吗?',
success: function (res) {
if (res.confirm) {
that.tui.request("/app/product/delById", "POST", {
id: v.id
}, false, true).then((res) => {
if (res.code == 200) {
that.getShareList()
that.tui.toast('删除成功')
} else {
that.tui.toast(res.message)
}
}).catch((res) => {})
}
}
});
},
isMust(type,index,item,value) {
this.tui.request("/app/product/isMust", "POST", {
id: item.id,
isMust:value
}, false, true).then((res) => {
if (res.code == 200) {
if(type == 'shopList'){
this.shopList[index].isMust = value
}else{
this.shopList1[index].isMust = value
}
this.tui.toast('设置成功')
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
},
upDown(type,index,item,value) {
if(value == 0){
this.tui.request("/app/product/down", "POST", {
id: item.id
}, false, true).then((res) => {
if (res.code == 200) {
if(type == 'shopList'){
this.shopList[index].delFlag = value
}else{
this.shopList1[index].delFlag = value
}
this.tui.toast('设置成功')
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
}else{
this.tui.request("/app/product/up", "POST", {
id: item.id
}, false, true).then((res) => {
if (res.code == 200) {
if(type == 'shopList'){
this.shopList[index].delFlag = value
}else{
this.shopList1[index].delFlag = value
}
this.tui.toast('设置成功')
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
}
}, },
goDetail(type,item){ goDetail(type,item){
let url="" let url=""
@ -237,7 +333,7 @@
this.shopList1 = [...this.shopList1, ...res.result.records] this.shopList1 = [...this.shopList1, ...res.result.records]
} }
for(let i=0;i<this.shopList1.length;i++){ for(let i=0;i<this.shopList1.length;i++){
this.shopList1[i].isShow = true this.shopList1[i].isShow = false
} }
this.pages = res.result.pages this.pages = res.result.pages
} else { } else {
@ -249,7 +345,7 @@
this.shopList = [...this.shopList, ...res.result.records] this.shopList = [...this.shopList, ...res.result.records]
} }
for(let i=0;i<this.shopList.length;i++){ for(let i=0;i<this.shopList.length;i++){
this.shopList[i].isShow = true this.shopList[i].isShow = false
} }
this.pages = res.result.pages this.pages = res.result.pages
} }

353
package1/myCenter/merchantCenter.vue

@ -0,0 +1,353 @@
<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="shop-title">
<view class="title1">
<img src="/static/images/img/shangpintu.png" alt="" />
</view>
<view class="title2">
<view class="title22">
老王的店
</view>
<view class="title33">
暂停营业
<uni-icons type="right" size="12"></uni-icons>
</view>
</view>
</view>
<view class="shop-order">
<view class="order1">
待办事项
</view>
<view class="order2">
<view class="order22">
<view class="order33">
<view class="order44">
0
</view>
<view class="order55">
待接单
</view>
</view>
<view class="order33">
<view class="order44">
0
</view>
<view class="order55">
待发货
</view>
</view>
<view class="order33">
<view class="order44">
0
</view>
<view class="order55">
待商家送达
</view>
</view>
</view>
<view class="order22">
<view class="order33">
<view class="order44">
0
</view>
<view class="order55">
待顾客自取
</view>
</view>
<view class="order33">
<view class="order44">
0
</view>
<view class="order55">
待退款/售后
</view>
</view>
<view class="order33">
<view class="order44">
0
</view>
<view class="order55">
待回复差评
</view>
</view>
</view>
</view>
</view>
<view class="shop-order">
<view class="order1" style="display: flex;">
<view style="flex: 1;">
今日实时数据
</view>
<view>
更多
<uni-icons type="right" size="12"></uni-icons>
</view>
</view>
<view class="data2">
<view class="data22">
<view class="data222">
0
</view>
<view class="data333">
今日订单
</view>
</view>
<view class="data22">
<view class="data222">
0
</view>
<view class="data333">
营业额
</view>
</view>
</view>
</view>
<view class="shop-order">
<view class="order1">
必备工具
</view>
<view class="menu2">
<view class="menu22" @tap="goDetail('sp')">
<view class="menu33">
<img src="/static/images/dingdan/dd0.png" alt="" />
</view>
<view class="menu44">
商品管理
</view>
</view>
<view class="menu22" @tap="goDetail('dp')">
<view class="menu33">
<img src="/static/images/dingdan/dd1.png" alt="" />
</view>
<view class="menu44">
店铺管理
</view>
</view>
<view class="menu22" @tap="goDetail('dd')">
<view class="menu33">
<img src="/static/images/dingdan/dd2.png" alt="" />
</view>
<view class="menu44">
订单管理
</view>
</view>
<view class="menu22" @tap="goDetail('zd')">
<view class="menu33">
<img src="/static/images/dingdan/dd3.png" alt="" />
</view>
<view class="menu44">
账单结算
</view>
</view>
<view class="menu22" @tap="goDetail('pj')">
<view class="menu33">
<img src="/static/images/dingdan/dd4.png" alt="" />
</view>
<view class="menu44">
顾客评价
</view>
</view>
<view class="menu22" @tap="goDetail('hx')">
<view class="menu33" style="width: 100%;height: 28px;">
<uni-icons type="scan" size="25"></uni-icons>
</view>
<view class="menu44">
扫码核销
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
menuButtonInfo: {}
}
},
onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
},
onLoad(option) {
},
methods: {
goDetail(type) {
let url = ''
switch (type) {
case 'sp':
url = '/package1/myCenter/goodsList'
break;
case 'dp':
url = ''
break;
case 'dd':
url = ''
break;
case 'zd':
url = ''
break;
case 'pj':
url = '/package1/group/shopEvaluate'
break;
default:
}
uni.navigateTo({
url: url
})
},
back() {
uni.navigateBack()
},
}
}
</script>
<style lang="scss">
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: 55px;
font-size: 36rpx;
font-weight: 700;
flex: 1;
text-align: center;
}
.shop-title {
width: 95%;
margin: -65px auto 0;
padding: 10px;
background: #fff;
border-radius: 10px;
display: flex;
font-size: 14px;
font-weight: 700;
}
.title1 {
width: 35px;
height: 35px;
img {
width: 100%;
height: 100%;
border-radius: 5px;
}
}
.title2{
flex: 1;
line-height: 35px;
display: flex;
}
.title22{
flex: 1;
padding-left: 10px;
}
.shop-order{
width: 95%;
margin: 10px auto 0;
background: #fff;
border-radius: 10px;
padding: 0 10px 0;
}
.order1{
height: 35px;
line-height: 35px;
font-size: 14px;
font-weight: 700;
border-bottom: 1px solid #eee;
}
.order22{
display: flex;
height: 50px;
padding-top: 10px;
}
.order33{
flex: 1;
text-align: center;
}
.order44{
font-size: 14px;
font-weight: 700;
}
.data2{
display: flex;
height: 70px;
text-align: center;
padding-top: 10px;
}
.data22{
flex: 1;
}
.data222{
font-size: 18px;
font-weight: 700;
padding-bottom: 10px;
}
.menu2{
display: flex;
flex-wrap: wrap;
text-align: center;
padding-top: 10px;
}
.menu22{
width: 25%;
height: 60px;
}
.menu33{
img{
width: 25px;
height: 25px;
background-size: 100%;
}
}
.menu44{
height: 20px;
line-height: 20px;
}
</style>

6
pages.json

@ -202,6 +202,12 @@
"navigationBarTitleText": "新增分类", "navigationBarTitleText": "新增分类",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},{
"path": "myCenter/merchantCenter",
"style": {
"navigationBarTitleText": "商家中心",
"navigationStyle": "custom"
}
},{ },{
"path": "myCenter/goodsList", "path": "myCenter/goodsList",
"style": { "style": {

Loading…
Cancel
Save