Browse Source

上传跳转预约订单

master
前端-胡立永 8 months ago
parent
commit
d1ff3494ce
12 changed files with 213 additions and 75 deletions
  1. +17
    -4
      api/api.js
  2. +23
    -3
      components/list/videoList.vue
  3. +11
    -3
      components/tourGuide/locations.vue
  4. +2
    -2
      config.js
  5. +7
    -4
      pages/index/center.vue
  6. +2
    -2
      pages_order/auth/wxUserInfo.vue
  7. +3
    -3
      pages_order/components/product/cartAction.vue
  8. +7
    -1
      pages_order/components/submit/StudyAndPathDetailSubmit.vue
  9. +11
    -12
      pages_order/mine/cart.vue
  10. +64
    -14
      pages_order/mine/collect.vue
  11. +58
    -19
      pages_order/mine/volunteer.vue
  12. +8
    -8
      store/store.js

+ 17
- 4
api/api.js View File

@ -28,13 +28,21 @@ const config = {
// 修改个人信息接口
updateInfo: {
url: '/info/updateInfo',
url: '/user/updateHanHaiMemberById',
method: 'POST',
auth: true,
limit: 500,
showLoading: true,
},
// 获取个人信息接口
getInfo: {
url: '/user/queryHanHaiMemberById',
method: 'GET',
auth: true,
showLoading: true,
},
//隐私政策
getPrivacyPolicy: {
url: '/login/getPrivacyPolicy',
@ -236,26 +244,31 @@ const config = {
// 添加购物车
addShopcar: {
url: '/wares/addShopcar',
method: 'GET',
method: 'POST',
showLoading: true,
auth: true,
},
// 获取购物车列表
queryShopcarList: {
url: '/wares/queryShopcarList',
method: 'GET',
showLoading: true,
auth: true,
},
// 取消购物车
deleteShopcar: {
url: '/wares/deleteShopcar',
method: 'GET',
method: 'DELETE',
showLoading: true,
auth: true,
},
// 修改购物车信息
updateShopcar: {
url: '/wares/updateShopcar',
method: 'GET',
method: 'POST',
showLoading: true,
debounce : 500,
auth: true,
},
}


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

@ -5,7 +5,7 @@
@scrolltolower="loadMoreData">
<view class="videoList">
<view class="video-item" v-for="(item, index) in list" :key="index"
@click="showVideo(item)">
@click="showVideo(item, index)">
<view class="image">
<image :src="item.videoImage" mode="aspectFill">
</image>
@ -32,6 +32,7 @@
</template>
<script>
import index from '../../uni_modules/uv-ui-tools'
export default {
props : {
height : {
@ -51,8 +52,27 @@
}
},
methods: {
showVideo(item){
this.$utils.hanldePreview
showVideo(item, current){
// this.$utils.hanldePreview
// uni.previewMedia({
// current : item.videoContent
// })
let sources = []
this.list.forEach(n => {
sources.push({
url : n.videoContent,
type : 'video'
})
})
wx.previewMedia({
sources, //
current, //
// url: url // url
})
},
queryVideoList(){


+ 11
- 3
components/tourGuide/locations.vue View File

@ -51,9 +51,9 @@
</view>
<view class="controls">
<view class="f">
<!-- <view class="f">
<image src="/static/image/tourGuide/f.png" mode=""></image>
</view>
</view> -->
<view class="btn"
@click="show = !show">
<text class="">
@ -88,12 +88,20 @@
</view>
<view class="controls">
<view class="f"
style="transform: scale(1.3);"
v-if="item.categoryId != 0">
<image
:src="`/static/image/tourGuide/${item.categoryId}.png`" mode=""></image>
</view>
<view class="f">
<image
@click="openLocation(item)"
src="/static/image/tourGuide/f.png" mode=""></image>
</view>
<view class="f">
<view
v-if="item.categoryId == 0"
class="f">
<image
@click="textToSpeech"
src="/static/image/tourGuide/a.png" mode=""></image>


+ 2
- 2
config.js View File

@ -7,13 +7,13 @@ import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI);
// 当前环境
const type = 'dev'
const type = 'prod'
// 环境配置
const config = {
dev : {
baseUrl : 'https://traveladmin.augcl.com/travel-api/api',
baseUrl : 'http://augcl.natapp1.cc/travel-api/api',
},
prod : {
baseUrl : 'https://traveladmin.augcl.com/travel-api/api',


+ 7
- 4
pages/index/center.vue View File

@ -5,14 +5,15 @@
<view class="head">
<view class="headImage">
<image src="" mode="aspectFill"></image>
<image :src="userInfo.headImage" mode="aspectFill"></image>
</view>
<view class="info">
<view class="name">
微信用户
{{ userInfo.nickName || '微信用户'}}
</view>
<view class="tips">
加入时间2024-03-03
<view class="tips"
v-if="userInfo.createTime">
加入时间{{ $dayjs(userInfo.createTime).format('YYYY-MM-DD') }}
</view>
</view>
<view class="setting">
@ -99,8 +100,10 @@
</template>
<script>
import { mapState } from 'vuex'
export default {
computed: {
...mapState(['userInfo']),
},
data() {
return {


+ 2
- 2
pages_order/auth/wxUserInfo.vue View File

@ -74,9 +74,9 @@
return
}
self.$api('infoUpdateInfo', self.userInfo, res => {
self.$api('updateInfo', self.userInfo, res => {
if (res.code == 200) {
uni.switchTab({
uni.navigateTo({
url:'/pages/index/index'
})
}


+ 3
- 3
pages_order/components/product/cartAction.vue View File

@ -37,8 +37,8 @@
}
let price = 0
this.cartList.forEach(n => {
if (this.cartCheckboxValue.includes(n.id)) {
price += n.waresPrice * (n.num || 1)
if (this.cartCheckboxValue.includes(n.shopcar.id)) {
price += n.wares.waresPrice * (n.shopcar.shopcarNumber || 1)
}
})
return price
@ -65,7 +65,7 @@
justify-content: center;
align-items: center;
overflow: hidden;
z-index: 99;
.icon {
position: relative;
width: 80rpx;


+ 7
- 1
pages_order/components/submit/StudyAndPathDetailSubmit.vue View File

@ -31,7 +31,7 @@
</view>
<view class=""
@click=""
@click="openLocation(detail)"
v-if="article">
<button
class="share">
@ -117,6 +117,12 @@
}
})
},
openLocation(n){
uni.openLocation({
latitude: n.experienceLatitude,
longitude: n.experienceLongitude,
})
},
}
}
</script>


+ 11
- 12
pages_order/mine/cart.vue View File

@ -18,7 +18,7 @@
<view class="item">
<view class="checkbox">
<uv-checkbox
:name="item.id"
:name="item.shopcar.id"
activeColor="#FA5A0A"
size="40rpx"
icon-size="35rpx"
@ -27,16 +27,16 @@
<image
class="image"
:src="item.waresImage"
:src="item.wares.waresImage"
mode=""></image>
<view class="info">
<view class="title">
<view class="">
{{ item.waresTitle }}
{{ item.wares.waresTitle }}
</view>
<view class="">
<uv-number-box v-model="item.num"
<uv-number-box v-model="item.shopcar.shopcarNumber"
@change="e => valChange(item, e)"></uv-number-box>
</view>
</view>
@ -45,7 +45,7 @@
<uv-icon name="arrow-down"></uv-icon>
</view> -->
<view class="price">
<text>{{ item.waresPrice }}</text>
<text>{{ item.wares.waresPrice }}</text>
</view>
</view>
</view>
@ -88,19 +88,18 @@
},
methods: {
valChange(item, e){
console.log(e.value);
// this.$api('updateShopcar', {
// id : item.id,
// shopcarNumber : e.value,
// })
this.$api('updateShopcar', {
id : item.shopcar.id,
shopcarNumber : e.value,
})
},
//
delCart(item, index){
this.$api('deleteShopcar', {
shopcarId : item.id
shopcarId : item.shopcar.id
}, res => {
if(res.code == 200){
this.getData()
this.$store.commit('getCartList')
uni.showToast({
title: '删除成功',
});


+ 64
- 14
pages_order/mine/collect.vue View File

@ -15,7 +15,7 @@
v-slot="{item,index}"
>
<view class="card"
@click="toUrl(item)"
@click="toUrl(item, tabs)"
>
<view class="card-img">
<image :src="item.roleHead
@ -24,11 +24,11 @@
|| item.waresImage" mode="aspectFill"></image>
</view>
<view class="iconx">
<view class="iconx"
@click.stop="delModel(item)">
<uv-icon
name="close-circle-fill"
size="40rpx"
@click="delModel(item)"
color="#B12026"></uv-icon>
</view>
@ -57,6 +57,8 @@
|| item.waresPrice}}
</view>
<view class="card-content-bottom-one"
v-if="item.collectionType != 6 &&
item.collectionType != 2 || item.isPay == 1"
@click.stop="toPayUrl(item)">
线上预约
</view>
@ -81,30 +83,43 @@
return {
tabs: [
// {
// name: ''
// name: '',
// },
{
name: '遗产讲述'
name: '遗产讲述',
toUrlType : 0,
toPayUrlType : 1,
},
{
name: '达人同游'
name: '达人同游',
toUrlType : 1,
toPayUrlType : 2,
},
{
name: '遗产路径'
name: '遗产路径',
toUrlType : 0,
toPayUrlType : 0,
},
{
name: '我要跟拍'
name: '我要跟拍',
toUrlType : 2,
toPayUrlType : 3,
},
{
name: '非遗体验'
name: '非遗体验',
toUrlType : 2,
toPayUrlType : 4,
},
{
name: '我要研学'
name: '我要研学',
toUrlType : 1,
toPayUrlType : 5,
},
{
name: '文创好物'
name: '文创好物',
},
],
type : [],
mixinsListApi : 'queryCollectionList',
options: [
{
@ -134,7 +149,28 @@
this.getData()
},
toUrl(item){
let type = this.tabs[item.collectionType].toUrlType
if([0, 1, 3].includes(item.collectionType)){
//
uni.navigateTo({
url: `/pages_order/service/reservationDetail?type=${type}&id=` + item.id
})
}else if([2, 5].includes(item.collectionType)){
//
uni.navigateTo({
url: `/pages_order/service/StudyAndPathDetail?type=${type}&id=` + item.id
})
}else if([4].includes(item.collectionType)){
//
uni.navigateTo({
url: `/pages_order/service/articleDetail?type=${type}&id=` + item.id
})
}else if([6].includes(item.collectionType)){
//
uni.navigateTo({
url: `/pages_order/product/productDetail?&id=` + item.id
})
}
},
delModel(item){
let self = this
@ -145,7 +181,8 @@
return
}
self.$api('deleteCollection', {
collectionId : item.id
collectionId : item.id,
collectionType : item.collectionType
}, res => {
self.getData()
})
@ -153,14 +190,27 @@
})
},
getData(){
this.$api(this.mixinsListApi, this.queryParams,
let queryParams = JSON.parse(JSON.stringify(this.queryParams))
this.$api(this.mixinsListApi, queryParams,
res => {
uni.stopPullDownRefresh()
if(res.code == 200){
res.result.forEach(n => {
n.collectionType = queryParams.collectionType
})
this.list = res.result
}
})
},
toPayUrl(item){
let type = this.tabs[item.collectionType].toPayUrlType
uni.navigateTo({
url: `/pages_order/order/orderSubscribe?payType=${type}&id=` + item.id
})
},
}
}
</script>


+ 58
- 19
pages_order/mine/volunteer.vue View File

@ -11,7 +11,7 @@
<view>
姓名
</view>
<input v-model="volunteerName" placeholder="请输入您的姓名" />
<input v-model="form.volunteerName" placeholder="请输入您的姓名" />
</view>
<view>
<uv-picker ref="picker" :columns="columns" @confirm="confirm"></uv-picker>
@ -19,38 +19,46 @@
<view @click="openPicker">
证件类型
</view>
<uv-cell :border="false" title="选择证件类型" :isLink="true" arrow-direction="right"
@click="openPicker" />
<uv-cell :border="false"
:title="form.cerType || '选择证件类型'"
:isLink="true" arrow-direction="right"
@click="openPicker" />
</view>
</view>
<view class="volunteer-form-sheet-cell">
<view>
证件号码
</view>
<input placeholder="请输入证件号码" v-model="volunteerCerNo" />
<input placeholder="请输入证件号码" v-model="form.cerNo" />
</view>
<view class="volunteer-form-sheet-cell">
<view>
手机号码
</view>
<uv-input placeholder="请输入手机号码" fontSize="24rpx" border="none"
:custom-style="{backgroundColor: '#fff'}">
<template #suffix>
<!-- <uv-input
v-model="form.volunteerPhone"
placeholder="请输入手机号码"
fontSize="24rpx"
border="none"
:custom-style="{backgroundColor: '#fff',
padding : '0 20rpx'}"> -->
<!-- <template #suffix>
<view>
<text class="yzm">获取验证码</text>
</view>
</template>
</uv-input>
</template> -->
<!-- </uv-input> -->
<input placeholder="请输入手机号码" v-model="form.volunteerPhone" />
</view>
<view class="volunteer-form-sheet-cell">
<!-- <view class="volunteer-form-sheet-cell">
<view>
验证码
</view>
<input placeholder="请输入验证码" />
</view>
</view> -->
</view>
<view class="submit">
<view class="submit" @click="submit">
<view>
提交
</view>
@ -64,12 +72,14 @@
data() {
return {
columns: [
['中国', '美国', '日本']
['居民身份证']
],
volunteerCerNo: "",
volunteerName: "",
volunteerPhone: ""
form : {
cerNo : '',//
cerType : '',//
volunteerName : '',//
volunteerPhone : '',//
},
}
},
methods: {
@ -77,8 +87,36 @@
this.$refs.picker.open();
},
confirm(e) {
console.log('confirm', e);
}
this.form.cerType = e.value[0]
},
submit(){
if(this.$utils.verificationAll(this.form, {
volunteerName : '请输入志愿者姓名',//
cerType : '请选择证件类型',//
cerNo : '请输入证件号码',//
volunteerPhone : '请输入手机号码',//
})){
return
}
if(this.$utils.verificationPhone(this.form.volunteerPhone)){
uni.showToast({
title: '请输入正确的手机号码',
icon : 'none'
})
}
this.$api('addVolunteer', this.form, res => {
if(res.code == 200){
setTimeout(uni.navigateBack, 800, -1)
uni.showToast({
title: res.message,
icon : 'none'
})
}
})
},
}
}
</script>
@ -143,6 +181,7 @@
color: rgb(192, 196, 204);
background-color: #fff;
font-size: 24rpx;
padding: 0 20rpx;
}
}
}


+ 8
- 8
store/store.js View File

@ -162,7 +162,7 @@ const store = new Vuex.Store({
if(res.code == 200){
state.cartCheckboxValue = []
res.result.forEach(n => {
state.cartCheckboxValue.push(n.id)
state.cartCheckboxValue.push(n.shopcar.id)
})
state.cartList = res.result
}
@ -194,19 +194,19 @@ const store = new Vuex.Store({
state.userInfo = res.result.userInfo
uni.setStorageSync('token', res.result.token)
// if(!state.userInfo.nickName || !state.userInfo.headImage){
// uni.navigateTo({
// url: '/pages_order/auth/wxUserInfo'
// })
// }else{
if(!state.userInfo.nickName || !state.userInfo.headImage){
uni.navigateTo({
url: '/pages_order/auth/wxUserInfo'
})
}else{
uni.navigateBack(-1)
// }
}
})
}
})
},
getUserInfo(state){
api('infoGetInfo', res => {
api('getInfo', res => {
if(res.code == 200){
state.userInfo = res.result
}


Loading…
Cancel
Save