套餐,新增融云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({ return request({
url: 'mall/meals/' + id url: 'mall/meals/' + id,
data: {
category_id: categoryId
}
}) })
} }

View File

@@ -1,7 +1,7 @@
{ {
"name" : "健康监测", "name" : "健康监测",
"appid" : "__UNI__C29473D", "appid" : "__UNI__C29473D",
"description" : "", "description" : "ZH健康监测您手上的健康管理专家",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
@@ -65,6 +65,22 @@
"share" : {}, "share" : {},
"ad" : {} "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, "requires": true,
"lockfileVersion": 1, "lockfileVersion": 1,
"dependencies": { "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": { "base-x": {
"version": "3.0.9", "version": "3.0.9",
"resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz",

View File

@@ -127,6 +127,13 @@
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, {
"path": "pages/im/index",
"name": "IM",
"style": {
"navigationBarTitleText": "im",
"enablePullDownRefresh": false
}
}], }],
"tabBar": { "tabBar": {
"borderStyle": "white", "borderStyle": "white",
@@ -135,19 +142,25 @@
"iconPath": "static/tabBar/tabBar_00.png", "iconPath": "static/tabBar/tabBar_00.png",
"selectedIconPath": "static/tabBar/tabBar_show_00.png", "selectedIconPath": "static/tabBar/tabBar_show_00.png",
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"text": "发现" "text": "健康"
}, },
{ {
"iconPath": "static/tabBar/tabBar_01.png", "iconPath": "static/tabBar/tabBar_01.png",
"selectedIconPath": "static/tabBar/tabBar_show_01.png", "selectedIconPath": "static/tabBar/tabBar_show_01.png",
"pagePath": "pages/record/index", "pagePath": "pages/record/index",
"text": "记录" "text": "服务"
}, },
{ {
"iconPath": "static/tabBar/tabBar_02.png", "iconPath": "static/tabBar/tabBar_02.png",
"selectedIconPath": "static/tabBar/tabBar_show_02.png", "selectedIconPath": "static/tabBar/tabBar_show_02.png",
"pagePath": "pages/store/index", "pagePath": "pages/store/index",
"text": "商城" "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", "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, orderInfo,
success: payRes => { success: payRes => {
console.log(payRes) console.log(payRes)
uni.showModal({
title: '支付成功',
content: '订单已支付,我们将尽快为您安排发货,可在订单管理查询订单动态',
showCancel:false,
success:onRes => {
if(onRes.confirm){
this.$Router.back()
}
}
})
}, },
fail: payErr => { fail: payErr => {
console.log(payErr) console.log(payErr)

View File

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