Browse Source

买花优化

shish 1 year ago
parent
commit
d485581d62

+ 15 - 3
ghs/src/views/item/list.vue

@@ -21,7 +21,8 @@
 	</template>
 	</template>
 
 
       <template #table-column-name="{scope}">
       <template #table-column-name="{scope}">
-		<span class="item-name">{{ scope.row.name }}</span>
+		<span class="item-name" v-if="scope.row.delStatus == 0">{{ scope.row.name }}</span>
+		<span class="item-name" v-else style="color:#CCCCCC;">{{ scope.row.name }}</span>
       </template>
       </template>
 
 
       <template #table-column-status="{scope}">
       <template #table-column-status="{scope}">
@@ -29,9 +30,14 @@
 		<span v-else>-</span>
 		<span v-else>-</span>
       </template>
       </template>
 
 
+      <template #table-column-delStatus="{scope}">
+		<span v-if="scope.row.delStatus == 1" style="color:#CCCCCC;">已删</span>
+		<span v-else>-</span>
+      </template>
+
       <template #table-column-unit="{scope}">
       <template #table-column-unit="{scope}">
-        <span v-if="scope.row.ratioType == 0">{{ scope.row.ratio }}{{scope.row.smallUnit}} / {{ scope.row.bigUnit }}</span>
-		<span v-else>若干{{scope.row.smallUnit}} / {{ scope.row.bigUnit }}</span>
+        <span v-if="scope.row.ratioType == 0">{{ scope.row.ratio }}{{scope.row.smallUnit}}</span>
+		<span v-else>若干{{scope.row.smallUnit}}</span>
       </template>
       </template>
 
 
       <template #table-column-price="{scope}">
       <template #table-column-price="{scope}">
@@ -690,6 +696,12 @@ export default {
               label: '上架',
               label: '上架',
               align: 'center',
               align: 'center',
               minWidth: 60
               minWidth: 60
+            },
+			{
+              prop: 'delStatus',
+              label: '状态',
+              align: 'center',
+              minWidth: 60
             }
             }
           ],
           ],
           op: {
           op: {

+ 1 - 1
hdApp/src/admin/ghsProduct/detail.vue

@@ -208,7 +208,7 @@ export default {
         if(this.notOpenShop == true){
         if(this.notOpenShop == true){
 
 
           that.$util.confirmModal({content:'请先注册登录哦',okText:'好的'},() => {
           that.$util.confirmModal({content:'请先注册登录哦',okText:'好的'},() => {
-            that.pageTo({url:'/admin/home/login',type:2})
+            that.pageTo({url:'/admin/home/login?itemId='+this.id+'&ghsShopId='+this.shopId,type:2})
           })
           })
 
 
           return false;
           return false;

+ 22 - 7
hdApp/src/admin/home/login.vue

@@ -58,7 +58,7 @@
 				<!-- #endif -->
 				<!-- #endif -->
 				<view style="margin-top:45upx;color:#333333;font-size:34upx;width:100%;text-align:right;padding-right:70upx;">
 				<view style="margin-top:45upx;color:#333333;font-size:34upx;width:100%;text-align:right;padding-right:70upx;">
 					<text style="margin-right:40upx;" @click="useAccount()">使用账号密码登录</text>
 					<text style="margin-right:40upx;" @click="useAccount()">使用账号密码登录</text>
-					<text @click="pageTo({url:'/pagesClient/official/apply',type:2})">注册帐号</text>
+					<text @click="register">注册帐号</text>
 				</view>
 				</view>
 			</view>
 			</view>
 			</view>
 			</view>
@@ -72,6 +72,7 @@ import {appLogin} from '@/api/common'
 import { getDictionaries,postWxCode } from '@/api/mini'
 import { getDictionaries,postWxCode } from '@/api/mini'
 import { replaceClientId } from '@/api/admin'
 import { replaceClientId } from '@/api/admin'
 import { phoneLogin,wxMobileLogin } from "@/api/auth";
 import { phoneLogin,wxMobileLogin } from "@/api/auth";
+import { ghsInfo } from "@/api/ghs/index";
 export default {
 export default {
 	name: "login",
 	name: "login",
 	components: {
 	components: {
@@ -126,6 +127,11 @@ export default {
 	},
 	},
 	methods: {
 	methods: {
 		...mapActions(['setUserShopAll']),
 		...mapActions(['setUserShopAll']),
+		register(){
+			let itemId = this.option.itemId ? this.option.itemId : 0
+			let ghsShopId = this.option.ghsShopId ? this.option.ghsShopId : 0
+			this.pageTo({url:'/pagesClient/official/apply?itemId='+itemId+'&ghsShopId='+ghsShopId,type:2})
+		},
 		useAccount(){
 		useAccount(){
 			this.showAccountLogin = true
 			this.showAccountLogin = true
 			this.agree = 0
 			this.agree = 0
@@ -212,13 +218,22 @@ export default {
 						getShopInfo(true).then(res => { uni.setNavigationBarTitle({ title: res.name }) })
 						getShopInfo(true).then(res => { uni.setNavigationBarTitle({ title: res.name }) })
 						that.setUserShopAll()
 						that.setUserShopAll()
 
 
-						//返回上一页带参数
-						let pages = getCurrentPages();
-						let prevPage = pages[ pages.length - 2 ];
-						//修改上一页data里面的xjData
-						prevPage.$vm.backAction = 'login'
+						if(this.option.itemId && Number(this.option.itemId)>0 && this.option.ghsShopId && Number(this.option.ghsShopId)>0){
+							ghsInfo({shopId:this.option.ghsShopId}).then(resInfo => {
+								let ghsId = resInfo.data.id
+								if(Number(ghsId)>0){
+									that.$util.pageTo({url: "/admin/ghsProduct/detail?id="+that.option.itemId+'&ghsId='+ghsId, type:2})
+								}
+							})
+						}else{
+							//返回上一页带参数
+							let pages = getCurrentPages();
+							let prevPage = pages[ pages.length - 2 ];
+							//修改上一页data里面的xjData
+							prevPage.$vm.backAction = 'login'
 
 
-						uni.navigateBack()
+							uni.navigateBack()
+						}
 					}
 					}
 				});
 				});
 			} else {
 			} else {

+ 11 - 3
hdApp/src/pagesClient/official/apply.vue

@@ -100,6 +100,7 @@ import { APIHOST } from '@/config'
 import { getShopInfo} from "@/utils/auth";
 import { getShopInfo} from "@/utils/auth";
 import { getDictionaries } from '@/api/mini'
 import { getDictionaries } from '@/api/mini'
 import { checkShop } from '@/api/shop'
 import { checkShop } from '@/api/shop'
+import { ghsInfo } from "@/api/ghs/index";
 export default {
 export default {
   name: "apply-data",
   name: "apply-data",
   components: {
   components: {
@@ -319,9 +320,16 @@ export default {
           // #endif
           // #endif
 
 
         }
         }
-
-        this.$util.pageTo({url: "/pagesClient/official/result", type:2})
-
+        if(this.option.itemId && Number(this.option.itemId)>0 && this.option.ghsShopId && Number(this.option.ghsShopId)>0){
+          ghsInfo({shopId:this.option.ghsShopId}).then(resInfo => {
+            let ghsId = resInfo.data.id
+            if(Number(ghsId)>0){
+              that.$util.pageTo({url: "/admin/ghsProduct/detail?id="+that.option.itemId+'&ghsId='+ghsId, type:2})
+            }
+          })
+        }else{
+          this.$util.pageTo({url: "/pagesClient/official/result", type:2})
+        }
       });
       });
     }
     }
   },
   },