Explorar el Código

Merge branch 'master' of http://git.huaml.com/zhh/front-end

icssoa hace 6 años
padre
commit
c46d83a1b0
Se han modificado 45 ficheros con 436 adiciones y 322 borrados
  1. 4 4
      admin-update/src/views/order/components/sel-order.vue
  2. 1 1
      mobile-code-back/src/admin/order/components/sel-order.vue
  3. 2 2
      mobile-code-back/src/components/app-delivery.vue
  4. 1 1
      mobile-code-back/src/official/apply.vue
  5. 1 1
      mobile-code-back/src/official/index.vue
  6. 4 0
      mobile-code/src/App.vue
  7. 1 1
      mobile-code/src/admin/order/components/sel-order.vue
  8. 1 1
      mobile-code/src/admin/shop/add.vue
  9. 128 120
      mobile-code/src/components/app-area-sel.vue
  10. 14 14
      mobile-code/src/components/app-delivery.vue
  11. 3 1
      mobile-code/src/components/module/app-order-list.vue
  12. 81 76
      mobile-code/src/components/module/app-search.vue
  13. 5 1
      mobile-code/src/components/module/app-share-mask.vue
  14. 1 1
      mobile-code/src/official/apply.vue
  15. 1 1
      mobile-code/src/official/index.vue
  16. 10 6
      mobile-code/src/pages/callback/index.vue
  17. 22 12
      mobile-code/src/pages/goods/components/sel-popup.vue
  18. 120 74
      mobile-code/src/pages/goods/detail.vue
  19. 20 4
      mobile-code/src/pages/order/buy.vue
  20. 15 0
      mobile-code/src/plugins/luch-request_0.0.7/request.js
  21. 1 1
      mobile/index.html
  22. 0 0
      mobile/static/js/chunk-vendors.69b3ba76.js
  23. 0 0
      mobile/static/js/chunk-vendors.6e20f2ca.js
  24. 0 0
      mobile/static/js/index.d644a1f8.js
  25. 0 0
      mobile/static/js/index.f8bf6c6d.js
  26. 0 0
      mobile/static/js/pages-callback-index.41d48fb7.js
  27. 0 0
      mobile/static/js/pages-callback-index.d6127b7f.js
  28. 0 0
      mobile/static/js/pages-chat-index.4a718f23.js
  29. 0 0
      mobile/static/js/pages-chat-index.5e5ab486.js
  30. 0 0
      mobile/static/js/pages-goods-detail.a97abb92.js
  31. 0 0
      mobile/static/js/pages-goods-detail.d20d15f7.js
  32. 0 0
      mobile/static/js/pages-interest-invite.1e787015.js
  33. 0 0
      mobile/static/js/pages-interest-invite.4d46fe78.js
  34. 0 0
      mobile/static/js/pages-order-buy.36539707.js
  35. 0 0
      mobile/static/js/pages-order-buy.e0d4034a.js
  36. 0 0
      mobile/static/js/pages-order-buy~pages-pay-index.23122297.js
  37. 0 0
      mobile/static/js/pages-order-buy~pages-pay-index.a3b8bf14.js
  38. 0 0
      mobile/static/js/pages-order-buy~pages-user-password~pages-user-register.35c3f4ea.js
  39. 0 0
      mobile/static/js/pages-order-detail.27fa531a.js
  40. 0 0
      mobile/static/js/pages-order-detail.72809c84.js
  41. 0 0
      mobile/static/js/pages-order-list.70cb54cd.js
  42. 0 0
      mobile/static/js/pages-order-list.fc7f2ffe.js
  43. 0 0
      mobile/static/js/pages-user-password.839e0c6b.js
  44. 0 0
      mobile/static/js/pages-user-register.f120af4a.js
  45. 0 0
      mobile/static/js/pages-user-register.fea6046b.js

+ 4 - 4
admin-update/src/views/order/components/sel-order.vue

@@ -53,7 +53,7 @@
 										>有配送单</el-button
 									>
 									<el-button type="primary" @click="fillFormFn"
-										>没有,去填单</el-button
+										>填单</el-button
 									>
 								</div>
 								<div v-else>
@@ -182,14 +182,14 @@
 								<!-- <el-input
 									type="textarea"
 									v-model="orderForm.receiveFullAddress"
-									placeholder="小区、大厦或街道名称,如金尚小区"
+									placeholder="小区、大厦或街道名称"
 									size="small"
 								></el-input> -->
 							</el-form-item>
 							<el-form-item label="门牌号" prop="receiveFloor">
 								<el-input
 									v-model="orderForm.receiveFloor"
-									placeholder="楼号门牌号,如23号403室 (选填)"
+									placeholder="楼号门牌号(选填)"
 									size="small"
 								></el-input>
 							</el-form-item>
@@ -633,7 +633,7 @@ export default {
 				this.printOrder();
 			});
 		},
-		// 填单
+		// 填单
 		fillFormFn() {
 			this.orderDialog = true;
 		},

+ 1 - 1
mobile-code-back/src/admin/order/components/sel-order.vue

@@ -19,7 +19,7 @@
 						query: {
 							id: orderData.id
 						}
-							})">没有,去填单</button>
+							})">填单</button>
 						</div>
 					</div>
 				</template>

+ 2 - 2
mobile-code-back/src/components/app-delivery.vue

