套餐,新增融云im

This commit is contained in:
唐明明
2022-01-11 15:50:44 +08:00
parent a27ffc0a7f
commit 61c9f096ca
7 changed files with 97 additions and 24 deletions

20
pages/im/index.vue Normal file
View File

@@ -0,0 +1,20 @@
<template>
<view>
im
</view>
</template>
<script>
import { init, connect } from '@rongcloud/imlib-uni'
export default {
data() {
return {
};
}
}
</script>
<style lang="scss">
</style>

View File

@@ -69,7 +69,16 @@
orderInfo,
success: payRes => {
console.log(payRes)
uni.showModal({
title: '支付成功',
content: '订单已支付,我们将尽快为您安排发货,可在订单管理查询订单动态',
showCancel:false,
success:onRes => {
if(onRes.confirm){
this.$Router.back()
}
}
})
},
fail: payErr => {
console.log(payErr)

View File

@@ -2,8 +2,12 @@
<view class="content">
<!-- banner -->
<view class="banner">
<image v-if="banner.length > 0" class="banner-cover" :src="banner[0].cover || ''" mode="aspectFill"></image>
<image v-if="banner != ''" class="banner-cover" :src="banner" mode="aspectFill"></image>
</view>
<!-- 分类 -->
<u-sticky bgColor="#fff" zIndex="99">
<u-tabs :list="classify" lineColor="#34CE98" @click="onTabs"></u-tabs>
</u-sticky>
<!-- 套餐列表 -->
<oct-goods
:lists="goodsArr"
@@ -18,8 +22,10 @@
export default {
data() {
return {
banner : [],
goodsArr: []
banner : "",
goodsArr : [],
classify : [],
categoryId : ""
};
},
mounted(){
@@ -27,18 +33,19 @@
},
methods:{
getMeals(){
meals(this.$Route.query.id).then(res => {
meals(this.$Route.query.id, this.categoryId).then(res => {
uni.setNavigationBarTitle({
title: res.meal.subtitle
})
console.log(res)
this.banner = res.banners
this.goodsArr = res.meal.goods
this.banner = res.meal.banner
this.goodsArr = res.goods
this.classify = [{ name: "全部", category_id: "" }].concat(res.categories)
uni.stopPullDownRefresh()
})
},
click(){
console.log('筛选')
onTabs(e){
this.categoryId = e.category_id
this.getMeals()
}
},
onPullDownRefresh() {