shish 4 жил өмнө
parent
commit
b4526802a2

+ 1 - 25
mallApp/src/App.vue

@@ -30,10 +30,6 @@ export default {
     }
     // #endif
   },
-  onShow () {
-    // this.isLogin()
-    uni.hideTabBar()
-  },
   onHide () { },
   onError (err) {
     console.error(err, "错误捕获");
@@ -47,26 +43,6 @@ export default {
         });
       }
     }
-    // ...mapMutations(['setLoginInfo'])
-    // #ifdef MP-WEIXIN
-    // wxLogin() {
-    // 	uni.login({
-    // 		provider: 'weixin',
-    // 		success: res => {
-    // 			uni.setStorageSync('code', res.code)
-    // 			console.log(res.code, 'res.code')
-    // 			postWxCode({ code: res.code }).then(subRes => {
-    // 				const { openid, session_key, unionid } = subRes.data
-    // 				this.setLoginInfo({
-    // 					openid,
-    // 					session_key,
-    // 					unionid
-    // 				})
-    // 			})
-    // 		}
-    // 	})
-    // }
-    // #endif
   }
 };
 </script>
@@ -81,4 +57,4 @@ export default {
 page {
   height: 100%;
 }
-</style>
+</style>

+ 0 - 1
mallApp/src/components/app-footer.vue

@@ -19,7 +19,6 @@
         </div>
     </div>
 </template>
-
 <script>
 import { mapGetters, mapState } from 'vuex'
 import { jumpShop } from '@/utils/common'

+ 11 - 27
mallApp/src/components/item/app-tabbar.vue

@@ -6,7 +6,6 @@
     </view>
   </view>
 </template>
-
 <script>
 export default {
   data () {
@@ -14,39 +13,27 @@ export default {
       tabList: [
         {
           "pagePath": "/pages/home/index",
-          "iconPath": "../static/images/common/home-no.png",
-          "selectedIconPath": "../static/images/common/home-is.png",
+          "iconPath": "../../static/images/common/home-no.png",
+          "selectedIconPath": "../../static/images/common/home-is.png",
           "text": "首页"
         },
         {
           "pagePath": "/pages/home/category",
-          "iconPath": "../static/images/common/category-no.png",
-          "selectedIconPath": "../static/images/common/category-is.png",
-          "text": "分类"
+          "iconPath": "../../static/images/common/category-no.png",
+          "selectedIconPath": "../../static/images/common/category-is.png",
+          "text": "花束"
         },
         {
           "pagePath": "/pages/item/item",
-          "iconPath": "../static/images/common/icon_class.png",
-          "selectedIconPath": "../static/images/common/icon_class_active.png",
-          "text": "培训班"
+          "iconPath": "../../static/images/common/category-no.png",
+          "selectedIconPath": "../../static/images/common/category-is.png",
+          "text": "鲜花"
         },
-        // {
-        //   "pagePath": "/pages/home/course",
-        //   "iconPath": "../static/images/common/icon_class.png",
-        //   "selectedIconPath": "../static/images/common/icon_class_active.png",
-        //   "text": "培训班"
-        // },
         {
           "pagePath": "/pages/home/shop",
-          "iconPath": "../static/images/common/shop-no.png",
-          "selectedIconPath": "../static/images/common/shop-is.png",
+          "iconPath": "../../static/images/common/shop-no.png",
+          "selectedIconPath": "../../static/images/common/shop-is.png",
           "text": "门店"
-        },
-        {
-          "pagePath": "/pages/home/user",
-          "iconPath": "../static/images/common/user-no.png",
-          "selectedIconPath": "../static/images/common/user-is.png",
-          "text": "我的"
         }
       ],
       currentTabIndex: this.current
@@ -61,10 +48,7 @@ export default {
   methods: {
     switchTab (index, item) {
       this.currentTabIndex = this.current
-      uni.switchTab({
-        url: item.pagePath
-      })
-      // this.$emit('click', index)
+      this.pageTo({ url: item.pagePath,type:2})
     }
   },
 }

+ 3 - 3
mallApp/src/components/item/module/app-footer-cart.vue

@@ -51,7 +51,7 @@ export default {
 	height: 88upx;
 	background-color: #444444;
 	position: fixed;
-	bottom: 15upx;
+	bottom: 102upx;
 	border-radius: 50upx;
 	left: 50%;
 	transform: translate(-50%, 0);
@@ -70,7 +70,7 @@ export default {
 				width: 72upx;
 				height: 72upx;
 				border-radius: 50%;
-				background-color: #3385ff;
+				background-color: #FF2842;
 				text-align: center;
 				line-height: 72upx;
 				margin-left: 6upx;
@@ -107,7 +107,7 @@ export default {
 			text-align: center;
 			font-size: 28upx;
 			color: #ffffff;
-			background-color: #3385ff;
+			background-color: #FF2842;
 			line-height: 88upx;
 		}
 	}

+ 2 - 23
mallApp/src/pages.json

@@ -196,9 +196,6 @@
         }
     ],
     "globalStyle": {
-        // #ifdef H5
-        "navigationStyle": "custom",
-        // #endif
         "navigationBarBackgroundColor": "#fff",
         "navigationBarTitleText": "花卉宝",
         "navigationBarTextStyle": "black"
@@ -209,28 +206,10 @@
         "borderStyle": "black",
         "backgroundColor": "#ffffff",
         "list": [{
-                "pagePath": "pages/home/index",
+                "pagePath": "pages/home/recent",
                 "iconPath": "static/images/common/home-no.png",
                 "selectedIconPath": "static/images/common/home-is.png",
-                "text": "首页"
-            },
-            {
-                "pagePath": "pages/home/category",
-                "iconPath": "static/images/common/category-no.png",
-                "selectedIconPath": "static/images/common/category-is.png",
-                "text": "分类"
-            },
-            {
-                "pagePath": "pages/item/item",
-                "iconPath": "static/images/common/icon_class.png",
-                "selectedIconPath": "static/images/common/icon_class_active.png",
-                "text": "鲜花"
-            },
-            {
-                "pagePath": "pages/home/shop",
-                "iconPath": "static/images/common/shop-no.png",
-                "selectedIconPath": "static/images/common/shop-is.png",
-                "text": "门店"
+                "text": "新花店"
             },
             {
                 "pagePath": "pages/home/user",

+ 6 - 29
mallApp/src/pages/billing/affirmGhs.vue

@@ -36,30 +36,6 @@
 					</view>
 				</view>
 
-				<view class="module-com input-line-wrap">
-
-					<tui-list-cell class="line-cell" :hover="false" :arrow="true">
-						<view class="tui-title ">配送时间</view>
-						<picker mode="date" :value="sendTimeWant" @change="bindDateChange" style="width:400upx;">
-							<view class="uni-input">{{sendTimeWant || '今天'}}</view>
-						</picker>
-					</tui-list-cell>
-
-          <tui-list-cell v-if="hasHb == 1" class="line-cell" :hover="false" :arrow="true" @click="goSelectCoupon">
-						<view class="tui-title ">红包</view>
-						<view class="coupon_box"><text class="selected" v-if="selectedHb.hbId && selectedHb.hbId>0">-{{selectedHb.couponAmount}}</text><text class="has-hb" v-else>有红包</text></view>
-					</tui-list-cell>
-
-					<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
-						<view class="tui-title">总金额</view>
-						<text style="color: #3385FF">{{ modifyPrice }}</text>
-					</tui-list-cell>
-
-					<tui-list-cell class="line-cell" :hover="false" :arrow="false">
-						<textarea style="height: 100upx" v-model="remark" placeholder="这里写备注"/>
-					</tui-list-cell>
-
-				</view>
 			</form>
 		</view>
 		<view class="under-bar">
@@ -67,7 +43,7 @@
 				<text class="price-title">合计</text>
 				<text class="price-number">¥<text class="large">{{ modifyPrice}}</text></text>
 			</view>
-			<button class="admin-button-com blue middle" @click="affirmFormSubmit">提交</button>
+			<button class="admin-button-com blue middle" style="border:none;" @click="confirmForm">提交</button>
 		</view>
 	</view>
 </template>
@@ -78,7 +54,6 @@ const formUtil = require("@/utils/formValidation.js");
 //import { freight,createOrder } from "@/api/purchase/index";
 import { mapActions, mapGetters } from "vuex";
 import { shopHouponHas } from '@/api/coupon'
-
 export default {
 	name: "BillingAffirm", // 开单确认
 	components: {
@@ -235,7 +210,9 @@ export default {
 				});
 			});
 		},
-		affirmFormSubmit(){
+		confirmForm(){
+			this.$msg('开发中')
+			return false
 			const product = this.list.map(ele => {
 				return { productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount,classId:ele.classId,itemId:ele.itemId };
 			});
@@ -329,7 +306,8 @@ export default {
 			}
 		},
 		gobackEvent() {
-			this.$util.pageTo({url: "/pagesPurchase/ghsProduct",query: {id:this.options.id},type: 2})
+			this.$msg('开发中')
+			//this.$util.pageTo({url: "/pagesPurchase/ghsProduct",query: {id:this.options.id},type: 2})
 		}
 	}
 };
@@ -470,7 +448,6 @@ export default {
 		width: 100%;
 		height: 100upx;
 		background-color: #fff;
-
 		box-shadow: 0upx -1px 6upx 0upx rgba(4, 0, 0, 0.06);
 		.price-view {
 			display: flex;

+ 17 - 115
mallApp/src/pages/home/category.vue

@@ -1,52 +1,16 @@
 <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($event ,item)"
-      >
+    <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($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'}"
-        @scrolltolower="onReachBottoms"
-        v-if="currentTab==index"
-      >
-        <!--内容部分 start -->
-        <div
-          class="page-view"
-          v-if="!$util.isEmpty(list.data)"
-        >
-          <div
-            class="goods-list"
-            v-for="(items, subIndex) in list.data"
-            :key="items.id"
-            @click="pageTo(`/pages/goods/detail?id=${items.id}`)"
-          >
+    <block v-for="(item,index) in tabbar" :key="index" >
+      <scroll-view scroll-y class="right-box" :style="{height:height+'px'}" @scrolltolower="onReachBottoms" v-if="currentTab==index" >
+        <div class="page-view" v-if="!$util.isEmpty(list.data)" >
+          <div class="goods-list" v-for="(items) in list.data" :key="items.id" @click="pageTo(`/pages/goods/detail?id=${items.id}`)" >
             <div class="img-blo">
-              <app-img
-                :src="items.smallImgList[0]"
-                alt="商品图"
-                mode="aspectFit"
-                :height="200"
-              />
+              <app-img :src="items.smallImgList[0]" alt="商品图" mode="aspectFit" :height="200" />
             </div>
             <div class="goods-det">
               <div class="goods-det-top">
@@ -58,10 +22,7 @@
           </div>
         </div>
         <block v-else>
-          <app-wrapper-empty
-            title="暂无数据"
-            :is-empty="$util.isEmpty(list.data)"
-          />
+          <app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
         </block>
         <!--内容部分 end -->
       </scroll-view>
@@ -69,7 +30,6 @@
     <tab-bar :current="1"></tab-bar>
   </div>
 </template>
-
 <script>
 import AppImg from '@/components/app-img'
 import AppWrapperEmpty from '@/components/app-wrapper-empty'
@@ -97,63 +57,22 @@ export default {
     }
   },
   onShow () {
-    uni.hideTabBar();
-  },
-  ceshi () {
-    console.log(1232)
+    uni.hideTabBar()
   },
-  // 	onPullDownRefresh() {
-  //     this.resetList();
-  //     this._list().then(res => {
-  //       uni.stopPullDownRefresh();
-  //     });
-  //   },
-  //   // 加载更多
-  //   onReachBottom() {
-  // 	  console.log(1212)
-  //     if (this.list.moreData == 1) {
-  //       this._list().then(res => {
-  //         uni.stopPullDownRefresh();
-  //       });
-  //     } else {
-  //       uni.stopPullDownRefresh();
-  //     }
-  //   },
   onLoad: function () {
-    if (this.$util.isLogin()) {
-      setTimeout(() => {
-        uni.getSystemInfo({
-          success: res => {
-            this.height = res.windowHeight
-            this.sInit()
-          }
-        })
-      }, 50)
-    }
-    let account = uni.getStorageSync('account')
-    getShopUser().then(res => {
-      // 设置分享
-      let shareParams = {
-        title: '分类', // 分享标题
-        desc: "", // 分享内容
-        imgUrl: '',
-        // #ifndef H5
-        pagePath: `/pages/home/course?fromUserId=${res.id}&account=${account}`
-        // #endif
-      }
-      this.jweixinFn(shareParams)
-      console.log('分享地址',`/pages/home/course?fromUserId=${res.id}&account=${account}`)
-    })
+    uni.hideTabBar()
   },
-
   methods: {
+    init(){
+      this.sInit()
+    },
     onReachBottoms () {
       if (!this.list.finished) {
         this._list().then(res => {
-          uni.stopPullDownRefresh();
+          uni.stopPullDownRefresh()
         });
       } else {
-        uni.stopPullDownRefresh();
+        uni.stopPullDownRefresh()
       }
     },
     async sInit () {
@@ -172,13 +91,9 @@ export default {
     },
     // 列表
     _list () {
-      return getList({
-        ...this.form,
-        page: this.list.page
-      })
-        .then(res => {
+      return getList({ ...this.form, page: this.list.page }) .then(res => {
           this.completes(res)
-        })
+      })
     },
     // 点击标题切换当前页时改变样式
     swichNav (e, item) {
@@ -190,7 +105,6 @@ export default {
         this.form.categoryId = item.id
         this.resetList()
         this._list()
-        // this.checkCor()
       }
     },
     // 判断当前滚动超过一屏时,设置tab标题滚动条。
@@ -221,10 +135,6 @@ page {
   background: #fff;
 }
 
-/* 左侧导航布局 start*/
-
-/* 隐藏scroll-view滚动条*/
-
 ::-webkit-scrollbar {
   width: 0;
   height: 0;
@@ -266,9 +176,6 @@ page {
     left: 0;
   }
 }
-
-/* 左侧导航布局 end*/
-
 .right-box {
   width: 100%;
   position: fixed;
@@ -307,9 +214,4 @@ page {
     }
   }
 }
-// img {
-// 	width: 100%;
-// 	height: 100%;
-// 	display: inline-block;
-// }
 </style>

+ 5 - 15
mallApp/src/pages/home/index.vue

@@ -46,26 +46,16 @@ export default {
   computed: {
     ...mapGetters({ orderShop: "getOrderShop" })
   },
+  onLoad(){
+    uni.hideTabBar()
+  },
   onShow () {
-    uni.hideTabBar();
+    uni.hideTabBar()
   },
   methods: {
     init () {
       getOrderShop()
-      this.getDetail().then(res => {
-        let account = uni.getStorageSync('account')
-        getShopUser().then(res => {
-          let shareParams = {
-            title: this.pageTitle, // 分享标题
-            desc: "", // 分享内容
-            imgUrl: '',
-            // #ifndef H5
-            //pagePath: `/pages/home/index?fromUserId=${res.id}&account=${account}`
-            // #endif
-          }
-          this.jweixinFn(shareParams)
-        })
-      })
+      this.getDetail()
     },
     getDetail() {
       return getMainIndex().then(res => {

+ 6 - 3
mallApp/src/pages/home/recent.vue

@@ -1,11 +1,10 @@
 <template>
   <view class="latest-content_box">
-    <!-- 为了方便审核  showGlInfo == 0 showGlInfo应该等于0  -->
     <view class="shop-list_box" v-if="showGlInfo == 0">
       <template v-if="!$util.isEmpty(list)">
-        <view :key="item.id" @click="pageTo({ url:'/pages/home/index?account', type:4, query: { account: item.id } })" v-for="item in list" >
+        <view :key="item.id" @click="goTo(item)" v-for="item in list" >
           <image :src="item.cover"></image>
-          <view class="tit"> {{item.showName}} </view>
+          <view class="tit"> {{item.showName}}</view>
         </view>
       </template>
       <view v-else> 暂无数据 </view>
@@ -73,6 +72,10 @@ export default {
   onLoad () {
   },
   methods: {
+    goTo(item){
+      console.log('/pages/home/index?account='+item.id)
+      this.pageTo({ url:'/pages/home/index?account='+item.id})
+    },
     async init () {
       try {
         const { data } = await getNewShop()

+ 26 - 35
mallApp/src/pages/home/shop.vue

@@ -1,14 +1,11 @@
 <template>
-  <div class="app-main app-content">
-    <app-swiper
-      :list="ad"
-      @detail="adDetailFn"
-    />
-    <div class="shop-wrap">
-      <div class="shop-tit">{{ shop.shopName }}</div>
-      <div>{{ shop.introduction }}</div>
-    </div>
-    <div class="list-content">
+  <view class="app-main app-content">
+    <app-swiper :list="ad" @detail="adDetailFn" />
+    <view class="shop-wrap">
+      <view class="shop-tit">{{ shop.shopName }}</view>
+      <view>{{ shop.introduction }}</view>
+    </view>
+    <view class="list-content">
       <tui-list-view class="tui-list-view">
         <tui-list-cell
           :lineLeft="false"
@@ -16,10 +13,10 @@
           padding="26rpx 30rpx 26rpx 0"
           class="tui-list"
         >
-          <div class="list-wrap">
-            <div class="list-label">营业时间</div>
-            <div class="list-val">{{ shop.openTime || '暂无' }}</div>
-          </div>
+          <view class="list-wrap">
+            <view class="list-label">营业时间</view>
+            <view class="list-val">{{ shop.openTime || '' }}</view>
+          </view>
         </tui-list-cell>
         <tui-list-cell
           @click="phoneCall"
@@ -28,16 +25,16 @@
           padding="26rpx 30rpx 26rpx 0"
           class="tui-list"
         >
-          <div class="list-wrap">
-            <div class="list-label">联系电话</div>
-            <div class="list-val">{{ shop.mobile || '暂无' }}</div>
-          </div>
-          <div class="list-icon">
+          <view class="list-wrap">
+            <view class="list-label">联系电话</view>
+            <view class="list-val">{{ shop.mobile || '' }}</view>
+          </view>
+          <view class="list-icon">
             <i
               class="iconfont iconditu"
               style="font-size:36rpx;"
             ></i>
-          </div>
+          </view>
         </tui-list-cell>
         <tui-list-cell
           @click="goNavBtn"
@@ -46,31 +43,25 @@
           padding="26rpx 30rpx 26rpx 0"
           class="tui-list"
         >
-          <div class="list-wrap">
-            <div class="list-label">门店地址</div>
-            <div class="list-val">{{ shop.fullAddress || '暂无' }}</div>
-          </div>
-          <div class="list-icon">
+          <view class="list-wrap">
+            <view class="list-label">门店地址</view>
+            <view class="list-val">{{ shop.fullAddress || '' }}</view>
+          </view>
+          <view class="list-icon">
             <i
               class="iconfont icondianhua"
               style="font-size:36rpx;"
             ></i>
-          </div>
+          </view>
         </tui-list-cell>
       </tui-list-view>
-    </div>
-    <!-- <app-footer :activeIndex="2" /> -->
-    <app-activily-coupon
-      :show.sync="activeCoupon"
-      :info="newUserGift"
-      :introUserId="option.introUserId"
-    />
+    </view>
+    <app-activily-coupon :show.sync="activeCoupon" :info="newUserGift" :introUserId="option.introUserId" />
     <tab-bar :current="3" ></tab-bar>
-  </div>
+  </view>
 </template>
 
 <script>
-// import AppFooter from '@/components/app-footer'
 import TuiListView from "@/components/plugin/list-view";
 import TuiListCell from "@/components/plugin/list-cell";
 import AppSwiper from "@/components/app-swiper";

+ 11 - 34
mallApp/src/pages/home/user.vue

@@ -6,10 +6,10 @@
           <view class="user-wrap-top">
             <view class="user-blo-left">
               <view class="user-name-warp">
-                <view class="user-name">{{shopUser.name}}</view>
+                <view class="user-name">{{shopUser.name||'游客'}}</view>
               </view>
               <view class="user-level">
-                <view>ID {{shopUser.id}}</view>
+                <view>ID {{shopUser.id||'0'}}</view>
               </view>
             </view>
             <view class="user-blo-right login-attr-wrap">
@@ -20,7 +20,7 @@
             <view class="level-lint">
               <progress percent="0" stroke-width="2" activeColor="#ffe4bd" backgroundColor="#FF2842"></progress>
             </view>
-            <view>成长值 {{shopUser.growth}} </view>
+            <view>成长值 {{shopUser.growth||'0'}} </view>
           </view>
         </view>
       </template>
@@ -29,70 +29,49 @@
       <view class="surplus-wrap">
         <view class="surplus-left">
           <view>我的余额(¥)</view>
-          <view class="my-surplus">{{shopUser.balance}}</view>
+          <view class="my-surplus">{{shopUser.balance||0}}</view>
         </view>
         <view class="surplus-right">
           <button class="button-com red" @click=" pageToFn({ url: '/pages/pay/index', query: { pageStatus: 'payment', }, }) " > 付款 </button>
         </view>
       </view>
     </template>
-
     <view class="list-content">
       <tui-list-view class="tui-list-view">
-        <tui-list-cell
-          class="tui-list"
-          :arrow="true"
-          @click="pageToFn('/pages/order/list')"
-        >
+        <tui-list-cell class="tui-list" :arrow="true" @click="pageToFn('/pages/order/list')" >
           <view class="list-wrap">
             <view class="list-label">我的订单</view>
             <!-- <view class="list-text">{{ shopUser.userAsset.totalBuyNum }}</view> -->
           </view>
         </tui-list-cell>
         <!--
-        <tui-list-cell
-          class="tui-list"
-          :arrow="true"
-          @click="pageToFn('/pages/interest/invite')"
-        >
+        <tui-list-cell class="tui-list" :arrow="true" @click="pageToFn('/pages/interest/invite')" >
           <view class="list-wrap">
             <view class="list-label">我的邀请</view>
             <view class="list-text">领取奖励</view>
           </view>
         </tui-list-cell>
         -->
-        <tui-list-cell
-          class="tui-list"
-          :arrow="true"
-          @click="pageToFn('/pages/coupon/list')"
-        >
+        <tui-list-cell class="tui-list" :arrow="true" @click="pageToFn('/pages/coupon/list')" >
           <view class="list-wrap">
             <view class="list-label">我的优惠券</view>
           </view>
         </tui-list-cell>
         <!--
-        <tui-list-cell
-          class="tui-list"
-          :arrow="true"
-          @click="pageToFn('/pages/interest/level')"
-        >
+        <tui-list-cell class="tui-list" :arrow="true" @click="pageToFn('/pages/interest/level')" >
           <view class="list-wrap">
             <view class="list-label">会员权益</view>
           </view>
         </tui-list-cell>
         -->
-        <tui-list-cell
-          class="tui-list"
-          :arrow="true"
-          @click="pageToFn('/pages/user/password')"
-        >
+        <!-- <tui-list-cell class="tui-list" :arrow="true" @click="pageToFn('/pages/user/password')" >
           <view class="list-wrap">
             <view class="list-label">支付密码</view>
           </view>
-        </tui-list-cell>
+        </tui-list-cell> -->
+
       </tui-list-view>
     </view>
-    <tab-bar :current="4"></tab-bar>
   </view>
 </template>
 <script>
@@ -132,7 +111,6 @@ export default {
 
   },
   onShow () {
-    uni.hideTabBar();
   },
   computed: {
     ...mapGetters({ shopUser: "getShopUser" })
@@ -149,7 +127,6 @@ export default {
   },
 };
 </script>
-
 <style lang="scss" scoped>
 .user-wrap {
   height: 220px;

+ 2 - 2
mallApp/src/pages/item/item.vue

@@ -69,9 +69,9 @@
 		</modal-module>
 
 		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent" ></FooterCart>
-    <sel-popup :show="popupShow" :info="infoData" @close="hidePopup" />
+    	<sel-popup :show="popupShow" :info="infoData" @close="hidePopup" />
 		<app-activily-coupon :show.sync="isNewCustom" :info="newCustomGift" :ghsId="ghsId" />
-
+		<tab-bar :current="2" ></tab-bar>
 	</view>
 </template>
 

+ 23 - 29
mallApp/src/pages/pay/index.vue

@@ -171,38 +171,32 @@
 					return false
 				}
 				let params = {}
-				let host = null
-				if (this.option.pageStatus == 'recharge') {
-					params = {
-						amount: this.amount
-					}
-					host = recharge
-				} else {
+				
+				params = {
+					needSend: this.tabIndex == 0 ? '0' : '1',
+					prePrice: this.amount,
+					payWay: this.form.payWay,
+					payPassword:this.modalForm.payPassword
+				}
+				if (this.tabIndex == 1) {
+					let deliveryForm = this.$refs.appDelivery.form ? this.$refs.appDelivery.form : {}
+					let deliveryRegion = this.$refs.appDelivery.region ? this.$refs.appDelivery.region : {}
 					params = {
-						needSend: this.tabIndex == 0 ? '0' : '1',
-						prePrice: this.amount,
-						payWay: this.form.payWay,
-						payPassword:this.modalForm.payPassword
-					}
-					if (this.tabIndex == 1) {
-						let deliveryForm = this.$refs.appDelivery.form ? this.$refs.appDelivery.form : {}
-						let deliveryRegion = this.$refs.appDelivery.region ? this.$refs.appDelivery.region : {}
-						params = {
-							...params,
-							...deliveryForm,
-							...deliveryRegion
-						}
+						...params,
+						...deliveryForm,
+						...deliveryRegion
 					}
-					if (this.option.store) {
-						params.store = this.option.store
-					}
-					params.fromType = this.option.fromType || 1
-					if (!this.$util.isEmpty(this.discountArr)) {
-						params.couponId = this.$refs.couponSel.couponId
-					}
-					host = fastPay
 				}
-				host(params).then(res => {
+				if (this.option.store) {
+					params.store = this.option.store
+				}
+				params.fromType = this.option.fromType || 1
+				if (!this.$util.isEmpty(this.discountArr)) {
+					params.couponId = this.$refs.couponSel.couponId
+				}
+				let miniOpenId = uni.getStorageSync('miniOpenId')
+				params.miniOpenId = miniOpenId
+				fastPay(params).then(res => {
 					this.payCallData = res.data
 					//错误返回判断
 					if(res.code == 0){

+ 38 - 38
mallApp/src/utils/auth.js

@@ -73,54 +73,54 @@ export async function wxLoginFn(update) {
 	})
 
 	await postWxCode({ code: getObj.code }).then(subRes => {
-		if (UTIL.isEmpty(subRes)) {
-			return false
-		}
-		uni.setStorageSync('token', subRes.data.token)
-		store.commit('setLoginInfo', subRes.data.user)
-		//更新用户数据
-		//store.dispatch('setShopUser', userInfo)
+		if(subRes.code && subRes.code == 1){
 
-        //启动更新逻辑 shish 2020.5.18
-		if (subRes.data.update == 1) {
+			uni.setStorageSync('token', subRes.data.token)
+			uni.setStorageSync('miniOpenId', subRes.data.miniOpenId)
+			store.commit('setLoginInfo', subRes.data.user)
 
+			//更新用户数据
+			//store.dispatch('setShopUser', userInfo)
 
+			//启动更新逻辑 shish 2020.5.18
+			if (subRes.data.update == 1) {
 
-			const updateManager = uni.getUpdateManager();
-			updateManager.onCheckForUpdate(function(res) {
-				// 请求完新版本信息的回调
-				if (res.hasUpdate) {
-					updateManager.onUpdateReady(function(res2) {
-						uni.showModal({
-							title: '更新提示',
-							content: '发现新版本,请更新应用',
-							cancelColor:'#DDDDDD',
-							confirmColor:'#FF0000',
-							success(res2) {
-								if (res2.confirm) {
-									// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
-									updateManager.applyUpdate();
+				const updateManager = uni.getUpdateManager();
+				updateManager.onCheckForUpdate(function(res) {
+					// 请求完新版本信息的回调
+					if (res.hasUpdate) {
+						updateManager.onUpdateReady(function(res2) {
+							uni.showModal({
+								title: '更新提示',
+								content: '发现新版本,请更新应用',
+								cancelColor:'#DDDDDD',
+								confirmColor:'#FF0000',
+								success(res2) {
+									if (res2.confirm) {
+										// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+										updateManager.applyUpdate();
+									}
 								}
-							}
+							});
 						});
-					});
-				}
-			});
+					}
+				});
 
-			updateManager.onUpdateFailed(function(res) {
-				// 新的版本下载失败
-				uni.showModal({
-					title: '提示',
-					content: '检查到有新版本,但下载失败,请检查网络连接',
-					success(res) {
-						if (res.confirm) {
-							// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
-							updateManager.applyUpdate();
+				updateManager.onUpdateFailed(function(res) {
+					// 新的版本下载失败
+					uni.showModal({
+						title: '提示',
+						content: '检查到有新版本,但下载失败,请检查网络连接',
+						success(res) {
+							if (res.confirm) {
+								// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+								updateManager.applyUpdate();
+							}
 						}
-					}
+					});
 				});
-			});
 
+			}
 		}
 	})