shish 4 лет назад
Родитель
Сommit
d4ac18d71a

+ 1 - 1
ghsApp/src/admin/billing/affirm.vue

@@ -23,7 +23,7 @@
                     <view class="open-bx" >
                     <view class="open-bx" >
                       <i class="iconfont iconjian" @click.stop="reduceItemFn(item)" v-if="item.bigCount > 0 || item.smallCount > 0"></i>
                       <i class="iconfont iconjian" @click.stop="reduceItemFn(item)" v-if="item.bigCount > 0 || item.smallCount > 0"></i>
                       <text class="num" >
                       <text class="num" >
-                        <text v-if="item.bigCount > 0 || item.smallCount > 0">{{ item.bigCount }}</text>
+                        <text>{{ Number(item.bigCount) > 0 ? Number(item.bigCount) : 0 }}</text>
                         <text v-if="item.smallCount > 0">/</text>
                         <text v-if="item.smallCount > 0">/</text>
                         <text v-if="item.smallCount > 0">{{ item.smallCount }}</text>
                         <text v-if="item.smallCount > 0">{{ item.smallCount }}</text>
                       </text>
                       </text>

+ 8 - 4
ghsApp/src/admin/home/me.vue

@@ -198,13 +198,17 @@ export default {
         title: "加载中",
         title: "加载中",
       });
       });
       try {
       try {
-
         await toggleShop({ shopId: this.shopId })
         await toggleShop({ shopId: this.shopId })
-
-        //这个切换得更彻底
+        // #ifdef MP-WEIXIN
         this.$store.commit("setLoginInfo", {})
         this.$store.commit("setLoginInfo", {})
         this.$util.pageTo({url: "/admin/home/me",type: 3})
         this.$util.pageTo({url: "/admin/home/me",type: 3})
-
+        // #endif
+        // #ifdef APP-PLUS
+        this.$store.commit("setLoginInfo", {})
+        this.$store.commit("setDictionariesInfo", {})
+        this.$store.commit("setMyShopInfo", {})
+        plus.runtime.restart()
+        // #endif
       } finally {
       } finally {
         uni.hideLoading();
         uni.hideLoading();
       }
       }

+ 10 - 2
ghsApp/src/admin/home/workbench.vue

@@ -196,7 +196,7 @@ export default {
 		...mapActions(['setUserShopAll']),
 		...mapActions(['setUserShopAll']),
 
 
 		loginFun(mobile,password){
 		loginFun(mobile,password){
-
+			uni.showLoading({mask:true})
 			//有几个地方涉及登陆,需要统一方法,请搜索关键词 uni_login
 			//有几个地方涉及登陆,需要统一方法,请搜索关键词 uni_login
 			appLogin({mobile,password}).then(subRes=>{
 			appLogin({mobile,password}).then(subRes=>{
 
 
@@ -228,6 +228,7 @@ export default {
 					// #endif
 					// #endif
 					this.setUserShopAll()
 					this.setUserShopAll()
 					this.init()
 					this.init()
+					uni.hideLoading()
 				}
 				}
 			})
 			})
 
 
@@ -236,9 +237,16 @@ export default {
 			let that = this
 			let that = this
 			that.$util.confirmModal({title:"确定关闭?",content:'关闭后可以在底部菜单【我的】,找到【使用手册】重新打开'},() => {
 			that.$util.confirmModal({title:"确定关闭?",content:'关闭后可以在底部菜单【我的】,找到【使用手册】重新打开'},() => {
 				closeBook().then((res) => {
 				closeBook().then((res) => {
-					//这个切换得更彻底
+					// #ifdef MP-WEIXIN
 					that.$store.commit("setLoginInfo", {})
 					that.$store.commit("setLoginInfo", {})
 					that.$util.pageTo({url: "/admin/home/workbench",type: 3})
 					that.$util.pageTo({url: "/admin/home/workbench",type: 3})
+					// #endif
+					// #ifdef APP-PLUS
+					this.$store.commit("setLoginInfo", {})
+					this.$store.commit("setDictionariesInfo", {})
+					this.$store.commit("setMyShopInfo", {})
+					plus.runtime.restart()
+					// #endif
 				})
 				})
 			})
 			})
 		},
 		},

+ 15 - 2
ghsApp/src/components/module/app-search.vue

@@ -6,7 +6,7 @@
 			</div>
 			</div>
 			<div class="input-wrap">
 			<div class="input-wrap">
 				<input
 				<input
-					type="password" placeholder-style="color:#ccc"
+					:type="isPCWx ? 'text' : 'password'" placeholder-style="color:#ccc"
 					ref="searchInput"
 					ref="searchInput"
 					v-model="search"
 					v-model="search"
 					:focus="focus"
 					:focus="focus"
@@ -96,9 +96,22 @@ export default {
 	},
 	},
 	data() {
 	data() {
 		return {
 		return {
-			search: ""
+			search: "",
+			isPCWx:false
 		};
 		};
 	},
 	},
