shish 4 лет назад
Родитель
Сommit
6e0298eb01
2 измененных файлов с 14 добавлено и 6 удалено
  1. 14 3
      mallApp/src/pages/home/shop.vue
  2. 0 3
      mallApp/src/pages/home/user.vue

+ 14 - 3
mallApp/src/pages/home/shop.vue

@@ -2,7 +2,10 @@
   <view class="app-main app-content">
     <app-swiper :list="ad" />
     <view class="shop-wrap">
-      <view class="shop-tit">{{ shop.shopName }}</view>
+      <view class="shop-tit">
+        <text>{{ shop.shopName }}</text>
+        <button class="button-com mini-btn red pay" @click="pageToFn({ url: '/pages/pay/index', query: { pageStatus: 'payment', }, }) " > 付款 </button>
+      </view>
       <view>{{ shop.introduction }}</view>
     </view>
     <view class="list-content">
@@ -71,7 +74,7 @@ export default {
   },
   methods: {
     init () {
-      this._detail();
+      this.getDetail();
       let account = uni.getStorageSync('account')
       getShopUser().then(res => {
         // 设置分享
@@ -87,7 +90,10 @@ export default {
         console.log('分享地址',`/pages/home/shop?account=${account}`)
       });
     },
-    _detail () {
+    pageToFn(item) {
+        this.$util.pageTo(item)
+    },
+    getDetail () {
       let form = {};
       if (this.option.introUserId) {
         form.introUserId = this.option.introUserId;
@@ -140,6 +146,11 @@ export default {
     color: #333;
     font-weight: 600;
     margin-bottom: 20upx;
+    .pay{
+      position: absolute;
+      right:20upx;
+      font-size:20upx;
+    }
   }
 }
 .list-content {

+ 0 - 3
mallApp/src/pages/home/user.vue

@@ -31,9 +31,6 @@
           <view>我的余额(¥)</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">