diff --git a/app.js b/app.js index aff7f56..8cf9030 100644 --- a/app.js +++ b/app.js @@ -22,7 +22,7 @@ App({ unique_key: "wechatxcx" }).then(res => { let data = JSON.parse(res.data); - data.isTest = data.isTest30?true:false; + data.isTest = data.isTest36?true:false; this.globalData.configJson = data }) @@ -146,7 +146,7 @@ App({ ticketProduct:[], index: 0, createDate: null, - list: [], + list: null, productPrice: 0, ticketPrice: 0, productState:{ diff --git a/app.json b/app.json index b4201fa..23d26ac 100644 --- a/app.json +++ b/app.json @@ -179,11 +179,15 @@ "pages/order/orderList/index", "pages/user/linkman/add/index", "pages/user/address/add/index", - "pages/user/linkman/index" + "pages/user/linkman/index", + "pages/user/userPrivacy/index", + "pages/user/personalInfo/index" + + ], "plugins": { "live-player-plugin": { - "version": "1.3.0", + "version": "1.3.5", "provider": "wx2b03c6e691cd7370" } }, diff --git a/pages/index/index.js b/pages/index/index.js index bfadf57..99a187c 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -33,14 +33,55 @@ Page({ otherPlat: null, activeBannerIndex: 0, smBannerIndex: 0, - indexSeason: {} + indexSeason: {}, + startList: [], // 启动页广告 + alertSwipeList: [], //弹窗广告 + showAdv: false, //弹窗开关 + showFullAdv: true, //全屏广告开关 + time: 5, //全屏广告剩余时间 + showTime:false, }, onLoad: function (options) { + //全屏广告 + wx.hideTabBar() //这里隐藏了底部导航栏 + commonApi._post("adv/getAdv", { + position: 2, + type_id: 5 + }).then(res => { + if (res.data.length > 0) { + this.setData({ + showTime:true + }) + var timer = setInterval(() => { + this.setData({ + time: this.data.time - 1 + }) + if (this.data.time == 0) { + timer = null + this.setData({ + showFullAdv: false + }) + if (this.data.alertSwipeList.length==0) { + wx.showTabBar() //倒计时结束清楚定时器显示导航栏 + } + + } + }, 1000) + this.setData({ + startList: res.data || [] + }) + }else{ + this.setData({ + showFullAdv: false + }) + } + }) if (options.from) { app.globalData.from = options.from; } - let systemInfo = wx.getSystemInfoSync(), rect = wx.getMenuButtonBoundingClientRect(); + let systemInfo = wx.getSystemInfoSync(), + rect = wx.getMenuButtonBoundingClientRect(); let height = (rect.top - systemInfo.statusBarHeight) * 2 + rect.height; wx.getLocation({ type: 'gcj02', @@ -147,6 +188,43 @@ Page({ xiaobanner: res.data || [] }) }) + //弹窗广告 + commonApi._post("adv/getAdv", { + position: 3, + type_id: 5 + }).then(res => { + if (res.data.length > 0) { + this.setData({ + alertSwipeList: res.data || [], + showAdv: true + }) + }else if(!this.data.showFullAdv){ + wx.showTabBar({ + animation: true, + }) + } + }) + + }, + //关闭弹窗广告 + closeAdv: function () { + this.setData({ + showAdv: false + }) + wx.showTabBar({ + animation: true, + }) + }, + //关闭全屏广告 + closeFullAdv:function(){ + this.setData({ + showFullAdv:false + }) + if (!this.data.alertSwipeList.length>0) { + wx.showTabBar({ + animation: true, + }) + } }, getWeather: function () { commonApi._post('pbservice/Ztfw/getWeather').then(res => { @@ -156,8 +234,7 @@ Page({ }) }) }, - saleDetail: function () { - }, + saleDetail: function () {}, getTwoProduct: function () { // 获取首页限时特惠 commonApi._post('act/fast_sale_now', { @@ -209,17 +286,18 @@ Page({ }) }, getFourProduct: function () { - let item = this.data.indexHot[this.data.hotIndex], service = "product/get_product_by_tag", data = { - tag_id: item.id, - offset: 0, - limit: 4, - sort: 'weight', - order: 'desc' - }; + let item = this.data.indexHot[this.data.hotIndex], + service = "product/get_product_by_tag", + data = { + tag_id: item.id, + offset: 0, + limit: 4, + sort: 'weight', + order: 'desc' + }; if (item.type == 'scene') { service = "scene/get_scene_by_tag"; - } - else if (item.type == 'movie') { + } else if (item.type == 'movie') { service = "Cinema/getHotMovieList"; data = { page: 1, @@ -238,8 +316,7 @@ Page({ wx.navigateTo({ url: '/pages/list/movieticket/list/info/index?id=' + item.third_id + '&title=' + item.title, }) - } - else { + } else { util.gotoDetail(item) } }, @@ -248,9 +325,11 @@ Page({ util.gotoDetail(item) }, gotoPath: function (e) { - console.log(e) + console.log(e) if (e.currentTarget.dataset.event) { - this.pagePoint({ event: e.currentTarget.dataset.event }, 1) + this.pagePoint({ + event: e.currentTarget.dataset.event + }, 1) } if (e.currentTarget.dataset.title == '书香借阅') { wx.navigateToMiniProgram({ @@ -258,7 +337,7 @@ Page({ path: 'pages/home/home' }) return; - }else if (e.currentTarget.dataset.title == '12348') { + } else if (e.currentTarget.dataset.title == '12348') { wx.navigateToMiniProgram({ appId: 'wxcdfd45c001466ba3', path: 'pages/index/index' @@ -280,7 +359,9 @@ Page({ }, gotoUrl: function (e) { if (e.currentTarget.dataset.event) { - this.pagePoint({ event: e.currentTarget.dataset.event }, 1) + this.pagePoint({ + event: e.currentTarget.dataset.event + }, 1) } let url = e.currentTarget.dataset.url; app.globalData.weburl = url; @@ -289,7 +370,8 @@ Page({ }) }, gotoMini: function (e) { - let appid = e.currentTarget.dataset.appid, path = e.currentTarget.dataset.path + let appid = e.currentTarget.dataset.appid, + path = e.currentTarget.dataset.path wx.navigateToMiniProgram({ appId: appid, path: path @@ -334,8 +416,7 @@ Page({ res.data.map(item => { if (item.ext.display_tags) { item.ext.display_tags = item.ext.display_tags.split(",").splice(0, 2) - } - else { + } else { item.ext.display_tags = [] } }) @@ -366,8 +447,7 @@ Page({ wx.navigateTo({ url: '/pages/info/strategyInfo/index?id=' + item.s_id, }) - } - else { + } else { util.gotoDetail(item.ext); } }, @@ -407,24 +487,22 @@ Page({ wx.navigateTo({ url: "/pages/pbService/web/index" }) - } - else { + } else { let page = item.tdata.split("/"); page = page[page.length - 1].split("?") console.log(page[0]) let url = this.data.urltopage[page[0]]; if (url && url.indexOf('map') != -1) { - let types = ['', 'scenic', 'venue', 'post', 'restaurant', 'relic', 'tenscenic', 'cinema', 'academes'], type = page[1] ? page[1].split("=") : []; + let types = ['', 'scenic', 'venue', 'post', 'restaurant', 'relic', 'tenscenic', 'cinema', 'academes'], + type = page[1] ? page[1].split("=") : []; wx.reLaunch({ url: url + "?type=" + (type[1] ? types.findIndex(t => t == type[1]) : null) }) - } - else if (url) { + } else if (url) { wx.navigateTo({ url: url, }) - } - else { + } else { app.globalData.weburl = item.tdata; wx.navigateTo({ url: "/pages/pbService/web/index" @@ -439,8 +517,7 @@ Page({ let weburl = item.tdata.page if (weburl.indexOf('?') != -1) { weburl += '&authCode=' + res.data; - } - else { + } else { weburl += '?authCode=' + res.data } wx.navigateToMiniProgram({ @@ -453,8 +530,7 @@ Page({ path: item.tdata.page }) }) - } - else { + } else { wx.navigateToMiniProgram({ appId: item.tdata.appid, path: item.tdata.page @@ -476,19 +552,16 @@ Page({ appId: info[0], path: info[1] }) - } - else if (item.href.indexOf('map/index') != -1) { + } else if (item.href.indexOf('map/index') != -1) { wx.reLaunch({ url: item.href }) - } - else { + } else { wx.navigateTo({ url: item.href, }) } - } - else if (item.action == "web") { + } else if (item.action == "web") { app.globalData.weburl = item.href; wx.navigateTo({ url: "/pages/pbService/web/index", @@ -541,6 +614,91 @@ Page({ } }) }, + bannerJumpNew(item) { + + let that = this + item = item.currentTarget.dataset.item + if (item.tdata == '') return + that.pagePoint({ + event: "banner_click", + type: 'banner' + }, 1) + switch (item.jump_type) { + case 0: + break; + case 1: + util.gotoDetail(item.product_model) + break; + case 2: + if (item.front_model && item.front_model.mini) { + wx.navigateTo({ + url: "/" + item.front_model.mini + }) + } + break; + case 3: + if ((item.tdata.indexOf('http://') != -1 || item.tdata.indexOf('https://') != -1) && item.tdata.indexOf('m.cloud.sz-trip.com') == -1) { + // 外部h5 + console.log(item.tdata) + app.globalData.weburl = item.tdata; + wx.navigateTo({ + url: "/pages/pbService/web/index" + }) + } else { + let page = item.tdata.split("/"); + page = page[page.length - 1].split("?") + console.log(page[0]) + let url = this.data.urltopage[page[0]]; + if (url && url.indexOf('map') != -1) { + let types = ['', 'scenic', 'venue', 'post', 'restaurant', 'relic', 'tenscenic', 'cinema', 'academes'], + type = page[1] ? page[1].split("=") : []; + wx.reLaunch({ + url: url + "?type=" + (type[1] ? types.findIndex(t => t == type[1]) : null) + }) + } else if (url) { + wx.navigateTo({ + url: url, + }) + } else { + app.globalData.weburl = item.tdata; + wx.navigateTo({ + url: "/pages/pbService/web/index" + }) + } + } + break; + case 4: + if (item.tdata.appid == 'wxe5ca0f71e918e352' && wx.getStorageSync('jstrip_userid')) { + // 如果是苏心游的小程序 直接把authCode带过去 + userApi.user_post("user/getJumpThirdAppCode", {}).then(res => { + let weburl = item.tdata.page + if (weburl.indexOf('?') != -1) { + weburl += '&authCode=' + res.data; + } else { + weburl += '?authCode=' + res.data + } + wx.navigateToMiniProgram({ + appId: item.tdata.appid, + path: weburl + }) + }).catch(err => { + wx.navigateToMiniProgram({ + appId: item.tdata.appid, + path: item.tdata.page + }) + }) + } else { + wx.navigateToMiniProgram({ + appId: item.tdata.appid, + path: item.tdata.page + }) + } + break; + default: + break; + } + return + }, onReady: function () { if (app.globalData.configJson) { this.setData({ @@ -551,8 +709,7 @@ Page({ }) console.log(app.globalData.configJson) this.getFourProduct() - } - else { + } else { setTimeout(() => { this.onReady() }, 300) @@ -565,14 +722,12 @@ Page({ wx.navigateTo({ url: "/pages/pbService/web/index" }) - } - else if (item.type == 'mini') { + } else if (item.type == 'mini') { wx.navigateToMiniProgram({ appId: item.appid, path: item.path }) - } - else if (item.type == 'page') { + } else if (item.type == 'page') { wx.navigateTo({ url: item.page, }) @@ -582,7 +737,10 @@ Page({ util.pagePoint(e, type) }, onShow: function () { - this.pagePoint({ event: 'home_view' }, 1) + this.pagePoint({ + event: 'home_view' + }, 1) + this.data.time!=5?wx.showTabBar():1 }, /** @@ -591,4 +749,4 @@ Page({ onShareAppMessage: function () { } -}) +}) \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml index b56ae75..963ea03 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -20,11 +20,11 @@ 搜索想要的旅游产品或服务 - + - + @@ -197,8 +197,8 @@ - - 文博会 + + 云上文博会 @@ -220,6 +220,11 @@ 书香借阅 + + + 文化配送 + @@ -411,4 +416,27 @@ - \ No newline at end of file + + + + + + + + + + + + + + + +跳过 {{time}} + + + + + + + + diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 0472f6f..a70741b 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -669,4 +669,57 @@ width: 20rpx; height: 7rpx; border-radius: 3rpx; +} +/* 弹窗广告 */ +.zzc{ + background: gray; + position: fixed; + left: 0px; + top: 0px; + width:100%; + height: 100%; + z-index: 998; + filter: alpha(opacity=80); + opacity: 0.8 !important; +} +.alertavd{ + width: 500rpx; + height: 500rpx; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-250rpx,-150rpx); + z-index: 999; + +} +.alertsp{ + width: 100%; + height: 100%; + z-index: 1000; +} +.fullavd{ + position: fixed; + left: 0px; + top: 0px; + width:100%; + height: 100%; + z-index: 1001; + background-color: #fff; +} +.fullsp{ + width: 100%; + height: 100%; +} +.time{ + width: 150rpx; + height: 60rpx; + background-color: #999999; + color: #fff; + position: absolute; + right: 20rpx; + top: 200rpx; + border-radius:6rpx ; + text-align: center; + line-height: 60rpx; + z-index: 1002; } \ No newline at end of file diff --git a/pages/info/hotelProductInfo/index.js b/pages/info/hotelProductInfo/index.js index eb4c6eb..b42b444 100644 --- a/pages/info/hotelProductInfo/index.js +++ b/pages/info/hotelProductInfo/index.js @@ -215,9 +215,20 @@ Page({ item.rate = Number(item.rate) }) this.setData({ - comment: res.data.list, + comment: res.data.list.splice(0, 2), commentTotal: res.data.total }) + let arr = this.data.comment + arr.map((item)=>{ + if (item.img_list) { + item.img_list = item.img_list.split(',') + }else{ + item.img_list=[] + } + }) + this.setData({ + comment:arr + }) }) }, like: function () { diff --git a/pages/info/hotelProductInfo/index.wxml b/pages/info/hotelProductInfo/index.wxml index 5460744..92fe16a 100644 --- a/pages/info/hotelProductInfo/index.wxml +++ b/pages/info/hotelProductInfo/index.wxml @@ -95,22 +95,34 @@ 游客点评{{info.rate}}分 - 共{{commentTotal}}条 + 共{{commentTotal}}条 > + 这里空空如也,快去点评吧! - + - {{item.user.nickname}} + {{item.nickname}} {{item.create_time}} {{item.content}} + + + + + + 共{{item.img_list.length}}张 + 查看全部 + + + + {{item.sku_name}} 查看全部点评 diff --git a/pages/info/hotelProductInfo/index.wxss b/pages/info/hotelProductInfo/index.wxss index d1ded8a..403c9e7 100644 --- a/pages/info/hotelProductInfo/index.wxss +++ b/pages/info/hotelProductInfo/index.wxss @@ -269,7 +269,7 @@ page { margin-right: 6rpx; } .comment-content { - margin-left: 72rpx; + margin-left: 12rpx; margin-top: 36rpx; font-size: 28rpx; color: #000; @@ -550,4 +550,40 @@ page { font-size: 31rpx; font-weight: 500; margin-top: 50rpx; +} +.imgs{ + width: 200rpx; + height: 200rpx; + margin: 10rpx; + border-radius: 8rpx; +} +.img-box{ + display: inline-block; + position: relative; +} +.all{ + color: #fff; + position:absolute; + bottom: 17rpx; + right: 10rpx; + width: 200rpx; + height: 200rpx; + border-radius: 8rpx; + background-color: rgba(0, 0, 0, .5); +} +.all view{ + text-align: center; +} +.all view:first-child{ + font-size: 45rpx; + margin-top: 40rpx; +} +.all view:last-child{ + margin-top: 10rpx; +} +.sku{ + margin-left: 10rpx; + color: #666; + font-size: 24rpx; + margin-top: 8rpx; } \ No newline at end of file diff --git a/pages/info/postProductInfo/index.js b/pages/info/postProductInfo/index.js index 303fc76..b2dfec6 100644 --- a/pages/info/postProductInfo/index.js +++ b/pages/info/postProductInfo/index.js @@ -87,11 +87,24 @@ Page({ }).then(res => { res.data.list.map(item => { item.rate = Number(item.rate) + item.create_time = item.create_time.substring(0,10) + }) this.setData({ - comment: res.data.list, + comment: res.data.list.splice(0, 2), commentTotal: res.data.total }) + let arr = this.data.comment + arr.map((item)=>{ + if (item.img_list) { + item.img_list = item.img_list.split(',') + }else{ + item.img_list=[] + } + }) + this.setData({ + comment:arr + }) }) }, @@ -243,7 +256,7 @@ Page({ }) }, order: function () { - app.globalData.postProduct = [] + app.globalData.postProduct = null app.globalData.list = [] if (this.data.skuFlag == 'order') { util.pagePoint({ diff --git a/pages/info/postProductInfo/index.wxml b/pages/info/postProductInfo/index.wxml index 7166da8..7d06781 100644 --- a/pages/info/postProductInfo/index.wxml +++ b/pages/info/postProductInfo/index.wxml @@ -56,23 +56,35 @@ 游客点评{{info.rate}}分 - 共{{commentTotal}}条 + 共{{commentTotal}}条 > + 这里空空如也,快去点评吧! - + - {{item.user.nickname}} + {{item.nickname}} - {{item.create_time}} + {{item.content}} + + + + + + 共{{item.img_list.length}}张 + 查看全部 + + + + {{item.sku_name}} 查看全部点评 diff --git a/pages/info/postProductInfo/index.wxss b/pages/info/postProductInfo/index.wxss index bf4277a..ec28d92 100644 --- a/pages/info/postProductInfo/index.wxss +++ b/pages/info/postProductInfo/index.wxss @@ -312,7 +312,7 @@ page { } .comment-content { - margin-left: 72rpx; + margin-left: 13rpx; margin-top: 36rpx; font-size: 28rpx; color: #000; @@ -806,4 +806,40 @@ page { .mask-allowance .mask-content .rule-title { text-align: center; margin-bottom: 20rpx; +} +.imgs{ + width: 200rpx; + height: 200rpx; + margin: 10rpx; + border-radius: 8rpx; +} +.img-box{ + display: inline-block; + position: relative; +} +.all{ + color: #fff; + position:absolute; + bottom: 17rpx; + right: 10rpx; + width: 200rpx; + height: 200rpx; + border-radius: 8rpx; + background-color: rgba(0, 0, 0, .5); +} +.all view{ + text-align: center; +} +.all view:first-child{ + font-size: 45rpx; + margin-top: 40rpx; +} +.all view:last-child{ + margin-top: 10rpx; +} +.sku{ + margin-left: 10rpx; + color: #666; + font-size: 24rpx; + margin-top: 8rpx; } \ No newline at end of file diff --git a/pages/info/sceneProductInfo/index.js b/pages/info/sceneProductInfo/index.js index c3c5a2d..41e4c81 100644 --- a/pages/info/sceneProductInfo/index.js +++ b/pages/info/sceneProductInfo/index.js @@ -96,6 +96,7 @@ Page({ this.setData({ info: res.data }) + console.log(this.data.info); util.pagePoint({ event: 'scene_view', param: { type: res.data.type, id: res.data.id } }, 1) this.BroswerRecord() }) @@ -127,10 +128,22 @@ Page({ item.rate = Number(item.rate) }) this.setData({ - comment: res.data.list.splice(0, 3), + comment: res.data.list.splice(0, 2), commentTotal: res.data.total }) - console.log(res) + let arr = this.data.comment + arr.map((item)=>{ + if (item.img_list) { + let arr = item.img_list.split(',') + item.img_list = arr + + }else{ + item.img_list=[] + } + }) + this.setData({ + comment:arr + }) }) }, changeAllowance: function () { diff --git a/pages/info/sceneProductInfo/index.wxml b/pages/info/sceneProductInfo/index.wxml index a2d5f8d..4ff2b60 100644 --- a/pages/info/sceneProductInfo/index.wxml +++ b/pages/info/sceneProductInfo/index.wxml @@ -3,14 +3,12 @@ - + - + @@ -26,16 +24,13 @@ 开园时间:{{info.open_time}} - 优待政策 | 景点介绍 + 优待政策 | 景点介绍 地址:{{info.address}} - {{info.garden_flag_text}} + {{info.garden_flag_text}} @@ -64,24 +59,23 @@ - - - 客服 - - - - 收藏 - - - - 加入购物车 - 立即预订 - 该商品已下架 - + + + 客服 + + + + 收藏 + + + + 加入购物车 + 立即预订 + 该商品已下架 + - + {{cartCount}} @@ -100,8 +94,7 @@ - {{item.sku_name}} + {{item.sku_name}} 数量 @@ -111,7 +104,7 @@ - {{skuFlag=='cart'?'确认':'立即购买'}} + {{skuFlag=='cart'?'确认':'立即购买'}} 该商品已下架 @@ -132,8 +125,7 @@ - + {{item.question_name}} @@ -155,25 +147,35 @@ - 游客点评{{info.rate}}分 - 共{{commentTotal}}条 + 游客点评{{info.rate}}分 + 共{{commentTotal}}条 > + 这里空空如也,快去点评吧! - + - {{item.user.nickname}} - + {{item.nickname}} + - {{item.create_time}} + {{item.content}} + + + + + + 共{{item.img_list.length}}张 + 查看全部 + + + + {{item.sku_name}} 查看全部点评 @@ -199,8 +201,7 @@ - + diff --git a/pages/info/sceneProductInfo/index.wxss b/pages/info/sceneProductInfo/index.wxss index bac3e07..e90e3f3 100644 --- a/pages/info/sceneProductInfo/index.wxss +++ b/pages/info/sceneProductInfo/index.wxss @@ -252,6 +252,7 @@ page { .product-comment-top .comment-info .iconfont { color: #D62828; font-size: 22rpx; + margin-top: 6rpx; } .product-comment-top .comment-info .iconfont text { @@ -259,7 +260,7 @@ page { } .comment-content { - margin-left: 72rpx; + margin-left:10rpx; margin-top: 36rpx; font-size: 28rpx; color: #000; @@ -272,6 +273,7 @@ page { color: #999; font-size: 27rpx; font-weight: 500; + margin-bottom:60rpx ; } .more-comment-btn .iconfont { @@ -284,6 +286,7 @@ page { color: #999999; font-size: 27rpx; font-weight: 400; + font-family: PingFang SC !important; } .ask-list .ask-item:nth-child(1) { @@ -779,7 +782,6 @@ page { right: -2rpx; top: -5rpx; } - .headimg { position: fixed; z-index: 3; @@ -788,11 +790,48 @@ page { height: 180rpx; top: 0; } - .headimg.active { transition: left .6s linear, top .6s cubic-bezier(0.5, -0.5, 1, 1), width .6s ease, height .6s ease; width: 80rpx; height: 80rpx; left: 650rpx; border-radius: 50%; +} +.imgs{ + width: 200rpx; + height: 200rpx; + margin: 10rpx; + border-radius: 8rpx; +} +.img-box{ + display: inline-block; + position: relative; +} +.all{ + color: #fff; + position:absolute; + bottom: 17rpx; + right: 10rpx; + width: 200rpx; + height: 200rpx; + border-radius: 8rpx; + background-color: rgba(0, 0, 0, .5); +} +.all view{ + text-align: center; +} +.all view:first-child{ + font-size: 40rpx; + margin-top: 40rpx; +} +.all view:last-child{ + margin-top: 10rpx; + font-size: 30rpx; + +} +.sku{ + margin-left: 10rpx; + color: #666; + font-size: 24rpx; + margin-top: 8rpx; } \ No newline at end of file diff --git a/pages/list/activitynew/index.wxml b/pages/list/activitynew/index.wxml index 5c4c8b1..e74532c 100644 --- a/pages/list/activitynew/index.wxml +++ b/pages/list/activitynew/index.wxml @@ -27,10 +27,10 @@ 演出 - + 电影 diff --git a/pages/list/comments/index.js b/pages/list/comments/index.js index c8b156d..9a8cced 100644 --- a/pages/list/comments/index.js +++ b/pages/list/comments/index.js @@ -9,7 +9,8 @@ Page({ productid:null, sceneid:null, list:[], - total:1 + total:1, + index:null, }, /** @@ -22,8 +23,10 @@ Page({ }) } else if(options.sceneid){ + console.log(options.index); this.setData({ - sceneid:options.sceneid + sceneid:options.sceneid, + index:options.index, }) } this.getList() @@ -41,13 +44,44 @@ Page({ } commonApi._post(service,data).then(res=>{ console.log(res) - this.setData({ - total:res.data.total, - list:list.concat(res.data.list) + // this.setData({ + // total:res.data.total, + // list:list.concat(res.data.list) + // }) + let arr = res.data.list + arr.map((item)=>{ + item.rate = Number(item.rate) + item.create_time = item.create_time.substring(0,10) + if (item.img_list) { + item.img_list = item.img_list.split(',') + }else{ + item.img_list=[] + } }) + if (this.data.index) { + this.setData({ + list:arr.splice(this.data.index,1) + }) + }else{ + this.setData({ + total:res.data.total, + list:list.concat(arr) + }) + } + + }) + }, + imgsc:function(e){ + console.log(e); + var src = e.currentTarget.dataset.img;//获取data-src + var imgList = e.currentTarget.dataset.list;//获取data-list + console.log(src) + //图片预览 + wx.previewImage({ + current: src, // 当前显示图片的http链接 + urls: imgList // 需要预览的图片http链接列表 }) }, - /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/list/comments/index.wxml b/pages/list/comments/index.wxml index 1d3db29..2df031d 100644 --- a/pages/list/comments/index.wxml +++ b/pages/list/comments/index.wxml @@ -5,11 +5,21 @@ - {{item.user.nickname}} + + {{item.nickname}} {{item.create_time}} + + + {{item.sku_name}} + + {{item.content}} + + + + diff --git a/pages/list/comments/index.wxss b/pages/list/comments/index.wxss index 042b432..5300d8a 100644 --- a/pages/list/comments/index.wxss +++ b/pages/list/comments/index.wxss @@ -30,6 +30,7 @@ flex: 1; font-size: 27rpx; color: #333; + } .author-time { color: #999999; @@ -37,11 +38,37 @@ margin-top: 4rpx; } .comment-detail { - margin-left: 87rpx; + margin-left: 10rpx; font-size: 29rpx; color: #000; margin-top: 25rpx; } .comment-item:last-child { border-bottom: none; +} +.imgs{ + width: 200rpx; + height: 200rpx; + margin: 10rpx; + border-radius: 8rpx; +} +.iconfont { + color: #D62828; + font-size: 22rpx; + line-height: 30rpx; +} +.top{ + display: flex; + justify-content: space-between; +} +.bot{ + margin-top: 10rpx; + display: flex; + justify-content: left; + align-self: center; +} +.sku{ + color: #666; + margin-left:20rpx ; + font-size: 24rpx; } \ No newline at end of file diff --git a/pages/order/comment/index.js b/pages/order/comment/index.js index 44b07d1..5fa253d 100644 --- a/pages/order/comment/index.js +++ b/pages/order/comment/index.js @@ -6,93 +6,212 @@ Page({ * 页面的初始数据 */ data: { - info:null + info: null, + imgs: [], + upImgs:[], + checked:false, + rate:0 }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { - commonApi.user_post("order/query",{ - order_id:options.id - }).then(res=>{ + commonApi.user_post("order/query", { + order_id: options.id + }).then(res => { let list = []; - res.data.order_product_list.map(item=>{ + res.data.order_product_list.map(item => { item.star = 5; item.content = ""; - if(item.state=='WAIT_COMMENT'){ + if (item.state == 'WAIT_COMMENT') { list.push(item); } }) - if(list.length==0){ + if (list.length == 0) { wx.showToast({ title: '该订单没有待评价产品', - icon:'none' + icon: 'none' }) - setTimeout(()=>{ + setTimeout(() => { wx.navigateBack() - },1000) + }, 1000) return; } res.data.order_product_list = list; this.setData({ - info:res.data + info: res.data }) }) }, - changeStar:function(e){ - console.log(e) + changeStar: function (e) { wx.showLoading({ title: '加载中' }) - let index = e.currentTarget.dataset.index,star = e.currentTarget.dataset.star; + let index = e.currentTarget.dataset.index, + star = e.currentTarget.dataset.star; let info = this.data.info; - info.order_product_list[index].star = Number(star)+1; + info.order_product_list[index].star = Number(star) + 1; this.setData({ - info:info - }) - wx.hideLoading({ + info: info, + rate:info.order_product_list[index].star }) + wx.hideLoading({}) }, - changeContent:function(e){ - console.log(e) - let index = e.currentTarget.dataset.index,info = this.data.info; + changeContent: function (e) { + let index = e.currentTarget.dataset.index, + info = this.data.info; info.order_product_list[index].content = e.detail.value; this.setData({ - info:info + info: info }) }, - submit:function(){ - let info = this.data.info,flag = true,ajax=[] - info.order_product_list.map(item=>{ - if(!item.content) { + submit: function () { + let info = this.data.info, + flag = true, + ajax = [] + info.order_product_list.map(item => { + if (!item.content) { wx.showToast({ title: '请输入评价内容', - icon:'none' + icon: 'none' }) flag = false; } - ajax.push(commonApi.user_post("product/product_comment",{ - product_id:item.product_id, - content:item.content, - order_id:this.data.id + ajax.push(commonApi.user_post("product/product_comment", { + product_id: item.product_id, + content: item.content, + order_id: item.order_id, + rate:this.data.rate, + img_list:this.data.upImgs.join(','), + is_anonymous:this.data.checked?1:0, + sku_id:item.sku_id })) }) - if(!flag) return; - Promise.all(ajax).then(res=>{ - console.log(res) + if (!flag) return; + Promise.all(ajax).then(res => { let flag = false; - res.map(item=>{ - if(item.code==1){ + res.map(item => { + if (item.code == 1) { flag = true } }) - if(flag){ + if (flag) { wx.navigateBack() } }) }, + //图片上传 + // 上传图片 + chooseImg: function (e) { + var that = this; + var imgs = this.data.imgs; + if (imgs.length >= 9) { + wx.showToast({ + title: '最多上传九张图片哦..', + icon: 'none' + }) + return false; + } + wx.chooseImage({ + // count: 1, // 默认9 + sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 + success: function (res) { + // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片 + let size = res.tempFiles[0].size + const temp = res.tempFilePaths[0] + if (size > 1024 * 1024 * 20) { + wx.showToast({ + title: '图片最大支持20M..', + icon: 'none' + }) + return + } else if (temp.substr(temp.length - 4, 4) == '.gif') { + wx.showToast({ + title: '图片格式错误', + icon: 'none' + }) + return; + } + var tempFilePaths = res.tempFilePaths; + var imgs = that.data.imgs; + console.log(imgs); + wx.showLoading({ + title: '上传中', + }) + + for (let i = 0; i < tempFilePaths.length; i++) { + wx.uploadFile({ + url: 'https://test.api.cloud.sz-trip.com/api/pbservice.other/upload', //这里是上传的服务器地址 + filePath: tempFilePaths[i], + name: 'file', + header: { + token: wx.getStorageSync('jstrip_token'), + }, + success(res) { + wx.hideLoading() + var res = JSON.parse(res.data); + if (res.code!=1) { + wx.showToast({ + title: res.msg, + icon: 'none' + }) + return + } + let img = res.data.url; + let arr = that.data.upImgs + arr.push(img) + that.setData({ + upImgs:arr + }) + imgs.push(tempFilePaths[i]); + that.setData({ + imgs: imgs + }); + } + }) + if (that.data,imgs.length+i==8) { + return + } + } + + + } + }); + }, + // 删除图片 + deleteImg: function (e) { + let imgs = this.data.imgs; + let index = e.currentTarget.dataset.index; + let upimg = this.data.upImgs + imgs.splice(index, 1); + upimg.splice(index,1) + this.setData({ + imgs: imgs, + upImgs:upimg + }); + + }, + // 预览图片 + previewImg: function (e) { + //获取当前图片的下标 + var index = e.currentTarget.dataset.index; + //所有图片 + var imgs = this.data.imgs; + wx.previewImage({ + //当前显示图片 + current: imgs[index], + //所有图片 + urls: imgs + }) + }, + checkboxChange:function(){ + this.setData({ + checked:!this.data.checked + }) + }, /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/order/comment/index.wxml b/pages/order/comment/index.wxml index 271c5d6..646d050 100644 --- a/pages/order/comment/index.wxml +++ b/pages/order/comment/index.wxml @@ -1,7 +1,7 @@ - + {{item.product_title}} @@ -18,6 +18,21 @@ + + + + + + + + 上传图片 + + + + + 提交 \ No newline at end of file diff --git a/pages/order/comment/index.wxss b/pages/order/comment/index.wxss index dc717b2..df3f7b3 100644 --- a/pages/order/comment/index.wxss +++ b/pages/order/comment/index.wxss @@ -1,7 +1,11 @@ /* pages/order/comment/index.wxss */ +page{ + background-color: #FBF8FB; +} .product-box { - margin: 0 30rpx; + padding: 0 30rpx 10rpx 30rpx; font-size: 28rpx; + background-color: #fff; } .product-top { display: flex; @@ -17,11 +21,19 @@ flex: 1; width: 100%; margin: 0 30rpx; + height: 120rpx; + display: flex; + flex-direction: column; + justify-content: space-between; + } .product-title { font-size: 32rpx; color: #000; } +.sku-name{ + margin-bottom:12rpx ; +} .product-price { flex-shrink: 0; text-align: right; @@ -56,6 +68,7 @@ .product-box textarea { display: block; width: 100%; + height: 210rpx; } .btn { width: 360rpx; @@ -70,4 +83,67 @@ bottom: 40rpx; left: 50%; margin-left: -180rpx; -} \ No newline at end of file +} + +/* 图片 */ +.three{ + margin-top: 27rpx; +} +.weui-uploader{ + margin: 16rpx 0; +} +.tp_add{ + width: 152rpx; + height: 152rpx; + border-radius: 10rpx; + opacity: 1; + border: 2rpx dashed #999999; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + font-size: 22rpx; + color: #BCBCBC; +} + +.pics { + float:left; + position:relative; + margin-right:15px; + margin-bottom:15px; + } + .pics image{ + width: 152rpx; + height: 152rpx; + } + .delete-btn{ + width: 20rpx; + height: 20rpx; + position: absolute; + top: -15rpx; + right: -5rpx; + } + .weui-uploader{ + padding: 10rpx 0; + } + .prd{ + border-bottom: 1px solid #CCCCCC; + } + .checkbox{ + margin: 16rpx 20rpx; + color: #BCBCBC; + } + checkbox .wx-checkbox-input { + width: 30rpx; + height: 30rpx; + border-radius: 50%; + } + + checkbox .wx-checkbox-input.wx-checkbox-input-checked { + border-color: #18d6ff; + background-color: #18d6ff; + } + + checkbox .wx-checkbox-input.wx-checkbox-input-checked::before { + color:#fff; + } diff --git a/pages/order/postOrder/index.js b/pages/order/postOrder/index.js index cb20054..6dcbca9 100644 --- a/pages/order/postOrder/index.js +++ b/pages/order/postOrder/index.js @@ -164,7 +164,8 @@ Page({ if (app.globalData.category_id) { data.category_id = app.globalData.category_id; } - if(!app.globalData.list){ + console.log(app.globalData.list) + if(!app.globalData.list || app.globalData.list.length == 0){ commonApi.user_post("order/create", { data: JSON.stringify(data) }).then(res => { diff --git a/pages/order/scene/index.js b/pages/order/scene/index.js index 34f21b9..3263c0c 100644 --- a/pages/order/scene/index.js +++ b/pages/order/scene/index.js @@ -34,7 +34,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - console.log(app.globalData.product) this.setData({ type: options.type, kjId: app.globalData.kjId, @@ -115,7 +114,7 @@ Page({ icon: 'none' }) } - if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1) { + if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && !this.data.flag) { this.couponCom.setNullCoupon() } app.globalData.couponInfo = null; @@ -249,9 +248,11 @@ Page({ postData.team_name = this.data.groupName postData.type = 1; } - app.globalData.list[app.globalData.index] = this.data.product + if(app.globalData.list){ + app.globalData.list[app.globalData.index] = this.data.product + } app.globalData.ticketPrice += (this.data.singlePrice * this.data.productNum - (this.data.coupon?this.data.coupon.activity.money:0))/100; - if(app.globalData.list.length > app.globalData.index + 1){ + if(app.globalData.list && app.globalData.list.length > app.globalData.index + 1){ if(app.globalData.createDate){ app.globalData.createDate.product_list.push(data.product_list[0]) }else{ @@ -264,8 +265,7 @@ Page({ }) return }else{ - console.log(app.globalData.list.length,app.globalData.postProduct) - if(app.globalData.list.length > 1 || app.globalData.postProduct.length>0){ + if(app.globalData.list && app.globalData.list.length > 1 || app.globalData.postProduct.length>0){ if(app.globalData.createDate){ app.globalData.createDate.product_list.push(data.product_list[0]) } @@ -347,11 +347,9 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { - console.log(this.data.flag); - if(app.globalData.list.length != 0){ + if(app.globalData.list && app.globalData.list.length != 0){ app.globalData.product = app.globalData.list[app.globalData.index] } - console.log(app.globalData.product) if (!this.data.isLogin) { commonApi.user_post("token/check").then(res => { if (res.code == 1) { @@ -369,7 +367,6 @@ Page({ commonApi.user_post("product/getProductAllowancePrice", { product_code: this.data.product.product.product_code }).then(resTwo => { - console.log(resTwo) if (resTwo && resTwo.code == 1) { this.setData({ allowance_data: resTwo.data diff --git a/pages/pbService/index.wxml b/pages/pbService/index.wxml index 827a635..1940aff 100644 --- a/pages/pbService/index.wxml +++ b/pages/pbService/index.wxml @@ -38,6 +38,10 @@ 12348 + 合计: - ¥{{allPrice/100}} + ¥{{allPrice/100}} + 不含运费 去下单 diff --git a/pages/user/order/list.wxml b/pages/user/order/list.wxml index 679be59..d1c53d1 100644 --- a/pages/user/order/list.wxml +++ b/pages/user/order/list.wxml @@ -41,7 +41,7 @@ 行程规划 再次购买 - 立即评价 + 取消预订 取消预订 退款详情 diff --git a/pages/user/order/postOrderInfo/index.js b/pages/user/order/postOrderInfo/index.js index 40fca77..3f28c4e 100644 --- a/pages/user/order/postOrderInfo/index.js +++ b/pages/user/order/postOrderInfo/index.js @@ -160,7 +160,12 @@ Page({ return; }) }, - + gotoComment:function(e){ + let id = e.currentTarget.dataset.id; + wx.navigateTo({ + url: '/pages/order/comment/index?id='+id, + }) + }, /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/user/personalInfo/index.js b/pages/user/personalInfo/index.js new file mode 100644 index 0000000..cd10b9d --- /dev/null +++ b/pages/user/personalInfo/index.js @@ -0,0 +1,228 @@ +// /pages/user/address/index.js +import user from "../../../utils/https/user.js" +import commonApi from "../../../utils/https/common" +import util from "../../../utils/util.js" +import http from "../../../utils/https.js" + +let app = getApp() +Page({ + + /** + * 页面的初始数据 + */ + data: { + baseList: [], + title: "为提供相应的产品和服务,并保障系统的安全稳定运行,我们可能会收集你的以下个人信息", + childList: [], + flag: true, + nowTitle: "" + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getInfo() + }, + getInfo: function () { + let that = this + wx.request({ + url: http.baseUrl + 'pbservice/Other/getUserInformation', // 仅为示例,并非真实的接口地址 + method: 'post', + header: { + 'content-type': 'application/x-www-form-urlencoded', // 默认值 + token: wx.getStorageSync('jstrip_token') + }, + success(res) { + that.setData({ + baseList: res.data.data + }) + } + }) + + }, + goDetail: function (e) { + let item = e.currentTarget.dataset.item; + this.setData({ + nowTitle: item.title + }) + for (let i = 0; i < item.child.length; i++) { + switch (item.child[i].information) { + case 'user': + item.child[i]['jump'] = true + break; + case 'address': + item.child[i]['jump'] = true + break; + case 'travel_user': + item.child[i]['jump'] = true + break; + case 'cart': + item.child[i]['jump'] = true + break; + case 'orders': + item.child[i]['jump'] = true + break; + case 'search_history': + item.child[i]['jump'] = true + break; + case 'my_collection': + item.child[i]['jump'] = true + break; + default: + item.child[i]['jump'] = false + break; + } + switch (item.child[i].information) { + case 'user': + item.child[i].information = "个人信息" + break; + case 'address': + item.child[i].information = "收货地址" + + break; + case 'travel_user': + item.child[i].information = "出游人信息" + + break; + case 'cart': + item.child[i].information = "购物车" + + break; + case 'orders': + item.child[i].information = "我的订单" + + break; + case 'search_history': + item.child[i].information = "搜索历史" + + break; + case 'my_collection': + item.child[i].information = "我的收藏" + break; + default: + break; + } + } + + + + this.setData({ + childList: item.child, + flag: false + }) + }, + goRouter: function (e) { + let item = e.currentTarget.dataset.item + if (!item.jump) return + let name = item.information + switch (name) { + case '个人信息': + wx.navigateTo({ + url: '/pages/user/profile/index', + }) + break; + case '收货地址': + wx.navigateTo({ + url: "/pages/user/address/index" + }) + break; + case '出游人信息': + wx.navigateTo({ + url: "/pages/user/linkman/index" + }) + break; + case '购物车': + wx.navigateTo({ + url: "/pages/user/cartlist/list" + }) + break; + case '我的订单': + wx.navigateTo({ + url: "/pages/user/order/list" + }) + break; + case '搜索历史': + wx.navigateTo({ + url: "/pages/search/index" + }) + break; + case '我的收藏': + wx.navigateTo({ + url: "/pages/user/likes/index" + }) + break; + default: + break; + } + }, + getName: function () { + let name = item.information + switch (name) { + case 'user': + name = "个人信息" + break; + case 'address': + name = "收货地址" + + break; + case 'travel_user': + name = "出游人信息" + + break; + case 'cart': + name = "购物车" + + break; + case 'orders': + name = "我的订单" + + break; + case 'search_history': + name = "搜索历史" + + break; + case 'my_collection': + name = "我的收藏" + + break; + default: + break; + } + return name + }, + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + } +}) \ No newline at end of file diff --git a/pages/user/personalInfo/index.json b/pages/user/personalInfo/index.json new file mode 100644 index 0000000..27b6d1f --- /dev/null +++ b/pages/user/personalInfo/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "title-header": "/pages/component/TitleHeader" + } +} \ No newline at end of file diff --git a/pages/user/personalInfo/index.wxml b/pages/user/personalInfo/index.wxml new file mode 100644 index 0000000..75b1bda --- /dev/null +++ b/pages/user/personalInfo/index.wxml @@ -0,0 +1,37 @@ + + + + + {{ title }} + + + {{ item.title }} + {{ item.des }} + > + + + + + + {{ item.title }} + + 使用目的 + {{ item.purpose }} + + + 使用场景 + {{ item.usage_scenarios }} + + + 收集情况 + {{ item.collect }} + + + + 信息内容 + {{item.information}} + + + + + \ No newline at end of file diff --git a/pages/user/personalInfo/index.wxss b/pages/user/personalInfo/index.wxss new file mode 100644 index 0000000..df0b01a --- /dev/null +++ b/pages/user/personalInfo/index.wxss @@ -0,0 +1,77 @@ +page{ + background-color: rgb(242,242,242); + +} +.info{ + font-size: .6rem; + padding: 1.4rem .6rem 0 .6rem; +} +.title-header{ + background-color:#fff !important; + +} +.title-box{ + background-color:transparent !important; +} +.title { + color: #000; + + font-size: .8rem; + margin: .4rem 0; +} + +.item { + background: #fff; + font-size: .7rem; + padding: .8rem .8rem .4rem .8rem; + margin-top: .6rem; + position: relative; + border-radius: .6rem; + min-height: 4rem; +} + +.item-info { + color: #666; + margin: .4rem 0 .2rem 0; +} + +.item-icon { + position: absolute; + right: .2rem; + top: 50%; + font-family: cursive; + transform: translate(-.2rem, -.2rem); +} + +.info-content { + font-size: .7rem; + +} + +.info-list { + background: #fff; + font-size: .7rem; + padding: .2rem .8rem .4rem .8rem; + margin-top: .6rem; + border-radius: .6rem; + min-height: 4rem; +} + +.info-column { + display: flex; + align-items: flex-start; + margin-top: .4rem; +} + +.column-title { + color: #666; + white-space: nowrap; + margin-right: .2rem; +} +.green { + color: #0B898E; +} +.column-info{ + overflow:auto; + width: 100%; +} \ No newline at end of file diff --git a/pages/user/service/list/index.js b/pages/user/service/list/index.js index 8ee49b6..51b8f3d 100644 --- a/pages/user/service/list/index.js +++ b/pages/user/service/list/index.js @@ -12,7 +12,11 @@ Page({ list:[], total:1, page_no:1, - keyword:"" + keyword:"", + showModal: false, + // 成功 + ses:true, + }, /** @@ -86,7 +90,29 @@ Page({ }) }) }, - + showDialogBtn: function () { + this.setData({ + showModal: true + }) + }, + hideModal: function () { + this.setData({ + showModal: false + }); + }, + onCancel: function () { + this.hideModal(); + }, + onConfirm: function (e) { + console.log(e.currentTarget.dataset.name); + this.hideModal(); + }, + phoneCall:function(){ + console.log(1111); + wx.makePhoneCall({ + phoneNumber: '0512-66555111', + }) + }, /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/user/service/list/index.wxml b/pages/user/service/list/index.wxml index 10726a0..4b548a6 100644 --- a/pages/user/service/list/index.wxml +++ b/pages/user/service/list/index.wxml @@ -9,4 +9,29 @@ {{item.question_name}} -没找到想要的答案?一键呼唤人工客服 \ No newline at end of file + + +没找到想要的答案?一键呼唤人工客服 + + + + + 即将跳转人工在线客服 + 客服服务时间:08:30-17:30 +如遇紧急情况可拨打 0512-66555111 + + 取消 + + + + \ No newline at end of file diff --git a/pages/user/service/list/index.wxss b/pages/user/service/list/index.wxss index b81cefe..5bcc390 100644 --- a/pages/user/service/list/index.wxss +++ b/pages/user/service/list/index.wxss @@ -47,7 +47,7 @@ } .more-btn { text-align: center; - width: 520rpx; + width: 550rpx !important; line-height: 60rpx; background: rgba(11, 137, 142, 0); border: 1rpx solid #D8D8D8; @@ -55,7 +55,96 @@ margin: 30rpx auto; font-size: 26rpx; font-weight: 500; + } .more-btn text { color: #0B898E; -} \ No newline at end of file +} + /**index.wxss**/ + .show-btn { + margin-top: 100rpx; + color: #22cc22; + } + + .modal-mask { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + background: #000; + opacity: 0.5; + overflow: hidden; + z-index: 9000; + color: #fff; + } + + .modal-dialog { + width: 540rpx; + overflow: hidden; + position: fixed; + top: 46%; + left: 0; + z-index: 9999; + background: #f9f9f9; + margin: -180rpx 105rpx; + border-radius: 8px; + } + + .modal-title { + padding-top: 30rpx; + padding-bottom: 30rpx; + font-size: 14px; + color: #030303; + text-align: center; + } + + .modal-img { + width: 40px; + height: 40px; + margin: 0 auto; + margin-top: 20rpx; + } + + + .modal-footer { + display: flex; + flex-direction: row; + height: 86rpx; + border-top: 1px solid #dedede; + font-size: 34rpx; + line-height: 86rpx; + } + + .btn-cancel { + width: 50%; + color: #8f8f8f; + background-color: #f2f2f2; + text-align: center; + border-right: 1px solid #dedede; + } + + .btn-confirm { + width: 50%; + color: #8f8f8f; + background-color: #f2f2f2; + text-align: center; + } + + .btn-confirms { + width: 100%; + background-color: #f2f2f2; + color: rgb(91,198,72); + text-align: center; + font-weight: normal !important; + } + .btn-confirms.two { + color: #8f8f8f; +} + .modal-info{ + line-height: 70rpx; + font-size: 30rpx; + } + .green{ + color: #22cc22; + } \ No newline at end of file diff --git a/pages/user/user.wxml b/pages/user/user.wxml index d808d7c..3e3cabb 100644 --- a/pages/user/user.wxml +++ b/pages/user/user.wxml @@ -88,5 +88,20 @@ 收货地址 + + + + 用户协议 + + + 隐私政策 + + + 个人信息收集清单 + + + 第三方共享信息清单 + + \ No newline at end of file diff --git a/pages/user/userPrivacy/index.js b/pages/user/userPrivacy/index.js new file mode 100644 index 0000000..8412a7d --- /dev/null +++ b/pages/user/userPrivacy/index.js @@ -0,0 +1,71 @@ +// pages/user/address/index.js +import user from "../../../utils/https/user.js" +import commonApi from "../../../utils/https/common" +import util from "../../../utils/util.js" +let app = getApp() +Page({ + + /** + * 页面的初始数据 + */ + data: { + id:null, + info:"", + title:"", + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.setData({ + id:options.id + }) + this.getInfo() + }, + getInfo:function(){ + commonApi._post("pbservice/Other/getDictionary", { id: this.data.id }).then(res => { + console.log(res); + res=res.data + this.setData({ + info:res[0].content, + title:res[0].type_name + }) + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + } +}) \ No newline at end of file diff --git a/pages/user/userPrivacy/index.json b/pages/user/userPrivacy/index.json new file mode 100644 index 0000000..27b6d1f --- /dev/null +++ b/pages/user/userPrivacy/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "title-header": "/pages/component/TitleHeader" + } +} \ No newline at end of file diff --git a/pages/user/userPrivacy/index.wxml b/pages/user/userPrivacy/index.wxml new file mode 100644 index 0000000..2a73447 --- /dev/null +++ b/pages/user/userPrivacy/index.wxml @@ -0,0 +1,11 @@ + + + + {{title}} + + + {{info}} + + + + \ No newline at end of file diff --git a/pages/user/userPrivacy/index.wxss b/pages/user/userPrivacy/index.wxss new file mode 100644 index 0000000..99f3367 --- /dev/null +++ b/pages/user/userPrivacy/index.wxss @@ -0,0 +1,9 @@ +.title{ + padding: 10rpx 20rpx 0rpx 20rpx; + font-size: 28rpx; +} +.text{ + padding: 10rpx 20rpx 0rpx 20rpx; + font-size: 24rpx; + +} \ No newline at end of file