+	mounted(){
+		// #ifdef MP-WEIXIN
+		let that = this
+		uni.getSystemInfo({
+			success: function (res) {
+				if(res.platform == 'windows'){
+					that.isPCWx = true
+				}
+			}
+		})
+		// #endif
+	},
 	methods: {
 	methods: {
 		searchFn() {
 		searchFn() {
 			this.$emit("search", this.search);
 			this.$emit("search", this.search);

+ 0 - 17
ghsApp/src/mixins/globalMixins.js

@@ -124,23 +124,6 @@ export default {
 
 
 		}
 		}
 
 
-    //#ifdef APP-PLUS
-    let main = plus.android.runtimeMainActivity()
-    //为了防止快速点按返回键导致程序退出重写quit方法改为隐藏至后台
-    plus.runtime.quit = function(){
-      main.moveTaskToBack(false)
-    }
-    //重写toast方法如果内容为 ‘再按一次退出应用’ 就隐藏应用,其他正常toast
-    plus.nativeUI.toast = (function(str){
-      if(str == '再按一次退出应用'){
-        main.moveTaskToBack(true)
-        return false
-      }else{
-        uni.showToast({ title: '再按一次退出应用', icon:'none' })
-      }
-    })
-    // #endif
-
 	},
 	},
 	onShow(){
 	onShow(){
 		if (isLogin()&&!this.$util.isEmpty(this.getLoginInfo)) {
 		if (isLogin()&&!this.$util.isEmpty(this.getLoginInfo)) {

+ 25 - 2
ghsApp/src/mixins/product.js

@@ -252,7 +252,22 @@ export default {
 			if(this.py.length <=1){
 			if(this.py.length <=1){
 				return
 				return
 			}
 			}
-
+			//红色粉色花材太多,搜索时会卡住,所以设置输入第三个字母时才搜索
+			if(this.py.indexOf('fs') == 0 && this.py.length <= 2){
+				return
+			}
+			if(this.py.indexOf('hs') == 0 && this.py.length <= 2){
+				return
+			}
+			if(this.py.indexOf('zs') == 0 && this.py.length <= 2){
+				return
+			}
+			if(this.py.indexOf('ls') == 0 && this.py.length <= 2){
+				return
+			}
+			if(this.py.indexOf('bs') == 0 && this.py.length <= 2){
+				return
+			}
 			//涉及记住花材的代码和流程,请全项目搜索关键词remember_item
 			//涉及记住花材的代码和流程,请全项目搜索关键词remember_item
 			//将已选的花材按classId_productId键名组合
 			//将已选的花材按classId_productId键名组合
 			let selectListData = []
 			let selectListData = []
@@ -330,7 +345,15 @@ export default {
 					item.bigCount++
 					item.bigCount++
 				}
 				}
 				if(calc == 'sub'){
 				if(calc == 'sub'){
-					item.bigCount--
+					if(Number(item.bigCount) <= 0){
+						if(Number(item.smallCount) > 0){
+							item.smallCount = 0
+						}else{
+							this.$msg('不能再小了')
+						}
+					}else{
+						item.bigCount--
+					}
 				}
 				}
 			}
 			}
 			console.log('........replace_item......')
 			console.log('........replace_item......')