Browse Source

上传

master
前端-胡立永 8 months ago
parent
commit
e460ae7a12
30 changed files with 611 additions and 288 deletions
  1. +1
    -0
      App.vue
  2. +84
    -8
      api/api.js
  3. +1
    -1
      api/http.js
  4. +2
    -2
      components/config/PrivacyAgreementPoup.vue
  5. +1
    -1
      components/tourGuide/locations.vue
  6. +50
    -0
      mixins/list.js
  7. +4
    -2
      pages/index/index.vue
  8. +3
    -3
      pages_order/auth/wxLogin.vue
  9. +5
    -5
      pages_order/components/address/addressList.vue
  10. +17
    -17
      pages_order/components/address/redactAddress.vue
  11. +8
    -2
      pages_order/components/list/cardList.vue
  12. +52
    -23
      pages_order/components/submit/StudyAndPathDetailSubmit.vue
  13. +21
    -21
      pages_order/mine/address.vue
  14. +45
    -16
      pages_order/mine/subscribe.vue
  15. +67
    -13
      pages_order/order/orderSubscribe.vue
  16. +39
    -12
      pages_order/service/StudyAndPathDetail.vue
  17. +23
    -6
      pages_order/service/StudyFurther.vue
  18. +9
    -2
      pages_order/service/applyRelic.vue
  19. +17
    -3
      pages_order/service/articleDetail.vue
  20. +14
    -9
      pages_order/service/carefree.vue
  21. +22
    -12
      pages_order/service/experience.vue
  22. +9
    -6
      pages_order/service/following.vue
  23. +49
    -21
      pages_order/service/heritagePath.vue
  24. +1
    -1
      pages_order/service/reservationDetail.vue
  25. BIN
      pages_order/static/service/carefree/1.png
  26. BIN
      pages_order/static/service/carefree/2.png
  27. BIN
      pages_order/static/service/carefree/3.png
  28. BIN
      pages_order/static/service/carefree/4.png
  29. +16
    -0
      store/store.js
  30. +51
    -102
      utils/utils.js

+ 1
- 0
App.vue View File

@ -4,6 +4,7 @@
},
onShow: function() {
this.$store.commit('initConfig')
this.$store.commit('getBanner')
},
onHide: function() {
}


+ 84
- 8
api/api.js View File

