套餐,新增融云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

View File

@@ -22,9 +22,12 @@ const goods = id => {
}
// 套餐列表
const meals = id => {
const meals = (id, categoryId) => {
return request({
url: 'mall/meals/' + id
url: 'mall/meals/' + id,
data: {
category_id: categoryId
}
})
}

View File

@@ -1,7 +1,7 @@
{
"name" : "健康监测",
"appid" : "__UNI__C29473D",
"description" : "",
"description" : "ZH健康监测您手上的健康管理专家",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
@@ -65,6 +65,22 @@
"share" : {},
"ad" : {}
}
},
"nativePlugins" : {
"RongCloud-IM" : {
"__plugin_info__" : {
"name" : "RCUniIM",
"description" : "融云即时通讯 SDK uni 原生插件",
"platforms" : "Android,iOS",
"url" : "https://ext.dcloud.net.cn/plugin?id=6120",
"android_package_name" : "io.zhhealth.app",
"ios_bundle_id" : "io.zhhealth.app",
"isCloud" : true,
"bought" : 1,
"pid" : "6120",
"parameters" : {}
}
}
}
},
/* */

5
package-lock.json generated
View File

@@ -2,6 +2,11 @@
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"@rongcloud/imlib-uni": {
"version": "5.1.3-release.3",
"resolved": "https://registry.npmjs.org/@rongcloud/imlib-uni/-/imlib-uni-5.1.3-release.3.tgz",
"integrity": "sha512-jgGNEqvfDxTv8lQoU168d+slZC0FL8CUq7vz+JekKCXL3UMWnZCRxHhUI7BO/saGtaLE+/yw3Xbv/ZORTz0hng=="
},
"base-x": {
"version": "3.0.9",
"resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz",

View File

@@ -101,7 +101,7 @@
"path": "pages/address/edit",
"name": "AddressEdit",
"style": {
"navigationBarTitleText": "编辑",
"navigationBarTitleText": "编辑",
"enablePullDownRefresh": false
}
}, {
@@ -120,13 +120,20 @@
"enablePullDownRefresh": true
}
}, {
"path": "pages/store/meals",
"path": "pages/store/meals",
"name": "StoreMeals",
"style": {
"navigationBarTitleText": "套餐",
"navigationBarTitleText": "套餐",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true
}
}, {
"path": "pages/im/index",
"name": "IM",
"style": {
"navigationBarTitleText": "im",
"enablePullDownRefresh": false
}
}],
"tabBar": {
"borderStyle": "white",
@@ -135,19 +142,25 @@
"iconPath": "static/tabBar/tabBar_00.png",
"selectedIconPath": "static/tabBar/tabBar_show_00.png",
"pagePath": "pages/index/index",
"text": "发现"
"text": "健康"
},
{
"iconPath": "static/tabBar/tabBar_01.png",
"selectedIconPath": "static/tabBar/tabBar_show_01.png",
"pagePath": "pages/record/index",
"text": "记录"
},
{
"iconPath": "static/tabBar/tabBar_02.png",
"selectedIconPath": "static/tabBar/tabBar_show_02.png",
"pagePath": "pages/store/index",
"text": "商城"
"text": "服务"
},
{
"iconPath": "static/tabBar/tabBar_02.png",
"selectedIconPath": "static/tabBar/tabBar_show_02.png",
"pagePath": "pages/store/index",
"text": "生活"
},
{
"iconPath": "static/tabBar/tabBar_01.png",
"selectedIconPath": "static/tabBar/tabBar_show_01.png",
"pagePath": "pages/im/index",
"text": "聊聊"
},
{
"iconPath": "static/tabBar/tabBar_03.png",

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() {