liujd před 6 roky
rodič
revize
ce1e2a410d

+ 3 - 0
mobile-code/src/App.vue

@@ -14,6 +14,9 @@ export default {
 		// #ifdef MP-WEIXIN
 		// wxLoginFn()
 		// #endif
+		// 开发
+		uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IjFfMTI1MzY2MzAifQ.eyJpc3MiOiJodHRwOlwvXC9tLmhoYi5jb20iLCJhdWQiOiJodHRwOlwvXC9tLmhoYi5jb20iLCJqdGkiOiIxXzEyNTM2NjMwIiwiaWF0IjoxNTc0NDIzMDc4LCJuYmYiOjE1NzQ0MjMwNzgsImV4cCI6MTU3NDQyNjY3OCwidXNlcklkIjoxMjUzNjYzMH0.v_T9NuFRpzuI7GtwuuuNlVg6EylImaCUwqo2A6NRTE4')
+		uni.setStorageSync('account', '12358')
 	},
 	onShow() {
 		// this.isLogin()

+ 52 - 0
mobile-code/src/api/category/index.js

@@ -0,0 +1,52 @@
+import https from '@/plugins/luch-request_0.0.7/request'
+
+/** *
+ * 获取分类 m
+ */
+export const getClass = data => {
+	return https.get('/category/list', data)
+}
+
+/** *
+ * 获取分类的商品 m
+ */
+export const getList = data => {
+	return https.get('/category/goods-list', data)
+}
+
+// =====================  B 端 ========================
+
+/** *
+ * 商品分类-列表(全部分类无分页) b
+ */
+export const getClassB = data => {
+	return https.get('/category/list', data)
+}
+
+/** *
+ * 商品分类-查看 b
+ */
+export const getClassDetB = data => {
+	return https.get('/category/detail', data)
+}
+
+/** *
+ * 商品分类-添加 b
+ */
+export const classAddB = data => {
+	return https.get('/category/add', data)
+}
+
+/** *
+ * 商品分类-修改 b
+ */
+export const classUpdateB = data => {
+	return https.get('/category/update', data)
+}
+
+/** *
+ * 商品分类-修改 b
+ */
+export const changeStatusB = data => {
+	return https.get('/category/change-status', data)
+}

+ 1 - 1
mobile-code/src/api/common/index.js

@@ -1,7 +1,7 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
 export const uploadPic = data => {
-	return https.post('/admin/hkds/api/oa/upload_image', data)
+	return https.post('/upload/img', data)
 }
 
 export const getOptions = param => https.get('/apihkds/api/option/getOptions', param)

+ 15 - 0
mobile-code/src/api/coupon/index.js

@@ -0,0 +1,15 @@
+import https from '@/plugins/luch-request_0.0.7/request'
+
+/** *
+ * 登陆客户的优惠情况 m
+ */
+export const discount = data => {
+	return https.get('/user/discount', data)
+}
+
+/** *
+ * 登陆客户的优惠券列表 m
+ */
+export const list = data => {
+	return https.get('/user/discount', data)
+}

+ 66 - 0
mobile-code/src/api/goods/index.js

@@ -0,0 +1,66 @@
+import https from '@/plugins/luch-request_0.0.7/request'
+
+/** *
+ * 商品详情 m
+ */
+export const getDetail = data => {
+	return https.get('/goods/detail', data)
+}
+
+// =====================  B 端 ========================
+
+/** *
+ * 商品-列表 b
+ */
+export const getListB = data => {
+	return https.get('/goods/list', data)
+}
+
+/** *
+ * 商品-查看 b
+ */
+export const getDetailB = data => {
+	return https.get('/goods/detail', data)
+}
+
+/** *
+ * 商品-添加 b
+ */
+export const addB = data => {
+	return https.get('/goods/add', data)
+}
+
+/** *
+ * 商品-删除 b
+ */
+export const delB = data => {
+	return https.get('/goods/delete', data)
+}
+
+/** *
+ * 商品-修改 b
+ */
+export const updateB = data => {
+	return https.get('/goods/update', data)
+}
+
+/** *
+ * 商品-上下架 b
+ */
+export const changeStatusB = data => {
+	return https.get('/goods/change-status', data)
+}
+
+/** *
+ * 商品-查看短链接 b
+ */
+export const shortUrlB = data => {
+	return https.get('/goods/short-url', data)
+}
+
+/** *
+ * 商品-发送链接 b
+ */
+export const sendShortUrlB = data => {
+	return https.get('/goods/send-short-url', data)
+}

+ 45 - 0
mobile-code/src/api/order/index.js

@@ -0,0 +1,45 @@
+import https from '@/plugins/luch-request_0.0.7/request'
+
+/** *
+ * 商城下单-生成订单 m
+ */
+export const createOrder = data => {
+	return https.post('/order/create-order', data)
+}
+
+/** *
+ * 商城下单-相关信息 m
+ */
+export const orderRelate = data => {
+	return https.get('/order/order-relate', data)
+}
+
+/** *
+ * 商城下单-余额付款 m
+ */
+export const balancePay = data => {
+	return https.post('/order/balance-pay', data)
+}
+
+/** *
+ * 商城下单-微信支付 m
+ */
+export const wxPay = data => {
+	return https.post('/order/wx-pay', data)
+}
+
+/** *
+ * 快捷下单-微信余额支付宝 m
+ */
+export const fastPay = data => {
+	return https.post('/order/fast-pay', data)
+}
+
+// =====================  B 端 ========================
+
+/** *
+ * 订单列表 b
+ */
+export const getListB = data => {
+	return https.post('/order/list', data)
+}

+ 41 - 21
mobile-code/src/components/app-delivery.vue

@@ -5,47 +5,47 @@
 		<div class="module-com">
 			<tui-list-cell class="line-cell" :hover="false">
 				<div class="tui-title">收花人姓名</div>
-				<input placeholder-class="phcolor" class="tui-input" name="name" placeholder="请输入姓名" maxlength="50" type="number" />
+				<input v-model="form.receiveUserName" placeholder-class="phcolor" class="tui-input" name="name" placeholder="请输入姓名" maxlength="50" type="number" />
 			</tui-list-cell>
 			<tui-list-cell class="line-cell" :hover="false">
 				<div class="tui-title">电话</div>
-				<input placeholder-class="phcolor" class="tui-input" name="phone" placeholder="请输入电话" maxlength="50" type="number" />
+				<input v-model="form.receiveMobile" placeholder-class="phcolor" class="tui-input" name="phone" placeholder="请输入电话" maxlength="50" type="number" />
 			</tui-list-cell>
 			<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="selRegionFn">
 				<div class="tui-title">收花人地址</div>
-				<div class="tui-input">福建厦门</div>
+				<div class="tui-input">{{ form.receiveFullAddress }}</div>
 			</tui-list-cell>
 			<tui-list-cell class="line-cell" :hover="false">
 				<div class="tui-title">详细地址</div>
-				<input placeholder-class="phcolor" class="tui-input" name="phone" placeholder="小区、大厦或街道名称,如金尚小区" maxlength="50" type="number" />
+				<input v-model="form.receiveFullAddress" placeholder-class="phcolor" class="tui-input" name="phone" placeholder="小区、大厦或街道名称,如金尚小区" maxlength="50" type="number" />
 			</tui-list-cell>
 			<tui-list-cell class="line-cell" :hover="false">
 				<div class="tui-title">门牌号</div>
-				<input placeholder-class="phcolor" class="tui-input" name="phone" placeholder="楼号门牌号,如23号403室 (选填)" maxlength="50" type="number" />
+				<input v-model="form.receiveFloor" placeholder-class="phcolor" class="tui-input" name="phone" placeholder="楼号门牌号,如23号403室 (选填)" maxlength="50" type="number" />
 			</tui-list-cell>
 		</div>
 		<!-- 订花人 -->
 		<div class="module-com">
 			<tui-list-cell class="line-cell" :hover="false">
 				<div class="tui-title">订花人姓名</div>
-				<input placeholder-class="phcolor" class="tui-input" name="age" placeholder="请输入姓名 (选填)" maxlength="50" type="number" />
+				<input v-model="form.receiveFloor" placeholder-class="phcolor" class="tui-input" name="age" placeholder="请输入姓名 (选填)" maxlength="50" type="number" />
 			</tui-list-cell>
 			<tui-list-cell class="line-cell" :hover="false">
 				<div class="tui-title">订花人电话</div>
-				<input placeholder-class="phcolor" class="tui-input" name="age" placeholder="填了花送到了会通知您 (选填)" maxlength="50" type="number" />
+				<input v-model="form.bookMobile" placeholder-class="phcolor" class="tui-input" name="age" placeholder="填了花送到了会通知您 (选填)" maxlength="50" type="number" />
 			</tui-list-cell>
 			<tui-list-cell class="line-cell" :hover="false" :arrow="true">
 				<div class="tui-title">送达时间</div>
-				<picker mode="date" :value="time" @change="selTimeFn" class="tui-input">
-					<div v-if="time">{{ time }}</div>
+				<picker mode="date" :value="form.reachTime" @change="selTimeFn" class="tui-input">
+					<div v-if="form.reachTime">{{ form.reachTime }}</div>
 					<div class="tui-placeholder" v-else>请选择送达时间</div>
 				</picker>
 			</tui-list-cell>
 			<!-- 具体时间 -->
 			<div class="delivery-time">
-				<button class="button-com" :class="[timeTodaySel == 0 ? 'red' : 'default']" @click="timeTodaySelFn(0)">上午</button>
-				<button class="button-com" :class="[timeTodaySel == 1 ? 'red' : 'default']" @click="timeTodaySelFn(1)">中午</button>
-				<button class="button-com" :class="[timeTodaySel == 2 ? 'red' : 'default']" @click="timeTodaySelFn(2)">下午</button>
+				<button class="button-com" :class="[reachPeriod == 0 ? 'red' : 'default']" @click="timeTodaySelFn(0)">上午</button>
+				<button class="button-com" :class="[reachPeriod == 1 ? 'red' : 'default']" @click="timeTodaySelFn(1)">下午</button>
+				<button class="button-com" :class="[reachPeriod == 2 ? 'red' : 'default']" @click="timeTodaySelFn(2)">晚上</button>
 			</div>
 		</div>
 		<!-- 贺卡 -->
@@ -57,7 +57,7 @@
 						<span class="need-gift">需要贺卡</span>
 					</div>
 					<div class="gitf-textarea">
-						<app-textarea placeholder="请填写贺卡内容" v-model="gift" @blur="blursave('blur')" />
+						<app-textarea v-model="form.cardInfo" placeholder="请填写贺卡内容" @blur="blursave('blur')" />
 					</div>
 				</div>
 			</tui-list-cell>
@@ -66,7 +66,7 @@
 		<div class="module-com">
 			<tui-list-cell class="line-cell" :hover="false">
 				<div class="tui-title">备注</div>
-				<input placeholder-class="phcolor" class="tui-input" name="age" placeholder="(选填)" maxlength="50" type="number" />
+				<input v-model="form.remark" placeholder-class="phcolor" class="tui-input" name="age" placeholder="(选填)" maxlength="50" type="number" />
 			</tui-list-cell>
 		</div>
 		<!-- 商品金额 -->
@@ -123,16 +123,36 @@ export default {
 	},
 	data() {
 		return {
-			time: '',
-			timeTodaySel: 0,
 			region: [],
-			gift: '',
-			showRegion: false
+			showRegion: false,
+			form: {
+				receiveUserName: '', // 收花人姓名;到店自提的姓名
+				receiveMobile: '', // 收花人手机;到店自提的电话;
+				receiveProvince: '', // 收花人省份
+				receiveCity: '', // 收花人城市
+				receiveAddress: '', // 收花人地址
+				receiveFloor: '', // 收花人门楼号和牌号
+				receiveFullAddress: '', // 收花人完整地址,从腾讯地图接口获取
+				receiveLat: '', // 收花人纬度
+				receiveLong: '', // 收花人经度
+				bookMobile: '', // 订花人手机号
+				reachTime: '', // 配送时间
+				reachPeriod: '', // 配送时段,0上午1下午2晚上
+				needCard: '', // 是否要贺卡 0不要 1要
+				cardInfo: '', // 贺卡信息
+				remark: '', // 备注
+				anonymity: '', // 是否匿名 0不 1要
+				sendDistance: '', // 配送距离,根据腾讯js进行计算
+				goodsId: '', // 【商城下单特有字段】商品id
+				goodsStyleId: '', // 【商城下单特有字段】商品款式id
+				goodsNum: '', // 【商城下单特有字段】商品数量
+				couponId: '' // 优惠券id,默认0没有使用优惠券
+			}
 		}
 	},
 	methods: {
 		selTimeFn(e) {
-			this.time = e.detail.value
+			this.form.reachTime = e.detail.value
 		},
 		selRegionFn() {
 			this.showRegion = true
@@ -144,10 +164,10 @@ export default {
 			this.showRegion = false
 		},
 		timeTodaySelFn(index) {
-			this.timeTodaySel = index
+			this.form.reachPeriod = index
 		},
 		giftChange() {
-			this.aaa = !this.aaa
+			this.form.anonymity = !this.form.anonymity
 		}
 	}
 }

+ 103 - 0
mobile-code/src/components/app-empty.vue

@@ -0,0 +1,103 @@
+<template>
+	<view class="tui-tips-box" :class="[fixed?'tui-tips-fixed':'']">
+		<image :src="imgUrl" class="tui-tips-icon" :style="{width:imgWidth+'rpx',height:imgHeight+'rpx'}"></image>
+		<view class="tui-tips-content">
+			<slot></slot>
+		</view>
+		<button class="tui-tips-btn" hover-class="tui-tips-btn-hover" :style="{width:btnWidth+'rpx'}" v-if="btnText"  @tap="handleClick">{{btnText}}</button>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'tuiTips',
+	props: {
+		// 是否垂直居中
+		fixed: {
+			type: Boolean,
+			default: true
+		},
+		// 图片地址,没有则不显示
+		imgUrl: {
+			type: String,
+			default: ''
+		},
+		// 图片宽度
+		imgWidth: {
+			type: Number,
+			default: 200
+		},
+		// 图片高度
+		imgHeight: {
+			type: Number,
+			default: 200
+		},
+		// 按钮宽度
+		btnWidth: {
+			type: Number,
+			default: 200
+		},
+		// 按钮文字,没有则不显示
+		btnText: {
+			type: String,
+			default: ''
+		}
+	},
+	methods: {
+		handleClick(e) {
+			this.$emit('click', {})
+		}
+	}
+}
+</script>
+
+<style>
+	.tui-tips-box {
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.tui-tips-fixed {
+		width: 90%;
+		position: fixed;
+		left: 50%;
+		top: 50%;
+		-webkit-transform: translate(-50%, -50%);
+		transform: translate(-50%, -50%);
+	}
+
+	.tui-tips-icon {
+		display: block;
+		flex-shrink: 0;
+		width: 280rpx;
+		height: 280rpx;
+		margin-bottom: 40rpx;
+	}
+
+	.tui-tips-content {
+		text-align: center;
+		color: #666666;
+		font-size: 28rpx;
+		padding: 0 50rpx 24rpx 50rpx;
+		box-sizing: border-box;
+		word-break: break-all;
+		word-wrap: break-word;
+	}
+
+	.tui-tips-btn {
+		height: 60rpx;
+		line-height: 60rpx;
+		font-size: 28rpx;
+		background: #EB0909;
+		color: #fff;
+		border-radius: 6rpx;
+		margin: 0;
+	}
+
+	.tui-tips-btn-hover {
+		background: #c80808;
+		color: #e5e5e5;
+	}
+</style>

+ 5 - 5
mobile-code/src/components/app-swiper.vue

@@ -1,11 +1,11 @@
 <template>
 	<div class="swiper-wrap" :style="{'width': widthFn,'height': heightFn}">
 		<swiper :indicator-dots="!tagShow" :autoplay="autoplay" :interval="5000" :duration="150" class="tui-banner-swiper" :circular="true" indicator-color="#969696" indicator-active-color="#F04545" @change="bannerChange">
-			<swiper-item v-for="(item, index) in data" :key="index" @tap.stop="detail">
-				<img src="./../static/images/swiper.png" class="tui-slide-image" mode="center" />
+			<swiper-item v-for="(item, index) in list" :key="index" @tap.stop="detail">
+				<img :src="item" class="tui-slide-image" mode="center" />
 			</swiper-item>
 		</swiper>
-		<app-tag v-if="tagShow" type="translucent" shape="circleLeft" size="small">{{index + 1}}/{{data.length}}</app-tag>
+		<app-tag v-if="tagShow" type="translucent" shape="circleLeft" size="small">{{index + 1}}/{{list.length}}</app-tag>
 	</div>
 </template>
 
@@ -17,10 +17,10 @@ export default {
 		appTag
 	},
 	props: {
-		data: {
+		list: {
 			type: Array,
 			default: () => {
-				return [1, 2]
+				return []
 			}
 		},
 		// 是否显示右下角tag

+ 16 - 7
mobile-code/src/components/app-wrapper-empty.vue

@@ -4,8 +4,8 @@
 			<slot v-if="!isEmpty" name="empty_body" />
 			<slot v-if="isEmpty && !isLoading" name="empty_content">
 				<!-- :style="`width:${pictureWidth};`" -->
-				<div class="app-empty__img">
-					<image :src="src" mode="widthFix" />
+				<div class="app-empty__img" :style="`width:${pictureWidth};`">
+					<img :src="src" mode="widthFix" />
 				</div>
 				<div class="app-empty__title">
 					<template v-if="isTitle">
@@ -35,6 +35,8 @@
 </template>
 
 <script>
+import dateImg from '../static/images/common/img_nodata.png'
+import orderImg from '../static/images/common/img_noorder.png'
 export default {
 	name: 'AppWrapperEmpty',
 	props: {
@@ -45,13 +47,13 @@ export default {
 			 */
 		type: {
 			type: String,
-			default: 'search'
+			default: 'noData'
 		},
 
 		// 图片宽度
 		pictureWidth: {
 			type: String,
-			default: '250rpx'
+			default: '200rpx'
 		},
 
 		pictureHeight: {
@@ -61,7 +63,7 @@ export default {
 
 		title: {
 			type: String,
-			default: '暂无数据内容'
+			default: '暂无数据'
 		},
 
 		// 是否垂直居中
@@ -93,7 +95,13 @@ export default {
 	},
 	computed: {
 		src() {
-			return `${this.$constant.imgUrl}empty/empty_${this.type}.png`
+			if (this.img) {
+				return this.img
+			} else if (this.type == 'search') {
+				return orderImg
+			} else {
+				return dateImg
+			}
 		}
 	},
 	data() {
@@ -115,10 +123,11 @@ export default {
 		& .app-empty__img {
 			width: 100%;
 			text-align: center;
-			margin: 116px 0 78px;
+			margin: 116px auto 50px;
 			& image {
 				width: 500px;
 				max-width: 100%;
+				height: auto;
 			}
 		}
 

+ 1 - 1
mobile-code/src/manifest.json

@@ -38,7 +38,7 @@
             "publicPath" : "/"
         },
         "devServer": {
-            "port": 7777,
+            "port": 81,
             "proxy": {
                 "/api": {
                     "target": "http://api.m.huaml.com",

+ 6 - 0
mobile-code/src/mixins/globalMixins.js

@@ -1,6 +1,12 @@
 export default {
+	data() {
+		return {
+			option: null
+		}
+	},
 	// 页面生命周期才触发
 	onLoad: function(option) {
+		this.option = option || null
 		if (option.token) {
 			uni.setStorageSync('token', option.token)
 		}

+ 2 - 4
mobile-code/src/pages/common/webview.vue

@@ -10,20 +10,18 @@ export default {
 	data() {
 		return {
 			src: '',
-			options: {},
 			roleName: ''
 		}
 	},
 	computed: {
 		...mapGetters({ userInfo: 'getBasicUser' })
 	},
-	onLoad(options) {
-		this.options = options
+	onLoad(option) {
 	},
 	/**
 		 * 用户点击右上角分享
 		 */
-	onShareAppMessage: function(options) {
+	onShareAppMessage: function(option) {
 		let shareObj = {}
 		shareObj = {
 			title: this.userInfo.nick_name + this.userInfo.role_name,

+ 1 - 0
mobile-code/src/pages/coupon/list.vue

@@ -54,6 +54,7 @@
 
 <script>
 import appTabs from '@/components/plugin/tabs'
+import { list } from '@/api/coupon'
 export default {
 	name: 'tabs',
 	components: {

+ 35 - 16
mobile-code/src/pages/goods/components/sel-popup.vue

@@ -4,28 +4,17 @@
             <app-close @close="close" />
             <div class="tui-popup-box">
 				<div class="tui-product-box">
-					<img src="https://www.thorui.cn/img/product/11.jpg" class="tui-popup-img" />
+					<img :src="imgNormal" class="tui-popup-img" />
 					<div class="tui-popup-price">
-                        <div class="goods-tit app-font-size-30">包月鲜花,购买前请查看</div>
-						<div class="tui-amount tui-bold">¥49.00</div>
+                        <div class="goods-tit app-font-size-30">{{ $util.isEmpty(info.goodsStyleList) ? '' : info.goodsStyleList[selIndex].title }}</div>
+						<div class="tui-amount tui-bold">¥{{ $util.isEmpty(info.goodsStyleList) ? '' : info.goodsStyleList[selIndex].price }}</div>
 					</div>
 				</div>
 				<scroll-view scroll-y class="tui-popup-scroll">
 					<div class="tui-scrolldiv-box">
 						<div class="tui-bold tui-attr-title">颜色</div>
 						<div class="tui-attr-box">
-							<div class="tui-attr-item">
-								包月玫瑰花
-							</div>
-							<div class="tui-attr-item">
-								包月玫瑰花
-							</div>
-							<div class="tui-attr-item">
-								包月玫瑰花
-							</div>
-							<div class="tui-attr-item tui-attr-active">
-								包月百合花
-							</div>
+							<div class="tui-attr-item" :class="{'tui-attr-active': selIndex}" v-for="(item, index) in info.goodsStyleList" :key="index">{{ item.title }}</div>
 						</div>
 
 						<div class="tui-number-box tui-bold tui-attr-title">
@@ -35,7 +24,7 @@
 					</div>
 				</scroll-view>
 				<div class="tui-popup-btn">
-                    <button class="button-com red" @click="$util.pageTo('/pages/order/buy')">下一步</button>
+                    <button class="button-com red" @click="nextFn">下一步</button>
 				</div>
 			</div>
         </bottom-popup>
@@ -54,6 +43,17 @@ export default {
 		appClose
 	},
 	props: {
+		// 信息
+		info: {
+			type: Object,
+			default: () => {
+				return {}
+			}
+		},
+		selIndex: {
+			type: Number,
+			default: 0
+		},
 		buyNum: {
 			type: Number,
 			default: 1
@@ -66,12 +66,31 @@ export default {
 	data() {
 		return {}
 	},
+	computed: {
+		imgNormal() {
+			if (!this.$util.isEmpty(this.info)) {
+				return this.info.imgList[0].normal
+			} else {
+				return ''
+			}
+		}
+	},
 	methods: {
 		change(e) {
 			this.$emit('change', e)
 		},
 		close() {
 			this.$emit('close')
+		},
+		nextFn() {
+			this.$util.pageTo({
+				url: '/pages/order/buy',
+				query: {
+					goodsId: this.info.id,
+					goodsStyleId: this.info.goodsStyleList[this.selIndex].id,
+					goodsNum: this.buyNum
+				}
+			})
 		}
 	}
 }

+ 53 - 14
mobile-code/src/pages/goods/detail.vue

@@ -1,15 +1,15 @@
 <template>
 	<div class="app-content">
-		<app-swiper :height="{type: 'number',val: 750}" :tagShow="true" />
+		<app-swiper :height="{type: 'number',val: 750}" :tagShow="true" :list="imgList" />
 		<!-- 商品简介 -->
 		<div class="shop-intro">
 			<div class="app-price app-bold">
 				<text>¥</text>
-				<text class="app-size-34">49</text>
-				<text>.00</text>
+				<text class="app-size-34">{{ data.price }}</text>
+				<!-- <text>.00</text> -->
 			</div>
 			<div class="tui-pro-titbox">
-				<div class="tui-pro-title app-size-32">谈判官明星同款耳坠韩国气质简约显脸瘦的耳环女百搭个性长款耳钉 个性水滴耳环【A2】</div>
+				<div class="tui-pro-title app-size-32">{{ data.goodsName }}</div>
 				<button open-type="share" class="tui-share-btn tui-share-position">
 					<app-tag type="gray" tui-tag-class="tui-tag-share tui-size" shape="circleLeft" size="small">
 						<div class="flex-center">
@@ -20,9 +20,15 @@
 				</button>
 			</div>
 			<div class="shop-express app-color-3">
-				<div>快递:0.00</div>
-				<div>月销2000</div>
-				<div>浙江杭州</div>
+				<div>{{ data.freeSendDist }}公里免运费</div>
+				<div>
+					<span class="prompt-text">月销</span>
+					<span>{{ data.sold }}</span>
+				</div>
+				<div>
+					<span class="prompt-text">剩余</span>
+					<span>{{ data.stock }}</span>
+				</div>
 			</div>
 		</div>
 		<!-- 商品简介 -->
@@ -30,18 +36,21 @@
 		<div class="module-wrap shop-detail">
 			<div class="module-tit app-size-30">商品详情</div>
 			<div class="module-det">
-				<img src="../../static/images/swiper.png" alt mode="widthFix" />
+				<img :src="imgNormal" alt mode="widthFix" />
+				<div class="module-det-text" v-html="data.content"></div>
 			</div>
 		</div>
 		<!-- 商品详情 -->
 		<!-- 简要说明 -->
 		<div class="module-wrap shop-desc">
-			<div class="module-tit app-size-30">商品详情</div>
-			<div class="module-det">配送及费用: 除部分较偏地区,市区内一般免收配送费。市外配送费: 30元~100元不等。因鲜花的特殊性,需由专人配送费用高 于一般快递。 签收事宜: 通常情况下,我们由专人送到收花人手上,确保本人签收。 但特殊情况除外:比如收花人不在、不方便签收或者门卫 不让进等原因,我们将征求收花人意见或结合实际情况处 理。</div>
+			<div class="module-tit app-size-30">简要说明</div>
+			<div class="module-det">
+				<div class="module-det-text">{{ data.commonIntro }}</div>
+			</div>
 		</div>
 		<!-- 简要说明 -->
 		<app-trademark />
-		<sel-popup :show="popupShow" :buyNum="buyNum" @change="changeNum" @close="hidePopup" />
+		<sel-popup :show="popupShow" :info="data" :buyNum="buyNum" @change="changeNum" @close="hidePopup" />
 		<buy-foot @buy="showPopup" />
 	</div>
 </template>
@@ -52,6 +61,7 @@ import appTag from '@/components/module/app-tag.vue'
 import appTrademark from '@/components/module/app-trademark'
 import buyFoot from './components/buy-foot.vue'
 import selPopup from './components/sel-popup.vue'
+import { getDetail } from '@/api/goods'
 export default {
 	name: 'goods-detail',
 	components: {
@@ -63,12 +73,35 @@ export default {
 	},
 	data() {
 		return {
+			data: {},
+			imgList: [],
 			buyNum: 1,
 			popupShow: false
 		}
 	},
-	onLoad(option) {},
+	onLoad(option) {
+		this.init()
+	},
+	computed: {
+		imgNormal() {
+			if (!this.$util.isEmpty(this.data)) {
+				return this.data.imgList[0].normal
+			} else {
+				return ''
+			}
+		}
+	},
 	methods: {
+		init() {
+			this._getDetail()
+		},
+		_getDetail() {
+			getDetail({ id: this.option.id }).then(res => {
+				this.data = res.data
+				this.imgList = this.data.imgList.filter(item => item.middle)
+			})
+		},
+		// 更换数量
 		changeNum(e) {
 			this.buyNum = e.value
 		},
@@ -90,11 +123,14 @@ export default {
 			margin-top: 20px;
 			background-color: #fff;
 			.module-tit {
-				padding: 14px 30px;
+				padding: 14px 24px;
 				border-bottom: 1px solid $borderColor;
 			}
 			.module-det {
 				color: $fontColor2;
+				.module-det-text {
+					padding: 24px;
+				}
 			}
 		}
 		// 公共模块
@@ -127,11 +163,14 @@ export default {
 			.shop-express {
 				padding-right: 30px;
 				@include disFlex(center, space-between);
+				.prompt-text {
+					margin-right: 4px;
+				}
 			}
 		}
 		.shop-desc {
 			.module-det {
-				padding: 24px;
+				// padding: 24px;
 				line-height: 48px;
 			}
 		}

+ 46 - 17
mobile-code/src/pages/home/category.vue

@@ -1,27 +1,30 @@
 <template>
 	<div class="app-main app-content">
 		<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop" :style="{height:height+'px'}">
-			<div v-for="(item,index) in tabbar" :key="index" class="tab-bar-item" :class="[currentTab==index ? 'active' : '']" :data-current="index" @tap.stop="swichNav">
-				<text>{{item}}</text>
+			<div v-for="(item,index) in tabbar" :key="index" class="tab-bar-item" :class="[currentTab==index ? 'active' : '']" :data-current="index" @tap.stop="swichNav($event ,item)">
+				<text>{{item.categoryName}}</text>
 			</div>
 		</scroll-view>
 		<block v-for="(item,index) in tabbar" :key="index">
 			<scroll-view scroll-y class="right-box" :style="{height:height+'px'}" v-if="currentTab==index">
 				<!--内容部分 start 自定义可删除-->
-				<div class="page-view">
-					<div class="goods-list" v-for="(item, index) in 10" :key="index" @click="detail">
+				<div class="page-view" v-if="!$util.isEmpty(list.data)">
+					<div class="goods-list" v-for="(item, index) in list.data" :key="index" @click="$util.pageTo(`/pages/goods/detail?id=${item.id}`)">
 						<div class="img-blo">
-							<img src="../../static/images/logout.png" alt mode="center" />
+							<img :src="item.imgList[0].middle" alt mode="center" />
 						</div>
 						<div class="goods-det">
 							<div class="goods-det-top">
-								<div class="goods-name">天使美人</div>
-								<div class="goods-sales">已售1982</div>
+								<div class="goods-name">{{ item.goodsName }}</div>
+								<div class="goods-sales">已售{{ item.sold }}</div>
 							</div>
-							<div class="goods-price">¥389.50</div>
+							<div class="goods-price">¥{{ item.price }}</div>
 						</div>
 					</div>
 				</div>
+				<block v-else>
+					<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+				</block>
 				<!--内容部分 end 自定义可删除-->
 			</scroll-view>
 		</block>
@@ -29,42 +32,68 @@
 </template>
 
 <script>
+import { getClass, getList } from '@/api/category'
+import { list } from '@/mixins'
+import AppWrapperEmpty from '@/components/app-wrapper-empty'
 export default {
+	name: 'category',
+	components: {
+		AppWrapperEmpty
+	},
+	mixins: [list],
 	data() {
 		return {
-			tabbar: ['爆款鲜花', '节日鲜花', '鲜花花材', '花篮用途', '推荐鲜花', '鲜花支数', '蛋糕', '绿植类别'],
+			tabbar: [],
 			height: 0, // scroll-view高度
 			currentTab: 0, // 预设当前项的值
-			scrollTop: 0 // tab标题的滚动条位置
+			scrollTop: 0, // tab标题的滚动条位置
+			form: {
+				categoryId: ''
+			}
 		}
 	},
-	onLoad: function(options) {
+	onLoad: function() {
 		setTimeout(() => {
 			uni.getSystemInfo({
 				success: res => {
 					this.height = res.windowHeight
+					this.init()
 				}
 			})
 		}, 50)
 	},
 	methods: {
-		detail() {
-			uni.navigateTo({
-				url: '/pages/goods/detail'
+		async init() {
+			this._getClass()
+			this._list()
+		},
+		// 分类
+		_getClass() {
+			getClass().then(res => {
+				this.tabbar = res.data
+			})
+		},
+		// 列表
+		_list() {
+			return getList(this.form).then(res => {
+				this.completes(res)
 			})
 		},
 		// 点击标题切换当前页时改变样式
-		swichNav: function(e) {
+		swichNav(e, item) {
 			let cur = e.currentTarget.dataset.current
 			if (this.currentTab == cur) {
 				return false
 			} else {
 				this.currentTab = cur
-				this.checkCor()
+				this.form.categoryId = item.id
+				this.resetList()
+				this._list()
+				// this.checkCor()
 			}
 		},
 		// 判断当前滚动超过一屏时,设置tab标题滚动条。
-		checkCor: function() {
+		checkCor() {
 			let that = this
 			// 这里计算按照实际情况进行修改,动态数据要进行动态分析
 			// 思路:窗体高度/单个分类高度 200rpx 转px计算 =>得到一屏幕所显示的个数,结合后台传回分类总数进行计算

+ 11 - 2
mobile-code/src/pages/order/buy.vue

@@ -6,6 +6,7 @@
 		<block v-if="tabIndex == 0">
 			<app-delivery-module />
 		</block>
+		<!-- 自取 -->
 		<block v-else>
 			<!-- 收花人 -->
 			<div class="module-com">
@@ -49,7 +50,7 @@
 					<span>.00</span>
 				</span>
 			</div>
-			<button class="button-com red">确认</button>
+			<button class="button-com red" @click="confirm">确认</button>
 		</div>
 		<!-- 弹窗 -->
 		<alert-module :show="showAlert" @click="hideAlert" @cancel="hideAlert">
@@ -96,10 +97,18 @@ export default {
 					name: '我要自提'
 				}
 			],
-			showAlert: false
+			showAlert: false,
+			// form
+			form: {
+				needSend: ''
+			}
 		}
 	},
+	onLoad(option) {},
 	methods: {
+		confirm() {
+			// this.
+		},
 		tabChange(e) {
 			this.tabIndex = e.index
 		},

+ 4 - 5
mobile-code/src/plugins/luch-request_0.0.7/request.js

@@ -140,12 +140,11 @@ class Request {
 					resolve(response.data)
 				}
 				if (statusCode === 200) { // 成功
-					console.log('response', response)
-					if (response.data.code === 'A0001') {
+					if (response.data.code === 1) {
 						resolve(response.data)
 					} else {
 						// 无权限或者登录过期
-						if (response.data.code && response.data.errors.code == -1) {
+						if (response.data.code && response.data.code == -100) {
 							uni.removeStorageSync('token')
 							uni.showToast({
 								title: '登陆过期,正在返回登录页...',
@@ -187,7 +186,7 @@ class Request {
 		})
 	}
 
-	get(url, data, options = {}, config = {}) {
+	get(url, data = {}, options = {}, config = {}) {
 		// options.url = url + common.queryData(data, true)
 		options.url = url + parse(data, true)
 		options.data = {}
@@ -195,7 +194,7 @@ class Request {
 		return this.request(options, config)
 	}
 
-	post(url, data, options = {}, config = {}) {
+	post(url, data = {}, options = {}, config = {}) {
 		options.url = url
 		options.data = data
 		options.method = 'POST'

binární
mobile-code/src/static/images/common/img_nodata.png


binární
mobile-code/src/static/images/common/img_noorder.png


+ 1 - 1
mobile-code/src/utils/util.js

@@ -65,7 +65,7 @@ export const parse = (query, isFrist = false) => {
 
 			return `${result}&${key}=${value}`
 		}, '')
-	return isFrist ? str : str.replace(/^&/, '?')
+	return !isFrist ? str : str.replace(/^&/, '?')
 }
 
 const $checkMobile = (num) => {