hmp 4 лет назад
Родитель
Сommit
b0d07895a6

+ 8 - 9
assets/colorui/app.scss

@@ -226,16 +226,15 @@
 /* ==========text-cut=========== */
 /* start--去除button的所有默认样式--start */
 .btnCss {
-	padding: 0;
-	font-size: inherit;
-	line-height: inherit;
-	background-color: transparent;
-	color: inherit;
-}
+		border: none;
+		border-radius: 0rpx;
+		outline: none;
+	}
 
-.btnCss {
-   border: none;
-}
+	.btnCss::after {
+		border: none;
+		outline: none;
+	}
 /* end--去除button的所有默认样式--end */
 
 

+ 21 - 1
assets/http/api.js

@@ -161,6 +161,7 @@ const goods={
 	list:p => http.get('goods/getGoodsList', {params: p}),
 	remove:p => http.post("ldt_goods/goods/remove?ids="+p),
 	submit: p => http.post('ldt_goods/goods/submit', p),
+	reload: p => http.get('goods/reload', {params: p}),
 }
 
 
@@ -170,6 +171,18 @@ const goodsCategory={
 	remove:p => http.post("ldt_goods/goodscategory/remove?ids="+p),
 }
 
+const goodsProperty={
+	list:p => http.get('ldt_goods/goodsproperty/list', {params: p}),
+	submit: p => http.post('ldt_goods/goodsproperty/submit', p),
+	saveBatch: p => http.post('ldt_goods/goodsproperty/saveBatch', p),
+	updateBatch: p => http.post('ldt_goods/goodsproperty/updateBatch', p),
+	submitBatch: p => http.post('ldt_goods/goodsproperty/submitBatch', p),
+	remove:p => http.post("ldt_goods/goodsproperty/remove?ids="+p),
+}
+
+
+
+
 const goodsbills = {
 	list: p => http.get("ldt_bills/goodsbills/list", {
 		params: p
@@ -189,6 +202,11 @@ const shopTrade={
 	balanceQuery: p => http.get('shopTrade/balanceQuery', {params: p}),
 }
 
+const shopConfig={
+	list:p => http.get('ldt_goods/shopconfig/list', {params: p}),
+	submit: p => http.post('ldt_goods/shopconfig/submit', p),
+}
+
 
 
 
@@ -215,7 +233,9 @@ export const api={
 	yeepay,
 	goods,
 	goodsCategory,
+	goodsProperty,
 	goodsbills,
 	area,
-	shopTrade
+	shopTrade,
+	shopConfig
 }

+ 27 - 20
pages.json

@@ -342,7 +342,8 @@
 		"pages": [{
 				"path": "pages/menu/menu",
 				"style": {
-					"navigationBarTitleText": "菜单管理"
+					"navigationBarTitleText": "菜单管理",
+					"navigationStyle": "custom"
 				}
 			},
 			{
@@ -350,26 +351,32 @@
 				"style": {
 					"navigationBarTitleText": "商品属性"
 				}
+			}, {
+				"path": "pages/order/order",
+				"style": {
+					"navigationBarTitleText": "订单中心",
+					"enablePullDownRefresh": false,
+					"navigationStyle": "custom"
+				}
+
+			}, {
+				"path": "pages/config/config",
+				"style": {
+					"navigationBarTitleText": "店铺设置",
+					"enablePullDownRefresh": false,
+					"navigationStyle": "custom"
+				}
+
+			}, {
+				"path": "pages/my-shop/my-shop",
+				"style": {
+					"navigationBarTitleText": "我的店铺",
+					"enablePullDownRefresh": false,
+					"navigationStyle":"custom"
+				}
+
 			}
-		    ,{
-                    "path" : "pages/order/order",
-                    "style" :                                                                                    
-                {
-                    "navigationBarTitleText": "订单中心",
-                    "enablePullDownRefresh": false
-                }
-                
-                }
-                ,{
-                    "path" : "pages/config/config",
-                    "style" :                                                                                    
-                {
-                    "navigationBarTitleText": "店铺设置",
-                    "enablePullDownRefresh": false
-                }
-                
-                }
-            ]
+		]
 	}],
 	"preloadRule": {
 		"pages/index/index": {

+ 1 - 1
pages/checkstand/pay-qrcode.vue

@@ -61,7 +61,7 @@
 			let res=await this.$api.shop.detail({id:this.vuex_shopId})
 			this.shopDetail=res.data
 			let avatar=res.data.cover
-			this.avatar =(await  this.initAvatat(avatar)).tempFilePath;
+			// this.avatar =(await  this.initAvatat(avatar)).tempFilePath;
 			//获取用户ID
 			this.id = this.$global.QR_PATH+this.vuex_shopId
 			//生成动态密码

+ 1 - 1
pages/index/index.vue

@@ -162,7 +162,7 @@
 				systemList: [{
 						icon: '/static/index/shangcheng.png',
 						name: '线上商城',
-						path: ''
+						path: '/pagesGoods/pages/menu/menu'
 					}, {
 						icon: '/static/index/mendian.png',
 						name: '门店管理',

+ 14 - 18
pages/material-download/material-download.vue

@@ -1,15 +1,13 @@
 <template>
 	<view class="poster_page">
-		<mp-swiper name="image" :list="list" @click="showModal"></mp-swiper>
-		<modal-checked ref="modalChecked" @confirm="createPoster"></modal-checked>
+		<mp-swiper name="image" :list="list" @click="createPoster"></mp-swiper>
 	</view>
 </template>
 <script>
 	import mpSwiper from "./comps/mp-swiper.vue"
-	import modalChecked from "./comps/modal-checked.vue"
 	export default {
 		components: {
-			mpSwiper,modalChecked
+			mpSwiper
 		},
 		data() {
 			return {
@@ -30,30 +28,28 @@
 						image: 'https://guosen-bucket-ldt.obs.cn-south-1.myhuaweicloud.com:443/be1bf10664ed47998752a423abae5d7f-cQkZEj7ZXbZ1662466380785e447bc1b1c3155317a95.png'
 					}
 				],
-				templateIndex:1
+				templateIndex:1,
+				type:''
 			};
 		},
+		onLoad(options) {
+			this.type=options.type || ''
+		},
 		methods: {
-			showModal(index){
-				this.templateIndex=index + 1
-				this.$refs.modalChecked.showModal()
-			},
 			createPoster(index) {
-				if (index==0) {
-					//生成付款码
-					uni.navigateTo({
-						url:"createPoster?index="+this.templateIndex
-					})
-				}else if(index==1){
+				this.templateIndex=index + 1
+				if (this.$isNotEmpty(this.type)) {
 					//生成点餐码
 					uni.navigateTo({
 						url:"createOrderPoster?index="+this.templateIndex
 					})
+					return
 				}
-				
-				
+				//生成付款码
+				uni.navigateTo({
+					url:"createPoster?index="+this.templateIndex
+				})
 			},
-
 		}
 	};
 </script>

+ 160 - 86
pages/member/add1.vue

@@ -1,63 +1,77 @@
 <template>
 	<view>
-		<view class="margin-30">
-			<text class="build_title">构建您的私域流量</text>
+		<view class="text-base padding-30 text-lg">
+			构建您的私域流量 牢牢锁住您的客户
 		</view>
-		<view class="card">
-			<text class="title">会员门槛</text>
-			<text class="desc">完成一笔任意金额交易即成会员</text>
-		</view>
-		<view class="card margin-top-30">
-			<text class="title">积分使用范围</text>
-			<text class="desc">通用(可在任意场景使用)</text>
+		<view class="bg-white padding-30 flex justify-between">
+			<text class="bold">会员门槛</text>
+			<text class="desc center">完成一笔任意金额交易即成会员</text>
 		</view>
-		
-		<view class="card margin-top-30">
-			<view class="margin-bottom-20">
-				<text class="title">积分价值</text>
-				<text class="sub_title">(例:1 元= 10 积分)</text>
+		<view class="card">
+			<view class="title">
+				<text class="bold">积分设置</text>
+				<text class="desc center">积分为本平台通用,可在任意场景使用</text>
 			</view>
-			<view class="flex">
-				<view class="center" style="width: 25%;">
-					<text class="text-bold  text-base" style="font-size: 40rpx;">1</text>
-					<text style="margin: 0 20rpx;">元</text>
-					<text style="margin: 0 20rpx;">=</text>
-				</view>
-				<view class="center" style="width: 45%;margin-left: 20rpx;">
-					<u-input disabled type="digit" height="50" :border="true" :clearable="false" v-model="form.point" placeholder="请输入积分数"/>
-					<view class="cu-tag bg-color radius">
-						积分
-					</view>
-				</view>
+			<view class="padding-30 u-border-bottom">
+				<u-form :model="form" ref="uForm" label-width="180" label-align="right">
+					<u-form-item label="积分兑率" :border-bottom="false">
+						<view class="margin-left-20">
+							<u-slider :min="1" height="10" v-model="value"  active-color="#EF9944" :use-slot="true" >
+								<view class="">
+									<view class="" >
+										<view class="badge-button">
+											{{value}}
+										</view>
+									</view>
+								</view>
+							</u-slider>
+						</view>
+					</u-form-item>
+					<u-form-item label="消费1元赠送" :border-bottom="false">
+						<view class="center" style="justify-content: flex-start;margin-left: 20rpx;">
+							<u-input type="digit" style="width: 90%;" height="60" :border="true" :clearable="false"
+								v-model="form.consumeOnePoint" placeholder="请输入积分数" />
+							<view class="cu-tag bg-color radius" style="height: 60rpx;">
+								积分
+							</view>
+						</view>
+					</u-form-item>
+				</u-form>
 			</view>
-		</view>
-		
-		<view class="card margin-top-30">
-			<view class="margin-bottom-20">
-				<text class="title">积分规则</text>
+			<view class="title" style="margin-top: 20rpx;">
+				<text class="bold">积分价值</text>
+				<text class="desc">1积分={{value / 100}}元</text>
 			</view>
-			<view class="flex">
-				<view class="center" style="width: 25%;">
-					<text>消费1元赠送</text>
-				</view>
-				<view class="center" style="width: 45%;margin-left: 20rpx;">
-					<u-input disabled type="digit" height="50" :border="true" :clearable="false" v-model="form.consumeOnePoint" placeholder="请输入积分数"/>
-					<view class="cu-tag bg-color radius">
-						积分
-					</view>
-				</view>
+
+			<view class="desc" style="margin-top: 60rpx;" v-if="false">
+				提示:消费返利赠送积分比例建议不超过30%,如超过30%需要另外
+				进行申请,审批通过后即可。
+				<text class="text-base">申请更高返利</text>
+				<text class="cuIcon-right text-base"></text>
 			</view>
 		</view>
-		
-		<view class="center flex-direction" style="position: fixed;bottom: 10%;width: 100%;">
+
+		<view class="tips">
+			从公域聚合投放到私域流量的沉淀,智能化数字化的数据管理,联兑通帮助企业在裂变获客、私域留存、营销转化、客户管理各个环节提供帮助和辅助,形成一个完整的私域闭环,能有效的提高企业的私域运营效率,减少了客户的流失以及提升产品的转化和复购。
+		</view>
+
+		<view class="center flex-direction" style="margin: 70rpx 0;">
 			<view class="margin-bottom-30 text-sm">
 				<text>提交代表已同意</text>
 				<text style="color: #3099F1;">会员中心规则说明</text>
 			</view>
-			<view @click="submit" class="cu-btn bg-color round" style="width: 70%;height: 90rpx;font-size: 36rpx;">
+			<view @click="confirmShow=true" class="cu-btn bg-color round" style="width: 70%;height: 90rpx;font-size: 36rpx;">
 				提交
 			</view>
 		</view>
+		<u-modal :mask-close-able="true" v-model="confirmShow" @confirm="confirm" :confirm-text="isHigh?'重新设置':'确认'" confirm-color="#EF9944">
+			<view class="slot-content">
+				<text class="text-lg text-bold">消费1元赠送 {{form.consumeOnePoint}} 积分</text>
+				<text class="text-lg text-bold">积分折合 {{pointsValue}} 元</text>
+				<text v-if="isHigh" class="text-red margin-top-20 text-sm">*赠送积分价值高于系统风险阈值!</text>
+			</view>
+		</u-modal>
+		<u-select confirm-color="#EF9944" v-model="show" :list="list"></u-select>
 	</view>
 </template>
 
@@ -65,33 +79,72 @@
 	export default {
 		data() {
 			return {
+				type:'',
+				
+				isHigh:false,
+				value:1,
+				show:false,
+				confirmShow:false,
+				list: [{
+						value: '0.01',
+						label: '10%'
+					},
+					{
+						value: '0.02',
+						label: '20%'
+					},
+					{
+						value: '0.03',
+						label: '30%'
+					}
+				],
 				form:{
-					point:'1',
-					consumeOnePoint:'0.01'
+					consumeOnePoint:'5'
 				}
 			}
 		},
-		methods: {
-			submit(){
-				if (this.$isEmpty(this.form.point)) {
-					this.$u.toast('请输入积分数')
-					return
+		computed:{
+			pointsValue(){
+				let data=this.$digital.floatMul( this.form.consumeOnePoint,(this.value / 100))
+				if (data>0.3) {
+					this.isHigh=true
+				}else{
+					this.isHigh=false
 				}
+				return data
+			}
+		},
+		onLoad(options) {
+			this.type=options.type || ''
+			if (this.$isNotEmpty(this.type)) {
+				uni.setNavigationBarTitle({
+					title:'更改规则'
+				})
+			}
+		},
+		methods: {
+			confirm(){
 				if (this.$isEmpty(this.form.consumeOnePoint)) {
 					this.$u.toast('请输入积分规则')
 					return
 				}
+				this.confirmShow=false
+				if (!this.isHigh) {
+					this.submit()
+				}
+			},
+			
+			submit(){
 				let id=this.vuex_shopId
 				let params={
 					id,
 					sendPointUnit: this.form.consumeOnePoint,
-					pointRate: this.$digital.keepTwoDecimalFull(1/this.form.point),
+					pointRate: this.value / 100,
 					isOpenMember: 1
 				}
-				console.log(params);
 				this.$api.shop.submit(params).then(res=>{
 					if (res.success) {
-						this.$dialog.showModal('创建成功',false).then(res=>{
+						this.$dialog.showModal('操作成功',false).then(res=>{
 							uni.redirectTo({
 								url:"/pages/member/member"
 							})
@@ -104,45 +157,66 @@
 		}
 	}
 </script>
+<style>
+	page {
+		background-color: #f4f5f7;
+	}
+</style>
 
-<style lang="scss" scoped>
-	page{
-		background-color: #F4F5F7;
+<style lang="scss">
+	
+	.slot-content{
+		font-size: 28rpx;
+		padding: 40rpx 0;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-direction: column;
+		line-height: 50rpx;
 	}
 	
-	.bg-color{
+	.bold {
+		font-size: 34rpx;
+		color: #1C1C1C;
+		font-weight: 800;
+	}
+
+	.desc {
+		color: #8f8f8f;
+		font-size: 26rpx;
+		font-weight: 400;
+		line-height: 40rpx;
+	}
+
+	.bg-color {
 		background-color: #EE9230;
 		color: #FFFFFF;
 	}
-	
-	.build_title{
-		color: #EE9230;
-		font-size: 32rpx;
-	}
-	
-	.card{
-		border-radius: 24rpx;
+
+	.card {
+		padding: 40rpx 30rpx;
+		margin-top: 20rpx;
 		background-color: #FFFFFF;
-		padding:25rpx 40rpx;
-		display: flex;
-		flex-direction: column;
-		
-		.title{
-			font-weight: 800;
-			font-size: 32rpx;
-			margin-bottom: 20rpx;
-		}
-		
-		.sub_title{
-			font-size: 24rpx;
-			color: #999;
-			margin-left: 10rpx;
-		}
-		
-		
-		.desc{
-			font-size: 26rpx;
-			color: #666666;
+
+		.title {
+			display: flex;
+			justify-content: space-between;
 		}
 	}
+
+	.tips {
+		font-size: 24rpx;
+		padding: 30rpx;
+		line-height: 46rpx;
+		color: #b3b3b3;
+	}
+	
+	.badge-button {
+		padding: 14rpx 16rpx;
+		background-color: $base-color;
+		color: #fff;
+		border-radius: 10rpx;
+		font-size: 22rpx;
+		line-height: 1;
+	}
 </style>

+ 2 - 2
pages/member/member.vue

@@ -17,7 +17,7 @@
 			
 			<block v-else>
 				<view class="top-menu">
-					<view class="leftFixed"> 1 积分等于 {{detail.pointUnitValue}} 元</view>
+					<!-- <view class="leftFixed"> 1 积分等于 {{detail.pointUnitValue}} 元</view> -->
 					<view class="u-flex u-row-between">
 						<view class="item">
 							<text>{{detail.memberNum}}</text>
@@ -30,7 +30,7 @@
 						</view>
 					</view>
 					<view class="u-m-t-50 u-flex u-col-center u-row-center">
-						<text class="u-font-24 u-m-r-20">规则:消费 1 元赠送 {{detail.sendPointUnit}} 积分</text>
+						<text class="u-font-24 u-m-r-20">规则:消费 1 元赠送 {{detail.pointUnitValue}} 元</text>
 						<view class="cu-btn bg-white sm round" @click="changeRule" style="padding: 10rpx 20rpx;">
 							更改规则
 						</view>

+ 2 - 2
pages/shop-info/shop-info.vue

@@ -943,7 +943,7 @@
 					id
 				}
 				let res = await this.$api.shop.detail(params)
-				this.$util.objectCoppy(this.form, res.data)
+				this.$util.objectCopy(this.form, res.data)
 
 				if (this.$isNotEmpty(res.data.mallId) && res.data.mallId != -1) {
 					this.mallLabel = (await this.$api.mall.detail({
@@ -961,7 +961,7 @@
 					entityId: id
 				}
 				let res = await this.$api.audit.detail(params)
-				this.$util.objectCoppy(this.auditForm, res.data)
+				this.$util.objectCopy(this.auditForm, res.data)
 				if (this.isFail) {
 					//获取流程历史
 					this.getHistoryFlowList()

+ 2 - 2
pages/test/test.vue

@@ -262,7 +262,7 @@
 				}
 				//修改分类
 				this.categoryEdit = true
-				this.$util.objectCoppy(this.categoryForm, item)
+				this.$util.objectCopy(this.categoryForm, item)
 			},
 			async submitCategory() {
 				if (this.$isEmpty(this.categoryForm.name)) {
@@ -330,7 +330,7 @@
 				this.$refs.mpUploadImg.changeImgList(this.imgList)
 				
 				this.goodsEdit = true
-				this.$util.objectCoppy(this.goodsForm, item)
+				this.$util.objectCopy(this.goodsForm, item)
 			},
 			delGoodsImg(item) {
 				this.imgList = item[0]

+ 4 - 5
pagesGoods/assert/js/tarbar.js

@@ -10,7 +10,6 @@ export  const tabbar = {
 				iconPath: "/pagesGoods/static/tarbar/menu.png",
 				selectedIconPath: "/pagesGoods/static/tarbar/menu1.png",
 				text: '菜单管理',
-				isDot: true,
 				pagePath: "/pagesGoods/pages/menu/menu"
 			},
 			{
@@ -21,10 +20,10 @@ export  const tabbar = {
 				pagePath: "/pagesGoods/pages/order/order"
 			},
 			{
-				iconPath: "/pagesGoods/static/tarbar/setting.png",
-				selectedIconPath: "/pagesGoods/static/tarbar/setting1.png",
-				text: '店铺设置',
-				pagePath: "/pagesGoods/pages/order/order"
+				iconPath: "/pagesGoods/static/tarbar/my-shop.png",
+				selectedIconPath: "/pagesGoods/static/tarbar/my-shop1.png",
+				text: '我的店铺',
+				pagePath: "/pagesGoods/pages/my-shop/my-shop"
 			},
 		]
 }

+ 130 - 26
pagesGoods/pages/config/config.vue

@@ -1,45 +1,149 @@
 <template>
 	<view>
-		
-		<u-tabbar
-		 @change="tabChange"
-		 v-model="tabbarCurr"
-		 :icon-size="tabbar.iconSize" 
-		 :active-color="tabbar.activeColor" 
-		 :mid-button-size="tabbar.MinButtonSize" 
-		 :list="tabbar.list" :mid-button="true">
-		 </u-tabbar>
+		<view class="">
+			<u-navbar :is-back="true" title="店铺设置"></u-navbar>
+			<view class="content">
+				<view class="margin-left-10">
+					<u-form :model="form" ref="uForm" label-width="150" :label-style="{'color': '#010101','fontSize': '30rpx'}">
+						<u-form-item label="营业状态" >
+							<view class="center" style="justify-content: flex-start;">
+								<u-switch active-color="#19be6b" v-model="form.shopStatus" active-value="1" inactive-value="0"></u-switch>
+							</view>
+						</u-form-item>
+					</u-form>
+				</view>
+				<view class="margin-left-10">
+					<u-form :model="form" ref="uForm" label-width="140" :label-style="{'color': '#010101','fontSize': '30rpx'}">
+						<u-form-item label="包装费" >
+							<u-input v-model="form.packingPrice" placeholder="请输入包装费" />
+							<text slot="right">元</text>
+						</u-form-item>
+					</u-form>
+				</view>
+				<view class="margin-top-30">
+					<text class="title margin-left-10">营业时间</text>
+					<view class="solid-bottom flex" style="padding:30rpx 0">
+						<u-input input-align="center" placeholder-style="color: #d8d8d8;" disabled
+							@click="timeShow=true;timeType=1" v-model="form.businessStartTime" placeholder="开始时间" />
+						<view class="center" style="padding: 0 50rpx;">至</view>
+						<u-input input-align="center" placeholder-style="color: #d8d8d8;" disabled
+							@click="timeShow=true;timeType=2" v-model="form.businessEndTime" placeholder="结束时间" />
+					</view>
+				</view>
+
+				<view class="margin-top-30">
+					<text class="title margin-left-10">店铺公告</text>
+					<view class="" style="padding:30rpx 0;">
+						<u-input :custom-style="{'lineHeight':'40rpx'}" maxlength="150" :clearable="false"
+							input-align="left" :border="true" border-color="#f4f4f4" placeholder-style="color: #d8d8d8;"
+							height="250" type="textarea" placeholder="请输入活动详情" v-model="form.shopNotice" />
+						<view class="text-right text-sm text-gray padding-right-20" style="margin-top: -40rpx;">
+							<text>{{form.shopNotice.length}}/150</text>
+						</view>
+					</view>
+				</view>
+			</view>
+
+			<view class="center flex-direction" style="margin: 60rpx;">
+				<view @click="submit" class="cu-btn flex  text-lg btn-bg-color radius"
+					style="padding: 42rpx 0;width: 100%;">
+					确认修改
+				</view>
+			</view>
+
+			<toast ref="toast"></toast>
+			<u-picker confirm-color="#EF9944" v-model="timeShow" mode="time" @confirm="timeConfirm" :params="params">
+			</u-picker>
+		</view>
+
 	</view>
 </template>
-
 <script>
-	import {
-		tabbar
-	} from "../../assert/js/tarbar.js"
 	export default {
 		data() {
 			return {
-				//tabbar
-				tabbarCurr: 2,
-				tabbar: tabbar,
+				//发布时间
+				timeShow: false,
+				timeType: 0,
+				params: {
+					year: false,
+					month: false,
+					day: false,
+					hour: true,
+					minute: true,
+					second: false
+				},
+				//表单
+				form: {
+					id:'',
+					shopId: "",
+					sendingPrice: "",
+					packingPrice: "",
+					sendingNeedLeastPrice: "",
+					businessStartTime: "",
+					businessEndTime: "",
+					shopStatus: true,
+					shopNotice: "",
+				}
 			}
 		},
+		onLoad() {
+			this.fetchDetail()
+		},
 		methods: {
-			tabChange(index){
-				if (index==0) {
-					uni.redirectTo({
-						url: "/pagesGoods/pages/menu/menu"
-					})
-				}else if (index==1) {
-					uni.redirectTo({
-						url:"/pagesGoods/pages/order/order"
-					})
+			fetchDetail(){
+				let params={
+					shopId:this.vuex_shopId
 				}
+				this.$api.shopConfig.list(params).then(res=>{
+					if (this.$isNotEmpty(res.data.records)) {
+						this.$util.objectCopy(this.form,res.data.records[0])
+					}
+				})
 			},
+			timeConfirm(e) {
+				let date = e.hour + ':' + e.minute+ ':00'
+				if (this.timeType == 1) {
+					this.form.businessStartTime = date
+				} else {
+					this.form.businessEndTime = date
+				}
+			},
+			submit(){
+				let params=this.$u.deepClone(this.form)
+				params.shopId=this.vuex_shopId
+				this.$isNotEmpty(this.form.packingPrice) ? params.packingPrice = params.packingPrice * 100 : ''
+				this.$isNotEmpty(this.form.sendingPrice) ? params.sendingPrice = params.sendingPrice * 100 : ''
+				this.$isNotEmpty(this.form.sendingNeedLeastPrice) ? params.sendingNeedLeastPrice = params.sendingNeedLeastPrice * 100 : ''
+				this.$api.shopConfig.submit(params).then(res=>{
+					if (res.success) {
+						this.$u.toast('操作成功')
+						this.fetchDetail()
+					}
+				})
+			}
 		}
 	}
 </script>
 
-<style>
+<style lang="scss">
+	.content {
+		background-color: #FFFFFF;
+		border-radius: 20rpx;
+		padding: 20rpx 30rpx;
 
+		.title {
+			color: #010101;
+			font-size: 30rpx;
+		}
+	}
+
+	.badge-button {
+		padding: 14rpx 16rpx;
+		background-color: $base-color;
+		color: #fff;
+		border-radius: 10rpx;
+		font-size: 22rpx;
+		line-height: 1;
+	}
 </style>

+ 14 - 5
pagesGoods/pages/menu/menu.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="u-wrap ">
+		<u-navbar :is-back="false" title="菜单管理"></u-navbar>
 		<view class="flex bg-white" style="padding: 30rpx 10rpx;">
 			<view class="" style="width: 20%;">
 				<u-button @click="operateCategory(null)" size="mini" type="warning" plain
@@ -178,7 +179,7 @@
 		<toast ref="toast"></toast>
 
 		<u-tabbar @change="tabChange" v-model="tabbarCurr" :icon-size="tabbar.iconSize"
-			:active-color="tabbar.activeColor" :mid-button="true" :mid-button-size="tabbar.MinButtonSize" :list="tabbar.list">
+			:active-color="tabbar.activeColor" :mid-button-size="tabbar.MinButtonSize" :list="tabbar.list">
 		</u-tabbar>
 	</view>
 </template>
@@ -265,7 +266,7 @@
 					})
 				}else if (index==2) {
 					uni.redirectTo({
-						url:"/pagesGoods/pages/config/config"
+						url:"/pagesGoods/pages/my-shop/my-shop"
 					})
 				}
 			},
@@ -277,7 +278,6 @@
 					this.goodsList = res.data
 				})
 			},
-
 			//分类 begin
 			operateCategory(item) {
 				this.operateCategoryItem = item
@@ -290,7 +290,7 @@
 				}
 				//修改分类
 				this.categoryEdit = true
-				this.$util.objectCoppy(this.categoryForm, item)
+				this.$util.objectCopy(this.categoryForm, item)
 			},
 			async submitCategory() {
 				if (this.$isEmpty(this.categoryForm.name)) {
@@ -319,6 +319,7 @@
 					this.$api.goodsCategory.remove(this.operateCategoryItem.id).then(res => {
 						if (res.success) {
 							this.$u.toast('删除成功')
+							this.reloadGoods()
 							this.current = 0
 							this.categoryShow = false
 							this.getGoodsList()
@@ -339,6 +340,12 @@
 			//分类 end
 
 			//商品begin
+			reloadGoods(){
+				let params={
+					shopId:this.vuex_shopId
+				}
+				this.$api.goods.reload(params)
+			},
 			uploadGoodsImg(e) {
 				this.goodsForm.image = e[0]
 			},
@@ -358,7 +365,7 @@
 				this.$refs.mpUploadImg.changeImgList(this.imgList)
 
 				this.goodsEdit = true
-				this.$util.objectCoppy(this.goodsForm, item)
+				this.$util.objectCopy(this.goodsForm, item)
 			},
 			delGoodsImg(item) {
 				this.imgList = item[0]
@@ -410,6 +417,7 @@
 					this.$api.goods.remove(this.operateGoodsItem.id).then(res => {
 						if (res.success) {
 							this.$u.toast('删除成功')
+							this.reloadGoods()
 							this.goodsShow = false
 							this.getGoodsList()
 						}
@@ -430,6 +438,7 @@
 			},
 
 			//商品属性end
+			
 
 
 

+ 128 - 44
pagesGoods/pages/menu/sku.vue

@@ -7,22 +7,26 @@
 						<u-input v-model="form.goodsName" />
 					</u-form-item>
 					<u-form-item label="商品属性">
-						<u-input v-model="form.category" :select-open="goodsPropertyShow" type="select" @click="goodsPropertyShow=true"/>
+						<u-input v-model="form.category" :select-open="goodsPropertyShow" type="select"
+							@click="goodsPropertyShow=true" />
 					</u-form-item>
+					<view v-if="isSize" class="text-left text-sm text-red">
+						* 当商品属性为大小时,可选项需要重置商品的价格
+					</view>
 				</u-form>
-				<view @click="addInput" class="text-right text-blue " style="padding: 30rpx 10rpx;">
+				<view  class="text-right text-blue " style="padding: 40rpx 10rpx">
 					<text class="cuIcon-roundadd u-m-r-4"></text>
-					<text>添加可选项</text>
+					<text @click="addInput">添加可选项</text>
 				</view>
-				
-				<view style="position: relative;" class="u-border flex padding-20"
-					v-for="(item,index) in inputList" :key="index">
+
+				<view style="position: relative;" class="u-border flex padding-20" v-for="(item,index) in inputList"
+					:key="index">
 					<view class="" style="width: 100%;">
 						<u-form :model="form" ref="uForm" label-width="140">
 							<u-form-item label="可选项">
 								<u-input v-model="item.propertyOption" />
 							</u-form-item>
-							<u-form-item  v-if="form.category == '大小'" :border-bottom="false" label="重置价格">
+							<u-form-item v-if="isSize" :border-bottom="false" label="重置价格">
 								<view class="flex">
 									<u-input v-model="item.rebasePrice" />
 									<text>元</text>
@@ -36,7 +40,7 @@
 							</u-form-item>
 						</u-form>
 					</view>
-				
+
 					<view class="center" style="width: 30%;" @click="activeIndex = index">
 						<view class=" margin-left-20 text-base" v-if="activeIndex == index">
 							<text class="cuIcon-roundcheckfill " style="font-size: 40rpx;"></text>
@@ -49,8 +53,8 @@
 						class="text-lg cuIcon-delete text-red"></text>
 				</view>
 			</view>
-			
-			
+
+
 		</view>
 		<view class="center" style="margin-top: 40rpx;">
 			<view @click="submit" class="cu-btn  flex  text-lg btn-bg-color radius"
@@ -58,9 +62,9 @@
 				确认
 			</view>
 		</view>
-		
+
 		<u-select @confirm="propertyConfirm" v-model="goodsPropertyShow" :list="goodsPropertyList"></u-select>
-		<toast ref="toast" ></toast>
+		<toast ref="toast"></toast>
 	</view>
 </template>
 <script>
@@ -68,61 +72,141 @@
 		name: '',
 		data() {
 			return {
-				goodsPropertyShow:false,
-				goodsPropertyList:[],
-				form:{
-					shopId:'',
-					goodsName:'',
-					goodsId:'',
-					category:'',
-					propertyOption:'',
-					
-					isDefault:false,
-					rebasePrice:'',
-					extraPrice:''
+				goodsPropertyShow: false,
+				goodsPropertyList: [],
+				form: {
+					shopId: '',
+					goodsName: '',
+					goodsId: '',
+					category: '',
+					propertyOption: '',
+
+					isDefault: false,
+					rebasePrice: '',
+					extraPrice: ''
 				},
-				
+
 				activeIndex: 0,
 				inputList: [{
 					propertyOption: '',
 					extraPrice: '',
-					rebasePrice:'',
-				}]
+					rebasePrice: '',
+				}],
+				isEdit:false
 			};
 		},
+		computed:{
+			isSize(){
+				if (this.form.category == '大小') {
+					return true
+				}
+				return false
+			}
+		},
 		onLoad(options) {
-			this.goodsPropertyList=this.$global.goodsPropertyList
-			this.form.goodsName=options.goodsName
-			this.form.goodsId=options.goodsId
-			this.form.shopId=this.vuex_shopId
+			this.goodsPropertyList = this.$global.goodsPropertyList
+			this.form.goodsName = options.goodsName
+			this.form.goodsId = options.goodsId
+			this.form.shopId = this.vuex_shopId
+			this.fecthList()
 		},
 		methods: {
-			propertyConfirm(e){
-				this.form.category=e[0].value
+			async fecthList() {
+				let params = {
+					goodsId: this.form.goodsId
+				}
+				let res=await this.$api.goodsProperty.list(params)
+				if (this.$isEmpty(res.data.records)) {
+					return
+				}
+				this.isEdit=true
+				this.inputList = res.data.records
+				this.form.category = this.inputList[0].category
+				this.inputList.forEach(item => {
+					if (this.$isNotEmpty(item.extraPrice)) {
+						item.extraPrice=item.extraPrice  / 100
+					}
+				
+					if (this.$isNotEmpty(item.rebasePrice)) {
+						item.rebasePrice=item.rebasePrice  / 100
+					}
+				})
+			},
+			propertyConfirm(e) {
+				this.form.category = e[0].value
 			},
-			
 			delInput(index) {
-				this.inputList.splice(index, 1)
+				let id=this.inputList[index].id
+				if (this.$isEmpty(id)) {
+					//未插进数据库的删除
+					this.inputList.splice(index, 1)
+					return
+				}
+				//已插进数据库中,删除数据库中的数据
+				this.$dialog.showModal('确定删除').then(()=>{
+					this.$api.goodsProperty.remove(id).then(res=>{
+						if (res.success) {
+							this.$u.toast('操作成功')
+							this.reloadGoods()
+							this.inputList.splice(index, 1)
+							this.fecthList()
+						}
+					})
+				})
 			},
 			addInput() {
 				let obj = {
+					rebasePrice:'',
 					propertyOption: '',
 					extraPrice: ''
 				}
 				this.inputList.push(obj)
 			},
-			submit() {
-				let formList=[]
-				this.inputList.forEach((item,index)=>{
-					let obj=this.$u.deepClone(this.form)
-					obj.propertyOption=item.propertyOption
-					this.$isNotEmpty(item.extraPrice)?obj.extraPrice=item.extraPrice:''
-					this.$isNotEmpty(item.rebasePrice)?obj.rebasePrice=item.rebasePrice:''
-					obj.isDefault=this.activeIndex==index
+			submit(){
+				if (!this.checkData()) {
+					return
+				}
+				let formList = []
+				this.inputList.forEach((item, index) => {
+					let obj = this.$u.deepClone(this.form)
+					obj.propertyOption = item.propertyOption
+					this.$isNotEmpty(item.id) ? obj.id = item.id: ''
+					this.$isNotEmpty(item.extraPrice) ? obj.extraPrice = item.extraPrice * 100 : ''
+					this.$isNotEmpty(item.rebasePrice) ? obj.rebasePrice = item.rebasePrice * 100 : ''
+					obj.isDefault = this.activeIndex == index
 					formList.push(obj)
 				})
-				console.log(formList);
+				this.$api.goodsProperty.submitBatch(formList).then(res=>{
+					if (res.success) {
+						this.$u.toast('操作成功')
+						this.reloadGoods()
+						this.fecthList()
+					}
+				})
+			},
+			checkData(){
+				if (this.$isEmpty(this.form.category)) {
+					this.$u.toast('请输入商品属性')
+					return false
+				}
+				let noPropertyOption= this.inputList.filter(item=>this.$isEmpty(item.propertyOption))
+				if (this.$isNotEmpty(noPropertyOption)) {
+					this.$u.toast('请输入可选项')
+					return false
+				}
+				let flag=this.inputList.filter(item=>this.$isEmpty(item.rebasePrice))
+				if (this.isSize && this.$isNotEmpty(flag)) {
+					this.$u.toast('请重置商品价格')
+					return false
+				}
+				return true
 			},
+			reloadGoods(){
+				let params={
+					shopId:this.vuex_shopId
+				}
+				this.$api.goods.reload(params)
+			}
 		}
 	};
 </script>

+ 91 - 0
pagesGoods/pages/my-shop/my-shop.vue

@@ -0,0 +1,91 @@
+<template>
+	<view>
+		<view class="">
+			<u-navbar :is-back="false" title="我的店铺"></u-navbar>
+			
+			<view class="" v-for="(item,index) in menuList" :key="index" @click="jump(item.path)">
+				<button  class="card u-reset-button" :open-type="item.name=='在线咨询'?'contact':''">
+					<view style="display: flex;">
+						<view class="center">
+							<u-icon size="30" :name="item.icon"></u-icon>
+						</view>
+						<view class="center flex-direction" style="align-items: flex-start;">
+							<text class="padding-left-10">{{item.name}}</text>
+							<text class="padding-left-10 text-base" style="font-size: 22rpx;" v-if="item.desc">{{item.desc}}</text>
+						</view>
+					</view>
+					<view class="center">
+						<text class="cuIcon-right"></text>
+					</view>
+				</button>
+			</view>
+		</view>
+		
+		<u-tabbar @change="tabChange" v-model="tabbarCurr" :icon-size="tabbar.iconSize"
+			:active-color="tabbar.activeColor" :mid-button-size="tabbar.MinButtonSize" :list="tabbar.list">
+		</u-tabbar>
+	</view>
+</template>
+
+<script>
+	import {tabbar} from "../../assert/js/tarbar.js"
+	export default {
+		data() {
+			return {
+				//tabbar
+				tabbarCurr: 2,
+				tabbar: tabbar,
+				
+				menuList: [{
+						icon: 'setting',
+						name: '店铺设置',
+						path: '/pagesGoods/pages/config/config'
+					},
+					{
+						icon: 'download',
+						name: '点餐码下载',
+						path: '/pages/material-download/material-download?type=order'
+					},
+					{
+						icon: 'kefu-ermai',
+						name: '在线咨询',
+						path: ''
+					},
+					{
+						icon: 'home',
+						name: '回到首页',
+						path: '/pages/index/index'
+					},
+				],
+			}
+		},
+		methods: {
+			tabChange(index) {
+				if (index == 0) {
+					uni.redirectTo({
+						url: "/pagesGoods/pages/menu/menu"
+					})
+				} else if (index == 1) {
+					uni.redirectTo({
+						url: "/pagesGoods/pages/order/order"
+					})
+				}
+			},
+			jump(url) {
+				uni.navigateTo({
+					url
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.card {
+		display: flex;
+		justify-content: space-between;
+		margin: 16rpx 0;
+		padding: 25rpx 30rpx;
+		background-color: #FFFFFF;
+	}
+</style>

+ 71 - 0
pagesGoods/pages/order/comps/card.vue

@@ -0,0 +1,71 @@
+<template>
+	<view>
+		<view @click="$jump('/pages/order/detail?id='+item.id)" class="card" v-for="(item,index) in list" :key="index">
+			<view class="center">
+				<image
+					src="https://guosen-bucket-ldt.obs.cn-south-1.myhuaweicloud.com:443/b15e8992179b4b30b9bdb943d8ad9c07-uWGk0l5GutNQ3013850822b2cdb5f77a445ce68ab57e.jpeg"
+					mode="aspectFill"></image>
+			</view>
+			<view class="content">
+				<view class="flex justify-between">
+					<text class="text-bold text-lg">杨国福麻辣烫</text>
+					<view class="">
+						<text v-if="item.payStatus=='付款成功'" class="text-base">{{item.orderStatus}}</text>
+						<text v-else class="text-base">{{item.payStatus}}</text>
+					</view>
+				</view>
+				
+				<view style="font-size: 26rpx;color: #888888;">
+					<view class="margin-bottom-10">
+						<text>{{item.id}}</text>
+						<text @click.stop="$util.copy(item.id)" class="margin-left-10 text-black">复制</text>
+					</view>
+					<view class="flex justify-between ">
+						<text class="center">{{item.createTime}}</text>
+						<text class="">消费:{{item.totalPrice / 100}}元</text>
+					</view>
+				</view>
+
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:{
+			list:Array
+		},
+		data() {
+			return {
+
+			}
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss">
+	.card {
+		margin: 10rpx;
+		background-color: #FFFFFF;
+		display: flex;
+		padding: 18rpx;
+
+		image {
+			width: 150rpx;
+			height: 150rpx;
+			border-radius: 8rpx;
+		}
+
+		.content {
+			width: calc(100% - 140rpx - 20rpx - 20rpx);
+			margin-left: 20rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-between;
+		}
+	}
+</style>

+ 101 - 0
pagesGoods/pages/order/comps/item.vue

@@ -0,0 +1,101 @@
+<template>
+	<view style="margin-top: 4rpx;">
+		<MeScroll  :up="up" :down="down" @up="upFn" :fixed="false" @down="downFn" @init="initMeScroll">
+			<card :list="list" ></card>
+		</MeScroll>
+	</view>
+	
+</template>
+<script>
+	import MeScroll from '@/components/mescroll-body/mescroll-uni.vue'
+	import card from './card.vue'
+	export default {
+		components:{
+			MeScroll,card
+		},
+		props: {
+			type: Number,
+			i: Number,
+			item:Object
+		},
+		data() {
+			return {
+				isInit: false, // 是否初始化
+				list: [], // 列表数据
+				mescroll: null, // mescroll 对象
+				// 上拉配置参数
+				up: {
+					noMoreSize: 5, 
+					auto: false,
+					page: {
+						page: 0,
+						size: 10
+					}
+				},
+				// 下拉配置参数
+				down: {
+					use: false, 
+					auto: false
+				}
+			}
+		},
+		created() {
+			
+		},
+		watch:{
+			type(val) {
+				if(!this.isInit && val === this.i) {
+					this.mescroll.resetUpScroll()
+				}
+			}
+		},
+		mounted() {
+			if(!this.isInit && this.i === 0) {
+				this.mescroll.resetUpScroll()
+			}
+		},
+		methods: {
+			//初始化组件
+			initMeScroll(mescroll) {
+				this.mescroll = mescroll
+			},
+			//上拉回调
+			upFn(mescroll) {
+				let params={
+					receiveId:this.vuex_shopId,
+					current:mescroll.num,
+					size:mescroll.size
+				}
+				if (this.item.value==0) {
+					params.createTime=this.$dateTime.format()
+				}
+				try{
+					this.$api.goodsbills.list(params).then(res=>{
+						let data=res.data.records
+						let length=data.length
+						let total=res.data.total
+						mescroll.endBySize(length, total);
+						if(mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
+						this.list=this.list.concat(data); //追加新数据
+					})
+				}catch(e){
+					console.log(e);
+					mescroll.endErr();
+				}
+			},
+			//下拉回调
+			downFn(mescroll) {
+				setTimeout(()=>{
+					this.u.toast('刷新成功')
+					this.mescroll.resetUpScroll()
+				},1500)
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	view{
+		box-sizing: border-box;
+	}
+</style>

+ 237 - 0
pagesGoods/pages/order/detail.vue

@@ -0,0 +1,237 @@
+<template>
+	<view class="page safe-area-inset-bottom">
+
+		<view class="card section" style="flex-direction: column;">
+			<view class="center text-bold margin-50" style="font-size: 66rpx;">
+				<text>{{order.verifyNum}}</text>
+			</view>
+			<view class="cu-steps steps-arrow margin-bottom-50">
+				<view class="cu-item" :class="index>stepIndex?'text-default':'text-base'" v-for="(item,index) in stepList" :key="index">
+					<text style="font-size: 70rpx;margin-bottom: 20rpx;margin-right: 10rpx;" :class="'cuIcon-' + item.icon"></text>
+					<text >{{item.name}}</text>
+				</view>
+			</view>
+			<view class="center padding-30" style="color: #999;">
+				<text>备注:{{order.extraInfo}}</text>
+			</view>
+		</view>
+		<view class="section"></view>
+		
+		<view class="padding-10 bg-white">
+			<u-read-more ref="uReadMore" close-text="展开更多" show-height="300" color="#999">
+				<view v-for="(item,index) in cart" :key="index" class="cart">
+					<view class="flex" style="width: 70%;">
+						<image :src="item.image" mode=""></image>
+						<view class="item-content " >
+							<text class="text-cut-1">{{item.name}}</text>
+							<text class="text-cut-1">{{item.propertyStr ? item.propertyStr : item.name}}</text>
+						</view>
+					</view>
+					<view class="item-data">
+						<view class="">
+							<text class="text-sm">x</text>
+							<text class="text-lg" style="margin-left: 6rpx;">{{item.number}}</text>
+						</view>
+						<text class=" text-lg">{{item.realPrice / 100}}</text>
+					</view>
+				</view>
+			</u-read-more>
+		</view>
+		
+		<!-- 订单金额 -->
+		<view class="">
+			<view class="card text-df" v-if="$isNotEmpty(order.packingPrice)&&order.packingPrice != -1">
+				<text class="text-gray">包装费</text>
+				<text class="text-price">{{order.packingPrice / 100}}</text>
+			</view>
+			<view class="card text-df" v-if="$isNotEmpty(order.sendingPrice)&&order.sendingPrice != -1">
+				<text class="text-gray">配送费</text>
+				<text class="text-price">{{order.sendingPrice / 100}}</text>
+			</view>
+			<view class="card text-df ">
+				<text class="text-gray">金额总计</text>
+				<view class="">
+					<text class="text-price">{{order.totalPrice / 100}}</text>
+				</view>
+			</view>
+		</view>
+		
+		<view class="section"></view>
+		
+		<view class="">
+			<view class="card text-df" >
+				<text class="text-gray">取单号</text>
+				<text class="">{{order.verifyNum}}</text>
+			</view>
+			<view class="card text-df" v-if="$isNotEmpty(order.seatNum) && order.seatNum !=-1">
+				<text class="text-gray">座位号</text>
+				<text class="">{{order.seatNum}}</text>
+			</view>
+			<view class="card text-df" >
+				<text class="text-gray">下单时间</text>
+				<text class="">{{order.createTime}}</text>
+			</view>
+			<view class="card text-df" >
+				<text class="text-gray">下单门店</text>
+				<text class="">{{shop.name}}</text>
+			</view>
+			<view class="card text-df" >
+				<text class="text-gray">付款状态</text>
+				<text class="">{{order.payStatus}}</text>
+			</view>
+			<view class="card text-df" >
+				<text class="text-gray">订单状态</text>
+				<text class="">{{order.orderStatus}}</text>
+			</view>
+			<view class="card text-df" >
+				<text class="text-gray">订单号</text>
+				<text class="">{{order.id}}</text>
+			</view>
+		</view>
+		
+		<view class="">
+			<view class="card text-df" >
+				<text class="text-gray">下单手机号</text>
+				<text class="">{{order.userPhone}}</text>
+			</view>
+			<view class="card text-df" >
+				<text class="text-gray">取餐方式</text>
+				<text class="">{{order.takeType}}</text>
+			</view>
+			<view class="card text-df">
+				<text class="text-gray">取餐时间</text>
+				<text class="">{{order.takeTime || '立即就餐'}}</text>
+			</view>
+		
+		</view>
+		
+		
+		
+	</view>
+</template>
+
+<script>
+export default {
+	name: '',
+	data() {
+		return {
+			id:'',
+			order:{},
+			shop:{},
+			cart:[],
+			//订单流程
+			stepList:[{
+				name:'待付款',
+				icon:'rechargefill'
+			},
+			{
+				name:'已付款',
+				icon:'roundcheckfill'
+			},
+			{
+				name:'制作中',
+				icon:'timefill'
+			},
+			{
+				name:'已完成',
+				icon:'goodsfill'
+			}],
+		};
+	},
+	onLoad(options) {
+		this.id=options.id
+		this.fetchDetail()
+	},
+	computed:{
+		stepIndex:{
+			get(){
+				if (this.order.orderStatus == '待付款') {
+					return 0
+				}else{
+					return 2
+				}
+			}
+		}
+	},
+	methods:{
+		fetchDetail(){
+			let params={
+				id:this.id
+			}
+			this.$api.goodsbills.detail(params).then(res=>{
+				this.order=res.data || {}
+				this.shop=this.order.shop || {}
+				this.cart=JSON.parse(this.order.goodsPreview)
+			})
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+	.page{
+		margin: 20rpx;
+	}
+	
+	.text-default{
+		color: #ffbf91;
+	}
+	
+	.btn-icon{
+		background-color: rgba(255, 148, 71,.3);
+		color: #FF9447;
+	}
+	
+	
+	.card {
+		padding: 30rpx;
+		background-color: #FFFFFF;
+		border-bottom: 1rpx solid #f1f1f1;
+		display: flex;
+		justify-content: space-between;
+	}
+	
+	.cart {
+		border-bottom: 1rpx solid #f1f1f1;
+		display: flex;
+		background-color: #FFFFFF;
+		padding: 15rpx 0;
+	
+		image {
+			width: 100rpx;
+			height: 100rpx;
+			border-radius: 8rpx;
+		}
+	
+		.item-content {
+			width: calc(100% - 100rpx);
+			margin-left: -40rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-between;
+	
+			text:first-child {
+				font-size: 30rpx;
+			}
+	
+			text:last-child {
+				font-size: 24rpx;
+				color: #999;
+				font-weight: 400;
+			}
+		}
+	
+		.item-data {
+			display: flex;
+			align-items: center;
+			width: 30%;
+			justify-content: space-between;
+			margin-right: 20rpx;
+	
+		}
+	}
+	
+	.cart:last-child {
+		border: none;
+	}
+</style>

+ 81 - 7
pagesGoods/pages/order/order.vue

@@ -1,41 +1,115 @@
 <template>
-	<view>
+	<view class="container">
+		<view class="tabs">
+			<u-navbar :is-back="false" title="订单中心"></u-navbar>
+			<scroll-view scroll-x class="bg-white nav">
+				<view class="flex text-center">
+					<view class="cu-item flex-sub" :class="index==current?'text-base cur text-xl text-bold ':'text-lg'"
+						v-for="(item,index) in tabs" :key="index" @tap="tabChange(index)">
+						{{item.name}}
+					</view>
+				</view>
+			</scroll-view>
+		</view>
+		<view style="height: 100%;">
+			<swiper style="height: 100%;" :current="current" @change="swiperChange" @animationfinish="animationfinish">
+				<swiper-item v-for="(item,index) in tabs" :key="index">
+					<scroll-view scroll-y style="height: 100%;">
+						<item :i="index" :item="item" :type="current"></item>
+					</scroll-view>
+				</swiper-item>
+			</swiper>
+		</view>
 
-		<u-tabbar @change="tabChange" v-model="tabbarCurr" :icon-size="tabbar.iconSize"
+		<u-tabbar @change="tabbarChange" v-model="tabbarCurr" :icon-size="tabbar.iconSize"
 			:active-color="tabbar.activeColor" :mid-button-size="tabbar.MinButtonSize" :list="tabbar.list"
 			:mid-button="true">
 		</u-tabbar>
 	</view>
 </template>
-
 <script>
+	import item from "./comps/item.vue"
 	import {
 		tabbar
 	} from "../../assert/js/tarbar.js"
 	export default {
+		components: {
+			item
+		},
 		data() {
 			return {
 				//tabbar
-				tabbarCurr: 1,
+				tabbarCurr: 2,
 				tabbar: tabbar,
+
+				current: 0,
+				swiperCurrent: 0,
+				tabs: [{
+						name: '今日订单',
+						value: 0
+					},
+					{
+						name: '全部订单',
+						value: 1
+					}
+				],
 			}
+		},
+		onLoad() {
+
 		},
 		methods: {
-			tabChange(index) {
+			tabbarChange(index) {
 				if (index == 0) {
 					uni.redirectTo({
 						url: "/pagesGoods/pages/menu/menu"
 					})
 				} else if (index == 2) {
 					uni.redirectTo({
-						url: "/pagesGoods/pages/config/config"
+						url: "/pagesGoods/pages/my-shop/my-shop"
 					})
 				}
 			},
+			tabChange(index) {
+				this.current = index
+			},
+			swiperChange(e) {
+				uni.pageScrollTo({
+					scrollTop: 0,
+					duration: 0
+				});
+				this.current = e.detail.current
+			},
+			animationfinish({
+				detail: {
+					current
+				}
+			}) {
+				this.swiperCurrent = current;
+				this.current = current;
+			},
 		}
 	}
 </script>
 
-<style>
+<style lang="scss" scoped>
+	.text-xl {
+		font-size: 34rpx;
+	}
 
+	.container {
+		height: calc(100vh);
+		background-color: #F6F6F6;
+		padding: 78rpx 0rpx 0rpx;
+
+		.tabs {
+			position: fixed;
+			top: -10rpx;
+			left: 0;
+			width: 100%;
+			background-color: #FFFFFF;
+			box-sizing: border-box;
+			z-index: 3;
+		}
+	}
 </style>

BIN
pagesGoods/static/tarbar/my-shop.png


BIN
pagesGoods/static/tarbar/my-shop1.png


+ 1 - 1
utils/util.js

@@ -115,7 +115,7 @@ util.uniqueArray = (arr) => {
 /**
  * 对象键复制
  */
-util.objectCoppy = (target, source) => {
+util.objectCopy = (target, source) => {
 	Object.keys(target).forEach(key => {
 		target[key] = source[key]
 	})