@@ -28,7 +28,7 @@
 			</tui-list-cell>
 			<tui-list-cell class="line-cell" :hover="false">
 				<div class="tui-title">门牌号</div>
-				<input v-model="form.receiveFloor" placeholder-class="phcolor" class="tui-input" name="receiveFloor" placeholder="楼号门牌号,如23号403室 (选填)" />
+				<input v-model="form.receiveFloor" placeholder-class="phcolor" class="tui-input" name="receiveFloor" placeholder="楼号门牌号(选填)" />
 			</tui-list-cell>
 		</div>
 		<!-- 订花人 -->
@@ -39,7 +39,7 @@
 			</tui-list-cell>-->
 			<tui-list-cell class="line-cell" :hover="false">
 				<div class="tui-title">订花人电话</div>
-				<input v-model="form.bookMobile" placeholder-class="phcolor" class="tui-input" name="bookMobile" placeholder="填了花送到了会通知您 (选填)" type="number" />
+				<input v-model="form.bookMobile" placeholder-class="phcolor" class="tui-input" name="bookMobile" placeholder="花送到了会通知您(选填)" type="number" />
 			</tui-list-cell>
 			<tui-list-cell class="line-cell" :hover="false" :arrow="true">
 				<div class="tui-title">送达时间</div>

+ 1 - 1
mobile-code-back/src/official/apply.vue

@@ -18,7 +18,7 @@
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
 					<div class="tui-title">门牌号</div>
-					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号,如23号403室 (选填)" />
+					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(选填)" />
 				</tui-list-cell>
 			</div>
 			<!-- 手机号 -->

+ 1 - 1
mobile-code-back/src/official/index.vue

@@ -91,7 +91,7 @@ export default {
 			],
 			contentData: [
 				{
-					title: `<span class="app-color-1">一键搭建</span>移动商城和小程序商城`,
+					title: `<span class="app-color-1">一键搭建</span>花店个性商城`,
 					subTitle: `各大节日商城自动涨价,客户下单自动按距离计算运费`,
 					img: `${this.$constant.imgUrl}/retail/official/content-1.png`
 				},

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

@@ -9,6 +9,10 @@ export default {
 	},
 	onLaunch() {
 		// this.getAllOptions()
+		// 删除缓存
+		if (process.env.NODE_ENV == 'production') {
+			uni.removeStorageSync('shopUser')
+		}
 		// #ifdef MP-WEIXIN
 		// wxLoginFn()
 		// uni.clearStorage()

+ 1 - 1
mobile-code/src/admin/order/components/sel-order.vue

@@ -19,7 +19,7 @@
 						query: {
 							id: orderData.id
 						}
-							})">没有,去填单</button>
+							})">填单</button>
 						</div>
 					</div>
 				</template>

+ 1 - 1
mobile-code/src/admin/shop/add.vue

@@ -33,7 +33,7 @@
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
 					<div class="tui-title required">门牌号</div>
-					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号,如23号403室 (选填)" />
+					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(选填)" />
 				</tui-list-cell>
 				<tui-list-cell class="line-cell remark-wrap" :hover="false">
 					<div class="tui-title">简介</div>

+ 128 - 120
mobile-code/src/components/app-area-sel.vue

@@ -8,7 +8,7 @@
 				</div>
 				<!-- 搜索 -->
 				<div class="map-search">
-					<app-search-module placeholder="请输入你的收货地址" @input="searchFn" />
+					<app-search-module ref="aaaaa" placeholder="请输入你的收货地址" :focus="true" @input="searchFn" />
 				</div>
 				<!-- 地图 -->
 				<!-- <div class="map-box">
@@ -20,7 +20,7 @@
 							</cover-view>
 						</cover-view>
 					</map>
-				</div> -->
+				</div>-->
 				<!-- 列表 -->
 				<scroll-view class="near-list" scroll-y>
 					<view v-for="(item,index) in nearListData" :key="index" @click="switchAddress(item,index)" class="near-item">
@@ -37,131 +37,139 @@
 </template>
 
 <script>
