|
|
@ -13,6 +13,17 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</uni-popup> |
|
|
</uni-popup> |
|
|
|
|
|
<!-- 多个商家选择弹窗 --> |
|
|
|
|
|
<uni-popup ref="shopPopup" background-color="rgba(2, 171, 255, 1)" borderRadius="40px 40px 40px 40px"> |
|
|
|
|
|
<view class="shop-content"> |
|
|
|
|
|
<view class="popup-pay-title"> |
|
|
|
|
|
<text>您有多个店铺</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="popup-list" @tap="clickShop(item)" v-for="(item,index) in schoolShop" :key="index"> |
|
|
|
|
|
{{item.shopName}} |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</uni-popup> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
@ -20,7 +31,7 @@ |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
schoolShop:[] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
props:{ |
|
|
props:{ |
|
|
@ -32,13 +43,30 @@ |
|
|
methods: { |
|
|
methods: { |
|
|
init(){ |
|
|
init(){ |
|
|
console.log("我的初始化") |
|
|
console.log("我的初始化") |
|
|
|
|
|
this.schoolShop = uni.getStorageSync('schoolShop') |
|
|
|
|
|
}, |
|
|
|
|
|
clickShop(item){ |
|
|
|
|
|
uni.setStorageSync('shopId',item.id) |
|
|
|
|
|
uni.setStorageSync('shopName',item.shopName) |
|
|
|
|
|
uni.setStorageSync('shopIcon',item.shopIcon) |
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
|
url: '/package1/myCenter/merchantCenter' |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
navigatorTo(e){ |
|
|
navigatorTo(e){ |
|
|
let url = "" |
|
|
let url = "" |
|
|
if(e=='addgoods'){ |
|
|
if(e=='addgoods'){ |
|
|
url = '/package1/myCenter/addGoods' |
|
|
url = '/package1/myCenter/addGoods' |
|
|
}else if(e=='merchantCenter'){ |
|
|
}else if(e=='merchantCenter'){ |
|
|
url = '/package1/myCenter/merchantCenter' |
|
|
if(this.schoolShop.length>1){ |
|
|
|
|
|
this.$refs.shopPopup.open() |
|
|
|
|
|
return |
|
|
|
|
|
}else if(this.schoolShop != ''){ |
|
|
|
|
|
uni.setStorageSync('shopId',this.schoolShop[0].id) |
|
|
|
|
|
uni.setStorageSync('shopName',this.schoolShop[0].shopName) |
|
|
|
|
|
uni.setStorageSync('shopIcon',this.schoolShop[0].shopIcon) |
|
|
|
|
|
url = '/package1/myCenter/merchantCenter' |
|
|
|
|
|
} |
|
|
}else if(e=='addType'){ |
|
|
}else if(e=='addType'){ |
|
|
url = '/package1/myCenter/addType' |
|
|
url = '/package1/myCenter/addType' |
|
|
}else if(e=='goodsList'){ |
|
|
}else if(e=='goodsList'){ |
|
|
@ -100,4 +128,29 @@ |
|
|
height: 350px; |
|
|
height: 350px; |
|
|
position: relative; |
|
|
position: relative; |
|
|
} |
|
|
} |
|
|
|
|
|
.shop-content{ |
|
|
|
|
|
width: 300px; |
|
|
|
|
|
height: auto; |
|
|
|
|
|
position: relative; |
|
|
|
|
|
background: #fff; |
|
|
|
|
|
border-radius: 10px; |
|
|
|
|
|
padding: 10px; |
|
|
|
|
|
} |
|
|
|
|
|
.popup-pay-title { |
|
|
|
|
|
font-size: 36rpx; |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
position: relative; |
|
|
|
|
|
padding-bottom: 10px; |
|
|
|
|
|
border-bottom: 1px solid #eee; |
|
|
|
|
|
margin-bottom: 10px; |
|
|
|
|
|
} |
|
|
|
|
|
.popup-list{ |
|
|
|
|
|
height: 30px; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
font-weight: 700; |
|
|
|
|
|
border-bottom: 1px solid #eee; |
|
|
|
|
|
line-height: 30px; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |