Browse Source

上传

master
前端-胡立永 6 months ago
parent
commit
692f74a8fc
10 changed files with 234 additions and 57 deletions
  1. +61
    -15
      api/api.js
  2. +17
    -3
      components/list/videoList.vue
  3. +5
    -0
      components/tourGuide/locations.vue
  4. +8
    -2
      pages/index/index.vue
  5. +8
    -7
      pages_order/components/product/submitUnitSelect.vue
  6. +14
    -1
      pages_order/mine/address.vue
  7. +18
    -1
      pages_order/mine/subscribe.vue
  8. +35
    -27
      pages_order/order/order.vue
  9. +50
    -0
      pages_order/order/orderSubscribe.vue
  10. +18
    -1
      pages_order/service/applyRelic.vue

+ 61
- 15
api/api.js View File

@ -67,7 +67,7 @@ const config = {
},
// 添加志愿者
addVolunteer: {
url: '/info/addVolunteer',
url: '/user/addVolunteer',
method: 'POST',
limit: 500,
showLoading: true,
@ -130,25 +130,25 @@ const config = {
// 获取非遗体验列表
queryExperienceList: {
url: '/amusement/queryExperienceList',
url: '/info/queryExperienceList',
method: 'GET',
showLoading: true,
},
// 获取非遗体验详情
queryExperienceById: {
url: '/amusement/queryExperienceById',
url: '/info/queryExperienceById',
method: 'GET',
showLoading: true,
},
// 获取路径定制、我要研学列表
queryAmusementList: {
url: '/amusement/queryAmusementList',
url: '/info/queryAmusementList',
method: 'GET',
showLoading: true,
},
// 获取路径定制、我要研学详情
queryAmusementById: {
url: '/amusement/queryAmusementById',
url: '/info/queryAmusementById',
method: 'GET',
showLoading: true,
},
@ -188,13 +188,13 @@ const config = {
},
// 根据角色Id获取角色信息详情
queryRoleInfoById: {
url: '/user/queryRoleInfoById',
url: '/info/queryRoleInfoById',
method: 'GET',
showLoading: true,
},
// 根据角色类型获取角色信息列表-讲解员-达人-摄影师
queryRoleInfoList: {
url: '/user/queryRoleInfoList',
url: '/info/queryRoleInfoList',
method: 'GET',
showLoading: true,
},
@ -222,13 +222,13 @@ const config = {
// 查询预约时间段
queryOrderTime: {
url: '/order/queryOrderTime',
url: '/user/queryOrderTime',
method: 'GET',
showLoading: true,
},
// 查询订单列表
queryOrderList: {
url: '/order/queryOrderList',
url: '/user/queryOrderList',
method: 'GET',
showLoading: true,
},
@ -237,45 +237,91 @@ const config = {
//文创好物-获取商品详情
queryWaresById: {
url: '/wares/queryWaresById',
url: '/info/queryWaresById',
method: 'GET',
showLoading: true,
},
//文创好物-获取商品列表
queryWaresList: {
url: '/wares/queryWaresList',
url: '/info/queryWaresList',
method: 'GET',
showLoading: true,
},
// 添加购物车
addShopcar: {
url: '/wares/addShopcar',
url: '/user/addShopcar',
method: 'POST',
showLoading: true,
auth: true,
},
// 获取购物车列表
queryShopcarList: {
url: '/wares/queryShopcarList',
url: '/user/queryShopcarList',
method: 'GET',
showLoading: true,
auth: true,
},
// 取消购物车
deleteShopcar: {
url: '/wares/deleteShopcar',
url: '/user/deleteShopcar',
method: 'DELETE',
showLoading: true,
auth: true,
},
// 修改购物车信息
updateShopcar: {
url: '/wares/updateShopcar',
url: '/user/updateShopcar',
method: 'POST',
showLoading: true,
debounce : 500,
auth: true,
},
/**
* 10月7日新接口
*/
// 语音播放
textToAudio: {
url: '/info/textToAudio',
method: 'GET',
},
// 根据id给视频点赞
addThumpup: {
url: '/info/addThumpup',
method: 'POST',
showLoading: true,
limit : 500,
},
// 我的预约-创建预约订单
createOrder: {
url: '/user/addOrder',
method: 'POST',
showLoading: true,
limit : 500,
},
// 创建文创好物订单
addWaresOrder: {
url: '/info/addWaresOrder',
method: 'POST',
showLoading: true,
limit : 500,
},
// 查询文创好物订单列表
queryWaresOrderList: {
url: '/info/queryWaresOrderList',
method: 'GET',
showLoading: true,
limit : 500,
},
// 搜索文章
queryArticleListByTitle: {
url: '/info/queryArticleListByTitle',
method: 'GET',
showLoading: true,
},
}


+ 17
- 3
components/list/videoList.vue View File

@ -5,8 +5,8 @@
@scrolltolower="loadMoreData">
<view class="videoList">
<view class="video-item" v-for="(item, index) in list" :key="index"
@click="showVideo(item, index)">
<view class="image">
>
<view class="image" @click="showVideo(item, index)">
<image :src="item.videoImage" mode="aspectFill">
</image>
<view class="icon">
@ -20,7 +20,8 @@
</image> -->
{{ item.videoTitle }}
</view>
<view class="like">
<view class="like"
@click="addThumpup(item.id)">
<uv-icon size="45rpx" v-if="false" name="heart"></uv-icon>
<uv-icon size="45rpx" color="#FF4340" v-else name="heart-fill"></uv-icon>
{{ item.videoThumpup }}
@ -93,6 +94,19 @@ import index from '../../uni_modules/uv-ui-tools'
this.queryVideoList()
}
},
addThumpup(videoId){
this.$api('addThumpup', {
videoId
}, res => {
if(res.code == 200){
this.queryVideoList()
uni.showToast({
title: res.message,
icon: 'none'
})
}
})
},
}
}
</script>