-import BottomPopup from '@/components/plugin/bottom-popup'
-import AppClose from '@/components/module/app-close'
-import AppSearchModule from '@/components/module/app-search'
-// api
-import { suggestion } from '@/api/common'
-export default {
-	name: 'app-area-sel',
-	components: {
-		BottomPopup,
-		AppClose,
-		AppSearchModule
-	},
-	props: {
-		show: {
-			type: Boolean,
-			default: false
+	import BottomPopup from '@/components/plugin/bottom-popup'
+	import AppClose from '@/components/module/app-close'
+	import AppSearchModule from '@/components/module/app-search'
+	// api
+	import { suggestion } from '@/api/common'
+	export default {
+		name: 'app-area-sel',
+		components: {
+			BottomPopup,
+			AppClose,
+			AppSearchModule
 		},
-		city: {
-			type: String,
-			default: ''
-		}
-	},
-	data() {
-		return {
-			showPopup: false,
-			keyword: '',
-			// 地图
-			// latitude: 24.44579,
-			// longitude: 118.08243,
-			// 列表
-			currentSelectAddress: null,
-			nearListData: []
-		}
-	},
-	// onLoad(val) {
-	// 	this.mapCtx = uni.createMapContext('myMap')
-	// 	this.query = val
-	// 	this.reload()
-	// },
-	watch: {
-		show(val) {
-			this.showPopup = val
-			if (val) {
-				this.getAreaList()
+		props: {
+			show: {
+				type: Boolean,
+				default: false
+			},
+			city: {
+				type: String,
+				default: ''
 			}
-		}
-	},
-	methods: {
-		getAreaList() {
-			suggestion({ region: this.city, keyword: this.keyword }).then(res => {
-				this.nearListData = res.data.data
-			})
 		},
-		// 搜索
-		searchFn(e) {
-			this.keyword = e
-			this.getAreaList()
-			// this.$emit('search', e)
-			// uni.reverseGeocode({
-			// 	latitude: 25.661333498914413,
-			// 	longitude: 117.5537109375
-			// }, (e) => {
-			// 	console.log(e)
-			// })
+		data() {
+			return {
+				showPopup: false,
+				keyword: '',
+				// 地图
+				// latitude: 24.44579,
+				// longitude: 118.08243,
+				// 列表
+				currentSelectAddress: null,
+				nearListData: []
+			}
 		},
-		hidePopup() {
-			this.$emit('update:show', false)
-			this.$emit('hide')
+		// onLoad(val) {
+		// 	this.mapCtx = uni.createMapContext('myMap')
+		// 	this.query = val
+		// 	this.reload()
+		// },
+
+		watch: {
+			show(val) {
+				this.showPopup = val
+
+				// #ifdef H5
+				this.$nextTick(function() {
+					this.$refs.aaaaa.$refs.searchInput._focusInput()
+				})
+				// #endif
+
+				// if (val) {
+				// 	this.getAreaList()
+				// }
+			}
 		},
-		switchAddress(item, index) {
-			this.currentSelectAddress = index
-			// this.latitude = item.location.lat
-			// this.longitude = item.location.lng
-			// if (!this.$util.isEmpty(item.province) && !this.$util.isEmpty(item.city)) {
-			// 	this.currentRegion = [item.province, item.city, item.district]
-			// }
-			this.$emit('change', item)
-			this.hidePopup()
+		methods: {
+			getAreaList() {
+				suggestion({ region: this.city, keyword: this.keyword }).then(res => {
+					this.nearListData = res.data.data
+				})
+			},
+			// 搜索
+			searchFn(e) {
+				this.keyword = e
+				this.getAreaList()
+				// this.$emit('search', e)
+				// uni.reverseGeocode({
+				// 	latitude: 25.661333498914413,
+				// 	longitude: 117.5537109375
+				// }, (e) => {
+				// 	console.log(e)
+				// })
+			},
+			hidePopup() {
+				this.$emit('update:show', false)
+				this.$emit('hide')
+			},
+			switchAddress(item, index) {
+				this.currentSelectAddress = index
+				// this.latitude = item.location.lat
+				// this.longitude = item.location.lng
+				// if (!this.$util.isEmpty(item.province) && !this.$util.isEmpty(item.city)) {
+				// 	this.currentRegion = [item.province, item.city, item.district]
+				// }
+				this.$emit('change', item)
+				this.hidePopup()
+			}
+			// 地图操作
+			// reload() {
+			// 	uni.getLocation({
+			// 		type: 'wgs84',
+			// 		success: res => {
+			// 			this.latitude = res.latitude
+			// 			this.longitude = res.longitude
+			// 			// this.nearList()
+			// 		},
+			// 		// eslint-disable-next-line handle-callback-err
+			// 		fail: err => {
+			// 			this.$msg('定位失败')
+			// 			// setTimeout(function() {
+			// 			// 	uni.navigateBack({
+			// 			// 		delta: 1
+			// 			// 	})
+			// 			// }, 1500)
+			// 		}
+			// 	})
+			// },
+			// mapChange(e) {
+			// 	if (e.type == 'end' && (e.causedBy == 'scale' || e.causedBy == 'drag')) {
+			// 		this.mapCtx.getCenterLocation({
+			// 			success: res => {
+			// 				this.longitude = res.longitude
+			// 				this.latitude = res.latitude
+			// 				// this.nearList()
+			// 			}
+			// 		})
+			// 	}
+			// },
+			// 获取列表
+			// nearList() {
+			// 	geocoder({
+			// 		latitude: this.latitude,
+			// 		longitude: this.longitude
+			// 	}).then(res => {
+			// 		console.log(res)
+			// 		let data = res.result
+			// 		this.currentSelectAddress = 0
+			// 		this.nearListData = data.pois
+			// 		// this.currentRegion = [data.address_component.province, data.address_component.city, data.address_component.district]
+			// 	})
+			// },
 		}
-		// 地图操作
-		// reload() {
-		// 	uni.getLocation({
-		// 		type: 'wgs84',
-		// 		success: res => {
-		// 			this.latitude = res.latitude
-		// 			this.longitude = res.longitude
-		// 			// this.nearList()
-		// 		},
-		// 		// eslint-disable-next-line handle-callback-err
-		// 		fail: err => {
-		// 			this.$msg('定位失败')
-		// 			// setTimeout(function() {
-		// 			// 	uni.navigateBack({
-		// 			// 		delta: 1
-		// 			// 	})
-		// 			// }, 1500)
-		// 		}
-		// 	})
-		// },
-		// mapChange(e) {
-		// 	if (e.type == 'end' && (e.causedBy == 'scale' || e.causedBy == 'drag')) {
-		// 		this.mapCtx.getCenterLocation({
-		// 			success: res => {
-		// 				this.longitude = res.longitude
-		// 				this.latitude = res.latitude
-		// 				// this.nearList()
-		// 			}
-		// 		})
-		// 	}
-		// },
-		// 获取列表
-		// nearList() {
-		// 	geocoder({
-		// 		latitude: this.latitude,
-		// 		longitude: this.longitude
-		// 	}).then(res => {
-		// 		console.log(res)
-		// 		let data = res.result
-		// 		this.currentSelectAddress = 0
-		// 		this.nearListData = data.pois
-		// 		// this.currentRegion = [data.address_component.province, data.address_component.city, data.address_component.district]
-		// 	})
-		// },
 	}
-}
 </script>
 
 <style lang="scss" scoped>

+ 14 - 14
mobile-code/src/components/app-delivery.vue

@@ -28,7 +28,7 @@
 			</tui-list-cell>
 			<tui-list-cell class="line-cell" :hover="false">
 				<div class="tui-title">门牌号</div>
-				<input v-model="form.receiveFloor" placeholder-class="phcolor" class="tui-input" name="receiveFloor" placeholder="楼号门牌号,如23号403室 (选填)" />
+				<input v-model="form.receiveFloor" placeholder-class="phcolor" class="tui-input" name="receiveFloor" placeholder="楼号门牌号(选填)" />
 			</tui-list-cell>
 		</div>
 		<!-- 订花人 -->
@@ -39,7 +39,7 @@
 			</tui-list-cell>-->
 			<tui-list-cell class="line-cell" :hover="false">
 				<div class="tui-title">订花人电话</div>
-				<input v-model="form.bookMobile" placeholder-class="phcolor" class="tui-input" name="bookMobile" placeholder="填了花送到了会通知您 (选填)" type="number" />
+				<input v-model="form.bookMobile" placeholder-class="phcolor" class="tui-input" name="bookMobile" placeholder="花送到了会通知您(选填)" type="number" />
 			</tui-list-cell>
 			<tui-list-cell class="line-cell" :hover="false" :arrow="true">
 				<div class="tui-title">送达时间</div>
@@ -60,8 +60,8 @@
 			<tui-list-cell class="line-cell" :hover="false">
 				<div class="gift-content">
 					<div class="flex-center">
-						<checkbox class="ljd-checkbox" :checked="form.needCard == 1 ? true : false" @change="needCardChange"></checkbox>
-						<span class="need-gift">需要贺卡</span>
+						<checkbox class="ljd-checkbox" id="needGift" :checked="form.needCard == 1 ? true : false" @change="needCardChange"></checkbox>
+						<label for="needGift" class="need-gift">需要贺卡</label>
 					</div>
 					<div class="gitf-textarea">
 						<textarea v-model="form.cardInfo" class="tui-textarea" placeholder-class="phcolor" name="cardInfo" placeholder="请填写贺卡内容" auto-height />
@@ -69,14 +69,14 @@
 					</div>
 				</div>
 			</tui-list-cell>
-			<block v-if="form.anonymous">
+			<!-- <block v-if="form.anonymous"> -->
 				<tui-list-cell class="line-cell" :hover="false">
 					<div class="none-name-delivery flex-center">
-						<checkbox class="ljd-checkbox" @change="anonymityChange"></checkbox>
-						<span class="none-name-text">匿名派送</span>
+						<checkbox class="ljd-checkbox" id="noneNameText" @change="anonymityChange"></checkbox>
+						<label for="noneNameText" class="none-name-text">匿名派送</label>
 					</div>
 				</tui-list-cell>
-			</block>
+			<!-- </block> -->
 		</div>
 		<!-- 备注 -->
 		<div class="module-com remark-wrap">
@@ -152,18 +152,18 @@
 		watch: {
 			orderShop(val) {
 				console.log('val', val)
-				this.form.receiveProvince = val.shop.shopProvince ? val.shop.shopProvince : ''
-				this.form.receiveCity = val.shop.shopCity ? val.shop.shopCity : ''
+				this.form.receiveProvince = val.shop.province ? val.shop.province : ''
+				this.form.receiveCity = val.shop.city ? val.shop.city : ''
 			}
 		},
 		mounted() {
 			if (!this.$util.isEmpty(this.orderShop)) {
-				this.form.receiveProvince = this.orderShop.shop.shopProvince ? this.orderShop.shop.shopProvince : ''
-				this.form.receiveCity = this.orderShop.shop.shopCity ? this.orderShop.shop.shopCity : ''
+				this.form.receiveProvince = this.orderShop.shop.province ? this.orderShop.shop.province : ''
+				this.form.receiveCity = this.orderShop.shop.city ? this.orderShop.shop.city : ''
 			}
-			if (this.anonymous) {
+			// if (this.anonymous) {
 				this.form.anonymous = '0'
-			}
+			// }
 		},
 		methods: {
 			selTimeFn(e) {

+ 3 - 1
mobile-code/src/components/module/app-order-list.vue

@@ -7,7 +7,9 @@
 				</div>
 				<div class="list-msg">
 					<div class="title">{{ info.goodsName || info.title }}</div>
-					<div class="desc">{{ info.goodsStyle || info.goodsStyleName }}</div>
+					<block v-if="(info.goodsStyle && info.goodsStyle != '0') || (info.goodsStyleName  && info.goodsStyleName != '0')">
+						<div class="desc">{{ info.goodsStyle || info.goodsStyleName }}</div>
+					</block>
 				</div>
 			</div>
 			<div class="list-right">

+ 81 - 76
mobile-code/src/components/module/app-search.vue

@@ -5,82 +5,87 @@
 				<i class="iconfont" :class="[icon]"></i>
 			</div>
 			<div class="input-wrap">
-				<input type="text" v-model="search" @input="inputFn" :style="{fontSize: fontSize + 'rpx'}" :placeholder="placeholder" placeholder-class="placeholder" />
+				<input ref="searchInput" type="text" v-model="search" :focus="focus" @input="inputFn" :style="{fontSize: fontSize + 'rpx'}" :placeholder="placeholder" placeholder-class="placeholder" />
 			</div>
 		</div>
-        <block v-if="isBtn">
-            <button v-if="isTextBtn" class="search-btn" :style="{fontSize: fontSize + 'rpx'}" @click="searchFn">{{ btnText }}</button>
-		    <button v-else class="search-btn admin-button-com middle blue" :style="{fontSize: fontSize + 'rpx'}" @click="searchFn">{{ btnText }}</button>
-        </block>
+		<block v-if="isBtn">
+			<button v-if="isTextBtn" class="search-btn" :style="{fontSize: fontSize + 'rpx'}" @click="searchFn">{{ btnText }}</button>
+			<button v-else class="search-btn admin-button-com middle blue" :style="{fontSize: fontSize + 'rpx'}" @click="searchFn">{{ btnText }}</button>
+		</block>
 	</div>
 </template>
 
 <script>
-export default {
-	name: 'app-search-module',
-	props: {
-		// 搜索组件的高度
-		height: {
-			type: Number,
-			default: 66
-		},
-		placeholder: {
-			type: String,
-			default: '请输入'
-		},
-		// size字体大小
-		fontSize: {
-			type: Number,
-			default: 26
-		},
-		// 是否有icon
-		isIcon: {
-			type: Boolean,
-			default: true
-		},
-		// 显示的icon
-		icon: {
-			type: String,
-			default: 'iconsearch'
-		},
-		// 背景色
-		backColor: {
-			type: String,
-			default: '#F0F2F6'
-		},
-		// 是否需要按钮
-		isBtn: {
-			type: Boolean,
-			default: false
-		},
-		// 是否是文字按钮
-		isTextBtn: {
-			type: Boolean,
-			default: true
+	export default {
+		name: 'app-search-module',
+		props: {
+			// 搜索组件的高度
+			height: {
+				type: Number,
+				default: 66
+			},
+			placeholder: {
+				type: String,
+				default: '请输入'
+			},
+			// size字体大小
+			fontSize: {
+				type: Number,
+				default: 26
+			},
+			// 是否有icon
+			isIcon: {
+				type: Boolean,
+				default: true
+			},
+			// 显示的icon
+			icon: {
+				type: String,
+				default: 'iconsearch'
+			},
+			// 背景色
+			backColor: {
+				type: String,
+				default: '#F0F2F6'
+			},
+			// 是否需要按钮
+			isBtn: {
+				type: Boolean,
+				default: false
+			},
+			// 是否是文字按钮
+			isTextBtn: {
+				type: Boolean,
+				default: true
+			},
+			// 按钮文字
+			btnText: {
+				type: String,
+				default: '搜索'
+			},
+			// 是否自动聚焦
+			focus: {
+				type: Boolean,
+				default: false
+			}
 		},
-		// 按钮文字
-		btnText: {
-			type: String,
-			default: '搜索'
-		}
-	},
-	data() {
-		return {
-			search: ''
-		}
-	},
-	methods: {
-		searchFn() {
-			this.$emit('search', this.search)
+		data() {
+			return {
+				search: ''
+			}
 		},
-		inputFn(e) {
-			// console.log('sdfa', e)
-			setTimeout(() => {
-				this.$emit('input', this.search)
-			})
+		methods: {
+			searchFn() {
+				this.$emit('search', this.search)
+			},
+			inputFn(e) {
+				// console.log('sdfa', e)
+				setTimeout(() => {
+					this.$emit('input', this.search)
+				})
+			}
 		}
 	}
-}
 </script>
 
 <style lang="scss" scoped>
@@ -89,7 +94,7 @@ export default {
 		@include disFlex(center, space-between);
 		.map-search {
 			@include disFlex(center, flex-start);
-		    width: 100%;
+			width: 100%;
 			height: 100%;
 			border-radius: 10px;
 			.icon-wrap {
@@ -110,14 +115,14 @@ export default {
 					color: #ccc;
 				}
 			}
-        }
-        // 按钮
-        .search-btn {
-            height: 100%;
-            padding: 0 20px;
-            flex-shrink: 0;
-            margin-left: 20px;
-            background-color: inherit;
-        }
+		}
+		// 按钮
+		.search-btn {
+			height: 100%;
+			padding: 0 20px;
+			flex-shrink: 0;
+			margin-left: 20px;
+			background-color: inherit;
+		}
 	}
 </style>

+ 5 - 1
mobile-code/src/components/module/app-share-mask.vue

@@ -7,7 +7,7 @@
 				</div>
 				<div class="share-text">
 					<div>点此右上角</div>
-					<div>分享即可邀请</div>
+					<div>{{ text }}</div>
 				</div>
 			</div>
 			<div class="share-btn">
@@ -25,6 +25,10 @@ export default {
 		show: {
 			type: Boolean,
 			default: false
+		},
+		text: {
+			type: String,
+			default: '分享即可邀请'
 		}
 	},
 	data() {

+ 1 - 1
mobile-code/src/official/apply.vue

@@ -18,7 +18,7 @@
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
 					<div class="tui-title">门牌号</div>
-					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号,如23号403室 (选填)" />
+					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(选填)" />
 				</tui-list-cell>
 			</div>
 			<!-- 手机号 -->

+ 1 - 1
mobile-code/src/official/index.vue

@@ -94,7 +94,7 @@
 				],
 				contentData: [
 					{
-						title: `<span class="app-color-1">一键搭建</span>移动商城和小程序商城`,
+						title: `<span class="app-color-1">一键搭建</span>花店个性商城`,
 						subTitle: `各大节日商城自动涨价,客户下单自动按距离计算运费`,
 						img: `${this.$constant.imgUrl}/retail/official/content-1.png`
 					},

+ 10 - 6
mobile-code/src/pages/callback/index.vue

@@ -121,7 +121,9 @@ export default {
 			passwordModal: false,
 			form: {
 				payPassword: ''
-			}
+			},
+
+			payCallData: {}
 		}
 	},
 	computed: {
@@ -158,7 +160,9 @@ export default {
 				.then(res => {
 					this.modalCancel()
 					this.$msg('支付成功!')
-					this.paySuccess(res)
+
+					this.payCallData = res.data
+					this.paySuccess()
 				})
 				.catch(e => {
 					this.$msg(e.msg)
@@ -171,19 +175,19 @@ export default {
 				orderSn: this.option.orderSn,
 				couponId: this.option.couponId
 			}).then(res => {
+				this.payCallData = res.data
 				wexinPay(res.data, this.paySuccess, this.payFail)
 			})
 		},
-		paySuccess(res) {
-			// alert('支付成功!')
+		paySuccess() {
 			this.$util.pageTo({
 				url: '/pages/callback/index',
 				type: 2,
 				query: {
+					...this.option,
 					pagestatus: 3,
 					// orderSn: this.option.orderSn,
-					payDiscountPrice: res.data.discountAmount,
-					...this.option
+					payDiscountPrice: this.payCallData.discountAmount
 				}
 			})
 		},

+ 22 - 12
mobile-code/src/pages/goods/components/sel-popup.vue

@@ -5,21 +5,25 @@
             <div class="tui-popup-box">
 				<div class="tui-product-box">
 					<img :src="imgNormal" class="tui-popup-img" />
-					<div class="tui-popup-price">
-                        <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 class="tui-popup-price" v-if="!$util.isEmpty(info.goodsStyleList)">
+                        <div class="goods-tit app-bold app-font-size-30">{{ info.goodsStyleList[selIndex].styleName }}</div>
+						<div class="tui-amount tui-bold">¥{{ info.goodsStyleList[selIndex].price }}</div>
+					</div>
+					<div class="tui-popup-price" v-else>
+                        <div class="goods-tit app-bold app-font-size-30">{{ info.goodsName }}</div>
+						<div class="tui-amount tui-bold">¥{{ info.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" :class="{'tui-attr-active': selIndex}" v-for="(item, index) in info.goodsStyleList" :key="index">{{ item.title }}</div>
+							<div class="tui-attr-item" :class="{'tui-attr-active': selIndex == index}" v-for="(item, index) in info.goodsStyleList" :key="index" @click="changeStyleFn(index)">{{ item.styleName }}</div>
 						</div>
 
 						<div class="tui-number-box tui-bold tui-attr-title">
 							<div class="tui-attr-title">数量</div>
-							<number-box :max="99" :min="1" :value="buyNum" @change="change"></number-box>
+							<number-box :max="info.stock" :min="1" :value="buyNum" @change="change"></number-box>
 						</div>
 					</div>
 				</scroll-view>
@@ -50,10 +54,10 @@ export default {
 				return {}
 			}
 		},
-		selIndex: {
-			type: Number,
-			default: 0
-		},
+		// selIndex: {
+		// 	type: Number,
+		// 	default: 0
+		// },
 		buyNum: {
 			type: Number,
 			default: 1
@@ -64,12 +68,14 @@ export default {
 		}
 	},
 	data() {
-		return {}
+		return {
+			selIndex: 0
+		}
 	},
 	computed: {
 		imgNormal() {
 			if (!this.$util.isEmpty(this.info)) {
-				return this.info.imgList[0].normal
+				return this.info.smallImgList[0]
 			} else {
 				return ''
 			}
@@ -82,6 +88,9 @@ export default {
 		close() {
 			this.$emit('close')
 		},
+		changeStyleFn(index) {
+			this.selIndex = index
+		},
 		nextFn() {
 			uni.setStorageSync('buyGoodsDetil', this.info)
 			this.$util.pageTo({
@@ -89,7 +98,8 @@ export default {
 				query: {
 					goodsId: this.info.id,
 					goodsStyleId: this.$util.isEmpty(this.info.goodsStyleList) ? '' : this.info.goodsStyleList[this.selIndex].id,
-					goodsNum: this.buyNum
+					goodsNum: this.buyNum,
+					selIndex: this.selIndex
 				}
 			})
 		}

+ 120 - 74
mobile-code/src/pages/goods/detail.vue

@@ -10,7 +10,7 @@
 			</div>
 			<div class="tui-pro-titbox">
 				<div class="tui-pro-title app-size-32">{{ data.goodsName }}</div>
-				<button open-type="share" class="tui-share-btn tui-share-position">
+				<button open-type="share" class="tui-share-btn tui-share-position" @click="shareFn">
 					<app-tag type="gray" tui-tag-class="tui-tag-share tui-size" shape="circleLeft" size="small">
 						<div class="flex-center">
 							<i class="iconfont iconfenxiang"></i>
@@ -54,89 +54,135 @@
 		<buy-foot @buy="showPopup" />
 		<!-- login -->
 		<go-login :show.sync="loginShow" />
+		<!-- 分享 -->
+		<app-share-mask :show="showShare" text="即可分享商品" @click="hideShare" />
 	</div>
 </template>
 
 <script>
-import AppImg from '@/components/app-img'
-import AppSwiper from '@/components/app-swiper'
-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 GoLogin from '@/pages/home/components/go-login.vue'
-// api
-import { getDetail } from '@/api/goods'
-export default {
-	name: 'goods-detail',
-	components: {
-		AppSwiper,
-		AppTag,
-		AppTrademark,
-		BuyFoot,
-		SelPopup,
-		AppImg,
-		GoLogin
-	},
-	data() {
-		return {
-			data: {},
-			imgList: [],
-			buyNum: 1,
-			popupShow: false,
-			loginShow: false
-		}
-	},
-	onLoad(option) {
-	},
-	mounted() {
-		// this.$util.getCheckLogin().then(res => {
-		// 	if (!res) return false
-		// this.init()
-		// })
-	},
-	computed: {
-		// imgNormal() {
-		// 	if (!this.$util.isEmpty(this.data)) {
-		// 		return this.data.imgList[0]
-		// 	} else {
-		// 		return ''
-		// 	}
-		// }
-	},
-	methods: {
-		init() {
-			this._getDetail()
+	import AppImg from '@/components/app-img'
+	import AppSwiper from '@/components/app-swiper'
+	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 GoLogin from '@/pages/home/components/go-login.vue'
+	import AppShareMask from '@/components/module/app-share-mask'
+	import { share } from '@/mixins'
+	// api
+	import { getDetail } from '@/api/goods'
+	export default {
+		name: 'goods-detail',
+		mixins: [share],
+		components: {
+			AppSwiper,
+			AppTag,
+			AppTrademark,
+			BuyFoot,
+			SelPopup,
+			AppImg,
+			GoLogin,
+			AppShareMask
 		},
-		_getDetail() {
-			getDetail({ id: this.option.id }).then(res => {
-				if (this.$util.isEmpty(res.data)) return false
-				this.data = res.data
-				let newArr = []
-				for (let i in res.data.imgList) {
-					newArr.push({
-						img: res.data.imgList[i]
-					})
-				}
-				this.imgList = newArr
-			})
+		data() {
+			return {
+				data: {},
+				imgList: [],
+				buyNum: 1,
+				popupShow: false,
+				loginShow: false,
+				// share
+				showShare: false
+			}
 		},
-		// 更换数量
-		changeNum(e) {
-			this.buyNum = e.value
+		onLoad(option) {},
+		mounted() {
+			// this.$util.getCheckLogin().then(res => {
+			// 	if (!res) return false
+			// this.init()
+			// })
 		},
-		showPopup() {
-			if (this.$util.isLogin()) {
-				this.popupShow = true
-			} else {
-				this.loginShow = true
-			}
+		computed: {
+			// imgNormal() {
+			// 	if (!this.$util.isEmpty(this.data)) {
+			// 		return this.data.imgList[0]
+			// 	} else {
+			// 		return ''
+			// 	}
+			// }
 		},
-		hidePopup() {
-			this.popupShow = false
+		methods: {
+			init() {
+				// #ifdef H5
+				// 微信二次分享
+				let href = window.location.href
+				if (href.indexOf('from=singlemessage') > 0) {
+					location.href = `${this.$constant.formal}/#/pages/interest/invite${this.$util.parse(this.option)}`
+					return false
+				}
+				// #endif
+
+				this._getDetail().then(() => {
+					// 设置分享
+					let shareParams = {
+						title: `${this.data.goodsName}`, // 分享标题
+						desc: '这束花不错推荐给你', // 分享内容
+						imgUrl: this.data.smallImgList[0],
+						// #ifdef H5
+						pagePath: `${window.location.protocol}//m.${this.$constant.firstHost}.com/#/pages/goods/detail?id=${this.data.id}`,
+						// #endif
+						// #ifndef H5
+						pagePath: `/pages/goods/detail?id=${this.data.id}`
+						// #endif
+					}
+					this.jweixinFn(shareParams)
+				})
+			},
+			async _getDetail() {
+				await getDetail({ id: this.option.id }).then(res => {
+					if (this.$util.isEmpty(res.data)) return false
+					let newArr = []
+					for (let i in res.data.imgList) {
+						newArr.push({
+							img: res.data.imgList[i]
+						})
+					}
+					this.imgList = newArr
+					// 格式化数据
+					let goodsStyleList = []
+					for (let i in res.data.goodsStyleList) {
+						goodsStyleList.push(res.data.goodsStyleList[i])
+					}
+					res.data.stock = res.data.stock ? parseInt(res.data.stock) : 0
+					res.data.goodsStyleList = goodsStyleList
+					
+					this.data = res.data
+				})
+			},
+			// 更换数量
+			changeNum(e) {
+				this.buyNum = e.value
+			},
+			showPopup() {
+				if (this.$util.isLogin()) {
+					this.popupShow = true
+				} else {
+					this.loginShow = true
+				}
+			},
+			hidePopup() {
+				this.popupShow = false
+			},
+			// 分享
+			shareFn() {
+				console.log('asdfasdf')
+				this.showShare = true
+			},
+			hideShare() {
+				this.showShare = false
+			}
 		}
 	}
-}
 </script>
 
 <style lang="scss" scoped>

+ 20 - 4
mobile-code/src/pages/order/buy.vue

@@ -27,6 +27,13 @@
 				<div class="module-tit">商品金额</div>
 				<div class="module-det">
 					<app-list-module v-if="!$util.isEmpty(goodsInfo)" :info="goodsInfo" />
+					<div class="shop-prompt">
+						<div>
+							<span>运费(6公里)</span>
+							<i class="iconfont iconchangjianwentixiangguanwenti2"></i>
+						</div>
+						<div>¥{{ goodsInfo.price }}</div>
+					</div>
 					<div class="shop-prompt">
 						<div>总计</div>
 						<div>¥{{ goodsInfo.price * option.goodsNum }}</div>
@@ -139,9 +146,11 @@
 			// 计算总金额
 			totalPrice() {
 				let totalPrice = this.goodsInfo.price * this.option.goodsNum
-				let discountMember = this.$util.isEmpty(this.shopUser) ? this.shopUser.userAsset.discount * totalPrice : 1 * totalPrice
-				discountMember = discountMember / 10
-				return discountMember.toFixed(2)
+				console.log('this.shopUser', this.shopUser)
+				// let discountMember = this.$util.isEmpty(this.shopUser) ? this.shopUser.userAsset.discount * totalPrice : 1 * totalPrice
+				// discountMember = discountMember / 10
+				// return discountMember.toFixed(2)
+				return totalPrice.toFixed(2)
 			}
 		},
 		onLoad(option) {
@@ -150,6 +159,7 @@
 		methods: {
 			init() {
 				let goodsInfo = uni.getStorageSync('buyGoodsDetil')
+				goodsInfo.price = this.option.goodsStyleId ? goodsInfo.goodsStyleList[this.option.selIndex].price : goodsInfo.price
 				// if (this.$util.isEmpty(goodsInfo)) {
 				// 	this.$util.pageTo({
 				// 		url: `/pages/goods/detail`,
@@ -274,11 +284,17 @@
 		}
 		// 商品金额
 		.shop-price-wrap {
+			.module-det {
+				padding-bottom: 20px;
+			}
 			.shop-prompt {
 				@include disFlex(center, space-between);
 				color: $fontColor2;
 				margin-top: 20px;
-				padding-bottom: 20px;
+				.iconchangjianwentixiangguanwenti2 {
+					color: #ccc;
+					margin-left: 10px;
+				}
 			}
 		}
 		// 可选优惠

+ 15 - 0
mobile-code/src/plugins/luch-request_0.0.7/request.js

@@ -163,6 +163,21 @@ class Request {
 								// 	url: `/pages/page/login/index`
 								// })
 							}, 1000)
+						} else if (response.data.code == 2) {
+							uni.removeStorageSync('token')
+							uni.removeStorageSync('shopUser')
+							uni.removeStorageSync('account')
+							uni.showToast({
+								title: '登录失效,正在重新登录...',
+								icon: 'none',
+								mask: true
+							})
+							setTimeout(() => {
+								getCheckLogin()
+								// uni.reLaunch({
+								// 	url: `/pages/page/login/index`
+								// })
+							}, 1000)
 						} else {
 							console.log('response.data', response.data)
 							if (!config.hideError) {

+ 1 - 1
mobile/index.html

@@ -1,3 +1,3 @@
 <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><title>花卉宝</title><script>document.addEventListener('DOMContentLoaded', function() {
 				document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
-			})</script><link rel=stylesheet href=/static/index.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script>/*BAIDU_STAT*/</script><script src=/static/js/chunk-vendors.69b3ba76.js></script><script src=/static/js/index.d644a1f8.js></script></body></html>
+			})</script><link rel=stylesheet href=/static/index.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script>/*BAIDU_STAT*/</script><script src=/static/js/chunk-vendors.6e20f2ca.js></script><script src=/static/js/index.f8bf6c6d.js></script></body></html>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/chunk-vendors.69b3ba76.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/chunk-vendors.6e20f2ca.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/index.d644a1f8.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/index.f8bf6c6d.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-callback-index.41d48fb7.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-callback-index.d6127b7f.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-chat-index.4a718f23.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-chat-index.5e5ab486.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-goods-detail.a97abb92.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-goods-detail.d20d15f7.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-interest-invite.1e787015.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-interest-invite.4d46fe78.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-order-buy.36539707.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-order-buy.e0d4034a.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-order-buy~pages-pay-index.23122297.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-order-buy~pages-pay-index.a3b8bf14.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-order-buy~pages-user-password~pages-user-register.35c3f4ea.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-order-detail.27fa531a.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-order-detail.72809c84.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-order-list.70cb54cd.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-order-list.fc7f2ffe.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-user-password.839e0c6b.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-user-register.f120af4a.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
mobile/static/js/pages-user-register.fea6046b.js


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio