Quellcode durchsuchen

小程序更新

xiaoshushu vor 3 Jahren
Ursprung
Commit
7f3f571992

+ 2 - 2
smart-ui-app/App.vue

@@ -25,8 +25,8 @@ button::after { border: none }
 /**挂载iconfont图表*/
 @font-face {
 	font-family: 'iconfont';
-	src: url('https://at.alicdn.com/t/font_2816842_arp22mrk3ue.ttf?t=1633749647568') format('truetype');
-	/* src: url('~@/static/font/iconfont.ttf') format('truetype'); */
+	src: url('https://at.alicdn.com/t/font_2816842_e3onhmsg2jb.ttf?t=1633856419950') format('truetype'); //在线
+	// src: url('~@/static/font/iconfont.ttf') format('truetype'); //本地
 }
 .icon {
 	font-family: iconfont;

+ 0 - 10
smart-ui-app/common/common.scss

@@ -127,16 +127,6 @@
 		font-size: 14px;
 		padding-left: 15px;
 	}
-	textarea {
-		margin-left: 17px;
-		font-size: 14px;
-		flex: 0.7;
-		padding: 5px 10px 5px 5px;
-		width: 90%;
-		height: 70px;
-		border: 1px solid #f1f1f1;
-		border-radius: 5px;
-	}
 	.u-upload{
 		margin-left: 20px;
 	}

+ 26 - 27
smart-ui-app/pages.json

@@ -4,20 +4,11 @@
 	},
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
 		{
-			"path": "pages/shop/list",
-			"style": {
-				"navigationBarTitleText": "我的店铺",
-				"enablePullDownRefresh": false
-			}
-		
-		},
-		{
-			"path": "pages/shop/apply",
+			"path": "pages/index/index",
 			"style": {
-				"navigationBarTitleText": "店铺开通申请",
-				"enablePullDownRefresh": false
+				"navigationBarTitleText": "",
+				"navigationStyle": "custom"
 			}
-		
 		},
 		{
 			"path": "pages/user/my",
@@ -27,19 +18,29 @@
 			}
 		},
 		{
-			"path": "pages/index/index",
+			"path": "pages/shop/list",
 			"style": {
-				"navigationBarTitleText": "",
-				"navigationStyle": "custom"
+				"navigationBarTitleText": "我的店铺",
+				"enablePullDownRefresh": true,
+				"backgroundTextStyle": "dark"
 			}
+		
 		},
 		{
 			"path": "pages/shop/up",
 			"style": {
-				"navigationBarTitleText": "门店数据上报",
+				"navigationBarTitleText": "数据上报",
 				"enablePullDownRefresh": false
 			}
-
+		
+		},
+		{
+			"path": "pages/shop/apply",
+			"style": {
+				"navigationBarTitleText": "店铺开通申请",
+				"enablePullDownRefresh": false
+			}
+		
 		},
 		{
 			"path": "pages/travel/detail",
@@ -106,17 +107,15 @@
 				"backgroundTextStyle": "dark"
 			}
 
+		}, {
+			"path": "pages/travel/route",
+			"style": {
+				"navigationBarTitleText": "路线",
+				"enablePullDownRefresh": false
+			}
+
 		}
-	    ,{
-            "path" : "pages/travel/route",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "路线",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-    ],
+	],
 	"tabBar": {
 		"color": "#7A7E83",
 		"selectedColor": "#c74547",

+ 40 - 48
smart-ui-app/pages/shop/apply.vue

@@ -14,6 +14,10 @@
 					<view class="dw icon" @click="wz(1)">&#xe64a;</view>
 				</view>
 				<view class="form_group hr">
+					<view class="lable">地图坐标</view>
+					<input type="number" placeholder="请在地图上选择坐标" @click="wz(2)" v-model="zb" :disabled="true" />
+				</view>
+				<view class="form_group hr">
 					<view class="lable">老板名称</view>
 					<input type="text" placeholder="请输入老板名称" v-model="item.bossName" />
 				</view>
@@ -21,10 +25,6 @@
 					<view class="lable">老板电话</view>
 					<input type="number" placeholder="请输入老板电话" v-model="item.bossPhone" />
 				</view>
-				<view class="form_group hr">
-					<view class="lable">地图坐标</view>
-					<input type="number" placeholder="请在地图上选择坐标" @click="wz(2)" v-model="zb" :disabled="true" />
-				</view>
 				<view class="form_group"><view class="lable">商铺展示</view></view>
 				<view class="pl5">
 					<u-upload
@@ -34,7 +34,7 @@
 						:size-type="upload.size"
 						:max-count="upload.count"
 						:name="upload.name"
-						:file-list="fileList"
+						:file-list="item.showPictures"
 						:deletable="item.auditFlag != 1"
 						:show-progress="item.auditFlag != 1"
 						:custom-btn="item.auditFlag == 1"
@@ -43,10 +43,8 @@
 						height="140"
 					></u-upload>
 				</view>
-				<view class="form_group hr">
-					<view class="lable">商铺简介</view>
-					<textarea placeholder="请输入商铺简介" v-model="item.briefContent" />
-				</view>
+				<view class="form_group"><view class="lable">商铺简介</view></view>
+				<textarea placeholder="请输入商铺简介(200字以内)" v-model="item.briefContent" maxlength="200" />
 			</view>
 			<button class="btn" @click="up()" v-if="!item.auditFlag">申请开通</button>
 			<button class="btn" @click="up()" v-if="item.auditFlag == 0">更新资料</button>
@@ -71,8 +69,7 @@ export default {
 				action: this.$http.urls.uploadImg,
 				size_type: 'compressed ',
 				count: 5
-			},
-			fileList: []
+			}
 		};
 	},
 	onLoad(e) {
@@ -87,7 +84,6 @@ export default {
 				}
 			});
 			this.item.shopType = this.subsection[this.current].value;
-			this.fileList = JSON.parse(this.item.showPictures);
 			if (this.item.auditFlag == 0) {
 				this.num = 1;
 			}
@@ -102,56 +98,42 @@ export default {
 		},
 		//定位
 		wz(index) {
-			uni.getLocation({
-				type: 'gcj02', //返回可以用于uni.openLocation的经纬度
-				success: res => {
-					uni.chooseLocation({
-						success: r => {
-							console.log('asd:' + JSON.stringify(r));
-							if (index == 1) {
-								this.item.addres = r.address;
-								this.zb = '纬度:' + r.latitude + ' 经度:' + r.longitude;
-								this.item.lat = r.latitude;
-								this.item.lng = r.longitude;
-							}
-							if (index == 2) {
-								this.zb = '纬度:' + r.latitude + ' 经度:' + r.longitude;
-								this.item.lat = r.latitude;
-								this.item.lng = r.longitude;
-							}
-							this.$forceUpdate();
-						}
-					});
-				},
-				fail: res => {
-					console.log('zx:' + JSON.stringify(res));
+			uni.chooseLocation({
+				success: r => {
+					if (index == 1) {
+						this.item.addres = r.address;
+					}
+					this.zb = '纬度:' + r.latitude + ' 经度:' + r.longitude;
+					this.item.lat = r.latitude;
+					this.item.lng = r.longitude;
+					this.$forceUpdate();
 				}
 			});
 		},
 		up() {
+			this.item.showPictures = [];
+			let files = this.$refs.uUpload.lists.filter(val => {
+				return val.progress == 100;
+			});
+			files.forEach(item => {
+				if (item.response) {
+					this.item.showPictures.push({ url: item.response.fileName }); //获取上传成功的网络地址
+				} else {
+					this.item.showPictures.push({ url: item.url }); //原来的地址
+				}
+			});
 			let rule = [
 				{ name: 'name', checkType: 'notnull', errorMsg: '请输入商铺名称' },
 				{ name: 'addres', checkType: 'notnull', errorMsg: '请输入商铺地址' },
 				{ name: 'bossName', checkType: 'notnull', errorMsg: '请输入老板名称' },
 				{ name: 'bossPhone', checkType: 'notnull', errorMsg: '请输入老板电话' },
-				{ name: 'lat', checkType: 'notnull', errorMsg: '请在地图上选择坐标' }
+				{ name: 'lat', checkType: 'notnull', errorMsg: '请在地图上选择坐标' },
+				{ name: 'showPictures', checkType: 'notnull', errorMsg: '请上传至少1张展示图' }
 			];
 			if (!this.$verify.check(this.item, rule)) {
 				uni.showModal({ content: this.$verify.error, showCancel: false });
 				return;
 			}
-			this.item.showPictures = [];
-			let files = this.$refs.uUpload.lists.filter(val => {
-				return val.progress == 100;
-			});
-			files.forEach(item => {
-				//response获取上传成功的网络地址
-				if (item.response) {
-					this.item.showPictures.push({ url: item.response.fileName });
-				} else {
-					this.item.showPictures.push({ url: item.url });
-				}
-			});
 			this.item.shopType = this.subsection[this.current].value;
 			this.item.memberId = this.$getUser().memberId;
 			this.item.showPictures = JSON.stringify(this.item.showPictures);
@@ -186,6 +168,7 @@ export default {
 		background-color: white;
 		border-radius: 5px;
 		margin-top: 10px;
+		padding-bottom: 10px;
 		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
 		.dw {
 			top: 11px;
@@ -194,6 +177,15 @@ export default {
 			position: absolute;
 		}
 	}
+	textarea {
+		margin-left: 17px;
+		font-size: 14px;
+		padding: 10px;
+		width: 85%;
+		height: 85px;
+		border: 1px solid #f1f1f1;
+		border-radius: 5px;
+	}
 	.btn {
 		margin-top: 25px;
 	}

Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 5
smart-ui-app/pages/shop/list.vue


+ 18 - 15
smart-ui-app/pages/shop/up.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<view class="mtop"><image src="../../static/my.jpg" mode="widthFix"></image></view>
+		<view class="mtop"><text class="icon">&#xe617;</text></view>
 		<view class="time">上次上报:{{ time }}</view>
 		<view class="cn">
 			<view class="info">
@@ -26,7 +26,7 @@
 				</view>
 				<view class="form_group hr">
 					<view class="lable">销售时间</view>
-					<input type="text" placeholder="请选择销售时间" v-model="item.salesTime" @click="show = true" />
+					<input type="text" placeholder="请选择销售时间" :disabled="true" v-model="item.salesTime" @click="show = true" />
 					<u-calendar v-model="show" @change="change"></u-calendar>
 				</view>
 			</view>
@@ -39,23 +39,22 @@
 export default {
 	data() {
 		return {
-			item: {},
+			item: { shopType: 1 },
 			time: '未上报过',
 			show: false
 		};
 	},
 	onLoad(e) {
 		if (e.item) {
-			let shop = JSON.parse(e.item);
-			this.item.shopId = shop.shopId;
-			if (shop.shopType == 1) {
+			this.item = JSON.parse(e.item);
+			if (this.item.shopType == 1) {
 				this.$nextTick(() => {
 					uni.setNavigationBarTitle({
 						title: '门店数据上报'
 					});
 				});
 			}
-			if (shop.shopType == 2) {
+			if (this.item.shopType == 2) {
 				this.$nextTick(() => {
 					uni.setNavigationBarTitle({
 						title: '酒店数据上报'
@@ -63,13 +62,14 @@ export default {
 				});
 			}
 		}
-		if (uni.getStorageSync('time') != '') {
-			this.time = this.$u.timeFrom(new Date(uni.getStorageSync('time').replace(/\-/g, '/')).getTime());
+		//上报时间
+		if (uni.getStorageSync('time-' + this.item.shopId) != '') {
+			this.time = this.$u.timeFrom(new Date(uni.getStorageSync('time-' + this.item.shopId).replace(/\-/g, '/')).getTime());
 		}
 	},
 	methods: {
 		change(e) {
-			this.item.salesTime=e.result;
+			this.item.salesTime = e.result;
 		},
 		up() {
 			let rule = [
@@ -77,7 +77,8 @@ export default {
 				{ name: 'scatteredReception', checkType: 'notnull', errorMsg: '请输入散客接待人数' },
 				{ name: 'groupAppointment', checkType: 'notnull', errorMsg: '请输入团客预约人数' },
 				{ name: 'groupReception', checkType: 'notnull', errorMsg: '请输入团客接待人数' },
-				{ name: 'salesAmount', checkType: 'notnull', errorMsg: '请输入销售金额' }
+				{ name: 'salesAmount', checkType: 'notnull', errorMsg: '请输入销售金额' },
+				{ name: 'salesTime', checkType: 'notnull', errorMsg: '请选择销售时间' }
 			];
 			if (!this.$verify.check(this.item, rule)) {
 				uni.showModal({ content: this.$verify.error, showCancel: false });
@@ -89,7 +90,7 @@ export default {
 				data: this.item,
 				success: res => {
 					uni.showToast({ title: '上报成功' });
-					uni.setStorageSync('time', this.$util.getDate('time'));
+					uni.setStorageSync('time-' + this.item.shopId, this.$util.getDate('time'));
 					setTimeout(() => {
 						uni.navigateBack();
 					}, 700);
@@ -103,15 +104,17 @@ export default {
 <style lang="scss">
 .mtop {
 	text-align: center;
-	image {
-		margin-top: 15px;
-		width: 40%;
+	margin-top: 20px;
+	.icon {
+		font-size: 90px;
+		color: $dar;
 	}
 }
 .time {
 	text-align: center;
 	color: $dar;
 	font-size: 13px;
+	margin-top: 10px;
 }
 .cn {
 	padding: 15px;

+ 0 - 2
smart-ui-app/pages/user/my.vue

@@ -35,12 +35,10 @@
 				<view class="item hr" @click="navigate('/pages/user/info')">
 					<text class="icon ic">&#xe626;</text>
 					<text>个人资料</text>
-					<text class="icon arrow">&#xe65a;</text>
 				</view>
 				<view class="item" @click="navigate('/pages/other/about')">
 					<text class="icon ic">&#xe65f;</text>
 					<text>关于我们</text>
-					<text class="icon arrow">&#xe65a;</text>
 				</view>
 			</view>
 		</view>

BIN
smart-ui-app/static/bg.jpg


BIN
smart-ui-app/static/bj.jpg


BIN
smart-ui-app/static/my.jpg


BIN
smart-ui-app/static/sj.png


BIN
smart-ui-app/static/tab/goods.png


BIN
smart-ui-app/static/tab/goods_select.png


BIN
smart-ui-app/static/tab/shopcar.png


BIN
smart-ui-app/static/tab/shopcar_select.png


Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.