+ 5
- 0
components/tourGuide/locations.vue View File

@ -162,6 +162,11 @@
let self = this
self.context.src = this.$config.baseUrl + '/info/textToAudio?text=' + "你好"
self.context.play()
return
plugin.textToSpeech({
lang: "zh_CN",
tts: true,


+ 8
- 2
pages/index/index.vue View File

@ -12,9 +12,10 @@
<view class="top">
<view class="search">
<uv-search
placeholder="请输入搜索服务"
placeholder="请输入搜索文章"
:showAction="false"
search-icon-size="40rpx"
@search="search"
v-model="keyword"></uv-search>
</view>
</view>
@ -150,6 +151,11 @@
}
})
},
search(){
uni.navigateTo({
url: '/pages_order/service/applyRelic?keyword=' + this.keyword
})
}
}
}
</script>
@ -189,7 +195,7 @@
padding-bottom: 30rpx;
background-color: #fff;
border-radius: 60rpx;
box-shadow: 0 0 10rpx 10rpx #00000033;
box-shadow: 0 0 10rpx 10rpx #00000013;
.grid-icon{
width: 80rpx;
height: 80rpx;


+ 8
- 7
pages_order/components/product/submitUnitSelect.vue View File

@ -78,7 +78,7 @@
<view class="submit-btn">
<view class="l"
@click="addCart">
加入租赁
加入购物
</view>
<view class="r"
@click="orderPay">
@ -106,7 +106,7 @@
},
props : {
submiitTitle : {
default : '立即租赁',
default : '立即购买',
type : String,
},
detail : {
@ -145,8 +145,9 @@
//
openAddress(){
if (this.addressTotal == 0) {
this.$refs.popup.close()
return uni.navigateTo({
url: '/pages_order/mine/address'
url: '/pages_order/mine/address?type=back'
})
}
this.$refs.addressPopup.open('bottom')
@ -178,9 +179,9 @@
orderPay(){
let data = {
id : this.detail.id,//id
waresId : this.detail.id,//id
addressId : this.address.id,//id
num : this.num,
number : this.num,
}
@ -190,11 +191,11 @@
return
}
this.$api('orderPay', data, res => {
this.$api('addWaresOrder', data, res => {
if(res.code == 200){
uni.redirectTo({
url: '/pages/index/order'
url: '/pages_order/order/order'
})
// uni.requestPayment({


+ 14
- 1
pages_order/mine/address.vue View File

@ -39,7 +39,15 @@
},
data() {
return {
title: '新增地址'
title: '新增地址',
type : '',
}
},
onLoad(args) {
this.type = args.type
if(this.type == 'back'){
this.addBtn()
}
},
onShow() {
@ -86,6 +94,11 @@
if (res.code == 200) {
this.$refs.addressPopup.close()
this.getAddressList()
if(this.type == 'back'){
uni.navigateBack(-1)
}
uni.showToast({
title: '操作成功',
icon: 'none'


+ 18
- 1
pages_order/mine/subscribe.vue View File

@ -11,6 +11,13 @@
@click="clickTabs"></uv-tabs>
</view>
<uv-empty
v-if="total == 0"
text="还没有订单呢!"
textSize="30rpx"
iconSize="200rpx"
icon="list"></uv-empty>
<view class="subscribe-list">
<view class="item"
v-for="(item, index) in list">
@ -60,7 +67,8 @@
</uv-cell>
<view class="btns">
<view class="btn">
<view class="btn"
@click="toUrl(item)">
再次预约
</view>
</view>
@ -112,6 +120,15 @@
this.queryParams.orderType = index;
this.getData()
},
toUrl(item){
for(let key in this.$config.dict){
if(this.$config.dict[key].payType == item.orderType){
uni.navigateTo({
url: `/pages_order/order/orderSubscribe?type=${key}&id=${item.itemId}`
})
}
}
},
}
}
</script>


+ 35
- 27
pages_order/order/order.vue View File

@ -17,6 +17,13 @@
@click="clickTabs"></uv-tabs>
</view>
<uv-empty
v-if="orderList.length == 0"
text="还没有订单呢!"
textSize="30rpx"
iconSize="200rpx"
icon="list"></uv-empty>
<view v-if="orderList.length > 0" class="list">
<view class="item"
v-for="(item, index) in orderList"
@ -25,8 +32,8 @@
<view class="top">
<view class="service">
<text>{{item.projectId_dictText}}</text>
<text>{{item.type_dictText}}</text>
<text>{{item.travelWares.waresTitle}}</text>
<!-- <text>{{item.type_dictText}}</text> -->
</view>
<view class="status">
<text> {{item.state_dictText}}</text>
@ -36,22 +43,20 @@
<view class="content">
<view class="left">
<image mode="aspectFill" :src="item.image"></image>
<image mode="aspectFill"
:src="item.travelWares.waresImage"></image>
</view>
<view class="right">
<view class="text-hidden-1">
客户姓名{{item.name}}
商品名称{{item.travelWares.waresTitle}}
</view>
<view class="text-hidden-1">
产品规格{{item.unit}}
客户姓名{{item.travelWaresOrder.userName}}
</view>
<view class="text-hidden-1">
租赁地址{{item.address}}
收货地址{{item.travelWaresOrder.userAddress}}
</view>
<!-- <view class="text-hidden-1">
总计时间{{item.useTime}}分钟
</view> -->
</view>
@ -59,11 +64,11 @@
<view class="bottom">
<view class="price">
总价格<text class="num">{{item.money}}</text>
总价格<text class="num">{{item.travelWaresOrder.price}}</text>
</view>
<view class="b1">
<!-- <view class="b1">
查看物流
</view>
</view> -->
<!-- <view @click.stop="toPayOrder(item)" class="b2" v-if="item.state == 0">
立即付款
</view>
@ -95,35 +100,35 @@
return {
tabs: [
{
name: '遗产路径'
name: '全部'
},
{
name: '待支付'
},
{
name: '我要研学'
name: '待发货'
},
{
name: '文创好物'
name: '待收货'
},
{
name: '已完成'
},
],
queryParams: {
pageNo: 1,
pageSize: 10
},
orderList: [
{
money : 99.99,
address : '广东省广州市越秀区城南故事C3栋2802',
name : '李**',
phone : '150*****091',
unit : '120*40*75【桌子尺寸】',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
state_dictText : '已完成',
}
], //
orderList: [], //
state : -1,
total : 0,
}
},
computed : {
},
onShow() {
this.getOrderList()
},
methods: {
//tab
clickTabs(index) {
@ -147,7 +152,7 @@
if(this.state != -1){
queryParams.state = this.state
}
this.$api('orderPage', queryParams, res => {
this.$api('queryWaresOrderList', queryParams, res => {
if(res.code == 200){
this.orderList = res.result
}
@ -207,6 +212,9 @@
padding-left: 20rpx;
line-height: 40rpx;
background-color: #F8F8F8;
display: flex;
flex-direction: column;
justify-content: space-around;
}
}


+ 50
- 0
pages_order/order/orderSubscribe.vue View File

@ -110,6 +110,11 @@
</view>
</view>
<view class="btn"
@click="submit">
提交预约
</view>
<!-- 选择日期 -->
<uv-calendars
@ -236,6 +241,40 @@
this.form.orderTime.push(n && n.timeDot)
})
},
submit(){
let data = {
itemId : this.detail.id,
orderPhone : this.form.phone,
orderTitle : this.detailTitle,
orderDate : this.selectDate,
orderPrice : this.price,
orderTime : this.form.orderTime.join('-'),
orderType : this.dict.payType,
orderName : this.form.name
}
if(this.$utils.verificationAll(data, {
orderName : '请填写姓名',
orderPhone : '请填写联系方式',
orderTime : '请选择预约时间',
})){
return
}
this.$api('createOrder', data, res => {
if(res.code == 200){
uni.showToast({
title: res.message,
icon : 'none'
})
uni.navigateTo({
url: '/pages_order/mine/subscribe'
})
}
})
},
}
}
</script>
@ -301,4 +340,15 @@
}
}
}
.btn{
margin: 0 auto;
padding: 20rpx 0;
display: flex;
justify-content: center;
align-items: center;
width: 80%;
background-color: $uni-color;
color: #fff;
border-radius: 30rpx;
}
</style>

+ 18
- 1
pages_order/service/applyRelic.vue View File

@ -53,6 +53,14 @@
</uv-list-item>
</uv-list>
</view>
<uv-empty
v-if="total == 0"
text="没有找到你需要的哦!"
textSize="30rpx"
iconSize="200rpx"
icon="list"></uv-empty>
<tabber />
</view>
</template>
@ -69,6 +77,7 @@
total : 0,
list : [],
articleType : -1,
keyword : '',
}
},
computed : {
@ -83,6 +92,9 @@
onPullDownRefresh(){
this.queryArticleListByType()
},
onLoad(args) {
this.keyword = args.keyword
},
methods: {
queryArticleListByType(){
@ -94,7 +106,12 @@
query.articleType = this.articleType
}
this.$api('queryArticleListByType', query, res => {
if(this.keyword){
query.articleTitle = this.keyword
}
this.$api(this.keyword ? 'queryArticleListByTitle' :
'queryArticleListByType', query, res => {
uni.stopPullDownRefresh()
if(res.code == 200){
this.list = res.result.records


Loading…
Cancel
Save