@ -94,30 +94,106 @@ const config = {
method: 'GET',
showLoading: true,
},
// areaId: 0-瓷都镇区 1-湖田片区 2-高岭片区 3-瑶里片区 4-蛟潭片区; categoryTyep: 0-景点 1-美食店铺 2-民宿 3-厕所
querySpotList: {
url: '/info/querySpotList',
method: 'GET',
showLoading: true,
},
// 获取视频列表
queryVedioById: {
url: '/info/queryVedioById',
method: 'GET',
showLoading: true,
},
// amusement 游玩项目相关接口
// 获取非遗体验列表
queryExperienceList: {
url: '/amusement/queryExperienceList',
method: 'GET',
showLoading: true,
},
// 获取非遗体验详情
queryExperienceById: {
url: '/amusement/queryExperienceById',
method: 'GET',
showLoading: true,
},
// 获取路径定制、我要研学列表
queryAmusementList: {
url: '/amusement/queryAmusementList',
method: 'GET',
showLoading: true,
},
// 获取路径定制、我要研学详情
queryAmusementById: {
url: '/amusement/queryAmusementById',
method: 'GET',
showLoading: true,
},
// 修改地址
updateAddress: {
url: '/user/updateAddress',
method: 'POST',
showLoading: true,
},
// 查询地址
queryAddress: {
url: '/user/queryAddress',
method: 'GET',
showLoading: true,
},
// 删除地址
deleteAddress: {
url: '/user/deleteAddress',
method: 'DELETE',
showLoading: true,
},
// 添加地址
addAddress: {
url: '/user/addAddress',
method: 'POST',
showLoading: true,
},
// 根据角色Id获取角色信息详情
queryRoleInfoById: {
url: '/info/queryRoleInfoById',
url: '/user/queryRoleInfoById',
method: 'GET',
showLoading: true,
},
// 根据角色类型获取角色信息列表-讲解员-达人-摄影师
queryRoleInfoList: {
url: '/info/queryRoleInfoList',
url: '/user/queryRoleInfoList',
method: 'GET',
showLoading: true,
},
// 根据景区id获取该景区下的地点列表:景点-厕所-美食店铺-民宿
querySpotList: {
url: '/info/querySpotList',
// 查询预约时间段
queryOrderTime: {
url: '/order/queryOrderTime',
method: 'GET',
showLoading: true,
},
// 获取视频列表
queryVedioById: {
url: '/info/queryVedioById',
// 查询订单列表
queryOrderList: {
url: '/order/queryOrderList',
method: 'GET',
showLoading: true,
},
}


+ 1
- 1
api/http.js View File

@ -16,7 +16,7 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
method: method,
header: {
'X-Access-Token': uni.getStorageSync('token'),
'Content-Type' : method == 'POST' ? 'application/x-www-form-urlencoded' : 'application/json'
'Content-Type' : method != ' GET' ? 'application/x-www-form-urlencoded' : 'application/json'
},
success: (res) => {


+ 2
- 2
components/config/PrivacyAgreementPoup.vue View File

@ -10,7 +10,7 @@
</view>
<view class="content_pri">
<view class="text">
欢迎来到酒店布草!我们根据最新的法律法规监管政策要求更新了用户协议隐私政策,请您认真阅读
欢迎来到遗产里的景徳镇!我们根据最新的法律法规监管政策要求更新了用户协议隐私政策,请您认真阅读
</view>
</view>
<view class="config">
@ -18,7 +18,7 @@
<view class="content">
<view style="display: flex;">
<!-- <uv-checkbox size="30rpx" :name="1"></uv-checkbox> -->
同意<text @click="goToPrivacy">酒店布草隐私政策</text>
同意<text @click="goToPrivacy">隐私政策</text>
</view>
<view class="">
以及<text @click="goToPrivacy">用户协议</text>


+ 1
- 1
components/tourGuide/locations.vue View File

@ -78,7 +78,7 @@
</template>
<script>
// var plugin = requirePlugin("WechatSI")
// var plugin = requirePlugin("WechatSI")
// "plugins" : {
// "WechatSI" : {


+ 50
- 0
mixins/list.js View File

@ -0,0 +1,50 @@
function query(self, queryParams){
return (self.beforeGetData && self.beforeGetData()) ||
queryParams || self.queryParams
}
export default {
data() {
return {
queryParams: {
pageNo: 1,
pageSize: 10,
},
total : 0,
list : [],
}
},
onReachBottom() {
this.loadMoreData()
},
methods: {
getData(queryParams){
return new Promise((success, error) => {
if(!this.mixinsListApi){
return console.error('mixinsListApi 缺失');
}
this.$api(this.mixinsListApi,
query(this, queryParams), res => {
uni.stopPullDownRefresh()
if(res.code == 200){
this[this.mixinsListKey || 'list'] = res.result.records
this.total = res.result.total
success(res.result)
this.getDataThen && this.getDataThen()
}
})
})
},
loadMoreData(){
console.log('loadMoreData----', this.queryParams.pageSize < this.total);
if(this.queryParams.pageSize < this.total){
this.queryParams.pageSize += 10
this.getData()
}
},
}
}

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

@ -7,7 +7,7 @@
indicator
height="620rpx"
indicatorStyle="bottom: 100rpx;"
keyName="url"></uv-swiper>
keyName="imageContent"></uv-swiper>
<view class="top">
<view class="search">
@ -141,7 +141,9 @@
},
methods: {
queryBannerList(){
this.$api('queryBannerList', res => {
this.$api('queryBannerList', {
bannerCategoryType : 0,
},res => {
uni.stopPullDownRefresh()
if(res.code == 200){
this.bannerList = res.result


+ 3
- 3
pages_order/auth/wxLogin.vue View File

@ -4,7 +4,7 @@
<!-- <image src="/static/image/login/logo.png" mode=""></image> -->
</view>
<view class="title">
欢迎使用酒店桌布租赁平台
欢迎使用遗产里的景徳镇
</view>
<view class="btn mt"
@click="wxLogin">
@ -35,10 +35,10 @@
activeColor="#FD5100"
:name="1"
></uv-checkbox>
阅读并同意我们的<text @click="openConfigDetail('privacyAgreement')">服务协议与隐私条款</text>
阅读并同意我们的<text @click="openConfigDetail('getPrivacyPolicy')">服务协议与隐私条款</text>
</view>
<view class="">
以及<text @click="openConfigDetail('userAgreement')">个人信息保护指引</text>
以及<text @click="openConfigDetail('getUserAgreement')">个人信息保护指引</text>
</view>
</view>
</uv-checkbox-group>


+ 5
- 5
pages_order/components/address/addressList.vue View File

@ -16,13 +16,13 @@
<view class="address-info">
<view class="user-info">
<text class="user-name">{{ item.name }}</text>
<text class="user-phone">{{ item.phone }}</text>
<text v-if="item.defaultId == '1'" class="is-default">默认</text>
<text class="user-name">{{ item.userName }}</text>
<text class="user-phone">{{ item.userPhone }}</text>
<text v-if="item.addressDefault == '1'" class="is-default">默认</text>
</view>
<view class="address-detail">
{{ item.address + " " + item.addressDetail }}
{{ item.area + " " + item.address }}
</view>
</view>
</view>
@ -90,7 +90,7 @@
//
getAddressList() {
return new Promise((success, fail) => {
this.$api('addressPage', this.queryParams, res => {
this.$api('queryAddress', this.queryParams, res => {
if (res.code == 200) {
this.addressList = res.result.records || [];
this.total = res.result.total || 0;


+ 17
- 17
pages_order/components/address/redactAddress.vue View File

@ -5,17 +5,17 @@
<uv-form label-width="210rpx" :model="addressDetail" ref="form">
<uv-form-item label="联系人" prop="name">
<uv-input v-model="addressDetail.name" placeholder="请输入联系人姓名" border="none">
<uv-input v-model="addressDetail.userName" placeholder="请输入联系人姓名" border="none">
</uv-input>
</uv-form-item>
<uv-form-item label="手机号" prop="phone">
<uv-input v-model="addressDetail.phone" placeholder="请输入手机号" border="none">
<uv-input v-model="addressDetail.userPhone" placeholder="请输入手机号" border="none">
</uv-input>
</uv-form-item>
<uv-form-item label="所在地区" prop="address">
<uv-input v-model="addressDetail.address" placeholder="请选择所在地区" border="none">
<uv-input v-model="addressDetail.area" placeholder="请选择所在地区" border="none">
</uv-input>
<template #right>
<view style="padding-right: 40rpx;color: #FBAB32;" @click.stop="selectAddr">
@ -25,7 +25,7 @@
</uv-form-item>
<uv-form-item label="详细地址" prop="addressDetail">
<uv-input v-model="addressDetail.addressDetail" placeholder="请输入详细地址" border="none">
<uv-input v-model="addressDetail.address" placeholder="请输入详细地址" border="none">
</uv-input>
</uv-form-item>
</uv-form>
@ -73,33 +73,33 @@
//
parameterVerification(addressDetaila) {
let {
name,
phone,
address,
addressDetail
userName,
userPhone,
area,
address
} = addressDetaila
if (name.trim() == '') {
if (userName.trim() == '') {
return {
title: '请填写联系人',
auth: false
}
} else if (phone.trim() == '') {
} else if (userPhone.trim() == '') {
return {
title: '请填写手机号',
auth: false
}
} else if (address.trim() == '') {
} else if (area.trim() == '') {
return {
title: '请填写所在地区',
auth: false
}
} else if (addressDetail.trim() == '') {
} else if (address.trim() == '') {
return {
title: '请填写详细地址',
auth: false
}
} else if (phone.trim() != '') {
if (!this.$utils.verificationPhone(phone)) {
} else if (userPhone.trim() != '') {
if (!this.$utils.verificationPhone(userPhone)) {
return {
title: '手机号格式不合法',
auth: false
@ -128,12 +128,12 @@
this.addressDetail.longitude = res.longitude
if (!res.address && res.name) { //
return this.addressDetail.address = res.name
return this.addressDetail.area = res.name
}
if (res.address || res.name) {
return this.addressDetail.address = res.address + res.name
return this.addressDetail.area = res.address + res.name
}
this.addressDetail.address = '' //
this.addressDetail.area = '' //
},
}
}


+ 8
- 2
pages_order/components/list/cardList.vue View File

@ -27,7 +27,8 @@
<view style="color: #FF280C;">
{{ item.price }}
</view>
<view class="card-content-bottom-one">
<view class="card-content-bottom-one"
@click.stop="toPayUrl(item)">
线上预约
</view>
</view>
@ -47,7 +48,7 @@
},
showRoleLevel : {
default : false,
}
},
},
data() {
return {
@ -85,6 +86,11 @@
let url = `/pages_order/service/reservationDetail?type=${type}&id=` + item.id
this.$utils.navigateTo(url)
},
toPayUrl(item){
uni.navigateTo({
url: `/pages_order/order/orderSubscribe?payType=${parseInt(this.type) + 1}&id=${item.id}`
})
},
}
}
</script>


+ 52
- 23
pages_order/components/submit/StudyAndPathDetailSubmit.vue View File

@ -1,37 +1,63 @@
<template>
<view class="submit">
<view class=""
@click=""
v-if="!article">
<button
class="share">
<uv-icon
size="40rpx"
name="chat"></uv-icon>
<!-- star-fill -->
<view class="">
客服
</view>
</button>
</view>
<view class=""
@click="">
<uv-icon
size="40rpx"
name="chat"></uv-icon>
<view class="">
客服
</view>
<button
class="share">
<uv-icon
size="40rpx"
name="star"></uv-icon>
<!-- star-fill -->
<view class="">
收藏
</view>
</button>
</view>
<view class=""
@click="">
<uv-icon
size="40rpx"
name="star"></uv-icon>
<!-- star-fill -->
<view class="">
收藏
</view>
@click=""
v-if="article">
<button
class="share">
<image src="/static/image/tourGuide/f.png"
style="width: 40rpx;height: 40rpx;"
mode=""></image>
<!-- star-fill -->
<view class="">
导航
</view>
</button>
</view>
<view class=""
@click="$emit('share')">
<uv-icon
size="40rpx"
name="share-square"></uv-icon>
<view class="">
分享
</view>
@click="$emit('share')"
v-if="!article">
<button
open-type="share"
class="share">
<uv-icon
size="40rpx"
name="share-square"></uv-icon>
<view class="">
分享
</view>
</button>
</view>
<view class="btn"
@ -46,8 +72,11 @@
name:"submit",
props : {
submiitTitle : {
default : '立即租赁',
default : '立即购买',
type : String,
},
article : {
default : false
}
},
data() {


+ 21
- 21
pages_order/mine/address.vue View File

@ -65,21 +65,21 @@
//
saveOrUpdate(addressDetail) {
let data = {
name: addressDetail.name,
phone: addressDetail.phone,
address: addressDetail.address,
addressDetail: addressDetail.addressDetail,
defaultId: addressDetail.defaultId || '0',
latitude: addressDetail.latitude,
longitude: addressDetail.longitude
}
if (addressDetail.id) {
data.id = addressDetail.id
}
this.$api(data.id ? 'addressEdit' : 'addressAdd', data, res => {
// let data = {
// name: addressDetail.name,
// phone: addressDetail.phone,
// address: addressDetail.address,
// addressDetail: addressDetail.addressDetail,
// defaultId: addressDetail.defaultId || '0',
// latitude: addressDetail.latitude,
// longitude: addressDetail.longitude
// }
// if (addressDetail.id) {
// data.id = addressDetail.id
// }
this.$api(addressDetail.id ? 'updateAddress' : 'addAddress', addressDetail, res => {
if (res.code == 200) {
this.$refs.addressPopup.close()
this.getAddressList()
@ -115,8 +115,8 @@
content: '确认删除此地址?删除后数据不可恢复',
success(e) {
if(e.confirm){
self.$api('addressDelete', {
id
self.$api('deleteAddress', {
AddressId : id
}, res => {
if (res.code == 200) {
uni.showToast({
@ -135,13 +135,13 @@
addBtn() {
this.title = '新增地址'
this.$refs.addressPopup.open({ //
name: '',
phone: '',
userName: '',
userPhone: '',
area: '',
address: '',
addressDetail: '',
defaultId: '',
latitude: '',
longitude: ''
longitude: '',
})
},
}


+ 45
- 16
pages_order/mine/subscribe.vue View File

@ -8,21 +8,32 @@
lineColor="#B12026"
lineHeight="8rpx"
lineWidth="50rpx"
:scrollable="false"
@click="clickTabs"></uv-tabs>
</view>
<view class="subscribe-list">
<view class="item">
<view class="item"
v-for="(item, index) in list">
<!-- 主题 -->
<uv-cell title="景德镇一日游"
<uv-cell :title="item.orderTitle"
:border="false">
<template #icon>
<text class="text">主题</text>
</template>
<template #value>
<text class="price">199.0</text>
<text class="price">{{ item.orderPrice }}</text>
</template>
</uv-cell>
<!-- 日期 -->
<uv-cell
:border="false">
<template #icon>
<text class="text">日期</text>
</template>
<template #title>
<text class="time">{{ item.orderDate }}</text>
</template>
</uv-cell>
@ -33,7 +44,7 @@
<text class="text">时间</text>
</template>
<template #title>
<text class="time">2024-04-21</text>
<text class="time">{{ item.orderTime }}</text>
</template>
</uv-cell>
@ -44,7 +55,7 @@
<text class="text">电话</text>
</template>
<template #title>
<text class="phone">15423451221</text>
<text class="phone">{{ item.orderPhone }}</text>
</template>
</uv-cell>
@ -60,30 +71,48 @@
</template>
<script>
import mixinsList from '@/mixins/list.js'
export default {
mixins : [mixinsList],
data() {
return {
tabs: [{
name: '遗产路径'
name: '路径定制'
},
{
name: '我要研学'
name: '遗产讲述'
},
{
name: '达人同游'
},
{
name: '文创好物'
name: '我要跟拍'
},
{
name: '非遗体验'
},
{
name: '遗产路径'
},
{
name: '我要研学'
},
],
mixinsListApi : 'queryOrderList',
list : [],
}
},
onLoad() {
this.queryParams.orderType = 0
},
onShow() {
this.getData()
},
methods: {
//tab
clickTabs(index) {
if (index == 0) {
this.state = -1;
} else {
this.state = index - 1;
}
this.getOrderList()
clickTabs({index}) {
this.queryParams.orderType = index;
this.getData()
},
}
}


+ 67
- 13
pages_order/order/orderSubscribe.vue View File

@ -4,14 +4,20 @@
<view class="box">
<view class="info">
<view class="title">
遗产讲述
{{ title }}
</view>
<view class="tips">
开放时间06:00-21:00
项目{{ detail.roleName }}
</view>
<view class="tips">
开放时间06:00-21:00
</view>
<view class="tips">
联系电话1311311311313
</view>
<view class="tips">
价格{{ detail.price }}
</view>
</view>
<view class="form-time">
@ -117,6 +123,7 @@
<uv-picker ref="picker"
:columns="timeColumns"
confirmColor="#B12026"
keyName="timeDot"
@confirm="confirmTime"></uv-picker>
</view>
</template>
@ -125,25 +132,72 @@
export default {
data() {
return {
tabs: [{
name: '路径定制'
},
{
name: '遗产讲述'
},
{
name: '达人同游'
},
{
name: '我要跟拍'
},
{
name: '非遗体验'
},
{
name: '遗产路径'
},
{
name: '我要研学'
},
],
title : '',
form : {
name : '',
phone : '',
},
selectDate : this.$dayjs().format('YYYY-MM-DD'),
timeColumns : [
[
'08',
'10',
],
[
'14',
'16',
'20',
]
],
timeColumns : [],
id : 0,
payType : 0,
detail : {},
}
},
onLoad(args) {
this.payType = args.payType
this.title = this.tabs[args.payType].name
this.id = args.id
},
onShow() {
this.getData()
this.getDataTime(0)
this.getDataTime(1)
},
methods: {
//
getData(){
this.$api('queryRoleInfoById', {
roleInfoId : this.id,
}, res => {
uni.stopPullDownRefresh()
if(res.code == 200){
this.detail = res.result
}
})
},
//
getDataTime(timeType){
this.$api('queryOrderTime', {
timeType
}, res => {
if(res.code == 200){
this.timeColumns.splice(timeType, 0, res.result)
}
})
},
//
confirmDate(e){
this.selectDate = e.fulldate


+ 39
- 12
pages_order/service/StudyAndPathDetail.vue View File

@ -1,22 +1,29 @@
<template>
<!-- 我要研学详情 type:0 遗产路径详情 type:1 -->
<!-- 我要研学详情 type:1 遗产路径详情 type:0 -->
<view class="page">
<navbar :title="title" leftClick @leftClick="$utils.navigateBack" />
<navbar :title="titles[type]" leftClick @leftClick="$utils.navigateBack" />
<view class="image">
<image src="https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1msKSi.img" mode="aspectFill"></image>
<!-- <image src="https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1msKSi.img" mode="aspectFill"></image> -->
<uv-swiper
:list="detail.amusementImage ?
detail.amusementImage.split(',') : []"
indicator
height="420rpx"></uv-swiper>
</view>
<view class="box">
<view class="info">
<view class="price">
<text>300</text>
<view class="price"
v-if="detail.amusementPrice
&& detail.isPay == 1">
<text>{{ detail.amusementPrice }}</text>
</view>
<view class="title">
景德镇风情-御窑厂-陶瓷博物馆-陶阳里一日游陶瓷博物馆陶瓷博物馆陶瓷博物馆
{{ detail.amusementTitle }}
</view>
<view class="tip">
2-6人一单一团!独家定制!尊享体验!私家团享出游一单一团时间自由支配不和陌生人尴尬拼团专属用车舒适出行专属司机安全保证贴心服务摄影助手风情解说
{{ detail.amusementBrief }}
</view>
</view>
@ -31,12 +38,12 @@
</view>
<view class="content">
12312312313
<uv-parse :content="content"></uv-parse>
</view>
</view>
</view>
<StudyAndPathDetailSubmit/>
<StudyAndPathDetailSubmit v-if="detail.isPay == 1"/>
</view>
</template>
@ -48,7 +55,7 @@
},
data() {
return {
title: '',
titles: ['遗产路径', '我要研学'],
type: 0,
tabs: [
{
@ -61,15 +68,35 @@
name: '出行说明'
},
],
id : 0,
detail : {},
contentKey : ['amusementRoute', 'amusementAttention', 'amusementStatement'],
content : '',
}
},
onLoad(args) {
this.type = args.type || 0
this.title = args.title
this.id = args.id
},
onShow() {
this.getData()
},
methods: {
//tab
clickTabs(index) {
clickTabs({index}) {
this.content = this.detail[this.contentKey[index]]
},
getData(){
this.$api('queryAmusementById',
{
amusementId : this.id,
}, res => {
uni.stopPullDownRefresh()
if(res.code == 200){
this.detail = res.result
this.content = this.detail[this.contentKey[0]]
}
})
},
}
}


+ 23
- 6
pages_order/service/StudyFurther.vue View File

@ -17,18 +17,18 @@
<view class="list">
<view class="item"
@click="$utils.navigateTo('/pages_order/service/StudyAndPathDetail?type=0&id=' + item.id)"
v-for="(item,index) in 3"
@click="$utils.navigateTo('/pages_order/service/StudyAndPathDetail?type=1&id=' + item.id)"
v-for="(item,index) in list"
:key="index">
<view class="image">
<image src="https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1msKSi.img" mode=""></image>
<image :src="item.amusementImage[0]" mode=""></image>
<view class="type">
报名中
</view>
</view>
<view class="info">
<view class="title text-ellipsis">
2024年景德镇艺术研学定金
{{ item.amusementTitle }}
</view>
<view class="price">
5000.00
@ -41,14 +41,31 @@
</template>
<script>
import mixinsList from '@/mixins/list.js'
export default {
mixins : [mixinsList],
data() {
return {
isShow: 0,
mixinsListApi : 'queryAmusementList',
list : [],
}
},
onLoad() {
this.queryParams.amusementType = 1
},
onShow() {
this.getData()
},
methods: {
setPath(i){
this.getData()
},
getDataThen(result){
this.list.forEach(n => n.amusementImage =
n.amusementImage ?
n.amusementImage.split(',') : [])
},
}
}
</script>


+ 9
- 2
pages_order/service/applyRelic.vue View File

@ -3,7 +3,11 @@
<view class="apply">
<navbar title="申遗历程" leftClick @leftClick="$utils.navigateBack" />
<view class="top-img">
<image src="../static/applyRelic/jdz.png" mode="aspectFill" style="width: 100%; height: 100%;"></image>
<uv-swiper
:list="banner.course"
indicator
height="420rpx"
keyName="imageContent"></uv-swiper>
</view>
<view class="middle-box">
@ -54,6 +58,7 @@
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
@ -66,6 +71,9 @@
articleType : -1,
}
},
computed : {
...mapState(['banner']),
},
onShow() {
this.queryArticleListByType()
},
@ -121,7 +129,6 @@
.apply {
.top-img {
height: 380rpx;
}
.middle-box {


+ 17
- 3
pages_order/service/articleDetail.vue View File

@ -2,22 +2,35 @@
<!-- 0文化遗产详情1申遗历程详情2非遗体验详情 三合一 -->
<view class="page">
<navbar :title="titles[type]" leftClick @leftClick="$utils.navigateBack" />
<uv-parse :content="detail.articleContent"></uv-parse>
<uv-parse :content="detail.articleContent || detail.experienceDetail"></uv-parse>
<StudyAndPathDetailSubmit
article
submiitTitle="线上预约"
v-if="type == 2"
/>
</view>
</template>
<script>
import StudyAndPathDetailSubmit from '../components/submit/StudyAndPathDetailSubmit.vue'
export default {
components : {
StudyAndPathDetailSubmit,
},
data() {
return {
titles: ['文化遗产', '申遗历程', '非遗体验'],
detail : {},
id : 0,
type : 0,
apis : ['queryArticleById', 'queryArticleById', 'queryExperienceById'],
}
},
onLoad(args) {
this.id = args.id
this.type = args.type
},
onShow() {
this.queryArticleById()
@ -27,8 +40,9 @@
},
methods: {
queryArticleById(){
this.$api('queryArticleById', {
articleId : this.id
this.$api(this.apis[this.type], {
articleId : this.id,
experienceId : this.id,
}, res => {
uni.stopPullDownRefresh()
if(res.code == 200){


+ 14
- 9
pages_order/service/carefree.vue View File

@ -4,7 +4,12 @@
<navbar title="无忧服务" leftClick @leftClick="$utils.navigateBack" />
<view class="picture" >
<image src="https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1msKSi.img" mode=""></image>
<!-- <image src="https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1msKSi.img" mode=""></image> -->
<uv-swiper
:list="banner.service"
indicator
height="420rpx"
keyName="imageContent"></uv-swiper>
</view>
<view class="serve">
<view class="word">
@ -12,26 +17,26 @@
</view>
<view class="list">
<view class="button1">
<image src="https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1msKSi.img" mode=""></image>
<image src="../static/service/carefree/1.png" mode=""></image>
<view class="">
瓷都美食
</view>
</view>
<view class="button2">
<image src="https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1msKSi.img" mode=""></image>
<image src="../static/service/carefree/2.png" mode=""></image>
<view class="">
精品民宿
</view>
</view>
<view class="button3">
<image src="https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1msKSi.img" mode=""></image>
<image src="../static/service/carefree/3.png" mode=""></image>
<view class="">
无忧租车
</view>
</view>
<view class="button4"
@click="$utils.navigateTo('/pages_order/service/StudyFurther')">
<image src="https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1msKSi.img" mode=""></image>
<image src="../static/service/carefree/4.png" mode=""></image>
<view class="">
我要研学
</view>
@ -44,12 +49,16 @@
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
}
},
computed : {
...mapState(['banner']),
},
methods: {
}
@ -60,10 +69,6 @@
.page{
.picture{
width: 100%;
image{
width: 100%;
height: 600rpx;
}
}
.serve{
.word{


+ 22
- 12
pages_order/service/experience.vue View File

@ -3,19 +3,23 @@
<view class="experience">
<navbar title="非遗体验" leftClick @leftClick="$utils.navigateBack" />
<view class="experience-img">
<image src="https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1msKSi.img" mode="aspectFill" />
<uv-swiper
:list="banner.experience"
indicator
height="420rpx"
keyName="imageContent"></uv-swiper>
</view>
<view class="experience-box" v-for="(item,index) in 10"
<view class="experience-box" v-for="(item,index) in list"
@click="toUrl(item)"
:key="index">
<view class="experience-box-img">
<uv-image src="https://cdn.uviewui.com/uview/album/1.jpg" radius="16rpx" width="100%" height="360rpx"
<uv-image :src="item.experienceImage" radius="16rpx" width="100%" height="360rpx"
:fade="false" />
</view>
<view class="experience-box-font">
<view style="font-weight: 600;">孙天天陶瓷工作室</view>
<view style="font-size: 24rpx; color: #999999;">开放时间0800-2100</view>
<view style="font-weight: 600;">{{ item.experienceTitle }}</view>
<view style="font-size: 24rpx; color: #999999;">{{ item.experienceOpentime }}</view>
<view class="experience-box-button">
<view>线上预订</view>
</view>
@ -27,15 +31,26 @@
</template>
<script>
import { mapState } from 'vuex'
import mixinsList from '@/mixins/list.js'
export default {
mixins : [mixinsList],
data() {
return {
mixinsListApi : 'queryExperienceList',
list : [],
}
},
computed : {
...mapState(['banner']),
},
onLoad() {
},
onShow() {
this.getData()
},
methods: {
toUrl(item){
console.log(item);
this.$utils.navigateTo(`/pages_order/service/articleDetail?id=${item.id}&type=2`)
},
}
@ -45,12 +60,7 @@
<style scoped lang="scss">
.experience {
.experience-img {
height: 400rpx;
image {
height: 100%;
width: 100%;
}
}
.experience-box {


+ 9
- 6
pages_order/service/following.vue View File

@ -3,7 +3,11 @@
<view class="following">
<navbar title="我要跟拍" leftClick @leftClick="$utils.navigateBack" />
<view class="following-top-img">
<image src="https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1msKSi.img" mode="aspectFill" />
<uv-swiper
:list="banner.follow"
indicator
height="420rpx"
keyName="imageContent"></uv-swiper>
</view>
<cardList :type="2" ref="cardList"/>
<tabber/>
@ -11,6 +15,7 @@
</template>
<script>
import { mapState } from 'vuex'
import cardList from '../components/list/cardList.vue'
export default {
components: {
@ -21,6 +26,9 @@
}
},
computed : {
...mapState(['banner']),
},
onShow() {
this.$refs.cardList.getList()
},
@ -40,12 +48,7 @@
<style scoped lang="scss">
.following {
.following-top-img {
height: 600rpx;
image {
height: 100%;
width: 100%;
}
}
}
</style>

+ 49
- 21
pages_order/service/heritagePath.vue View File

@ -3,35 +3,40 @@
<view class="heritagePath">
<navbar title="遗产路径" leftClick @leftClick="$utils.navigateBack" />
<view class="heritagePath-img">
<image src="../static/situation/four.png" mode="aspectFill">
<!-- <image src="../static/situation/four.png" mode="aspectFill"> -->
<uv-swiper
:list="banner.path"
indicator
height="420rpx"
keyName="imageContent"></uv-swiper>
</view>
<view class="heritagePath-button">
<view @click="isShow = 0" :class="{ fontColor:isShow == 0}">路径定制</view>
<view @click="isShow = 1" :class="{ fontColor:isShow == 1}">推荐路径</view>
<view @click="setPath(1)" :class="{ fontColor: queryParams.isPay == 1}">路径定制</view>
<view @click="setPath(0)" :class="{ fontColor: queryParams.isPay == 0}">推荐路径</view>
</view>
<view class="heritagePath-card" v-for="(item,index) in 10"
@click="$utils.navigateTo('/pages_order/service/StudyAndPathDetail?type=1&id=' + item.id)"
<view class="heritagePath-card" v-for="(item,index) in list"
@click="$utils.navigateTo('/pages_order/service/StudyAndPathDetail?type=0&id=' + item.id)"
:key="index">
<view class="heritagePath-card-box">
<view class="heritagePath-card-pic">
<view class="heritagePath-card-img">
<image src="../static/situation/four.png" mode="aspectFill" />
<image :src="item.amusementImage[0]" mode="aspectFill" />
</view>
<view class="heritagePath-card-imgs">
<view class="heritagePath-card-imgs"v-if="item.amusementImage[1]">
<view>
<image src="../static/situation/four.png" mode="aspectFill" />
<image :src="item.amusementImage[1]" mode="aspectFill" />
</view>
<view>
<image src="../static/situation/four.png" mode="aspectFill" />
<view v-if="item.amusementImage[2]">
<image :src="item.amusementImage[2]" mode="aspectFill" />
</view>
</view>
</view>
<view class="heritagePath-card-font">
<view class="heritagePath-card-font-one">
<view style="font-size: 28rpx; font-weight: 600;">景德镇一日游</view>
<view style="font-size: 20rpx; color: #999999;" v-if="isShow == 0">300</view>
<view style="font-size: 28rpx; font-weight: 600;">{{ item.amusementTitle }}</view>
<view style="font-size: 20rpx; color: #999999;" v-if="item.isPay == '1'">{{ item.amusementPrice }}</view>
</view>
<view class="heritagePath-card-font-button" v-if="isShow == 0">线上预订</view>
<view class="heritagePath-card-font-button" v-if="item.isPay == '1'">线上预订</view>
</view>
<view style="height: 40rpx;" />
</view>
@ -41,14 +46,41 @@
</template>
<script>
import mixinsList from '@/mixins/list.js'
import { mapState } from 'vuex'
export default {
mixins : [mixinsList],
data() {
return {
isShow: 0
isShow: 0,
mixinsListApi : 'queryAmusementList',
list : [],
}
},
computed : {
...mapState(['banner']),
},
onLoad() {
this.queryParams.isPay = 1
this.queryParams.amusementType = 0
},
onShow() {
this.getData()
},
methods: {
setPath(i){
this.queryParams.isPay = i
this.getData()
},
getDataThen(result){
this.list.forEach(n => n.amusementImage =
n.amusementImage ?
n.amusementImage.split(',') : [])
},
// queryParams
beforeGetData(){
},
}
}
</script>
@ -56,12 +88,6 @@
<style scoped lang="scss">
.heritagePath {
.heritagePath-img {
height: 400rpx;
image {
width: 100%;
height: 100%;
}
}
.heritagePath-button {
@ -105,6 +131,7 @@
height: 320rpx;
width: 400rpx;
flex-shrink: 0;
flex: 1;
}
.heritagePath-card-imgs {
@ -116,6 +143,7 @@
height: 156rpx;
width: 260rpx;
flex-shrink: 0;
flex: 1;
}
}


+ 1
- 1
pages_order/service/reservationDetail.vue View File

@ -201,7 +201,7 @@
},
toUrl(detail, type){
uni.navigateTo({
url: `/pages_order/order/orderSubscribe?id=${detail.id}&type=${type}`
url: `/pages_order/order/orderSubscribe?id=${detail.id}&payType=${parseInt(type) + 1}`
})
},
}


BIN
pages_order/static/service/carefree/1.png View File

Before After
Width: 70  |  Height: 71  |  Size: 6.2 KiB

BIN
pages_order/static/service/carefree/2.png View File

Before After
Width: 70  |  Height: 70  |  Size: 2.2 KiB

BIN
pages_order/static/service/carefree/3.png View File

Before After
Width: 83  |  Height: 74  |  Size: 5.0 KiB

BIN
pages_order/static/service/carefree/4.png View File

Before After
Width: 64  |  Height: 71  |  Size: 4.4 KiB

+ 16
- 0
store/store.js View File

@ -32,6 +32,7 @@ const store = new Vuex.Store({
unit : '120*40*75【桌子尺寸】',
},//购物车列表
],
banner : {},
cartCheckboxValue : [],//选中的购物车
},
getters: {
@ -58,6 +59,21 @@ const store = new Vuex.Store({
})
})
},
getBanner(state){
// 0-首页 1-遗产路径 2-我要跟拍 3-非遗体验 4-无忧服务 5申遗历程
let config = ['path', 'follow', 'experience', 'service', 'course']
config.forEach((k, i) => {
api('queryBannerList', {
bannerCategoryType : i + 1,
}, res => {
if(res.code == 200){
state.banner[k] = res.result
}
})
})
},
login(state){
uni.showLoading({
title: '登录中...'


+ 51
- 102
utils/utils.js View File

@ -36,33 +36,56 @@ function generateLightRandomColor() {
function verificationAll(data, msg){
let Msgs = {
default : msg || '表单数据未填写'
}
if(typeof msg == 'object'){
Msgs = {
default : '表单数据未填写',
...msg,
}
if (!msg){
console.log(msg);
return false
}
if (!data){
uni.showToast({
title: Msgs.default,
title: '表单数据未填写',
icon: "none"
})
return true
}
for (let key in data) {
if (!data[key] || data[key] === "") {
for (let key in msg) {
if (!data[key]) {
uni.showToast({
title: (Msgs[key] || Msgs.default),
title: msg[key],
icon: "none"
})
return true
}
}
// let Msgs = {
// default : msg || '表单数据未填写'
// }
// if(typeof msg == 'object'){
// Msgs = {
// default : '表单数据未填写',
// ...msg,
// }
// }
// if (!data){
// uni.showToast({
// title: Msgs.default,
// icon: "none"
// })
// return true
// }
// for (let key in data) {
// if (!data[key] || data[key] === "") {
// uni.showToast({
// title: (Msgs[key] || Msgs.default),
// icon: "none"
// })
// return true
// }
// }
return false
}
@ -91,93 +114,6 @@ export function getHrefParams(name) {
}
}
//其中url是文件的地址
export function hanldePreview(url) {
console.log("url--->", url)
let index = url.lastIndexOf('.');
let fileType = url.substring(index + 1, url.length);
let white_filetype = ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf']
let white_image = ['jpg', 'jpeg', 'png', 'gif', 'webp', 'ico', 'wbmp', 'fax', 'net', 'rp', 'jfif', 'jpe',
'tiff', 'tif'
]
let white_media = ['mp3', 'wav', 'flac', 'aac', 'mp4', 'avi', 'wmv', 'mov', 'flv']
uni.downloadFile({
url: url,
success: function(res) {
console.log("res--->", res)
var filePath = res.tempFilePath;
if (white_filetype.indexOf(fileType) != -1) {
uni.openDocument({
filePath: filePath,
showMenu: true,
success: function(res) {
console.log('打开文档成功');
},
fail: function(err) {
console.log('打开文档失败--->', err);
uni.showToast({
title: err.errMsg,
icon: 'none'
})
},
});
} else if (white_image.indexOf(fileType) != -1) {
uni.previewImage({
urls: [filePath],
longPressActions: {
itemList: ['发送给朋友', '保存图片', '收藏'],
success: function(data) {
},
fail: function(err) {
console.log(err.errMsg);
uni.showToast({
title: err.errMsg,
icon: 'none'
})
}
}
});
} else if (white_media.indexOf(fileType) != -1) {
wx.previewMedia({
sources: [{
url: filePath, //图片或者视频所在路径
type: 'video', //图片为image,视频为video
}],
success(res) {
//预览成功
// uni.showToast({
// title: "预览成功",
// icon: "none"
// })
},
fail(err) {
console.log(err);
uni.showToast({
title: err.errMsg,
icon: 'none'
})
//预览失败
}
})
} else {
uni.showToast({
title: '不支持打开该类型文件',
icon: 'none'
})
}
},
fail: function(err) {
console.log("err--->", err)
uni.showToast({
title: err.errMsg,
icon: 'none'
})
}
});
}
//深度对比合并两个对象,相同属性b会覆盖a
export function deepMergeObject(a, b){
@ -195,6 +131,19 @@ export function deepMergeObject(a, b){
return mergeObject(data, b)
}
//复制内容
export function copyText(content) {
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制成功',
icon: 'none'
})
}
})
}
function params(url){
if(typeof url == 'object'){
return url
@ -236,5 +185,5 @@ export default {
navigateTo,
navigateBack,
redirectTo,
hanldePreview,
copyText
}

Loading…
Cancel
Save