| @@ -33,10 +33,12 @@ App({ | |||||
| } catch (error) { | } catch (error) { | ||||
| console.log(`获取系统信息失败`); | console.log(`获取系统信息失败`); | ||||
| } | } | ||||
| that.logn(); | |||||
| tt.getSystemInfo({ | tt.getSystemInfo({ | ||||
| success(res) { | success(res) { | ||||
| console.log(res,"**"); | |||||
| that.globalData.systemInfo = res | that.globalData.systemInfo = res | ||||
| that.logn(); | |||||
| }, | }, | ||||
| fail(res) { | fail(res) { | ||||
| console.log(`getSystemInfo 调用失败`); | console.log(`getSystemInfo 调用失败`); | ||||
| @@ -75,6 +77,7 @@ App({ | |||||
| tt.login({ | tt.login({ | ||||
| success:(res=>{ | success:(res=>{ | ||||
| let {code} = res | let {code} = res | ||||
| console.log(code,"code"); | |||||
| Http.post({ | Http.post({ | ||||
| url:config.api.login, | url:config.api.login, | ||||
| data:{ | data:{ | ||||
| @@ -4,8 +4,6 @@ | |||||
| "index/searchbar", | "index/searchbar", | ||||
| "pages/index/index", | "pages/index/index", | ||||
| "index/user", | "index/user", | ||||
| "pages/mainOrder/mainOrder", | |||||
| "pages/detailOrder/detailOrder", | |||||
| "pages/couponorder/index/index", | "pages/couponorder/index/index", | ||||
| "pages/couponorder/detail/index", | "pages/couponorder/detail/index", | ||||
| "pages/coupon/detail/index", | "pages/coupon/detail/index", | ||||
| @@ -37,14 +35,14 @@ | |||||
| "pages/paySnapshoot/paySnapshoot", | "pages/paySnapshoot/paySnapshoot", | ||||
| "pages/refund/refund", | "pages/refund/refund", | ||||
| "pages/serviceWebView/serviceWebView", | "pages/serviceWebView/serviceWebView", | ||||
| "pages/liveLsit/liveLsit" | |||||
| "pages/liveLsit/liveLsit", | |||||
| "pages/coupon/confirmation/confirmation", | |||||
| "pages/coupon/instructions/instructions" | |||||
| ], | ], | ||||
| "window": { | "window": { | ||||
| "backgroundTextStyle": "light", | "backgroundTextStyle": "light", | ||||
| "navigationBarBackgroundColor": "#fff", | "navigationBarBackgroundColor": "#fff", | ||||
| "navigationBarTitleText": "Mini Program", | |||||
| "navigationBarTextStyle": "black", | |||||
| "navigationStyle": "custom" | |||||
| "navigationBarTextStyle": "black" | |||||
| } | } | ||||
| } | } | ||||
| @@ -128,7 +128,7 @@ Component({ | |||||
| tt.requestSubscribeMessage({ | tt.requestSubscribeMessage({ | ||||
| tmplIds: tmplIds, | tmplIds: tmplIds, | ||||
| success(res) { | success(res) { | ||||
| console.log("我重复订阅") | |||||
| console.log("我重复订阅",res) | |||||
| let _statue = null | let _statue = null | ||||
| tmplIds.map((item, index) => { //判读用户是否点击了确定 | tmplIds.map((item, index) => { //判读用户是否点击了确定 | ||||
| if (res[item] == "accept") { | if (res[item] == "accept") { | ||||
| @@ -139,11 +139,6 @@ Component({ | |||||
| Http.post({ | Http.post({ | ||||
| url: config.api.wxMsg | url: config.api.wxMsg | ||||
| }).then(res => { | }).then(res => { | ||||
| tt.setStorageSync({ | |||||
| key: 'ifShowTab', | |||||
| data: true, | |||||
| }) | |||||
| console.log(res) | console.log(res) | ||||
| }) | }) | ||||
| return | return | ||||
| @@ -137,6 +137,11 @@ var config = { | |||||
| * 支付订单 | * 支付订单 | ||||
| */ | */ | ||||
| payOrderCreate: "/pay/create", | payOrderCreate: "/pay/create", | ||||
| /** | |||||
| * 2.0订单支付 | |||||
| */ | |||||
| payOrderCreate_2: "/pay/ttcreatev2", | |||||
| /** | /** | ||||
| * 订单状态更新 | * 订单状态更新 | ||||
| */ | */ | ||||
| @@ -456,7 +461,11 @@ var config = { | |||||
| /** | /** | ||||
| * 取消订单 | * 取消订单 | ||||
| */ | */ | ||||
| orderCancel:"/order/cancel" | |||||
| orderCancel:"/order/cancel", | |||||
| /** | |||||
| * 判断是否支付 | |||||
| */ | |||||
| continueToPay:"/order/continueToPay", | |||||
| }, | }, | ||||
| weapp: { | weapp: { | ||||
| AppId: weappId | AppId: weappId | ||||
| @@ -1,23 +1,30 @@ | |||||
| { | { | ||||
| "extEnable": true, | |||||
| "extAppid": "ttef6599d8705b49b101", | |||||
| "window": { | |||||
| "backgroundTextStyle": "light", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTitleText": "Mini Program", | |||||
| "navigationBarTextStyle": "black", | |||||
| "navigationStyle": "custom" | |||||
| }, | |||||
| "ext": { | |||||
| "weappId": "ttef6599d8705b49b101", | |||||
| "name": "富茂券模板", | |||||
| "attr": { | |||||
| "configUrl": "https://ctest.malls.iformall.com/C/api" | |||||
| } | |||||
| }, | |||||
| "directCommit": false, | |||||
| "networkTimeout": { | |||||
| "request": 30000, | |||||
| "downloadFile": 10000 | |||||
| "extEnable": true, | |||||
| "extAppid": "ttef6599d8705b49b101", | |||||
| "window": { | |||||
| "backgroundTextStyle": "light", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black" | |||||
| }, | |||||
| "ttPlugins": { | |||||
| "dependencies": { | |||||
| "microapp-trade-plugin": { | |||||
| "version": "1.1.2", | |||||
| "isDynamic": true | |||||
| } | |||||
| } | } | ||||
| }, | |||||
| "ext": { | |||||
| "weappId": "ttef6599d8705b49b101", | |||||
| "name": "富茂券模板", | |||||
| "attr": { | |||||
| "configUrl": "https://ctest.malls.iformall.com/C/api" | |||||
| } | |||||
| }, | |||||
| "directCommit": false, | |||||
| "networkTimeout": { | |||||
| "request": 30000, | |||||
| "downloadFile": 10000 | |||||
| } | |||||
| } | } | ||||
| @@ -518,9 +518,7 @@ Page({ | |||||
| * 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
| */ | */ | ||||
| onLoad: function (options) { | onLoad: function (options) { | ||||
| console.log(123); | |||||
| let that = this; | let that = this; | ||||
| let optionss; | let optionss; | ||||
| @@ -1,4 +1,4 @@ | |||||
| { | { | ||||
| "usingComponents": { | "usingComponents": { | ||||
| "c-banner": "../components/banner/index", | "c-banner": "../components/banner/index", | ||||
| @@ -11,6 +11,9 @@ | |||||
| "tabbar":"../components/tabbar/tabbar" | "tabbar":"../components/tabbar/tabbar" | ||||
| }, | }, | ||||
| "enablePullDownRefresh": true, | "enablePullDownRefresh": true, | ||||
| "navigationBarBackgroundColor": "#F4F5F9" | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "navigationBarTitleText": "首页" | |||||
| } | } | ||||
| @@ -1,9 +1,9 @@ | |||||
| <!-- 初始模板 --> | <!-- 初始模板 --> | ||||
| <view tt:if="{{mouldType==0}}"> | <view tt:if="{{mouldType==0}}"> | ||||
| <navbar color="{{typeLsit.sy_top_f.styleClass}}" background="{{typeLsit.sy_top.styleClass}}" text="首页"></navbar> | |||||
| <!-- <navbar color="{{typeLsit.sy_top_f.styleClass}}" background="{{typeLsit.sy_top.styleClass}}" text="首页"></navbar> --> | |||||
| <!-- style="padding-top:{{navigationBarHeight}}" --> | <!-- style="padding-top:{{navigationBarHeight}}" --> | ||||
| <view class="container"> | <view class="container"> | ||||
| <view style="height:{{navigationBarHeight1}} "></view> | |||||
| <!-- <view style="height:{{navigationBarHeight1}} "></view> --> | |||||
| <!-- 会员信息 --> | <!-- 会员信息 --> | ||||
| <view class="color_box" style="{{typeLsit.sy_bbg.styleClass}}"> | <view class="color_box" style="{{typeLsit.sy_bbg.styleClass}}"> | ||||
| <!-- 所属集团 --> | <!-- 所属集团 --> | ||||
| @@ -127,7 +127,7 @@ | |||||
| <view class="color_box1"> | <view class="color_box1"> | ||||
| <view> | <view> | ||||
| <!-- navigationBarHeight --> | <!-- navigationBarHeight --> | ||||
| <view style="height:{{navigationBarHeight}};overflow: hidden;" class="goSqunar1" bindtap="goSquareList"> | |||||
| <!-- <view style="height:{{navigationBarHeight}};overflow: hidden;" class="goSqunar1" bindtap="goSquareList"> | |||||
| <image class="squareLogo" src="../assets/imgData/squareLogo.png" style="top: {{navImgHeight}};" ></image> | <image class="squareLogo" src="../assets/imgData/squareLogo.png" style="top: {{navImgHeight}};" ></image> | ||||
| <view class="title1" style="line-height:{{navLineHeight}}">{{marketName}}</view> | <view class="title1" style="line-height:{{navLineHeight}}">{{marketName}}</view> | ||||
| @@ -136,34 +136,8 @@ | |||||
| </image> | </image> | ||||
| </view> | </view> | ||||
| </view> | |||||
| <!-- <view class='userinfo1' tt:if="{{ifStoreApp!=1}}"> | |||||
| <view class='infoLeft' style="{{typeLsit.sy_xxb.styleClass}}"> | |||||
| <view class="user-avatar1"> | |||||
| <image tt:if="{{userAvatarUrl!=''}}" class="userAvatarUrl" src="{{userAvatarUrl}}"></image> | |||||
| </view> | |||||
| <view class="user-data1 fl" style="{{typeLsit.sy_xxb.styleClass}}"> | |||||
| <view class='nameBox' bindtap="goIntegralmall"> | |||||
| <p style="font-size: 28rpx;color:#292723;float: left;">{{userName}}</p> | |||||
| <view class="vgrade">{{levelName}}</view> | |||||
| <view class="integralNum">积分:{{credit}}</view> | |||||
| </view> | |||||
| <view class="view" bindtap='gotoChengzhangzhi'> | |||||
| <progress percent="{{upgradePercent}}" stroke-width="6" activeColor="{{activeColor}}" /> | |||||
| <view class='remainchengzhangzhi'>还需 | |||||
| <span style="color:#4D4941">{{upgradeScore}}成长值</span> | |||||
| 可升级 | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| <view class='qrcode1 fr' bindtap='qrcode'> | |||||
| <image src="https://formall.oss-accelerate.aliyuncs.com/cimg/lqcbarcode.png" class='qrcodeimg' | |||||
| mode='widthFix'></image> | |||||
| </view> | |||||
| </view> --> | </view> --> | ||||
| </view> | </view> | ||||
| @@ -239,4 +213,5 @@ | |||||
| </navigator> | </navigator> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <tabbar /> | |||||
| <tabbar /> | |||||
| <s-title/> | |||||
| @@ -1,6 +1,6 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "门店", | "navigationBarTitleText": "门店", | ||||
| "navigationBarBackgroundColor": "#F4F5F9", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | "navigationBarTextStyle": "black", | ||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../components/navbar/navbar", | "navbar": "../components/navbar/navbar", | ||||
| @@ -1,8 +1,8 @@ | |||||
| <!-- <navbar text="门店"></navbar> --> | <!-- <navbar text="门店"></navbar> --> | ||||
| <view style="height:{{navigationBarHeight}};overflow: hidden;" class="goSqunar1" bindtap="goSquareList"> | |||||
| <!-- <view style="height:{{navigationBarHeight}};overflow: hidden;" class="goSqunar1" bindtap="goSquareList"> | |||||
| <image class="squareLogo" src="../assets/imgData/squareLogo.png" style="top: {{navImgHeight}};" ></image> | <image class="squareLogo" src="../assets/imgData/squareLogo.png" style="top: {{navImgHeight}};" ></image> | ||||
| <view class="title1" style="line-height:{{navLineHeight}}">门店</view> | <view class="title1" style="line-height:{{navLineHeight}}">门店</view> | ||||
| </view> | |||||
| </view> --> | |||||
| <!-- 左侧滚动栏 --> | <!-- 左侧滚动栏 --> | ||||
| <!-- <view style="height:{{navigationBarHeight}} "></view> --> | <!-- <view style="height:{{navigationBarHeight}} "></view> --> | ||||
| @@ -111,6 +111,7 @@ Page({ | |||||
| // }); | // }); | ||||
| }, | }, | ||||
| onShow: function (options) { | onShow: function (options) { | ||||
| this.setData({ | this.setData({ | ||||
| mouldType:app.globalData.mouldType | mouldType:app.globalData.mouldType | ||||
| }) | }) | ||||
| @@ -1,5 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "我的", | "navigationBarTitleText": "我的", | ||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../components/navbar/navbar", | "navbar": "../components/navbar/navbar", | ||||
| "phoem":"../components/getPhoen/getPhoen", | "phoem":"../components/getPhoen/getPhoen", | ||||
| @@ -1,8 +1,8 @@ | |||||
| <view class="BoxBg"> | <view class="BoxBg"> | ||||
| <image class="bgImgTop" src="https://formall.oss-accelerate.aliyuncs.com/douyin_ifomall/imgData/userBg.png"></image> | <image class="bgImgTop" src="https://formall.oss-accelerate.aliyuncs.com/douyin_ifomall/imgData/userBg.png"></image> | ||||
| <navbar tt:if="{{mouldType==1}}" text="会员中心" background='#e6e6e6'></navbar> | |||||
| <navbar tt:if="{{mouldType!=1}}" text="我的" background='#FD832D' color="#fff"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar tt:if="{{mouldType==1}}" text="会员中心" background='#e6e6e6'></navbar> | |||||
| <navbar tt:if="{{mouldType!=1}}" text="我的" background='#FD832D' color="#fff"></navbar> --> | |||||
| <!-- <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <view class="{{mouldType==1?'userBg1':'userBg'}}"> | <view class="{{mouldType==1?'userBg1':'userBg'}}"> | ||||
| <view class="userLogo" style="{{mouldType==1?'':'background: linear-gradient(180deg,rgba(253,131,45,1) 0%,rgba(254,74,22,1) 100%);'}}"> | <view class="userLogo" style="{{mouldType==1?'':'background: linear-gradient(180deg,rgba(253,131,45,1) 0%,rgba(254,74,22,1) 100%);'}}"> | ||||
| <image style="width: 100%;height:100%;border-radius: 50%;" src="{{avatarUrl}}" /> | <image style="width: 100%;height:100%;border-radius: 50%;" src="{{avatarUrl}}" /> | ||||
| @@ -7,7 +7,7 @@ | |||||
| /* background: #F1F6F7 */ | /* background: #F1F6F7 */ | ||||
| position: relative; | position: relative; | ||||
| background-color: #e6e6e6; | background-color: #e6e6e6; | ||||
| overflow: hidden; | |||||
| } | } | ||||
| .bgImgTop{ | .bgImgTop{ | ||||
| width: 100%; | width: 100%; | ||||
| @@ -168,6 +168,9 @@ button { | |||||
| background-color: #ffffff; | background-color: #ffffff; | ||||
| border-radius: 10rpx; | border-radius: 10rpx; | ||||
| overflow: hidden; | overflow: hidden; | ||||
| left: 5%; | |||||
| position: absolute; | |||||
| z-index: 1000; | |||||
| } | } | ||||
| .fuwu{ | .fuwu{ | ||||
| /* font-size: 28rpx; */ | /* font-size: 28rpx; */ | ||||
| @@ -1,5 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "活动详情", | "navigationBarTitleText": "活动详情", | ||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../components/navbar/navbar" | "navbar": "../../components/navbar/navbar" | ||||
| } | } | ||||
| @@ -1,6 +1,6 @@ | |||||
| <!-- <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> --> | <!-- <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> --> | ||||
| <navbar back home text="详情" background="#fff"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar back home text="详情" background="#fff"></navbar> --> | |||||
| <!-- <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <!-- banner活动详情页面 --> | <!-- banner活动详情页面 --> | ||||
| <view class='coupons' > | <view class='coupons' > | ||||
| <view class="coupons-body"> | <view class="coupons-body"> | ||||
| @@ -1,5 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "服务资质", | "navigationBarTitleText": "服务资质", | ||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../components/navbar/navbar" | "navbar": "../../components/navbar/navbar" | ||||
| } | } | ||||
| @@ -1,6 +1,6 @@ | |||||
| <view class="BoxBg"> | <view class="BoxBg"> | ||||
| <navbar back home text="服务资质" background='#fff' color="#000"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar back home text="服务资质" background='#fff' color="#000"></navbar> --> | |||||
| <!-- <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <image src="{{businessLicense}}" class="img1"> | <image src="{{businessLicense}}" class="img1"> | ||||
| </image> | </image> | ||||
| <image src="{{icp}}" class="img1"> | <image src="{{icp}}" class="img1"> | ||||
| @@ -1,5 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "投诉建议", | "navigationBarTitleText": "投诉建议", | ||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../components/navbar/navbar" | "navbar": "../../components/navbar/navbar" | ||||
| } | } | ||||
| @@ -1,6 +1,6 @@ | |||||
| <view class="BoxBg"> | <view class="BoxBg"> | ||||
| <navbar back="{{true}}" home="{{true}}" text="投诉建议" background='#FD832D' color="white"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar back="{{true}}" home="{{true}}" text="投诉建议" background='#FD832D' color="white"></navbar> --> | |||||
| <!-- <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <view class="Box"> | <view class="Box"> | ||||
| <view class="titleBox"> | <view class="titleBox"> | ||||
| <view class="title">{{"标题:"}}</view> | <view class="title">{{"标题:"}}</view> | ||||
| @@ -0,0 +1,851 @@ | |||||
| const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px' | |||||
| var config = require("../../../config/config.js"); | |||||
| var app = getApp(); | |||||
| const Http = require("../../../utils/HttpBasics"); | |||||
| const util = require("../../../utils/util"); | |||||
| const imgurl = require("../../../utils/imgurl"); | |||||
| Page({ | |||||
| data: { | |||||
| couponIds: "", | |||||
| couponChannelId: "", | |||||
| showPage: false, | |||||
| data: {}, | |||||
| spuIdObj: {}, | |||||
| priceAndStockObj: {} | |||||
| }, | |||||
| onLoad: function (options) { | |||||
| console.log(options); | |||||
| tt.showLoading({ | |||||
| title: "加载中..." | |||||
| }); | |||||
| let that = this | |||||
| if (app.globalData.token) { | |||||
| if (options && options.couponChannelId) { | |||||
| that.setData({ | |||||
| couponChannelId: options.couponChannelId | |||||
| }) | |||||
| that.getDetail(options.couponChannelId, 'notendclock'); | |||||
| } | |||||
| } else { | |||||
| app.tokenCallback = token => { | |||||
| that.setData({ | |||||
| couponChannelId: options.couponChannelId | |||||
| }) | |||||
| if (options && options.couponChannelId) { | |||||
| that.getDetail(options.couponChannelId, 'notendclock'); | |||||
| } | |||||
| } | |||||
| } | |||||
| }, | |||||
| goInstructions() { | |||||
| tt.navigateTo({ | |||||
| url: '/pages/coupon/instructions/instructions?couponChannelId=' + this.data.couponChannelId, | |||||
| success: (res) => { | |||||
| }, | |||||
| fail: (res) => { | |||||
| }, | |||||
| }); | |||||
| }, | |||||
| getSupId(id) { | |||||
| Http.get({ | |||||
| url: config.api.getSpuid, | |||||
| data: { id: id } | |||||
| }).then(res => { | |||||
| if (res.data) { | |||||
| this.setData({ | |||||
| spuIdObj: res.data | |||||
| }) | |||||
| } | |||||
| }).catch(err => { | |||||
| // tt.showToast({ | |||||
| // title: err.message, | |||||
| // icon: 'none', | |||||
| // duration: 2000, | |||||
| // mask: false | |||||
| // }); | |||||
| }) | |||||
| }, | |||||
| getCouponPriceAndStock(couponChannelId) {//获取券价格与库存 | |||||
| Http.get({ | |||||
| url: config.api.couponPriceAndStock, | |||||
| data: { | |||||
| couponChannelId | |||||
| } | |||||
| }).then(res => { | |||||
| let tempBoj = JSON.parse(res.data) | |||||
| console.log(tempBoj, "$"); | |||||
| this.setData({ | |||||
| priceAndStockObj: tempBoj | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| getDetail: function (couponChannelId, flag) { | |||||
| let that = this; | |||||
| let data = {}; | |||||
| that.getCouponPriceAndStock(couponChannelId);//获取券价格和库存 | |||||
| if (that.data.couponIds) { | |||||
| data.couponId = couponChannelId | |||||
| } else { | |||||
| data.couponChannelId = couponChannelId | |||||
| } | |||||
| var parmer = { | |||||
| url: config.api.newCouponDetail, | |||||
| data: data | |||||
| }; | |||||
| Http.get(parmer).then(res => { | |||||
| that.setData({ | |||||
| couponId: res.data.couponId | |||||
| }) | |||||
| /** | |||||
| * activityStatus==0 活动未开始 | |||||
| * activityStatus==1 活动已开始 | |||||
| * flag == endclock 说明倒计时已经结束 | |||||
| */ | |||||
| if (res.data.endTime && res.data.beginTime) { | |||||
| that.setData({ | |||||
| begin_time: res.data.beginTime, | |||||
| end_time: res.data.endTime, | |||||
| activityStatus: res.data.actStatus ? res.data.actStatus : '' | |||||
| }) | |||||
| if (res.data.actStatus == 0 && flag != 'endclock') { | |||||
| that.countdown(res.data.beginTime); | |||||
| } else if (res.data.actStatus != 0 && flag != 'endclock') { | |||||
| that.countdown(res.data.endTime); | |||||
| } else { | |||||
| clearInterval(that.data.setInterval) | |||||
| } | |||||
| if (res.data.actStatus == 0) { | |||||
| var beginTime = util.formatTime(res.data.beginTime, "yyyy-MM-dd hh:mm:ss"); | |||||
| if (util.timechuo(beginTime).indexOf('-') == 0) { | |||||
| that.setData({ | |||||
| beginTime: "活动已结束", | |||||
| }); | |||||
| } else { | |||||
| that.setData({ | |||||
| beginTime: util.timechuo(beginTime) | |||||
| }); | |||||
| } | |||||
| } else { | |||||
| var endTime = util.formatTime(res.data.endTime, "yyyy-MM-dd hh:mm:ss"); | |||||
| if (util.timechuo(endTime).indexOf('-') == 0) { | |||||
| that.setData({ | |||||
| endtime: "活动已结束", | |||||
| }); | |||||
| } else { | |||||
| that.setData({ | |||||
| endtime: util.timechuo(endTime) | |||||
| }); | |||||
| } | |||||
| } | |||||
| } | |||||
| tt.hideLoading(); | |||||
| that.setData({ | |||||
| data: res.data, | |||||
| }); | |||||
| if (res.data.type == 10) { | |||||
| that.setData({ | |||||
| salePriceStr: res.data.salePriceStr, | |||||
| pickEndDate: util.formatTime(res.data.pickEndDate, "yyyy-MM-dd"), | |||||
| pickStartDate: util.formatTime(res.data.pickStartDate, "yyyy-MM-dd"), | |||||
| priceStr: res.data.priceStr, | |||||
| tailPriceStr: res.data.tailPriceStr, | |||||
| origPriceStr: res.data.origPriceStr | |||||
| }) | |||||
| } | |||||
| if (res.data.validType == 1) { | |||||
| that.setData({ | |||||
| validStartDate: util.formatTime(res.data.validStartDate, "yyyy-MM-dd"), | |||||
| validEndDate: util.formatTime(res.data.validEndDate, "yyyy-MM-dd"), | |||||
| pickStartDate: util.formatTime(res.data.pickStartDate, "yyyy-MM-dd"), | |||||
| pickEndDate: util.formatTime(res.data.pickEndDate, "yyyy-MM-dd"), | |||||
| }); | |||||
| } else { | |||||
| if (res.data.validDays) { | |||||
| that.setData({ | |||||
| validDays: res.data.validDays | |||||
| }); | |||||
| } | |||||
| } | |||||
| if (res.data.itemGroup) { | |||||
| let tempObj = this.data.data | |||||
| tempObj.itemGroup = JSON.parse(tempObj.itemGroup) | |||||
| this.setData({ | |||||
| data: tempObj | |||||
| }) | |||||
| console.log(this.data.data, "data"); | |||||
| } | |||||
| if (res.data.productAttrs && res.data.skuAttrs) { | |||||
| let tempObj = this.data.data | |||||
| tempObj.productAttrs = JSON.parse(tempObj.productAttrs) | |||||
| tempObj.skuAttrs = JSON.parse(tempObj.skuAttrs) | |||||
| tempObj.productAttrs.map(item => { | |||||
| if (item.key == "Notification") { | |||||
| if (item.data != '') { | |||||
| tempObj.curLsit = JSON.parse(item.data) | |||||
| } | |||||
| } | |||||
| if (item.key == "bring_out_meal") { | |||||
| tempObj.besides = item.data | |||||
| } | |||||
| if (item.key == "free_pack") { | |||||
| tempObj.pack = item.data | |||||
| } | |||||
| if (item.key == "superimposed_discounts") { | |||||
| tempObj.superimposed_discounts = item.data | |||||
| } | |||||
| if (item.key == "private_room") { | |||||
| tempObj.private_room = item.data | |||||
| } | |||||
| if (item.key == "rec_person_num_max") { | |||||
| tempObj.rec_person_num_max = item.data | |||||
| } | |||||
| if (item.key == 'Description') { | |||||
| tempObj.Description = JSON.parse(item.data) | |||||
| } | |||||
| if (item.key == "can_no_use_date") { | |||||
| tempObj.can_no_use_date = JSON.parse(item.data) | |||||
| } | |||||
| }) | |||||
| tempObj.skuAttrs.map(item => { | |||||
| if (item.key == "commodity") { | |||||
| if (item.data != '') { | |||||
| tempObj.itemGroup = JSON.parse(item.data) | |||||
| } | |||||
| } | |||||
| }) | |||||
| this.setData({ | |||||
| data: tempObj | |||||
| }) | |||||
| console.log(this.data.data, "data"); | |||||
| } | |||||
| }).catch(err => { | |||||
| tt.showToast({ | |||||
| title: err.message, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 支付订单更新 | |||||
| */ | |||||
| payOrderUpdate: (orderId, payOrderId, status, reason, type, _this, composeOrderType) => { | |||||
| let that = this; | |||||
| // 支付成功 | |||||
| Http.post({ | |||||
| url: config.api.payOrderUpdate, | |||||
| data: { | |||||
| payOrderId: payOrderId, | |||||
| composeOrderId: orderId, | |||||
| status: status, | |||||
| reason: reason | |||||
| } | |||||
| }) | |||||
| .then(res => { | |||||
| tt.hideLoading() | |||||
| // 有价券 | |||||
| if (!type && type != 'free') { | |||||
| tt.navigateTo({ | |||||
| url: `/pages/order/detail/index?orderId=${orderId | |||||
| }` | |||||
| }); | |||||
| } else if (type == 'free') { | |||||
| tt.navigateTo({ | |||||
| url: `/pages/order/detail/index?orderId=${orderId | |||||
| }` | |||||
| }); | |||||
| } | |||||
| }) | |||||
| .catch(err => { | |||||
| console.log(err); | |||||
| if (!type) { | |||||
| setTimeout(function () { | |||||
| _this.payOrderUpdate(orderId, payOrderId, status, reason, type, _this, composeOrderType); | |||||
| }, 2000) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| // 获得未支付的订单 | |||||
| getUnPaidOrder(couponId) { | |||||
| let that = this; | |||||
| Http.get({ | |||||
| url: config.api.getUnPaidOrder, | |||||
| data: { | |||||
| couponId: couponId | |||||
| } | |||||
| }).then(res => { | |||||
| that.setData({ | |||||
| disOrderNumber: res.data.orderNumber, | |||||
| composeOrderType: res.data.composeOrderType | |||||
| }) | |||||
| if (res.data && res.data.pressEndDate) { | |||||
| that.setData({ | |||||
| dispressEndDate: true | |||||
| }) | |||||
| } else { | |||||
| that.setData({ | |||||
| dispressEndDate: false | |||||
| }) | |||||
| } | |||||
| if (that.data.dispressEndDate) { | |||||
| tt.showModal({ | |||||
| title: '提示', | |||||
| content: "您有未支付订单,请到“我的-我的砍价”进行支付", | |||||
| confirmText: "我的砍价", | |||||
| success: function (res) { | |||||
| if (res.confirm) { | |||||
| tt.navigateTo({ | |||||
| url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.disOrderNumber}&composeOrderType=${that.data.composeOrderType}`, | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| } else { | |||||
| tt.showModal({ | |||||
| title: '提示', | |||||
| content: '您有未支付订单,请先进行支付', | |||||
| confirmText: "去支付", | |||||
| success: function (res1) { | |||||
| if (res1.confirm) { | |||||
| if (that.data.composeOrderType > 0) {//券包 | |||||
| tt.navigateTo({ | |||||
| url: `/pages/order/detail/index?orderId=${res.data.composeOrderId}`, | |||||
| }) | |||||
| } else { | |||||
| tt.navigateTo({ | |||||
| url: `/pages/order/detail/index?orderId=${res.data.composeOrderId}`, | |||||
| }) | |||||
| } | |||||
| } | |||||
| } | |||||
| }) | |||||
| } | |||||
| }).catch(error => { | |||||
| tt.showToast({ | |||||
| title: error.message, | |||||
| icon: "none", | |||||
| duration: 3000 | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 发起支付 | |||||
| */ | |||||
| orderFunc(discount) { | |||||
| if (this.data.showbutton) return; | |||||
| let that = this; | |||||
| tt.showLoading({ | |||||
| title: "加载中..." | |||||
| }); | |||||
| that.setData({ | |||||
| showbutton: true, | |||||
| }) | |||||
| Http.get({ | |||||
| url: config.api.checkUserStatus, | |||||
| data: { | |||||
| token: app.globalData.token | |||||
| } | |||||
| }).then(res => { | |||||
| Http.get({ | |||||
| url: config.api.checkPhoneStatus, | |||||
| data: {} | |||||
| }).then(res => { | |||||
| // | |||||
| // if (!tt.canIUse('createOrder') || that.data.data.type == 50 || that.data.priceAndStockObj.salePrice == 0) { | |||||
| //积分券和免费券 | |||||
| // 发起砍价 | |||||
| if (discount == 'discount') { | |||||
| var data = { | |||||
| couponChannelId: "" + that.data.couponChannelId, | |||||
| couponId: "" + that.data.couponId, | |||||
| formId: "" + that.data.formId, | |||||
| press: true | |||||
| } | |||||
| } else if (discount == 'discount1') { | |||||
| var data = { | |||||
| couponChannelId: "" + that.data.couponChannelId, | |||||
| couponId: "" + that.data.couponId, | |||||
| formId: "" + that.data.formId, | |||||
| press: false | |||||
| } | |||||
| } else if (that.data.couponChannelId == null) { | |||||
| var data = { | |||||
| couponId: "" + that.data.couponId, | |||||
| formId: "" + that.data.formId, | |||||
| }; | |||||
| } else { | |||||
| var data = { | |||||
| couponChannelId: "" + that.data.couponChannelId, | |||||
| couponId: "" + that.data.couponId, | |||||
| formId: "" + that.data.formId, | |||||
| } | |||||
| } | |||||
| console.log(data, "data") | |||||
| let url = "" | |||||
| let tempObj; | |||||
| let tempArr = [] | |||||
| if (that.data.data.type == 12) { | |||||
| url = config.api.couponPackageSave | |||||
| tempObj = { | |||||
| signleOrder: { | |||||
| couponChannelId: "" + that.data.couponChannelId, | |||||
| couponId: "" + that.data.couponId, | |||||
| formId: "" + that.data.formId, | |||||
| }, | |||||
| count: "1" | |||||
| } | |||||
| tempArr.push(tempObj) | |||||
| } else { | |||||
| url = config.api.orderSave | |||||
| } | |||||
| /** | |||||
| * orderSave 下单 | |||||
| */ | |||||
| Http.post({ | |||||
| url: url, | |||||
| data: that.data.data.type == 12 ? JSON.stringify(tempArr) : data | |||||
| }).then(res => { | |||||
| if (discount != 'discount') { | |||||
| if (typeof (res) != "undefined") { | |||||
| let orderId = "" + res.data.mainOrderId; | |||||
| that.setData({ | |||||
| orderId: orderId, | |||||
| composeOrderType: res.data.composeOrderType | |||||
| }); | |||||
| if (res.data.payment > 0) { | |||||
| // 支付金额不为0 | |||||
| if (tt.canIUse('createOrder')) { | |||||
| Http.post({ | |||||
| url: config.api.payOrderCreate_2, | |||||
| data: { | |||||
| orderId: orderId, | |||||
| composeOrderType: res.data.composeOrderType | |||||
| } | |||||
| }).then(res => { | |||||
| console.log(res,"789789"); | |||||
| let tempCallbackData = { | |||||
| composeOrderId:res.data.outOrderNo | |||||
| } | |||||
| // tempCallbackData[that.data.data.couponChannel.ttSpuId] = that.data.data.couponChannel.id | |||||
| let options = { | |||||
| callbackData: tempCallbackData, | |||||
| goodsList: res.data.goodsList, | |||||
| payment: res.data.payment, | |||||
| success: res => { | |||||
| tt.hideLoading(); | |||||
| that.setData({ | |||||
| showbutton: false, | |||||
| }) | |||||
| const { orderId, outOrderNo } = res; | |||||
| that.setData({ orderId, outOrderNo }); | |||||
| that.payOrderUpdate(outOrderNo, outOrderNo, 1, '', '', that, ''); | |||||
| }, | |||||
| fail: res => { | |||||
| const { orderId, outOrderNo, errNo, errMsg, errLogId } = res; | |||||
| if (errLogId) { | |||||
| tt.hideLoading(); | |||||
| that.setData({ | |||||
| showbutton: false, | |||||
| }) | |||||
| console.log('预下单失败', errNo, errMsg, errLogId); | |||||
| let tempErrmsg = errMsg.split('开发者拒绝交易:'); | |||||
| tt.showToast({ | |||||
| title: tempErrmsg[tempErrmsg.length - 1], | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } | |||||
| if (orderId || outOrderNo) { | |||||
| tt.hideLoading(); | |||||
| that.setData({ | |||||
| showbutton: false, | |||||
| }) | |||||
| console.log('支付失败', errNo, errMsg, orderId, outOrderNo); | |||||
| console.log(that.payOrderUpdate, "payOrderUpdate"); | |||||
| tt.showToast({ | |||||
| title: "取消支付", | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| that.payOrderUpdate(outOrderNo, outOrderNo, 2, '', 'fail') | |||||
| } | |||||
| }, | |||||
| } | |||||
| console.log(options, "options"); | |||||
| tt.createOrder(options) | |||||
| }) | |||||
| } else {//不支持2.0支付 | |||||
| /** | |||||
| * 支付订单创建 | |||||
| */ | |||||
| tt.showToast({ | |||||
| title: '请升级抖音', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| return | |||||
| Http.post({ | |||||
| url: config.api.payOrderCreate, | |||||
| data: { | |||||
| orderId: orderId, | |||||
| composeOrderType: res.data.composeOrderType | |||||
| } | |||||
| }).then(res => { | |||||
| var payOrderId = "" + res.data.outOrderNo; | |||||
| tt.hideLoading(); | |||||
| tt.pay({ | |||||
| service: 5, | |||||
| orderInfo: { | |||||
| order_id: res.data.payOrderId, | |||||
| order_token: res.data.payOrderToken, | |||||
| }, | |||||
| success: res => { | |||||
| tt.showLoading({ | |||||
| title: '订单正在处理中...', | |||||
| }) | |||||
| if (res.code === 0) { | |||||
| that.payOrderUpdate(that.data.orderId, payOrderId, 1, '', '', that, that.data.composeOrderType); | |||||
| if (res.errMsg == "requestPayment:ok") { | |||||
| /** | |||||
| * 用户支付成功以后跳转到券包列表 | |||||
| */ | |||||
| if (that.data.cardType == 100) { | |||||
| tt.setStorage({ | |||||
| key: 'couponNum2', | |||||
| data: "couponNum2" | |||||
| }) | |||||
| } else if (that.data.data.type != 5 && that.data.cardType != 100) { | |||||
| tt.setStorage({ | |||||
| key: 'couponNum', | |||||
| data: "couponNum" | |||||
| }) | |||||
| } | |||||
| } | |||||
| } | |||||
| else if (res.code === 1) { | |||||
| that.setData({ | |||||
| showbutton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '支付超时', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } else if (res.code === 2) { | |||||
| that.setData({ | |||||
| showbutton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '支付失败', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } else if (res.code === 3) { | |||||
| that.setData({ | |||||
| showbutton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '支付关闭', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } else if (res.code === 4) { | |||||
| that.setData({ | |||||
| showbutton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '支付取消', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } else if (res.code === 9) { | |||||
| that.setData({ | |||||
| showbutton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '订单状态开发者自行获取', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } | |||||
| }, | |||||
| fail: res => { | |||||
| tt.hideLoading(); | |||||
| /** | |||||
| * 支付失败,需要更新订单的状态 | |||||
| */ | |||||
| that.payOrderUpdate(that.data.orderId, payOrderId, 2, '', 'fail', that, that.data.composeOrderType); | |||||
| that.setData({ | |||||
| showbutton: false | |||||
| }) | |||||
| return; | |||||
| }, | |||||
| complete: res => { } | |||||
| }); | |||||
| /// End payment -------- | |||||
| }) | |||||
| .catch(err => { | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: err.message, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| } | |||||
| } else { | |||||
| // 免费券 | |||||
| that.payOrderUpdate(orderId, "0", 1, '', 'free', that, that.data.composeOrderType); | |||||
| if (that.data.cardType == 100) { | |||||
| tt.setStorage({ | |||||
| key: 'couponNum2', | |||||
| data: "couponNum2" | |||||
| }) | |||||
| } else if (that.data.data.type != "5" && that.data.cardType != 100) { | |||||
| tt.setStorage({ | |||||
| key: 'couponNum', | |||||
| data: "couponNum" | |||||
| }) | |||||
| } | |||||
| } | |||||
| } | |||||
| } else { | |||||
| if (res) { | |||||
| tt.navigateTo({ | |||||
| url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${res.data.mainOrderId}&composeOrderType=${res.data.composeOrderType}`, | |||||
| }) | |||||
| } | |||||
| } | |||||
| }).catch(err => { | |||||
| tt.hideLoading(); | |||||
| that.setData({ | |||||
| showbutton: false, | |||||
| }) | |||||
| if (err.code == 3012) { | |||||
| that.getUnPaidOrder(that.data.couponId); | |||||
| } else { | |||||
| tt.showToast({ | |||||
| title: err.message ? err.message : err.data, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| success(res) { | |||||
| console.log(res); | |||||
| }, | |||||
| fail(res) { | |||||
| console.log("showToast 调用失败", res); | |||||
| }, | |||||
| }); | |||||
| } | |||||
| }) | |||||
| // } else { | |||||
| // //有价券 | |||||
| // console.log(tt.canIUse('createOrder'), "是否支持2.0js-api"); | |||||
| // if (tt.canIUse('createOrder')) { | |||||
| // //支持 支付2.0 js-api | |||||
| // let tempCallbackData = {} | |||||
| // tempCallbackData[that.data.data.couponChannel.ttSpuId] = that.data.data.couponChannel.id | |||||
| // let options = { | |||||
| // callbackData: tempCallbackData, | |||||
| // goodsList: [ | |||||
| // { | |||||
| // quantity: 1, // 购买数量 必填 | |||||
| // price: that.data.priceAndStockObj.salePrice, // 商品价格 必填 | |||||
| // goodsName: that.data.data.title, // 商品名称 必填 | |||||
| // goodsPhoto: that.data.data.coverImg, // 商品图片链接 必填 | |||||
| // goodsId: that.data.data.couponChannel.ttSpuId, // 商品ID 必填 | |||||
| // goodsType: 1, // 商品类型 必填 | |||||
| // goodsLabels: ['过期退', '随时退', '免预约'], // 商品标签 非必填 | |||||
| // dateRule: '', // 使用规则 非必填 | |||||
| // }, | |||||
| // ], | |||||
| // payment: { | |||||
| // totalAmount: that.data.priceAndStockObj.salePrice, // 订单总价 必填 | |||||
| // }, | |||||
| // success: res => { | |||||
| // tt.hideLoading(); | |||||
| // that.setData({ | |||||
| // showbutton: false, | |||||
| // }) | |||||
| // const { orderId, outOrderNo } = res; | |||||
| // that.setData({ orderId, outOrderNo }); | |||||
| // that.payOrderUpdate(outOrderNo, outOrderNo, 1, '', '', that, ''); | |||||
| // }, | |||||
| // fail: res => { | |||||
| // const { orderId, outOrderNo, errNo, errMsg, errLogId } = res; | |||||
| // if (errLogId) { | |||||
| // tt.hideLoading(); | |||||
| // that.setData({ | |||||
| // showbutton: false, | |||||
| // }) | |||||
| // console.log('预下单失败', errNo, errMsg, errLogId); | |||||
| // let tempErrmsg = errMsg.split('开发者拒绝交易:'); | |||||
| // tt.showToast({ | |||||
| // title: tempErrmsg[tempErrmsg.length - 1], | |||||
| // icon: 'none', | |||||
| // duration: 2000, | |||||
| // mask: false | |||||
| // }); | |||||
| // } | |||||
| // if (orderId || outOrderNo) { | |||||
| // tt.hideLoading(); | |||||
| // that.setData({ | |||||
| // showbutton: false, | |||||
| // }) | |||||
| // console.log('支付失败', errNo, errMsg, orderId, outOrderNo); | |||||
| // console.log(that.payOrderUpdate, "payOrderUpdate"); | |||||
| // tt.showToast({ | |||||
| // title: "取消支付", | |||||
| // icon: 'none', | |||||
| // duration: 2000, | |||||
| // mask: false | |||||
| // }); | |||||
| // that.payOrderUpdate(outOrderNo, outOrderNo, 2, '', 'fail') | |||||
| // } | |||||
| // }, | |||||
| // } | |||||
| // console.log(options, "options"); | |||||
| // tt.createOrder(options) | |||||
| // } else { | |||||
| // //不支持 支付2.0 js -api | |||||
| // } | |||||
| // } | |||||
| }).catch(err => { | |||||
| tt.hideLoading() | |||||
| that.setData({ | |||||
| showbutton: false, | |||||
| }) | |||||
| if (err.code == 2011) { | |||||
| tt.showToast({ | |||||
| title: "商户信息没找到", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 2013) { | |||||
| tt.showToast({ | |||||
| title: "商户信息禁用", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 3000) { | |||||
| tt.showToast({ | |||||
| title: "库存不足", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 3001) { | |||||
| tt.showToast({ | |||||
| title: "您已超过限购", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 3002) { | |||||
| tt.showToast({ | |||||
| title: "订单失败", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 3003) { | |||||
| tt.showToast({ | |||||
| title: "订单不存在", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 3004) { | |||||
| tt.showToast({ | |||||
| title: "订单不存在", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 4003) { | |||||
| tt.showToast({ | |||||
| title: "卡券已作废", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 3012) { | |||||
| that.getUnPaidOrder(that.data.couponId); | |||||
| } else if (err.code == 11005) { | |||||
| /** | |||||
| * 将值传到用户手机号授权的页面 | |||||
| * | |||||
| */ | |||||
| tt.navigateTo({ | |||||
| url: `/pages/getPhone/getPhone?couponChannelId=${that.data.couponChannelId}&path=qr` | |||||
| }); | |||||
| } else if (err.code == 11006) { | |||||
| // 用户手机已加密 | |||||
| tt.navigateTo({ | |||||
| url: `/pages/getPhone/getPhone?couponChannelId=${that.data.couponChannelId}&path=qr` | |||||
| }); | |||||
| } else { | |||||
| tt.showToast({ | |||||
| title: err.message, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } | |||||
| }) | |||||
| }).catch(err => { | |||||
| tt.hideLoading() | |||||
| that.setData({ | |||||
| showbutton: false, | |||||
| }) | |||||
| console.log(err) | |||||
| if (err.code == 11004) { | |||||
| tt.navigateTo({ | |||||
| url: `/pages/getuserinfo/getuserinfo?fromflag=confirmation&confirmationFlag=${that.data.couponChannelId}`, | |||||
| }) | |||||
| } else { | |||||
| tt.showToast({ | |||||
| title: err.message, | |||||
| icon: "none", | |||||
| duration: 2500 | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| }) | |||||
| @@ -0,0 +1,12 @@ | |||||
| { | |||||
| "usingComponents": { | |||||
| "navbar": "../../../components/navbar/navbar", | |||||
| "store": "../../../components/store/index", | |||||
| "c-coupons": "../../../components/coupons/index", | |||||
| "phoen":"../../../components/getPhoen/getPhoen" | |||||
| }, | |||||
| "navigationBarTitleText": "确认订单", | |||||
| "backgroundColor":"#f4f4f4", | |||||
| "navigationBarBackgroundColor": "#f4f4f4", | |||||
| "navigationBarTextStyle": "black" | |||||
| } | |||||
| @@ -0,0 +1,23 @@ | |||||
| <view class="commodityBox"> | |||||
| <view class="commodityImgBox"> | |||||
| <image class="commodityImg" src="{{data.coverImg}}"></image> | |||||
| </view> | |||||
| <view class="contentBox"> | |||||
| <view class="topBox"> | |||||
| <view class="title">{{data.title}}</view> | |||||
| <view class="unit">{{data.type==50?priceAndStockObj.creditPrice+'积分':'¥'+priceAndStockObj.salePrice/100}}</view> | |||||
| </view> | |||||
| <view class="subhead"> {{data.subTitle}}</view> | |||||
| </view> | |||||
| <view class="app-border-topX"> | |||||
| <view class="actually"> 实付 </view> | |||||
| <view class="payZ">{{data.type!=50?'¥':''}}</view> | |||||
| <view class="price">{{data.type==50?priceAndStockObj.creditPrice+'积分':priceAndStockObj.salePrice/100}}</view> | |||||
| <view class="buyX" bindtap="orderFunc">{{data.type==50?'立即换购':'提交订单'}}</view> | |||||
| </view> | |||||
| </view> | |||||
| <view class="go" bindtap="goInstructions"> | |||||
| <view class="goTitle">使用须知</view> | |||||
| <image class="goImg" src="../../../assets/itemImg/chevron.png" ></image> | |||||
| </view> | |||||
| @@ -0,0 +1,113 @@ | |||||
| .commodityBox{ | |||||
| background-color: #fff; | |||||
| width: 96%; | |||||
| border-radius: 12rpx; | |||||
| overflow: hidden; | |||||
| margin: 10rpx auto; | |||||
| } | |||||
| .commodityImgBox{ | |||||
| width: 160rpx; | |||||
| height: 160rpx; | |||||
| overflow: hidden; | |||||
| float: left; | |||||
| margin: 20rpx; | |||||
| border-radius: 8rpx; | |||||
| } | |||||
| .commodityImg{ | |||||
| width: 100%; | |||||
| height: 100%; | |||||
| } | |||||
| .contentBox{ | |||||
| width: 500rpx; | |||||
| float: left; | |||||
| height: 100rpx; | |||||
| margin-top: 20rpx; | |||||
| } | |||||
| .topBox{ | |||||
| overflow: hidden; | |||||
| } | |||||
| .title{ | |||||
| height: 90rpx; | |||||
| font-size: 32rpx; | |||||
| width: 400rpx; | |||||
| float: left; | |||||
| text-overflow: ellipsis; | |||||
| display: -webkit-box; | |||||
| -webkit-box-orient: vertical; | |||||
| -webkit-line-clamp: 2; /* 这里是超出几行省略 */ | |||||
| overflow: hidden; | |||||
| } | |||||
| .unit{ | |||||
| float: right; | |||||
| font-size: 30rpx; | |||||
| } | |||||
| .subhead{ | |||||
| margin-top: 4rpx; | |||||
| color: #a6a6a6; | |||||
| font-size: 24rpx; | |||||
| } | |||||
| .app-border-topX{ | |||||
| width: 100%; | |||||
| height: 140rpx; | |||||
| background-color: #fff; | |||||
| overflow: hidden; | |||||
| position: fixed; | |||||
| left: 0; | |||||
| bottom: 0; | |||||
| } | |||||
| .actually{ | |||||
| margin-left: 10%; | |||||
| font-size: 28rpx; | |||||
| color: #a6a6a6; | |||||
| line-height: 140rpx; | |||||
| float: left; | |||||
| } | |||||
| .payZ{ | |||||
| margin-left: 6rpx; | |||||
| font-size: 24rpx; | |||||
| color: #d5af67; | |||||
| line-height: 144rpx; | |||||
| float: left; | |||||
| } | |||||
| .price{ | |||||
| font-size: 30rpx; | |||||
| color: #d5af67; | |||||
| line-height: 140rpx; | |||||
| float: left; | |||||
| } | |||||
| .buyX{ | |||||
| float: right; | |||||
| background: linear-gradient(270deg, #DDAB5A, #B8832D); | |||||
| /* width: 80rpx; */ | |||||
| color: #fff; | |||||
| font-size: 30rpx; | |||||
| border-radius: 60rpx; | |||||
| margin: 30rpx 40rpx; | |||||
| padding: 20rpx 40rpx; | |||||
| } | |||||
| .go{ | |||||
| height: 120rpx; | |||||
| width: 96%; | |||||
| border-radius: 6px; | |||||
| overflow: hidden; | |||||
| margin: 5px auto; | |||||
| background-color: #fff; | |||||
| } | |||||
| .goTitle{ | |||||
| float: left; | |||||
| line-height: 120rpx; | |||||
| font-size: 30rpx; | |||||
| /* color: #a6a6a6; */ | |||||
| margin-left: 20rpx; | |||||
| } | |||||
| .goImg{ | |||||
| float: right; | |||||
| width: 20rpx; | |||||
| height: 40rpx; | |||||
| margin: 40rpx 20rpx; | |||||
| } | |||||
| @@ -6,7 +6,7 @@ const util = require("../../../utils/util"); | |||||
| const imgurl = require("../../../utils/imgurl"); | const imgurl = require("../../../utils/imgurl"); | ||||
| Page({ | Page({ | ||||
| data: { | data: { | ||||
| priceAndStockObj:{},//存放价格和库存 | |||||
| priceAndStockObj: {},//存放价格和库存 | |||||
| isGetUser: true,//判断是否授权抖音 | isGetUser: true,//判断是否授权抖音 | ||||
| mouldType: 0, | mouldType: 0, | ||||
| navigationBarHeight, | navigationBarHeight, | ||||
| @@ -95,7 +95,7 @@ Page({ | |||||
| page: 1,//查询商户优惠券page | page: 1,//查询商户优惠券page | ||||
| idList: [], | idList: [], | ||||
| showBox: false,//手机号授权框 | showBox: false,//手机号授权框 | ||||
| spuIdObj:{} | |||||
| spuIdObj: {} | |||||
| }, | }, | ||||
| /** | /** | ||||
| @@ -226,7 +226,7 @@ Page({ | |||||
| if (err.code == 11004) { | if (err.code == 11004) { | ||||
| // 用户昵称未授权 | // 用户昵称未授权 | ||||
| tt.redirectTo({ | tt.redirectTo({ | ||||
| url: `/pages/getuserinfo/index?couponChannelId=${that.data.data.id}&fromflag=poster` | |||||
| url: `/pages/getuserinfo/getuserinfo?couponChannelId=${that.data.data.id}&fromflag=poster` | |||||
| }) | }) | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -416,97 +416,12 @@ Page({ | |||||
| }, | }, | ||||
| gotopay: function (e) { | gotopay: function (e) { | ||||
| let that = this; | |||||
| app.globalData.previewFlag = true | |||||
| /* 判断是否授权*/ | |||||
| Http.get({ | |||||
| url: config.api.checkUserStatus, | |||||
| data: { | |||||
| token: app.globalData.token | |||||
| } | |||||
| }).then(res => { | |||||
| Http.get({ | |||||
| url: config.api.checkPhoneStatus, | |||||
| }).then(res => { | |||||
| tt.showLoading(); | |||||
| if (e.currentTarget.dataset.type == 51 || e.currentTarget.dataset.type == 50) { | |||||
| tt.navigateTo({ | |||||
| url: '/pages/integralmall/payIntegcoupondetail/index?couponChannelId=' + that.data.couponChannelId + '&couponId=' + that.data.couponId, | |||||
| }) | |||||
| } else { | |||||
| let formId = e.detail.formId ? e.detail.formId : ""; | |||||
| var discount = e.currentTarget.dataset.discount; | |||||
| that.setData({ | |||||
| queueData: null, | |||||
| showbutton: true, | |||||
| formId: formId | |||||
| }) | |||||
| Http.get({ | |||||
| url: config.api.getQuestion, | |||||
| data: { | |||||
| couponType: JSON.stringify(that.data.data.type) | |||||
| } | |||||
| }).then(res => { | |||||
| tt.hideLoading(); | |||||
| if (res.data == undefined) { | |||||
| // 立即购买 | |||||
| that.orderFunc(discount); | |||||
| that.setData({ | |||||
| flag: false | |||||
| }) | |||||
| } else if (res.data) { | |||||
| var animation = tt.createAnimation({}); | |||||
| animation.translate((that.data.widthScreen - that.data.widthScreen), 0).scale(1).opacity(1).step({ | |||||
| duration: 500 | |||||
| }) | |||||
| that.setData({ | |||||
| queueData: animation.export(), | |||||
| zIndex: 9, | |||||
| opacity: 1, | |||||
| display: "block", | |||||
| questionnaire: JSON.parse(res.data.content), | |||||
| questionId: res.data.id | |||||
| }); | |||||
| } | |||||
| }).catch(err => { | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: err.message, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| } | |||||
| }).catch(err => { | |||||
| app.globalData.type = '' | |||||
| app.globalData.skipUrl="" | |||||
| app.globalData.skip = 'navigateBack' | |||||
| if(app.globalData.ifCongPh==1){ | |||||
| tt.navigateTo({ | |||||
| url: '/pages/getPhone/getPhone?skipUrl=1', | |||||
| }); | |||||
| }else{ | |||||
| this.setData({ | |||||
| showBox: true | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }).catch(err => { | |||||
| app.globalData.type = '' | |||||
| if (err.code == 11004) {//未授权抖音 | |||||
| tt.navigateTo({ | |||||
| url: `/pages/getuserinfo/getuserinfo?fromflag=coupondetail&couponChannelIdflag=${this.data.couponChannelId}`, | |||||
| }); | |||||
| } | |||||
| tt.navigateTo({ | |||||
| url: `/pages/coupon/confirmation/confirmation?couponChannelId=${this.data.couponChannelId}`, | |||||
| }) | }) | ||||
| return | |||||
| }, | }, | ||||
| setIntervalTime(end_time) { | setIntervalTime(end_time) { | ||||
| let that = this; | let that = this; | ||||
| var EndTime = end_time; | var EndTime = end_time; | ||||
| @@ -568,7 +483,8 @@ Page({ | |||||
| * 获取用户信息 | * 获取用户信息 | ||||
| */ | */ | ||||
| onLoad(options) { | onLoad(options) { | ||||
| console.log(options); | |||||
| this.setData({ | this.setData({ | ||||
| mouldType: app.globalData.mouldType, | mouldType: app.globalData.mouldType, | ||||
| }) | }) | ||||
| @@ -583,6 +499,7 @@ Page({ | |||||
| onshow: false | onshow: false | ||||
| }) | }) | ||||
| if (options && (options.couponChannelId || options.couponIds)) { | if (options && (options.couponChannelId || options.couponIds)) { | ||||
| if (options.couponIds) { | if (options.couponIds) { | ||||
| this.setData({ | this.setData({ | ||||
| couponIds: options.couponIds | couponIds: options.couponIds | ||||
| @@ -632,17 +549,17 @@ Page({ | |||||
| } | } | ||||
| }) | }) | ||||
| }, | }, | ||||
| getSupId(id){ | |||||
| getSupId(id) { | |||||
| Http.get({ | Http.get({ | ||||
| url:config.api.getSpuid, | |||||
| data:{id:id} | |||||
| }).then(res=>{ | |||||
| if(res.data){ | |||||
| url: config.api.getSpuid, | |||||
| data: { id: id } | |||||
| }).then(res => { | |||||
| if (res.data) { | |||||
| this.setData({ | this.setData({ | ||||
| spuIdObj:res.data | |||||
| spuIdObj: res.data | |||||
| }) | }) | ||||
| } | } | ||||
| }).catch(err=>{ | |||||
| }).catch(err => { | |||||
| // tt.showToast({ | // tt.showToast({ | ||||
| // title: err.message, | // title: err.message, | ||||
| // icon: 'none', | // icon: 'none', | ||||
| @@ -652,27 +569,27 @@ Page({ | |||||
| }) | }) | ||||
| }, | }, | ||||
| getCouponPriceAndStock(couponChannelId){//获取券价格与库存 | |||||
| getCouponPriceAndStock(couponChannelId) {//获取券价格与库存 | |||||
| Http.get({ | Http.get({ | ||||
| url:config.api.couponPriceAndStock, | |||||
| data:{ | |||||
| url: config.api.couponPriceAndStock, | |||||
| data: { | |||||
| couponChannelId | couponChannelId | ||||
| } | } | ||||
| }).then(res=>{ | |||||
| }).then(res => { | |||||
| let tempBoj = JSON.parse(res.data) | let tempBoj = JSON.parse(res.data) | ||||
| console.log(tempBoj,"$"); | |||||
| console.log(tempBoj, "$"); | |||||
| this.setData({ | this.setData({ | ||||
| priceAndStockObj:tempBoj | |||||
| priceAndStockObj: tempBoj | |||||
| }) | }) | ||||
| }) | }) | ||||
| }, | }, | ||||
| getCouponMerchant(couponChannelId){//获取适用门店 | |||||
| getCouponMerchant(couponChannelId) {//获取适用门店 | |||||
| Http.get({ | Http.get({ | ||||
| url:config.api.couponMerchant, | |||||
| data:{ | |||||
| couponChannelId:couponChannelId | |||||
| url: config.api.couponMerchant, | |||||
| data: { | |||||
| couponChannelId: couponChannelId | |||||
| } | } | ||||
| }).then(res=>{ | |||||
| }).then(res => { | |||||
| if (res.data && res.data.length) { | if (res.data && res.data.length) { | ||||
| let merchantVoList = res.data | let merchantVoList = res.data | ||||
| let idList = [] | let idList = [] | ||||
| @@ -695,6 +612,7 @@ Page({ | |||||
| let data = {}; | let data = {}; | ||||
| that.getCouponMerchant(couponChannelId);//获取适用门店 | that.getCouponMerchant(couponChannelId);//获取适用门店 | ||||
| that.getCouponPriceAndStock(couponChannelId);//获取券价格和库存 | that.getCouponPriceAndStock(couponChannelId);//获取券价格和库存 | ||||
| if (that.data.couponIds) { | if (that.data.couponIds) { | ||||
| data.couponId = couponChannelId | data.couponId = couponChannelId | ||||
| } else { | } else { | ||||
| @@ -755,9 +673,18 @@ Page({ | |||||
| that.setData({ | that.setData({ | ||||
| barTitle: res.data.title | barTitle: res.data.title | ||||
| }) | }) | ||||
| tt.setNavigationBarTitle({ | |||||
| title: res.data.title, | |||||
| success() { | |||||
| console.log("setNavigationBarTitle 调用成功"); | |||||
| }, | |||||
| fail(res) { | |||||
| console.log(`setNavigationBarTitle 调用失败:`, res.errMsg); | |||||
| }, | |||||
| }); | |||||
| var EndTime = res.data.validStartDate; | var EndTime = res.data.validStartDate; | ||||
| var NowTime = new Date().getTime(); | var NowTime = new Date().getTime(); | ||||
| /** | /** | ||||
| * activityStatus==0 活动未开始 | * activityStatus==0 活动未开始 | ||||
| * activityStatus==1 活动已开始 | * activityStatus==1 活动已开始 | ||||
| @@ -829,14 +756,76 @@ Page({ | |||||
| } | } | ||||
| } | } | ||||
| if(res.data.itemGroup){ | |||||
| if (res.data.itemGroup) { | |||||
| let tempObj = this.data.data | let tempObj = this.data.data | ||||
| tempObj.itemGroup = JSON.parse(tempObj.itemGroup) | tempObj.itemGroup = JSON.parse(tempObj.itemGroup) | ||||
| this.setData({ | this.setData({ | ||||
| data:tempObj | |||||
| data: tempObj | |||||
| }) | |||||
| console.log(this.data.data, "data"); | |||||
| } | |||||
| if (res.data.productAttrs && res.data.skuAttrs) { | |||||
| let tempObj = this.data.data | |||||
| tempObj.productAttrs = JSON.parse(tempObj.productAttrs) | |||||
| tempObj.skuAttrs = JSON.parse(tempObj.skuAttrs) | |||||
| tempObj.productAttrs.map(item => { | |||||
| if (item.key == "appointment") { | |||||
| let tempAppoinObj = JSON.parse(item.data) | |||||
| if (tempAppoinObj.need_appointment) { | |||||
| let subscribeSing = ""; | |||||
| if (tempAppoinObj.ahead_time_type == 1) { | |||||
| subscribeSing = `需提前${tempAppoinObj.ahead_day_num}天致电商家预约` | |||||
| } else if (tempAppoinObj.ahead_time_type == 2) { | |||||
| subscribeSing = `需提前${tempAppoinObj.ahead_hour_num}小时致电商家预约` | |||||
| } else if (tempAppoinObj.ahead_time_type == 3) { | |||||
| subscribeSing = `需提前${tempAppoinObj.ahead_minute_num}分钟致电商家预约` | |||||
| } | |||||
| tempObj.subscribeSing = subscribeSing | |||||
| } | |||||
| } | |||||
| if (item.key == "Notification") { | |||||
| if (item.data != '') { | |||||
| tempObj.curLsit = JSON.parse(item.data) | |||||
| } | |||||
| } | |||||
| if (item.key == "bring_out_meal") { | |||||
| tempObj.besides = item.data | |||||
| } | |||||
| if (item.key == "free_pack") { | |||||
| tempObj.pack = item.data | |||||
| } | |||||
| if (item.key == "superimposed_discounts") { | |||||
| tempObj.superimposed_discounts = item.data | |||||
| } | |||||
| if (item.key == "private_room") { | |||||
| tempObj.private_room = item.data | |||||
| } | |||||
| if (item.key == "rec_person_num_max") { | |||||
| tempObj.rec_person_num_max = item.data | |||||
| } | |||||
| if (item.key == 'Description') { | |||||
| tempObj.Description = JSON.parse(item.data) | |||||
| } | |||||
| if (item.key == "can_no_use_date") { | |||||
| tempObj.can_no_use_date = JSON.parse(item.data) | |||||
| } | |||||
| }) | |||||
| tempObj.skuAttrs.map(item => { | |||||
| if (item.key == "commodity"&&item.data) { | |||||
| tempObj.itemGroup = JSON.parse(item.data) | |||||
| } | |||||
| }) | |||||
| this.setData({ | |||||
| data: tempObj | |||||
| }) | }) | ||||
| console.log(this.data.data,"data"); | |||||
| console.log(this.data.data, "data"); | |||||
| } | } | ||||
| }).catch(err => { | }).catch(err => { | ||||
| tt.showToast({ | tt.showToast({ | ||||
| @@ -931,325 +920,19 @@ Page({ | |||||
| }); | }); | ||||
| } | } | ||||
| }) | }) | ||||
| }, | |||||
| }, | |||||
| // 券包支付 | // 券包支付 | ||||
| /** | /** | ||||
| * 发起支付 | * 发起支付 | ||||
| */ | */ | ||||
| orderFunc(discount) { | orderFunc(discount) { | ||||
| let that = this; | |||||
| Http.get({ | |||||
| url: config.api.checkUserStatus, | |||||
| data: { | |||||
| token: app.globalData.token | |||||
| } | |||||
| }).then(res => { | |||||
| Http.get({ | |||||
| url: config.api.checkPhoneStatus, | |||||
| data: {} | |||||
| }).then(res => { | |||||
| // 发起砍价 | |||||
| if (discount == 'discount') { | |||||
| var data = { | |||||
| couponChannelId: "" + that.data.couponChannelId, | |||||
| couponId: "" + that.data.couponId, | |||||
| formId: "" + that.data.formId, | |||||
| press: true | |||||
| } | |||||
| } else if (discount == 'discount1') { | |||||
| var data = { | |||||
| couponChannelId: "" + that.data.couponChannelId, | |||||
| couponId: "" + that.data.couponId, | |||||
| formId: "" + that.data.formId, | |||||
| press: false | |||||
| } | |||||
| } else if (that.data.couponChannelId == null) { | |||||
| var data = { | |||||
| couponId: "" + that.data.couponId, | |||||
| formId: "" + that.data.formId, | |||||
| }; | |||||
| } else { | |||||
| var data = { | |||||
| couponChannelId: "" + that.data.couponChannelId, | |||||
| couponId: "" + that.data.couponId, | |||||
| formId: "" + that.data.formId, | |||||
| } | |||||
| } | |||||
| console.log(data, "data") | |||||
| let url = "" | |||||
| let tempObj; | |||||
| let tempArr = [] | |||||
| if (that.data.data.type == 12) { | |||||
| url = config.api.couponPackageSave | |||||
| tempObj = { | |||||
| signleOrder: { | |||||
| couponChannelId: "" + that.data.couponChannelId, | |||||
| couponId: "" + that.data.couponId, | |||||
| formId: "" + that.data.formId, | |||||
| }, | |||||
| count: "1" | |||||
| } | |||||
| tempArr.push(tempObj) | |||||
| } else { | |||||
| url = config.api.orderSave | |||||
| } | |||||
| /** | |||||
| * orderSave 下单 | |||||
| */ | |||||
| return Http.post({ | |||||
| url: url, | |||||
| data: that.data.data.type == 12 ? JSON.stringify(tempArr) : data | |||||
| }); | |||||
| }).catch(err => { | |||||
| tt.hideLoading() | |||||
| that.setData({ | |||||
| showbutton: false, | |||||
| showbutton1: false | |||||
| }) | |||||
| if (err.code == 2011) { | |||||
| tt.showToast({ | |||||
| title: "商户信息没找到", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 2013) { | |||||
| tt.showToast({ | |||||
| title: "商户信息禁用", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 3000) { | |||||
| tt.showToast({ | |||||
| title: "库存不足", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 3001) { | |||||
| tt.showToast({ | |||||
| title: "您已超过限购", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 3002) { | |||||
| tt.showToast({ | |||||
| title: "订单失败", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 3003) { | |||||
| tt.showToast({ | |||||
| title: "订单不存在", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 3004) { | |||||
| tt.showToast({ | |||||
| title: "订单不存在", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 4003) { | |||||
| tt.showToast({ | |||||
| title: "卡券已作废", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 3012) { | |||||
| that.getUnPaidOrder(that.data.couponId); | |||||
| } else if (err.code == 11005) { | |||||
| /** | |||||
| * 将值传到用户手机号授权的页面 | |||||
| * | |||||
| */ | |||||
| tt.redirectTo({ | |||||
| url: "/pages/getphoneInfo/index?couponChannelId=" + | |||||
| that.data.couponChannelId | |||||
| }); | |||||
| } else if (err.code == 11006) { | |||||
| // 用户手机已加密 | |||||
| tt.redirectTo({ | |||||
| url: "/pages/phoneinput/phoneinput?couponChannelId=" + | |||||
| that.data.couponChannelId | |||||
| }); | |||||
| } else { | |||||
| tt.showToast({ | |||||
| title: err.message, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } | |||||
| }).then(res => { | |||||
| if (discount != 'discount') { | |||||
| if (typeof (res) != "undefined") { | |||||
| let orderId = "" + res.data.mainOrderId; | |||||
| that.setData({ | |||||
| orderId: orderId, | |||||
| composeOrderType: res.data.composeOrderType | |||||
| }); | |||||
| if (res.data.payment > 0) { | |||||
| // 支付金额不为0 | |||||
| /** | |||||
| * 支付订单创建 | |||||
| */ | |||||
| Http.post({ | |||||
| url: config.api.payOrderCreate, | |||||
| data: { | |||||
| orderId: orderId, | |||||
| composeOrderType: res.data.composeOrderType | |||||
| } | |||||
| }).then(res => { | |||||
| var payOrderId = "" + res.data.outOrderNo; | |||||
| tt.hideLoading(); | |||||
| tt.pay({ | |||||
| service: 5, | |||||
| orderInfo: { | |||||
| order_id: res.data.orderId, | |||||
| order_token: res.data.token, | |||||
| }, | |||||
| success: res => { | |||||
| tt.showLoading({ | |||||
| title: '订单正在处理中...', | |||||
| }) | |||||
| if (res.code === 0) { | |||||
| that.payOrderUpdate(that.data.orderId, payOrderId, 1, '', '', that, that.data.composeOrderType); | |||||
| if (res.errMsg == "requestPayment:ok") { | |||||
| /** | |||||
| * 用户支付成功以后跳转到券包列表 | |||||
| */ | |||||
| if (that.data.cardType == 100) { | |||||
| tt.setStorage({ | |||||
| key: 'couponNum2', | |||||
| data: "couponNum2" | |||||
| }) | |||||
| } else if (that.data.data.type != 5 && that.data.cardType != 100) { | |||||
| tt.setStorage({ | |||||
| key: 'couponNum', | |||||
| data: "couponNum" | |||||
| }) | |||||
| } | |||||
| } | |||||
| } | |||||
| else if (res.code === 1) { | |||||
| that.setData({ | |||||
| showbutton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '支付超时', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| tt.navigateTo({ | |||||
| url: `/pages/coupon/confirmation/confirmation?couponChannelId=${this.data.couponChannelId}`, | |||||
| }) | |||||
| // return | |||||
| } else if (res.code === 2) { | |||||
| that.setData({ | |||||
| showbutton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '支付失败', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } else if (res.code === 3) { | |||||
| that.setData({ | |||||
| showbutton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '支付关闭', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } else if (res.code === 4) { | |||||
| that.setData({ | |||||
| showbutton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '支付取消', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } else if (res.code === 9) { | |||||
| that.setData({ | |||||
| showbutton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '订单状态开发者自行获取', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } | |||||
| }, | |||||
| fail: res => { | |||||
| tt.hideLoading(); | |||||
| /** | |||||
| * 支付失败,需要更新订单的状态 | |||||
| */ | |||||
| that.payOrderUpdate(that.data.orderId, payOrderId, 2, '', 'fail', that, that.data.composeOrderType); | |||||
| that.setData({ | |||||
| showbutton: false | |||||
| }) | |||||
| return; | |||||
| }, | |||||
| complete: res => { } | |||||
| }); | |||||
| /// End payment -------- | |||||
| }) | |||||
| .catch(err => { | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: err.message, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| } else { | |||||
| // 免费券 | |||||
| that.payOrderUpdate(orderId, "0", 1, '', 'free', that, that.data.composeOrderType); | |||||
| if (that.data.cardType == 100) { | |||||
| tt.setStorage({ | |||||
| key: 'couponNum2', | |||||
| data: "couponNum2" | |||||
| }) | |||||
| } else if (that.data.data.type != "5" && that.data.cardType != 100) { | |||||
| tt.setStorage({ | |||||
| key: 'couponNum', | |||||
| data: "couponNum" | |||||
| }) | |||||
| } | |||||
| } | |||||
| } | |||||
| } else { | |||||
| if (res) { | |||||
| tt.navigateTo({ | |||||
| url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${res.data.mainOrderId}&composeOrderType=${res.data.composeOrderType}`, | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| }).catch(err => { | |||||
| console.log(err) | |||||
| if (err.code == 11004) { | |||||
| tt.redirectTo({ | |||||
| url: `/pages/getuserinfo/index?fromflag=coupondetail&couponChannelIdflag=${that.data.couponChannelId}`, | |||||
| }) | |||||
| } else { | |||||
| tt.showToast({ | |||||
| title: err.message, | |||||
| icon: "none", | |||||
| duration: 2500 | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | }, | ||||
| // 获得未支付的订单 | // 获得未支付的订单 | ||||
| getUnPaidOrder(couponId) { | getUnPaidOrder(couponId) { | ||||
| @@ -1318,7 +1001,7 @@ Page({ | |||||
| }) | }) | ||||
| }, | }, | ||||
| onShow() { | onShow() { | ||||
| this.ifGetUser()//判断是否授权抖音 | this.ifGetUser()//判断是否授权抖音 | ||||
| this.setData({ | this.setData({ | ||||
| @@ -1384,23 +1067,23 @@ Page({ | |||||
| }, | }, | ||||
| // onShareAppMessage: function(e) { | |||||
| // console.log("onShareAppMessage", e); | |||||
| // return { | |||||
| // channel: 'video', | |||||
| // title: "测试小程序分享", | |||||
| // desc: "这是默认的分享文案,用户可以直接发送,也可以在发布器内修改", | |||||
| // extra: { | |||||
| // spu_id:"7091460633887279111" //开发者在抖音开放平台设置的商品id | |||||
| // }, | |||||
| // success: function(e) { | |||||
| // console.log("分享成功"); | |||||
| // }, | |||||
| // fail: function(e) { | |||||
| // console.log(e,"分享成功失败") | |||||
| // } | |||||
| // }; | |||||
| // }, | |||||
| // onShareAppMessage: function(e) { | |||||
| // console.log("onShareAppMessage", e); | |||||
| // return { | |||||
| // channel: 'video', | |||||
| // title: "测试小程序分享", | |||||
| // desc: "这是默认的分享文案,用户可以直接发送,也可以在发布器内修改", | |||||
| // extra: { | |||||
| // spu_id:"7091460633887279111" //开发者在抖音开放平台设置的商品id | |||||
| // }, | |||||
| // success: function(e) { | |||||
| // console.log("分享成功"); | |||||
| // }, | |||||
| // fail: function(e) { | |||||
| // console.log(e,"分享成功失败") | |||||
| // } | |||||
| // }; | |||||
| // }, | |||||
| // 下拉刷新 | // 下拉刷新 | ||||
| onPullDownRefresh: function () { | onPullDownRefresh: function () { | ||||
| @@ -7,5 +7,7 @@ | |||||
| }, | }, | ||||
| "navigationBarTitleText": "", | "navigationBarTitleText": "", | ||||
| "backgroundColor":"#f4f4f4", | "backgroundColor":"#f4f4f4", | ||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "enablePullDownRefresh": true | "enablePullDownRefresh": true | ||||
| } | } | ||||
| @@ -1,5 +1,6 @@ | |||||
| <navbar back home text="{{barTitle}}" background='#fff'></navbar> | |||||
| <view tt:if="{{showPage}}" style="margin-top:{{navigationBarHeight}} "> | |||||
| <!-- <navbar back home text="{{barTitle}}" background='#fff'></navbar> --> | |||||
| <!-- style="margin-top:{{navigationBarHeight}} " --> | |||||
| <view tt:if="{{showPage}}"> | |||||
| <!-- <view ></view> --> | <!-- <view ></view> --> | ||||
| <!-- 券的详情页面 --> | <!-- 券的详情页面 --> | ||||
| <view class='coupons'> | <view class='coupons'> | ||||
| @@ -78,57 +79,26 @@ | |||||
| <text class='throgh' tt:if="{{data.unit==0&&data.type!=50&&data.type!=51}}">{{priceAndStockObj.price/100}}元</text> | <text class='throgh' tt:if="{{data.unit==0&&data.type!=50&&data.type!=51}}">{{priceAndStockObj.price/100}}元</text> | ||||
| <text tt:if="{{data.unit==1&&data.type!=50&&data.type!=51}}">{{priceAndStockObj.price/100}}小时</text> | <text tt:if="{{data.unit==1&&data.type!=50&&data.type!=51}}">{{priceAndStockObj.price/100}}小时</text> | ||||
| <!-- <text class='rest' tt:if="{{data.autoRefund == 1}}"> | |||||
| <text class='time refound'><text class="use">过期不退款</text></text> | |||||
| </text> --> | |||||
| </view> | </view> | ||||
| <view class="fl" tt:if="{{data.type==8}}"> | <view class="fl" tt:if="{{data.type==8}}"> | ||||
| <text class="pri01">{{priceAndStockObj.salePrice/100}}</text> | <text class="pri01">{{priceAndStockObj.salePrice/100}}</text> | ||||
| <text class='presslimit' tt:if="{{data.type==8}}"><text>{{data.pressLimitNum+'人可砍至底价'}}</text></text> | <text class='presslimit' tt:if="{{data.type==8}}"><text>{{data.pressLimitNum+'人可砍至底价'}}</text></text> | ||||
| <text class='throgh'>{{priceAndStockObj.price/100}}元</text> | <text class='throgh'>{{priceAndStockObj.price/100}}元</text> | ||||
| <!-- <text class='rest' tt:if="{{data.autoRefund == 1}}"> | |||||
| <text class='time refound'><text class="use">过期不退款</text></text> | |||||
| </text> --> | |||||
| </view> | |||||
| </view> | |||||
| <view class="subTitleBox"> | |||||
| <text class="subTitle">{{data.subTitle}}</text> | |||||
| </view> | |||||
| <view class="sellBox"> {{'已售'+(priceAndStockObj.inventory-priceAndStockObj.remainInventory)+'|'+'库存'+priceAndStockObj.remainInventory}}</view> | <view class="sellBox"> {{'已售'+(priceAndStockObj.inventory-priceAndStockObj.remainInventory)+'|'+'库存'+priceAndStockObj.remainInventory}}</view> | ||||
| </view> | </view> | ||||
| <!-- <view class='rest' tt:if="{{data.validType==2}}">自领取之日起 | |||||
| <text class='time'>{{validDays}}</text>天内有效 | |||||
| <text class="use">(请在有效期内使用)</text> | |||||
| </view> | |||||
| <view class='rest' tt:if="{{data.validType==1&&data.type!=10}}"> | |||||
| <text class='time'>{{validStartDate}}至{{validEndDate}}</text> | |||||
| </view> | |||||
| <view class='rest' tt:if="{{data.type==5}}"> | |||||
| <text class='time'>当次有效</text> | |||||
| <!-- <view class="subTitleBox"> | |||||
| <text class="subTitle">{{data.subTitle}}</text> | |||||
| </view> --> | </view> --> | ||||
| <!-- <view class='rest' tt:if="{{data.type==1}}"> | |||||
| <text class='txt01'>使用条件:</text> | |||||
| <text class='time'>满{{data.usePriceStr}}元可用</text> | |||||
| </view> | |||||
| <view class='rest' tt:if="{{data.sendType!=3&&mouldType!=1}}"> | |||||
| <view class='quan'></view> | |||||
| <text class='time'>限购{{data.useLimitQuantity}}张</text> | |||||
| <text class='timess' tt:if='{{limitCondition==1}}'>(仅限新用户活动)</text> | |||||
| <text class='timess' | |||||
| tt:if='{{limitCondition==2&&(minLimit||minLimit==0)&&maxLimit}}'>({{minLimit}}-{{maxLimit}}成长值)</text> | |||||
| <text class='timess' tt:if='{{limitCondition==2&&minLimit&&!maxLimit}}'>(大于{{minLimit}}成长值)</text> | |||||
| <text class="restNum fr">剩余<text>{{data.remainInventory}}张</text></text> | |||||
| </view> --> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <!-- 适用门店 --> | <!-- 适用门店 --> | ||||
| <!-- <store merchantVoList="{{merchantVoList}}" tt:if="{{data.type!=12}}"></store> --> | |||||
| <!-- 券包子券样式 --> | |||||
| <!-- <view class="childText">购买须知</view> --> | |||||
| <view class="childBox"> | <view class="childBox"> | ||||
| <view class="childItem" tt:for="{{data.giftCouponList}}" bindtap="gochild" data-id="{{item.id}}" | <view class="childItem" tt:for="{{data.giftCouponList}}" bindtap="gochild" data-id="{{item.id}}" | ||||
| tt:key="{{index}}"> | tt:key="{{index}}"> | ||||
| @@ -138,7 +108,8 @@ | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <vieW class="groupTitleBox"> | <vieW class="groupTitleBox"> | ||||
| <view class="groupTitle" tt:if="{{data.itemGroup.length>0}}">团购详情</view> | |||||
| <view class="groupTitle" tt:if="{{data.itemGroup.length>0}}">餐饮搭配</view> | |||||
| <view class="groupTitle" tt:if="{{data.Description.length>0}}">商品描述</view> | |||||
| </vieW> | </vieW> | ||||
| <view class="groupTextBox" tt:if="{{data.itemGroup.length>0}}" tt:for="{{data.itemGroup}}"> | <view class="groupTextBox" tt:if="{{data.itemGroup.length>0}}" tt:for="{{data.itemGroup}}"> | ||||
| @@ -152,23 +123,53 @@ | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class="groupTextBox" tt:if="{{data.Description.length>0}}" tt:for="{{data.Description}}"> | |||||
| <view class="groupTitleS">{{item}}</view> | |||||
| </view> | |||||
| <!-- 适用门店 --> | <!-- 适用门店 --> | ||||
| <store merchantVoList="{{merchantVoList}}" tt:if="{{data.type!=12}}"></store> | <store merchantVoList="{{merchantVoList}}" tt:if="{{data.type!=12}}"></store> | ||||
| <view class='notes'> | <view class='notes'> | ||||
| <view class="notesH">购买须知</view> | |||||
| <view class="notesH">购买须知</view> | |||||
| <view class="timeText">有效期</view> | <view class="timeText">有效期</view> | ||||
| <view class="Hchild">{{validStartDate}}至{{validEndDate}}</view> | |||||
| <view class="Hchild">• {{validStartDate}}至{{validEndDate}}</view> | |||||
| <view class="timeText">可用时间</view> | <view class="timeText">可用时间</view> | ||||
| <view class="Hchild">•商家营业时间可用</view> | |||||
| <view class="Hchild">• 商家营业时间内到店使用</view> | |||||
| <view class="Hchild" tt:if="{{data.can_no_use_date.weekend}}">• 周末不支持使用</view> | |||||
| <view class="Hchild" tt:if="{{data.can_no_use_date.HolidaysFlag}}">• 节假日(元旦、春节、清明、劳动节、端午节、中秋节、国庆节、情人节、圣诞节)不支持使用</view> | |||||
| <view class="timeText">购买限制</view> | |||||
| <view class="Hchild">• 每个用户限购{{data.useLimitQuantity}}单</view> | |||||
| <view class="timeText">预约消费</view> | <view class="timeText">预约消费</view> | ||||
| <view class="Hchild">• 不需预约,高峰时段可能需要排队</view> | |||||
| <view class="Hchild" tt:if="{{!data.subscribeSing}}">• 无需预约,高峰时段可能等位</view> | |||||
| <view class="Hchild" tt:if="{{data.subscribeSing}}">• {{data.subscribeSing}}</view> | |||||
| <view class="timeText" tt:if="{{data.rec_person_num_max}}">适用人数</view> | |||||
| <view class="Hchild" tt:if="{{data.rec_person_num_max}}">• 该团购劵最多{{data.rec_person_num_max}}人使用</view> | |||||
| <view class="timeText">温馨提示</view> | |||||
| <view class="Hchild">• 团购券不支持配送或外卖</view> | <view class="Hchild">• 团购券不支持配送或外卖</view> | ||||
| <view class="timeText">使用规则</view> | |||||
| <view class="Hchild" tt:if="{{data.pack}}">• 该团购商品{{data.pack=='false'?'不支持':'支持'}}打包</view> | |||||
| <view class="Hchild" tt:if="{{data.besides}}">• {{data.besides=="false"?'不可以':'可以'}}外带餐食</view> | |||||
| <view class="Hchild" tt:if="{{data.superimposed_discounts}}">• {{data.superimposed_discounts=="false"?'不可以':'可以'}}享受店内其他优惠</view> | |||||
| <view class="Hchild" tt:if="{{data.private_room}}">• {{data.private_room=="false"?'不可以使用':'可以使用'}}包间</view> | |||||
| <view class="notesH">使用规则</view> | |||||
| <text tt:if="{{curHtml==''}}" class="notesText">{{data.remark}}</text> | <text tt:if="{{curHtml==''}}" class="notesText">{{data.remark}}</text> | ||||
| <view tt:if="{{curHtml!=''}}"> | <view tt:if="{{curHtml!=''}}"> | ||||
| <rich-text nodes="{{curHtml}}"></rich-text> | <rich-text nodes="{{curHtml}}"></rich-text> | ||||
| </view> | </view> | ||||
| <view tt:if="{{data.curLsit}}" tt:for="{{data.curLsit}}" tt:key="{{index}}"> | |||||
| <view class="timeText" tt:if="{{item.title!=''}}">{{item.title}}</view> | |||||
| <text class="Hchild">{{item.content}}</text> | |||||
| </view> | |||||
| </view> | </view> | ||||
| <view tt:if="{{couponList.length!=0}}" | <view tt:if="{{couponList.length!=0}}" | ||||
| @@ -190,30 +191,30 @@ | |||||
| <text class='btnTxt'>首页</text> | <text class='btnTxt'>首页</text> | ||||
| </button> | </button> | ||||
| <button bindtap="gotopay" disabled='{{showbutton}}' hover-class='active' class='buy' | <button bindtap="gotopay" disabled='{{showbutton}}' hover-class='active' class='buy' | ||||
| tt:if="{{data.type!=11&&data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100!=0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}"> | |||||
| tt:if="{{data.type!=11&&data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100!=0&&priceAndStockObj.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}"> | |||||
| <text class='txt'>{{priceAndStockObj.salePrice/100}}元</text>马上购买</button> | <text class='txt'>{{priceAndStockObj.salePrice/100}}元</text>马上购买</button> | ||||
| <button tt:if="{{data.type==11&&data.remainInventory!=0}}" bindtap="gohome" | |||||
| <button tt:if="{{data.type==11&&priceAndStockObj.remainInventory!=0}}" bindtap="gohome" | |||||
| data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="2" | data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="2" | ||||
| class="home">配送到家 | class="home">配送到家 | ||||
| </button> | </button> | ||||
| <button tt:if="{{data.type==11&&data.remainInventory!=0}}" bindtap="gohome" | |||||
| <button tt:if="{{data.type==11&&priceAndStockObj.remainInventory!=0}}" bindtap="gohome" | |||||
| data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="1" | data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="1" | ||||
| class="arrive">到店自提 | class="arrive">到店自提 | ||||
| </button> | </button> | ||||
| <button bindtap="gotopay" disabled='{{showbutton}}' class='buy' | <button bindtap="gotopay" disabled='{{showbutton}}' class='buy' | ||||
| tt:if="{{data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100==0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">免费领取</button> | |||||
| tt:if="{{data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100==0&&priceAndStockObj.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">免费领取</button> | |||||
| <button bindtap="gotopay" disabled='{{showbutton}}' class='buy' data-type='{{data.type}}' | <button bindtap="gotopay" disabled='{{showbutton}}' class='buy' data-type='{{data.type}}' | ||||
| tt:if="{{data.type==51&&data.remainInventory!=0||data.type==50&&data.remainInventory!=0}}">马上兑换</button> | |||||
| tt:if="{{data.type==51&&priceAndStockObj.remainInventory!=0||data.type==50&&priceAndStockObj.remainInventory!=0}}">马上兑换</button> | |||||
| <button class='buy buyHr' disabled='true' | <button class='buy buyHr' disabled='true' | ||||
| tt:if="{{data.sendType!=3&&(data.remainInventory==0&&endtime!='活动已结束'||data.remainInventory==0&&data.type==8)}}">已售罄</button> | |||||
| tt:if="{{data.sendType!=3&&(priceAndStockObj.remainInventory==0&&endtime!='活动已结束'||priceAndStockObj.remainInventory==0&&data.type==8)}}">已售罄</button> | |||||
| <button class='buy' disabled='true' | <button class='buy' disabled='true' | ||||
| tt:if="{{data.remainInventory==0&&data.type==50||data.remainInventory==0&&data.type==51}}">已兑完</button> | |||||
| tt:if="{{priceAndStockObj.remainInventory==0&&data.type==50||priceAndStockObj.remainInventory==0&&data.type==51}}">已兑完</button> | |||||
| <button class='buy' disabled='true' tt:if="{{endtime=='活动已结束'&&data.activityStatus!=0}}">活动已结束</button> | <button class='buy' disabled='true' tt:if="{{endtime=='活动已结束'&&data.activityStatus!=0}}">活动已结束</button> | ||||
| <button class='buy' disabled='true' tt:if="{{total_micro_second<=0&&data.activityStatus!=0}}">活动已结束</button> | <button class='buy' disabled='true' tt:if="{{total_micro_second<=0&&data.activityStatus!=0}}">活动已结束</button> | ||||
| <button id='noBuy' disabled='true' tt:if="{{data.activityStatus==0}}">活动未开始</button> | <button id='noBuy' disabled='true' tt:if="{{data.activityStatus==0}}">活动未开始</button> | ||||
| </view> | </view> | ||||
| </form> | |||||
| </form> | |||||
| <form data-type='{{data.type}}' report-submit='true' tt:if="{{mouldType==1}}"> | <form data-type='{{data.type}}' report-submit='true' tt:if="{{mouldType==1}}"> | ||||
| <view class="app-border-topX" style="position:fixed;z-index:{{zIndex}}; bottom: 0;"> | <view class="app-border-topX" style="position:fixed;z-index:{{zIndex}}; bottom: 0;"> | ||||
| @@ -222,29 +223,29 @@ | |||||
| <view class="qsOriginal">¥{{priceAndStockObj.price/100}}</view> | <view class="qsOriginal">¥{{priceAndStockObj.price/100}}</view> | ||||
| <button bindtap="gotopay" disabled='{{showbutton}}' hover-class='active' class='buyX' | <button bindtap="gotopay" disabled='{{showbutton}}' hover-class='active' class='buyX' | ||||
| tt:if="{{data.type!=11&&data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100!=0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}"> | |||||
| tt:if="{{data.type!=11&&data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100!=0&&priceAndStockObj.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}"> | |||||
| 马上购买</button> | 马上购买</button> | ||||
| <button tt:if="{{data.type==11&&data.remainInventory!=0}}" bindtap="gohome" | |||||
| <button tt:if="{{data.type==11&&priceAndStockObj.remainInventory!=0}}" bindtap="gohome" | |||||
| data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="2" | data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="2" | ||||
| class="home">配送到家 | class="home">配送到家 | ||||
| </button> | </button> | ||||
| <button tt:if="{{data.type==11&&data.remainInventory!=0}}" bindtap="gohome" | |||||
| <button tt:if="{{data.type==11&&priceAndStockObj.remainInventory!=0}}" bindtap="gohome" | |||||
| data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="1" | data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="1" | ||||
| class="arrive">到店自提 | class="arrive">到店自提 | ||||
| </button> | </button> | ||||
| <button bindtap="gotopay" disabled='{{showbutton}}' class='buyX' | <button bindtap="gotopay" disabled='{{showbutton}}' class='buyX' | ||||
| tt:if="{{data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100==0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">免费领取</button> | |||||
| tt:if="{{data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100==0&&priceAndStockObj.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">免费领取</button> | |||||
| <button bindtap="gotopay" disabled='{{showbutton}}' class='buyX' data-type='{{data.type}}' | <button bindtap="gotopay" disabled='{{showbutton}}' class='buyX' data-type='{{data.type}}' | ||||
| tt:if="{{data.type==51&&data.remainInventory!=0||data.type==50&&data.remainInventory!=0}}">马上兑换</button> | |||||
| tt:if="{{data.type==51&&priceAndStockObj.remainInventory!=0||data.type==50&&priceAndStockObj.remainInventory!=0}}">马上兑换</button> | |||||
| <button class='buyX buyHr' disabled='true' | <button class='buyX buyHr' disabled='true' | ||||
| tt:if="{{data.sendType!=3&&(data.remainInventory==0&&endtime!='活动已结束'||data.remainInventory==0&&data.type==8)}}">已售罄</button> | |||||
| tt:if="{{data.sendType!=3&&(priceAndStockObj.remainInventory==0&&endtime!='活动已结束'||priceAndStockObj.remainInventory==0&&data.type==8)}}">已售罄</button> | |||||
| <button class='buyX' disabled='true' | <button class='buyX' disabled='true' | ||||
| tt:if="{{data.remainInventory==0&&data.type==50||data.remainInventory==0&&data.type==51}}">已兑完</button> | |||||
| tt:if="{{priceAndStockObj.remainInventory==0&&data.type==50||priceAndStockObj.remainInventory==0&&data.type==51}}">已兑完</button> | |||||
| <button class='buyX' disabled='true' tt:if="{{endtime=='活动已结束'&&data.activityStatus!=0}}">活动已结束</button> | <button class='buyX' disabled='true' tt:if="{{endtime=='活动已结束'&&data.activityStatus!=0}}">活动已结束</button> | ||||
| <button class='buyX' disabled='true' tt:if="{{total_micro_second<=0&&data.activityStatus!=0}}">活动已结束</button> | <button class='buyX' disabled='true' tt:if="{{total_micro_second<=0&&data.activityStatus!=0}}">活动已结束</button> | ||||
| <button id='buyX' disabled='true' tt:if="{{data.activityStatus==0}}">活动未开始</button> | <button id='buyX' disabled='true' tt:if="{{data.activityStatus==0}}">活动未开始</button> | ||||
| <!-- <view class="sell">已售出<span class="sellP">{{data.inventory-data.remainInventory}}</span>件</view> --> | |||||
| <!-- <view class="sell">已售出<span class="sellP">{{data.inventory-priceAndStockObj.remainInventory}}</span>件</view> --> | |||||
| <button class="serviceBox" open-type="contact"> | <button class="serviceBox" open-type="contact"> | ||||
| <view class="fuwuLogoBox f" > | <view class="fuwuLogoBox f" > | ||||
| <image class="itemLogo" src="../../../assets/images/service1.png" /> | <image class="itemLogo" src="../../../assets/images/service1.png" /> | ||||
| @@ -254,7 +255,7 @@ | |||||
| </form> | </form> | ||||
| </view> | </view> | ||||
| <view tt:if="{{data.remainInventory!=0&&data.type==8}}" class="btns clearfix" hover-class="none" | |||||
| <view tt:if="{{priceAndStockObj.remainInventory!=0&&data.type==8}}" class="btns clearfix" hover-class="none" | |||||
| hover-stop-propagation="false"> | hover-stop-propagation="false"> | ||||
| <button class='goback' bindtap='goback'> | <button class='goback' bindtap='goback'> | ||||
| <image src='{{homeSelectedO}}' mode="widthFix"></image> | <image src='{{homeSelectedO}}' mode="widthFix"></image> | ||||
| @@ -343,7 +344,7 @@ | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class="shootBox" tt:if="{{spuIdObj.status==1}}"> | |||||
| <view class="shootBox" tt:if="{{spuIdObj.lastStatus==4}}"> | |||||
| <button class="mount" open-type="share" data-channel="video"> | <button class="mount" open-type="share" data-channel="video"> | ||||
| <image src="../../../assets/images/shoot.png" class="videoCla"/> | <image src="../../../assets/images/shoot.png" class="videoCla"/> | ||||
| <view class="issue">发布视频</view> | <view class="issue">发布视频</view> | ||||
| @@ -355,7 +355,7 @@ button::after { | |||||
| height: 25px; | height: 25px; | ||||
| line-height: 25px; | line-height: 25px; | ||||
| width: 92%; | width: 92%; | ||||
| margin: 10rpx auto; | |||||
| margin: 10rpx auto 0 auto; | |||||
| } | } | ||||
| .fl { | .fl { | ||||
| float: left; | float: left; | ||||
| @@ -1120,7 +1120,7 @@ checkbox-group, radio-group { | |||||
| color: #333; | color: #333; | ||||
| letter-spacing: 0; | letter-spacing: 0; | ||||
| font-size: 28rpx; | font-size: 28rpx; | ||||
| height: 50rpx; | |||||
| /* height: 50rpx; */ | |||||
| line-height: 50rpx; | line-height: 50rpx; | ||||
| width: 90%; | width: 90%; | ||||
| margin: 0 auto; | margin: 0 auto; | ||||
| @@ -0,0 +1,197 @@ | |||||
| const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px' | |||||
| var config = require("../../../config/config.js"); | |||||
| var app = getApp(); | |||||
| const Http = require("../../../utils/HttpBasics"); | |||||
| const util = require("../../../utils/util"); | |||||
| const imgurl = require("../../../utils/imgurl"); | |||||
| Page({ | |||||
| data: { | |||||
| couponIds:"", | |||||
| couponChannelId:"", | |||||
| showPage:false, | |||||
| data:{}, | |||||
| spuIdObj:{}, | |||||
| priceAndStockObj:{}, | |||||
| validStartDate:"", | |||||
| validEndDate:"", | |||||
| }, | |||||
| onLoad: function (options) { | |||||
| console.log(options.couponChannelId); | |||||
| this.getDetail(options.couponChannelId) | |||||
| }, | |||||
| getDetail: function (couponChannelId, flag) { | |||||
| let that = this; | |||||
| let data = {}; | |||||
| // that.getCouponPriceAndStock(couponChannelId);//获取券价格和库存 | |||||
| if (that.data.couponIds) { | |||||
| data.couponId = couponChannelId | |||||
| } else { | |||||
| data.couponChannelId = couponChannelId | |||||
| } | |||||
| var parmer = { | |||||
| url: config.api.newCouponDetail, | |||||
| data: data | |||||
| }; | |||||
| Http.get(parmer).then(res => { | |||||
| that.setData({ | |||||
| couponId: res.data.couponId | |||||
| }) | |||||
| /** | |||||
| * activityStatus==0 活动未开始 | |||||
| * activityStatus==1 活动已开始 | |||||
| * flag == endclock 说明倒计时已经结束 | |||||
| */ | |||||
| if (res.data.endTime && res.data.beginTime) { | |||||
| that.setData({ | |||||
| begin_time: res.data.beginTime, | |||||
| end_time: res.data.endTime, | |||||
| activityStatus: res.data.actStatus ? res.data.actStatus : '' | |||||
| }) | |||||
| if (res.data.actStatus == 0 && flag != 'endclock') { | |||||
| that.countdown(res.data.beginTime); | |||||
| } else if (res.data.actStatus != 0 && flag != 'endclock') { | |||||
| that.countdown(res.data.endTime); | |||||
| } else { | |||||
| clearInterval(that.data.setInterval) | |||||
| } | |||||
| if (res.data.actStatus == 0) { | |||||
| var beginTime = util.formatTime(res.data.beginTime, "yyyy-MM-dd hh:mm:ss"); | |||||
| if (util.timechuo(beginTime).indexOf('-') == 0) { | |||||
| that.setData({ | |||||
| beginTime: "活动已结束", | |||||
| }); | |||||
| } else { | |||||
| that.setData({ | |||||
| beginTime: util.timechuo(beginTime) | |||||
| }); | |||||
| } | |||||
| } else { | |||||
| var endTime = util.formatTime(res.data.endTime, "yyyy-MM-dd hh:mm:ss"); | |||||
| if (util.timechuo(endTime).indexOf('-') == 0) { | |||||
| that.setData({ | |||||
| endtime: "活动已结束", | |||||
| }); | |||||
| } else { | |||||
| that.setData({ | |||||
| endtime: util.timechuo(endTime) | |||||
| }); | |||||
| } | |||||
| } | |||||
| } | |||||
| tt.hideLoading(); | |||||
| that.setData({ | |||||
| data: res.data, | |||||
| }); | |||||
| if (res.data.type == 10) { | |||||
| that.setData({ | |||||
| salePriceStr: res.data.salePriceStr, | |||||
| pickEndDate: util.formatTime(res.data.pickEndDate, "yyyy-MM-dd"), | |||||
| pickStartDate: util.formatTime(res.data.pickStartDate, "yyyy-MM-dd"), | |||||
| priceStr: res.data.priceStr, | |||||
| tailPriceStr: res.data.tailPriceStr, | |||||
| origPriceStr: res.data.origPriceStr | |||||
| }) | |||||
| } | |||||
| if (res.data.validType == 1) { | |||||
| that.setData({ | |||||
| validStartDate: util.formatTime(res.data.validStartDate, "yyyy-MM-dd"), | |||||
| validEndDate: util.formatTime(res.data.validEndDate, "yyyy-MM-dd"), | |||||
| pickStartDate: util.formatTime(res.data.pickStartDate, "yyyy-MM-dd"), | |||||
| pickEndDate: util.formatTime(res.data.pickEndDate, "yyyy-MM-dd"), | |||||
| }); | |||||
| } else { | |||||
| if (res.data.validDays) { | |||||
| that.setData({ | |||||
| validDays: res.data.validDays | |||||
| }); | |||||
| } | |||||
| } | |||||
| if (res.data.itemGroup) { | |||||
| let tempObj = this.data.data | |||||
| tempObj.itemGroup = JSON.parse(tempObj.itemGroup) | |||||
| this.setData({ | |||||
| data: tempObj | |||||
| }) | |||||
| console.log(this.data.data, "data"); | |||||
| } | |||||
| if (res.data.productAttrs && res.data.skuAttrs) { | |||||
| let tempObj = this.data.data | |||||
| tempObj.productAttrs = JSON.parse(tempObj.productAttrs) | |||||
| tempObj.skuAttrs = JSON.parse(tempObj.skuAttrs) | |||||
| tempObj.productAttrs.map(item => { | |||||
| if (item.key == "appointment") { | |||||
| let tempAppoinObj = JSON.parse(item.data) | |||||
| if (tempAppoinObj.need_appointment) { | |||||
| let subscribeSing = ""; | |||||
| if (tempAppoinObj.ahead_time_type == 1) { | |||||
| subscribeSing = `需提前${tempAppoinObj.ahead_day_num}天致电商家预约` | |||||
| } else if (tempAppoinObj.ahead_time_type == 2) { | |||||
| subscribeSing = `需提前${tempAppoinObj.ahead_hour_num}小时致电商家预约` | |||||
| } else if (tempAppoinObj.ahead_time_type == 3) { | |||||
| subscribeSing = `需提前${tempAppoinObj.ahead_minute_num}分钟致电商家预约` | |||||
| } | |||||
| tempObj.subscribeSing = subscribeSing | |||||
| } | |||||
| } | |||||
| if (item.key == "Notification") { | |||||
| if (item.data != '') { | |||||
| tempObj.curLsit = JSON.parse(item.data) | |||||
| } | |||||
| } | |||||
| if (item.key == "bring_out_meal") { | |||||
| tempObj.besides = item.data | |||||
| } | |||||
| if (item.key == "free_pack") { | |||||
| tempObj.pack = item.data | |||||
| } | |||||
| if (item.key == "superimposed_discounts") { | |||||
| tempObj.superimposed_discounts = item.data | |||||
| } | |||||
| if (item.key == "private_room") { | |||||
| tempObj.private_room = item.data | |||||
| } | |||||
| if (item.key == "rec_person_num_max") { | |||||
| tempObj.rec_person_num_max = item.data | |||||
| } | |||||
| if (item.key == 'Description') { | |||||
| tempObj.Description = JSON.parse(item.data) | |||||
| } | |||||
| if (item.key == "can_no_use_date") { | |||||
| tempObj.can_no_use_date = JSON.parse(item.data) | |||||
| } | |||||
| }) | |||||
| tempObj.skuAttrs.map(item => { | |||||
| if (item.key == "commodity") { | |||||
| if (item.data != '') { | |||||
| tempObj.itemGroup = JSON.parse(item.data) | |||||
| } | |||||
| } | |||||
| }) | |||||
| this.setData({ | |||||
| data: tempObj | |||||
| }) | |||||
| console.log(this.data.data, "data"); | |||||
| } | |||||
| }).catch(err => { | |||||
| tt.showToast({ | |||||
| title: err.message, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }, | |||||
| }) | |||||
| @@ -0,0 +1,12 @@ | |||||
| { | |||||
| "usingComponents": { | |||||
| "navbar": "../../../components/navbar/navbar", | |||||
| "store": "../../../components/store/index", | |||||
| "c-coupons": "../../../components/coupons/index", | |||||
| "phoen":"../../../components/getPhoen/getPhoen" | |||||
| }, | |||||
| "navigationBarTitleText": "使用须知", | |||||
| "backgroundColor":"#f4f4f4", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black" | |||||
| } | |||||
| @@ -0,0 +1,39 @@ | |||||
| <view class='notes'> | |||||
| <view class="notesH">购买须知</view> | |||||
| <view class="timeText">有效期</view> | |||||
| <view class="Hchild">• {{validStartDate}}至{{validEndDate}}</view> | |||||
| <view class="timeText">可用时间</view> | |||||
| <view class="Hchild">• 商家营业时间内到店使用</view> | |||||
| <view class="Hchild" tt:if="{{data.can_no_use_date.weekend}}">• 周末不支持使用</view> | |||||
| <view class="Hchild" tt:if="{{data.can_no_use_date.HolidaysFlag}}">• 节假日(元旦、春节、清明、劳动节、端午节、中秋节、国庆节、情人节、圣诞节)不支持使用</view> | |||||
| <view class="timeText">购买限制</view> | |||||
| <view class="Hchild">• 每个用户限购{{data.useLimitQuantity}}单</view> | |||||
| <view class="timeText">预约消费</view> | |||||
| <!-- <view class="Hchild">• 无需预约,高峰时段可能等位</view> --> | |||||
| <view class="Hchild" tt:if="{{!data.subscribeSing}}">• 无需预约,高峰时段可能等位</view> | |||||
| <view class="Hchild" tt:if="{{data.subscribeSing}}">• {{data.subscribeSing}}</view> | |||||
| <view class="timeText" tt:if="{{data.rec_person_num_max}}">适用人数</view> | |||||
| <view class="Hchild" tt:if="{{data.rec_person_num_max}}">• 该团购劵最多{{data.rec_person_num_max}}人使用</view> | |||||
| <view class="timeText">温馨提示</view> | |||||
| <view class="Hchild">• 团购券不支持配送或外卖</view> | |||||
| <view class="Hchild" tt:if="{{data.pack}}">• 该团购商品{{data.pack=='false'?'不支持':'支持'}}打包</view> | |||||
| <view class="Hchild" tt:if="{{data.besides}}">• {{data.besides=="false"?'不可以':'可以'}}外带餐食</view> | |||||
| <view class="Hchild" tt:if="{{data.superimposed_discounts}}">• {{data.superimposed_discounts=="false"?'不可以':'可以'}}享受店内其他优惠</view> | |||||
| <view class="Hchild" tt:if="{{data.private_room}}">• {{data.private_room=="false"?'不可以使用':'可以使用'}}包间</view> | |||||
| <view class="notesH">使用规则</view> | |||||
| <text tt:if="{{curHtml==''}}" class="notesText">{{data.remark}}</text> | |||||
| <view tt:if="{{curHtml!=''}}"> | |||||
| <rich-text nodes="{{curHtml}}"></rich-text> | |||||
| </view> | |||||
| <view tt:if="{{data.curLsit}}" tt:for="{{data.curLsit}}" tt:key="{{index}}"> | |||||
| <view class="timeText" tt:if="{{item.title!=''}}">{{item.title}}</view> | |||||
| <text class="Hchild">{{item.content}}</text> | |||||
| </view> | |||||
| </view> | |||||
| @@ -6,6 +6,7 @@ const util = require("../../../utils/util"); | |||||
| const QR = require("../../../utils/memberqrcode.js"); | const QR = require("../../../utils/memberqrcode.js"); | ||||
| Page({ | Page({ | ||||
| data: { | data: { | ||||
| showIdFalg:false, | |||||
| navigationBarHeight, | navigationBarHeight, | ||||
| couponorderstatus:"", | couponorderstatus:"", | ||||
| quancode:"", | quancode:"", | ||||
| @@ -27,6 +28,36 @@ Page({ | |||||
| templTiem:"", | templTiem:"", | ||||
| curHtml:"", | curHtml:"", | ||||
| }, | }, | ||||
| showId(){ | |||||
| let this_ = this; | |||||
| if(!this_.data.showIdFalg){ | |||||
| tt.showModal({ | |||||
| // title: "查看券码", | |||||
| content: "是否查看完整券码", | |||||
| success(res) { | |||||
| if (res.confirm) { | |||||
| console.log("confirm, continued"); | |||||
| this_.setData({ | |||||
| showIdFalg:true | |||||
| }) | |||||
| } else if (res.cancel) { | |||||
| //取消 | |||||
| console.log("cancel, cold"); | |||||
| } else { | |||||
| // what happend? | |||||
| } | |||||
| }, | |||||
| fail(err) { | |||||
| console.log(`showModal 调用失败`, err); | |||||
| }, | |||||
| }); | |||||
| }else{ | |||||
| this.setData({ | |||||
| showIdFalg:false | |||||
| }) | |||||
| } | |||||
| }, | |||||
| getHtml(couponOrderId) { | getHtml(couponOrderId) { | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.couponHtmlDetailForPkg, | url: config.api.couponHtmlDetailForPkg, | ||||
| @@ -49,6 +80,7 @@ Page({ | |||||
| console.log(options); | console.log(options); | ||||
| that.setData({ | that.setData({ | ||||
| code: options.quancode, | code: options.quancode, | ||||
| codeS: options.quancode.slice(0,4)+`******`+options.quancode.slice(14), | |||||
| couponorderstatus: options.couponorderstatus, | couponorderstatus: options.couponorderstatus, | ||||
| validStatus:options.validStatus | validStatus:options.validStatus | ||||
| }); | }); | ||||
| @@ -1,5 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "使用优惠券", | "navigationBarTitleText": "使用优惠券", | ||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../../components/navbar/navbar", | "navbar": "../../../components/navbar/navbar", | ||||
| "store":"../../../components/store/index" | "store":"../../../components/store/index" | ||||
| @@ -1,6 +1,6 @@ | |||||
| <view class="BoxBg"> | <view class="BoxBg"> | ||||
| <navbar back home text="使用优惠券" background='#fff' color="#000"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar back home text="使用优惠券" background='#fff' color="#000"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <view class="container"> | <view class="container"> | ||||
| @@ -37,7 +37,10 @@ | |||||
| <text style="color:red">{{expiredSeconds}}s</text> | <text style="color:red">{{expiredSeconds}}s</text> | ||||
| 后失效 | 后失效 | ||||
| </view> | </view> | ||||
| <view class="barnum">{{code}}</view> | |||||
| <view class="barnum"> | |||||
| <view class="barnumtext">{{showIdFalg?code:codeS}}</view> | |||||
| <image class="barnumImg" src="../../../assets/images/password.png" bindtap="showId"></image> | |||||
| </view> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -106,9 +106,20 @@ | |||||
| color: #333; | color: #333; | ||||
| letter-spacing: 0; | letter-spacing: 0; | ||||
| text-align: center; | text-align: center; | ||||
| overflow: hidden; | |||||
| } | |||||
| .barnumtext{ | |||||
| float: left; | |||||
| margin-left: 20rpx; | |||||
| font-size: 30rpx; | |||||
| } | |||||
| .barnumImg{ | |||||
| float: left; | |||||
| height: 40rpx; | |||||
| width: 40rpx; | |||||
| margin: 24rpx 20rpx; | |||||
| } | } | ||||
| .barnum::before{ | |||||
| .barnumtext::before{ | |||||
| content: "优惠券码:"; | content: "优惠券码:"; | ||||
| font-size: 24rpx; | font-size: 24rpx; | ||||
| color: #999; | color: #999; | ||||
| @@ -1,5 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "我的券包", | "navigationBarTitleText": "我的券包", | ||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../../components/navbar/navbar" | "navbar": "../../../components/navbar/navbar" | ||||
| @@ -1,8 +1,8 @@ | |||||
| <view class="BoxBg"> | <view class="BoxBg"> | ||||
| <navbar back home text="我的券包" background='#fff' color="#000"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar back home text="我的券包" background='#fff' color="#000"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <view class="boatBoxf" style="top:{{navigationBarHeight}}"> | |||||
| <view class="boatBoxf" > | |||||
| <view class="boatBox"> | <view class="boatBox"> | ||||
| <view class="boatItemBox" tt:for="{{boatLsit}}" tt:key="index" bindtap="setBoatFlag" data-index="{{index}}"> | <view class="boatItemBox" tt:for="{{boatLsit}}" tt:key="index" bindtap="setBoatFlag" data-index="{{index}}"> | ||||
| <view class="{{boatFlag==item.value? 'boatTitleA':'boatTitle'}}">{{item.name}}</view> | <view class="{{boatFlag==item.value? 'boatTitleA':'boatTitle'}}">{{item.name}}</view> | ||||
| @@ -1,205 +0,0 @@ | |||||
| const app = getApp() | |||||
| const navigationBarHeight = (getApp().statusBarHeight + 50) + "px" | |||||
| const Http = require("../../utils/HttpBasics"); | |||||
| let config = require("../../config/config.js"); | |||||
| const util = require("../../utils/util") | |||||
| Page({ | |||||
| data: { | |||||
| navigationBarHeight, | |||||
| ifPay:true, | |||||
| orderId:"", | |||||
| detailObj:{}, | |||||
| createDate:"", | |||||
| mystatus: '', | |||||
| }, | |||||
| updetail(){ | |||||
| Http.get({ | |||||
| url:config.api.orderDetail, | |||||
| data:{ | |||||
| orderId: this.data.orderId | |||||
| } | |||||
| }).then(res=>{ | |||||
| console.log(res); | |||||
| let createDate = util.formatTime(res.data.createDate, "yyyy-MM-dd hh:mm:ss"); | |||||
| this.setData({ | |||||
| detailObj:res.data, | |||||
| createDate: createDate | |||||
| }) | |||||
| }).catch(err => { | |||||
| tt.showToast({ | |||||
| title: err.message ? err.message : err.data, // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 支付订单更新 | |||||
| */ | |||||
| payOrderUpdate(orderId, payOrderId, status, reason, type, _this, composeOrderType) { | |||||
| let that = this; | |||||
| Http.post({ | |||||
| url: config.api.payOrderUpdate, | |||||
| data: { | |||||
| payOrderId: payOrderId, | |||||
| composeOrderId: orderId, | |||||
| status: status, | |||||
| reason: reason | |||||
| } | |||||
| }).then(res => { | |||||
| tt.hideLoading(); | |||||
| if(!type&&type!="free"){ | |||||
| tt.showToast({ | |||||
| title: "购买成功", | |||||
| duration: 2000, | |||||
| mask: false, | |||||
| success: function () { | |||||
| tt.showLoading({ | |||||
| title: "加载中..." | |||||
| }); | |||||
| setTimeout(function () { | |||||
| tt.hideLoading(); | |||||
| }, 1600); | |||||
| setTimeout(() => { | |||||
| let url = "" | |||||
| if (_this.data.orderFlag){ | |||||
| tt.redirectTo({ | |||||
| url: `/pages/detailOrder/detailOrder?orderId=${orderId}&dingdan=order` | |||||
| }); | |||||
| }else{ | |||||
| tt.redirectTo({ | |||||
| url: `/pages/detailOrder/detailOrder?orderId=${orderId}` | |||||
| }); | |||||
| } | |||||
| }, 1600); | |||||
| } | |||||
| }); | |||||
| } else if (type == 'free'){ | |||||
| tt.redirectTo({ | |||||
| url: `/pages/detailOrder/detailOrder?orderId=${orderId}` | |||||
| }); | |||||
| } | |||||
| }).catch(err => { | |||||
| console.log(err); | |||||
| if (!type) { | |||||
| setTimeout(function () { | |||||
| _this.payOrderUpdate(orderId, payOrderId, status, reason, type, _this, composeOrderType); | |||||
| }, 2000) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| powerDrawer: function (e) { | |||||
| let that = this; | |||||
| console.log(e) | |||||
| // couponOrderStatus | |||||
| // 0 未使用 | |||||
| // 1 已使用 | |||||
| // 2 已过期 | |||||
| // 3 已经退款 | |||||
| if (that.data.mystatus == "" || that.data.mystatus == undefined) { | |||||
| tt.navigateTo({ | |||||
| url: `/pages/orderquanma/orderquanma?quancode=${ | |||||
| e.currentTarget.dataset.quancode | |||||
| }&title=${e.currentTarget.dataset.title}&subtitle=${ | |||||
| e.currentTarget.dataset.subtitle | |||||
| }&remark=${e.currentTarget.dataset.remark}&couponorderstatus=${ | |||||
| e.currentTarget.dataset.couponorderstatus}&validstatus=${e.currentTarget.dataset.validstatus} | |||||
| &contentType=${that.data.contentType}` | |||||
| }); | |||||
| } else { | |||||
| tt.navigateTo({ | |||||
| url: `/pages/orderquanma/orderquanma?quancode=${ | |||||
| e.currentTarget.dataset.quancode | |||||
| }&title=${e.currentTarget.dataset.title}&subtitle=${ | |||||
| e.currentTarget.dataset.subtitle | |||||
| }&remark=${e.currentTarget.dataset.remark}&couponorderstatus=${ | |||||
| that.data.mystatus}&validstatus=${e.currentTarget.dataset.validstatus} | |||||
| &contentType=${that.data.contentType}` | |||||
| }); | |||||
| } | |||||
| }, | |||||
| gotopay() { | |||||
| let that = this; | |||||
| Http.get({//判断是否授权抖音 | |||||
| url: config.api.checkPhoneStatus, | |||||
| }).then(res => { | |||||
| Http.post({ | |||||
| url: config.api.payOrderCreate, | |||||
| data: { | |||||
| orderId: that.data.detailObj.id, | |||||
| composeOrderType: that.data.detailObj.composeOrderType | |||||
| } | |||||
| }).then(payres => { | |||||
| tt.hideLoading(); | |||||
| tt.pay({ | |||||
| service: 5, | |||||
| orderInfo: { | |||||
| order_id: payres.data.orderId, | |||||
| order_token: payres.data.token, | |||||
| }, | |||||
| success(suRes) { | |||||
| if(suRes.code==0){ | |||||
| tt.showLoading({ | |||||
| title: '订单正在处理中...', | |||||
| }) | |||||
| that.payOrderUpdate(that.data.detailObj.id,payres.data.outOrderNo,1,"","",that,that.data.detailObj.composeOrderType) | |||||
| } else if (res.code === 1) { | |||||
| tt.showToast({ | |||||
| title: '支付超时', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } else if (res.code === 2) { | |||||
| tt.showToast({ | |||||
| title: '支付失败', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } else if (res.code === 3) { | |||||
| tt.showToast({ | |||||
| title: '支付关闭', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } else if (res.code === 4) { | |||||
| tt.showToast({ | |||||
| title: '支付取消', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } else if (res.code === 9) { | |||||
| tt.showToast({ | |||||
| title: '订单状态开发者自行获取', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } | |||||
| }, | |||||
| fail(res) { | |||||
| console.log(123); | |||||
| // handle fail | |||||
| }, | |||||
| }) | |||||
| }).catch(err => { | |||||
| tt.showToast({ | |||||
| title: err.message ? err.message : err.data, // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| }) | |||||
| }) | |||||
| // .catch(err => { | |||||
| // if (err.code == 11005) { | |||||
| // this.setData({ | |||||
| // showPhoem: true | |||||
| // }) | |||||
| // } | |||||
| // }) | |||||
| }, | |||||
| onLoad: function (options) { | |||||
| console.log(options.orderId); | |||||
| this.setData({ | |||||
| orderId:options.orderId | |||||
| }) | |||||
| this.updetail() | |||||
| } | |||||
| }) | |||||
| @@ -1,7 +0,0 @@ | |||||
| { | |||||
| "navigationBarTitleText": "订单详情", | |||||
| "usingComponents": { | |||||
| "navbar": "../../components/navbar/navbar", | |||||
| "store":"../../components/store/index" | |||||
| } | |||||
| } | |||||
| @@ -1,57 +0,0 @@ | |||||
| <view class="BoxBg"> | |||||
| <navbar back home text="订单详情" background='#fff' color="#000"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <view class="ifPay" tt:if="{{detailObj.orderStatus==1}}"> | |||||
| <image class='yueImg' src='../../assets/itemImg/succ.png' mode='widthFix'></image> | |||||
| <view class="statusPayText">支付成功</view> | |||||
| </view> | |||||
| <view class="hie" tt:elss></view> | |||||
| <view class="commodityBox"> | |||||
| <view class="commodityTitle">{{detailObj.title}}</view> | |||||
| <view class="imgNanText"> | |||||
| <!-- <view class="commodityImgBox"></view> --> | |||||
| <image class='commodityImgBox' src='{{detailObj.coverImg}}' mode='widthFix'></image> | |||||
| <view class="commodityData"> | |||||
| <view class="commodityName">{{createDate}}</view> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| <view class="orderBox" tt:if="{{detailObj.orderStatus==1}}" bindtap="powerDrawer" data-couponOrderStatus="{{detailObj.couponOrderStatus}}" data-title="{{detailObj.title}}" data-subtitle="{{detailObj.subTitle}}" data-remark="{{detailObj.remark}}" data-quancode="{{detailObj.couponOrderId}}" | |||||
| data-validstatus="{{detailObj.validStatus}}"> | |||||
| <view class="rqBox"> | |||||
| <view class="text">兑换码:</view> | |||||
| <view class="rqCode">{{detailObj.couponOrderId}}</view> | |||||
| <image class="goQr" src="../../assets/itemImg/chevron.png" mode='widthFix'></image> | |||||
| <image class="rqImg" src="../../assets/itemImg/spcode.png" mode='widthFix'></image> | |||||
| </view> | |||||
| </view> | |||||
| <view class="orderNumBox"> | |||||
| <view class="orderNum"> | |||||
| <view class="numText">订单编号:</view> | |||||
| <view class="num">{{detailObj.orderNumber}}</view> | |||||
| </view> | |||||
| </view> | |||||
| <view class="orderNumBox1"> | |||||
| <view class="orderNum"> | |||||
| <view class="numText">实付金额:</view> | |||||
| <view class="money">{{detailObj.payment/100}}元</view> | |||||
| <view class="moneyiIcn">¥</view> | |||||
| </view> | |||||
| </view> | |||||
| <!-- <view class="orderNumBox1"> | |||||
| <view class="shop">适用门店</view> | |||||
| <view class="shopbox"> | |||||
| <view class="shopImg"></view> | |||||
| <view class="shopDetailsBox"> | |||||
| <view class="shopName">百利</view> | |||||
| <view class="floor">A座一层--A2827</view> | |||||
| </view> | |||||
| <view class="phoneImg"></view> | |||||
| </view> | |||||
| </view> --> | |||||
| <store merchantVoObj="{{detailObj.merchantVoList[0]}}"></store> | |||||
| <view class="payBtn" tt:if="{{detailObj.orderStatus==0&&detailObj.salePrice!=0}}" bindtap="gotopay">立即支付</view> | |||||
| </view> | |||||
| @@ -1,186 +0,0 @@ | |||||
| /* d:\fumaolianke\ttFmC\tt富茂C\pages\detailOrder\detailOrder.ttss */ | |||||
| .ifPay{ | |||||
| background-color:#2c8dff; | |||||
| overflow: hidden; | |||||
| color: #fff; | |||||
| } | |||||
| .yueImg{ | |||||
| float: left; | |||||
| width: 40rpx; | |||||
| height: 40rpx; | |||||
| /* background-color: #fff; */ | |||||
| margin: 20rpx; | |||||
| } | |||||
| .statusPayText{ | |||||
| float: left; | |||||
| margin-top: 20rpx; | |||||
| font-size: 30rpx; | |||||
| /* font-family: PingFangSC-Regular; */ | |||||
| } | |||||
| .commodityBox{ | |||||
| background-color: #fff; | |||||
| /* margin-top: 20rpx; */ | |||||
| overflow: hidden; | |||||
| } | |||||
| .commodityTitle{ | |||||
| margin: 20rpx; | |||||
| font-size: 32rpx; | |||||
| } | |||||
| .imgNanText{ | |||||
| overflow: hidden; | |||||
| } | |||||
| .commodityImgBox{ | |||||
| margin: 20rpx; | |||||
| width: 140rpx; | |||||
| height: 140rpx; | |||||
| background-color: aqua; | |||||
| float: left; | |||||
| } | |||||
| .commodityData{ | |||||
| float: left; | |||||
| /* width: 520rpx; */ | |||||
| } | |||||
| .commodityName{ | |||||
| margin-top: 20rpx; | |||||
| font-size: 28rpx; | |||||
| } | |||||
| .commodityName::before{ | |||||
| content: "下单时间:"; | |||||
| font-size: 26rpx; | |||||
| color: #999; | |||||
| } | |||||
| .orderBox{ | |||||
| overflow: hidden; | |||||
| margin-top: 20rpx; | |||||
| background-color: #fff; | |||||
| overflow: hidden; | |||||
| border-bottom: 1rpx solid #f4f5f9; | |||||
| } | |||||
| .text{ | |||||
| margin: 20rpx; | |||||
| float: left; | |||||
| font-size: 30rpx; | |||||
| } | |||||
| .rqCode{ | |||||
| float: left; | |||||
| font-size: 30rpx; | |||||
| margin-top: 20rpx; | |||||
| } | |||||
| .rqImg{ | |||||
| float: right; | |||||
| width: 50rpx; | |||||
| height: 50rpx; | |||||
| /* background-color: aqua; */ | |||||
| margin-top: 20rpx; | |||||
| margin-right: 20rpx; | |||||
| } | |||||
| .goQr{ | |||||
| float: right; | |||||
| width: 20rpx; | |||||
| height: 20rpx; | |||||
| /* background-color: aqua; */ | |||||
| margin-top: 26rpx; | |||||
| margin-right: 40rpx; | |||||
| } | |||||
| .orderNumBox{ | |||||
| background-color: #fff; | |||||
| overflow: hidden; | |||||
| border-bottom: 1rpx solid #f4f5f9; | |||||
| } | |||||
| .orderNumBox1{ | |||||
| background-color: #fff; | |||||
| overflow: hidden; | |||||
| } | |||||
| .orderNum{ | |||||
| overflow: hidden; | |||||
| } | |||||
| .numText{ | |||||
| margin: 20rpx; | |||||
| float: left; | |||||
| font-size: 30rpx; | |||||
| color: #999; | |||||
| } | |||||
| .num{ | |||||
| float: right; | |||||
| font-size: 30rpx; | |||||
| margin-top: 20rpx; | |||||
| margin-right: 50rpx; | |||||
| } | |||||
| .moneyiIcn{ | |||||
| margin-top: 20rpx; | |||||
| color: #fd782d ; | |||||
| font-size: 22rpx; | |||||
| float: right; | |||||
| line-height: 44rpx; | |||||
| margin-right: 4rpx; | |||||
| } | |||||
| .money{ | |||||
| float: right; | |||||
| font-size: 30rpx; | |||||
| margin-top: 20rpx; | |||||
| margin-right: 50rpx; | |||||
| color: #fd782d ; | |||||
| } | |||||
| .shop{ | |||||
| margin: 20rpx; | |||||
| font-size: 32rpx; | |||||
| } | |||||
| .shopbox{ | |||||
| margin-top: 60rpx; | |||||
| overflow: hidden; | |||||
| } | |||||
| .shopImg{ | |||||
| margin-left: 20rpx; | |||||
| margin-bottom: 20rpx; | |||||
| width: 110rpx; | |||||
| height: 110rpx; | |||||
| background-color: #fd782d; | |||||
| float: left; | |||||
| } | |||||
| .shopDetailsBox{ | |||||
| float: left; | |||||
| margin-left: 20rpx; | |||||
| } | |||||
| .shopName{ | |||||
| margin-top: 10rpx; | |||||
| font-size: 32rpx; | |||||
| } | |||||
| .floor{ | |||||
| margin-top: 10rpx; | |||||
| font-size: 24rpx !important; | |||||
| color: #b8b8b8 !important; | |||||
| } | |||||
| .phoneImg{ | |||||
| margin-top: 20rpx; | |||||
| float:right; | |||||
| margin-right: 50rpx; | |||||
| width: 70rpx; | |||||
| height: 70rpx; | |||||
| border-radius: 50%; | |||||
| background-color: #fd782d; | |||||
| } | |||||
| .payBtn{ | |||||
| position: fixed; | |||||
| width: 90%; | |||||
| height: 80rpx; | |||||
| left: 5%; | |||||
| line-height: 80rpx; | |||||
| text-align: center; | |||||
| color: #fff; | |||||
| background: linear-gradient(127deg, rgba(252, 177, 74, 1) 0%, rgba(254, 70, 20, 1) 100%); | |||||
| font-size: 32rpx; | |||||
| border-radius: 50rpx; | |||||
| bottom: 5%; | |||||
| } | |||||
| .hie{ | |||||
| height: 20rpx; | |||||
| } | |||||
| @@ -1,4 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "编辑信息", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../components/navbar/navbar" | "navbar": "../../components/navbar/navbar" | ||||
| } | } | ||||
| @@ -1,5 +1,5 @@ | |||||
| <navbar back home text="编辑信息"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar back home text="编辑信息"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <form bindsubmit="formSubmit" tt:if="{{showPage}}"> | <form bindsubmit="formSubmit" tt:if="{{showPage}}"> | ||||
| <view class='section'> | <view class='section'> | ||||
| <text>姓名</text> | <text>姓名</text> | ||||
| @@ -1,5 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "编辑信息", | "navigationBarTitleText": "编辑信息", | ||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../components/navbar/navbar" | "navbar": "../../components/navbar/navbar" | ||||
| } | } | ||||
| @@ -1,6 +1,6 @@ | |||||
| <view class="BoxBg"> | <view class="BoxBg"> | ||||
| <navbar back home text="编辑信息" background='#fff' color="#000"></navbar> | |||||
| <view style="height:{{navigationBarHeight}}"></view> | |||||
| <!-- <navbar back home text="编辑信息" background='#fff' color="#000"></navbar> | |||||
| <view style="height:{{navigationBarHeight}}"></view> --> | |||||
| <view class="section"> | <view class="section"> | ||||
| <view class="uesrName">姓名</view> | <view class="uesrName">姓名</view> | ||||
| <input | <input | ||||
| @@ -1,4 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "适用店铺", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../components/navbar/navbar" | "navbar": "../../components/navbar/navbar" | ||||
| } | } | ||||
| @@ -1,5 +1,5 @@ | |||||
| <navbar back text="适用店铺"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar back text="适用店铺"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <view style="height:20rpx"></view> | <view style="height:20rpx"></view> | ||||
| <view class='posi' tt:for="{{list}}" tt:key="index"> | <view class='posi' tt:for="{{list}}" tt:key="index"> | ||||
| <view class='posi_logo'> | <view class='posi_logo'> | ||||
| @@ -106,6 +106,7 @@ Page({ | |||||
| }) | }) | ||||
| }, | }, | ||||
| backHome(){ | backHome(){ | ||||
| console.log("我调用的返回"); | |||||
| tt.navigateBack({ | tt.navigateBack({ | ||||
| delta: 1, | delta: 1, | ||||
| success: (res) => { | success: (res) => { | ||||
| @@ -136,6 +137,7 @@ Page({ | |||||
| iv: iv | iv: iv | ||||
| } | } | ||||
| }).then(res => { | }).then(res => { | ||||
| app.globalData.phone = res.data.phone; | app.globalData.phone = res.data.phone; | ||||
| if (that.data.skipUrl == '1') { | if (that.data.skipUrl == '1') { | ||||
| console.log(app.globalData.skip, app.globalData.skipUrl, "跳转地址") | console.log(app.globalData.skip, app.globalData.skipUrl, "跳转地址") | ||||
| @@ -166,6 +168,12 @@ Page({ | |||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| //确认订单 | |||||
| if (that.data.path == "qr") { | |||||
| tt.redirectTo({ | |||||
| url: `/pages/coupon/confirmation/confirmation?couponChannelId=${that.data.couponChannelId}` | |||||
| }) | |||||
| } | |||||
| //线上配送 | //线上配送 | ||||
| if (that.data.path == "fi") { | if (that.data.path == "fi") { | ||||
| tt.redirectTo({ | tt.redirectTo({ | ||||
| @@ -1,4 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "授权手机号", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../components/navbar/navbar" | "navbar": "../../components/navbar/navbar" | ||||
| } | } | ||||
| @@ -1,4 +1,4 @@ | |||||
| <navbar home text="抖音授权"></navbar> | |||||
| <!-- <navbar home text="授权手机号"></navbar> --> | |||||
| <view class="login-body" > | <view class="login-body" > | ||||
| <view class="login-logo"> | <view class="login-logo"> | ||||
| <image src="{{mallImgUrl}}" mode='widthFix'></image> | <image src="{{mallImgUrl}}" mode='widthFix'></image> | ||||
| @@ -13,6 +13,7 @@ Page({ | |||||
| optionData: null, | optionData: null, | ||||
| fromflag: '', | fromflag: '', | ||||
| couponChannelIdflag: '', | couponChannelIdflag: '', | ||||
| confirmationFlag:'', | |||||
| wjId: "", | wjId: "", | ||||
| composeOrderType: "", | composeOrderType: "", | ||||
| fillIndentId: "", | fillIndentId: "", | ||||
| @@ -87,7 +88,7 @@ Page({ | |||||
| }) | }) | ||||
| }, | }, | ||||
| onLoad: function (options) { | onLoad: function (options) { | ||||
| console.log(app.globalData.skip, app.globalData.skipUrl, app.globalData.type, "跳转地址") | console.log(app.globalData.skip, app.globalData.skipUrl, app.globalData.type, "跳转地址") | ||||
| var that = this; | var that = this; | ||||
| // options.fromflag == 'coupondetail'; | // options.fromflag == 'coupondetail'; | ||||
| @@ -117,12 +118,18 @@ Page({ | |||||
| couponId: options.couponId | couponId: options.couponId | ||||
| }) | }) | ||||
| } | } | ||||
| // 来自优惠券列表券详情页面的 couponChannelId | |||||
| // 来自优惠券列表券详情页面的 couponChannelId | |||||
| if (options && options.couponChannelIdflag) { | if (options && options.couponChannelIdflag) { | ||||
| that.setData({ | that.setData({ | ||||
| couponChannelIdflag: options.couponChannelIdflag | couponChannelIdflag: options.couponChannelIdflag | ||||
| }) | }) | ||||
| } | } | ||||
| //确定订单 | |||||
| if (options && options.confirmationFlag) { | |||||
| that.setData({ | |||||
| confirmationFlag: options.confirmationFlag | |||||
| }) | |||||
| } | |||||
| //调查问卷 | //调查问卷 | ||||
| if (options && !options.wjId || options.wjId) { | if (options && !options.wjId || options.wjId) { | ||||
| this.setData({ | this.setData({ | ||||
| @@ -227,240 +234,285 @@ Page({ | |||||
| }) | }) | ||||
| }, | }, | ||||
| bindGetUserInfo(e) { | bindGetUserInfo(e) { | ||||
| //session_key 未过期,并且在本生命周期一直有效 | |||||
| //session_key 未过期,并且在本生命周期一直有效 tt.getUserProfile | |||||
| tt.getUserProfile({ | tt.getUserProfile({ | ||||
| withCredentials: true, | |||||
| title: '温馨提示', | title: '温馨提示', | ||||
| desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 | desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 | ||||
| success: (res) => { | success: (res) => { | ||||
| let that = this; | let that = this; | ||||
| var iv = res.iv; | var iv = res.iv; | ||||
| var encryptedData = res.encryptedData; | var encryptedData = res.encryptedData; | ||||
| Http.post({ | |||||
| url: config.api.getUserInfo, | |||||
| data: { | |||||
| encryptedData: encryptedData, | |||||
| iv: iv | |||||
| } | |||||
| }).then(res => { | |||||
| if (app.globalData.type == 'gm' && that.data.id && that.data.gameId && that.data.url) {//游戏页面 | |||||
| app.globalData.skipUrl = '/pages/game/index?url=' + that.data.url + "&id=" + that.data.id + "&gameId=" + that.data.gameId, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| return; | |||||
| } | |||||
| if (that.data.wjId) { | |||||
| app.globalData.skipUrl = `/pages/questionnaire/questionnaire?id=${that.data.wjId}` | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| return; | |||||
| } | |||||
| if (that.data.fromflag == 'poster') { | |||||
| app.globalData.skipUrl = `/pages/canvas/index?couponChannelId=${that.data.couponChannelId}` | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| return; | |||||
| } | |||||
| // | |||||
| if (that.data.optionData != null && that.data.optionData.orderGroupId != null && that.data.optionData.orderGroupId != "") { | |||||
| app.globalData.skipUrl = `/pages/joinFrDpell/index?couponId=${that.data.optionData.couponId}&orderGroupId=${that.data.optionData.orderGroupId}&couponChannelId=${that.data.optionData.couponChannelId}&orderId=${that.data.optionData.orderId}&avatarUrl=${that.data.optionData.avatarUrl}&nickName=${that.data.optionData.nickName}` | |||||
| app.globalData.skip = 'reLaunch' | |||||
| that.judgePhonelngo() | |||||
| return; | |||||
| } | |||||
| if (that.data.path == 'index') { | |||||
| app.globalData.skipUrl = "/pages/game/index" | |||||
| app.globalData.skip = 'reLaunch' | |||||
| that.judgePhonelngo() | |||||
| } else { | |||||
| //返回主页 | |||||
| // if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup||that.data.couponChannelId && !that.data.cuserId&&app.globalData.type == 'cd') { | |||||
| if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup && app.globalData.type == 'cd') { | |||||
| // 跳转普通券/消费卡/限时秒杀/砍价详情 | |||||
| app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}` | |||||
| app.globalData.skip = 'navigateTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.couponChannelId && that.data.cuserId && !that.data.spellGroup && app.globalData.type != 'sd') { | |||||
| // 来自转赠 | |||||
| app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&cuserId=${that.data.cuserId}&coverImg=${that.data.coverImg}&userName=${that.data.userName}&avatarUrl=${that.data.avatarUrl}&couponOrderId=${that.data.couponOrderId}&updateDate=${that.data.updateDate}` | |||||
| app.globalData.skip = 'reLaunch' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.couponChannelId && app.globalData.type == 'sd' || that.data.couponChannelId && that.data.spellGroup) { | |||||
| // 拼团详情页 | |||||
| app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelId}` | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'gm') { | |||||
| // 游戏页面 | |||||
| that.getGameOne(app.globalData.token, that.data.optionData.id) | |||||
| } else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'td') { | |||||
| app.globalData.skipUrl = `/pages/topicDetail/index?id=${that.data.optionData.id}` | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } | |||||
| // 报名活动 | |||||
| else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'ra') { | |||||
| app.globalData.skipUrl = `/pages/radetail/index?id=${that.data.optionData.id}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } | |||||
| // 报名签到 | |||||
| else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'si') { | |||||
| app.globalData.skipUrl = `/pages/acSignIn/index?id=${that.data.optionData.id}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } | |||||
| // 门店详情 | |||||
| else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'md') { | |||||
| app.globalData.skipUrl = `/pages/index/searchbar/detail/index?id=${that.data.optionData.id}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } | |||||
| // 通过分享进入的门店详情页面 | |||||
| else if (that.data.id && that.data.frommd == 'md') { | |||||
| app.globalData.skipUrl = `/pages/index/searchbar/detail/index?id=${that.data.id}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.optionData != null && that.data.optionData.bt && that.data.optionData.id && app.globalData.type == 'bd') { | |||||
| // 宣传页详情 | |||||
| if (that.data.optionData != null && that.data.optionData.bt == '2') { | |||||
| // 自由图文 | |||||
| app.globalData.skipUrl = `/pages/freeBannerDetail/index?id=${that.data.optionData.id}`, | |||||
| // console.log(res,"数据"); | |||||
| // return | |||||
| tt.login({ | |||||
| success:(res=>{ | |||||
| let {code} = res | |||||
| console.log(code,"code"); | |||||
| Http.post({ | |||||
| url:config.api.login, | |||||
| data:{ | |||||
| code:code, | |||||
| appId:app.globalData.appId, | |||||
| systemInfo:JSON.stringify(app.globalData.systemInfo) | |||||
| } | |||||
| }).then(res=>{ | |||||
| Http.setToken(res.data.token); | |||||
| app.globalData.token = res.data.token | |||||
| Http.post({ | |||||
| url: config.api.getUserInfo, | |||||
| data: { | |||||
| encryptedData: encryptedData, | |||||
| iv: iv | |||||
| } | |||||
| }).then(res => { | |||||
| if (app.globalData.type == 'gm' && that.data.id && that.data.gameId && that.data.url) {//游戏页面 | |||||
| app.globalData.skipUrl = '/pages/game/index?url=' + that.data.url + "&id=" + that.data.id + "&gameId=" + that.data.gameId, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| return; | |||||
| } | |||||
| if (that.data.wjId) { | |||||
| app.globalData.skipUrl = `/pages/questionnaire/questionnaire?id=${that.data.wjId}` | |||||
| app.globalData.skip = 'redirectTo' | app.globalData.skip = 'redirectTo' | ||||
| that.judgePhonelngo() | |||||
| } else { | |||||
| // 标准格式 | |||||
| app.globalData.skipUrl = `/pages/bannerdetail/index?id=${that.data.optionData.id}`, | |||||
| that.judgePhonelngo() | |||||
| return; | |||||
| } | |||||
| if (that.data.fromflag == 'poster') { | |||||
| app.globalData.skipUrl = `/pages/canvas/index?couponChannelId=${that.data.couponChannelId}` | |||||
| app.globalData.skip = 'redirectTo' | app.globalData.skip = 'redirectTo' | ||||
| that.judgePhonelngo() | |||||
| } | |||||
| } else if (that.data.orderId || that.data.orderId && app.globalData.type == 'bg') { | |||||
| // 参与砍价 | |||||
| app.globalData.skipUrl = `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.orderId}&composeOrderType=${that.composeOrderType}`, | |||||
| app.globalData.skip = 'navigateTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'uc') { | |||||
| // 我的 | |||||
| app.globalData.skipUrl = '/index/user', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'in') { | |||||
| // 首页 | |||||
| app.globalData.skipUrl = app.globalData.goHomeUrl, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == "qd") { | |||||
| //每日签到 | |||||
| app.globalData.skipUrl = "/pages/activityCalendar/activityCalendar" | |||||
| app.globalData.skip = 'reLaunch' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == "hdrl") { | |||||
| //活动日历 | |||||
| app.globalData.skipUrl = `/pages/radetail/index?id=${app.globalData.activityId}` | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } | |||||
| // 积分 | |||||
| else if (app.globalData.type == 'jf') { | |||||
| app.globalData.skipUrl = '/pages/integralmall/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'pc') { | |||||
| // 停车 | |||||
| app.globalData.skipUrl = '/index/passCar', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'mc') { | |||||
| // 我的券包 | |||||
| app.globalData.skipUrl = '/pages/couponorder/index/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'mo') { | |||||
| // 我的订单 | |||||
| app.globalData.skipUrl = '/pages/order/index/index?id=all', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'ca') { | |||||
| // 我的卡包 | |||||
| app.globalData.skipUrl = '/pages/cardorder/index/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'sc') { | |||||
| // 特享礼遇 | |||||
| app.globalData.skipUrl = '/pages/specialcourtesy/specialcourtesy', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'rb') { | |||||
| // 限时秒杀 | |||||
| app.globalData.skipUrl = '/pages/rushToBuy/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'bl') { | |||||
| // 砍价专场 | |||||
| app.globalData.skipUrl = '/pages/bargain/bargain', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'mb') { | |||||
| // 我的砍价 | |||||
| app.globalData.skipUrl = '/pages/bargain/bargain?from=myhtml', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'sl') { | |||||
| // 拼团专场 | |||||
| app.globalData.skipUrl = '/pages/spellGroup/spellGroup', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'ms') { | |||||
| // 我的拼团 | |||||
| app.globalData.skipUrl = '/pages/spellGroup/spellGroup?from=myhtml', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'dc') { | |||||
| // 消费卡 | |||||
| app.globalData.skipUrl = '/pages/discountCardList/discountCardList', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'td') { | |||||
| // 专题活动页 | |||||
| app.globalData.skipUrl = '/pages/topicDetail/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'ml') { | |||||
| // 门店 | |||||
| app.globalData.skipUrl = '/index/searchbar', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.fromflag == 'coupondetail' && that.data.couponChannelIdflag) { | |||||
| app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelIdflag}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.fromflag == 'spellcoupondetail' && that.data.couponChannelIdflag) { | |||||
| app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelIdflag}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.fromflag == 'fillIndent' && that.data.fillIndentId && that.data.couponId) { | |||||
| //线上配送 填写订单 | |||||
| app.globalData.skipUrl = `/pages/fillIndent/fillIndent?id=${that.data.fillIndentId}&couponId=${that.data.couponId}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else { | |||||
| app.globalData.skipUrl = app.globalData.goHomeUrl, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } | |||||
| } | |||||
| }) | |||||
| .catch(err => { | |||||
| tt.showToast({ | |||||
| title: err.code, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| that.judgePhonelngo() | |||||
| return; | |||||
| } | |||||
| // | |||||
| if (that.data.optionData != null && that.data.optionData.orderGroupId != null && that.data.optionData.orderGroupId != "") { | |||||
| app.globalData.skipUrl = `/pages/joinFrDpell/index?couponId=${that.data.optionData.couponId}&orderGroupId=${that.data.optionData.orderGroupId}&couponChannelId=${that.data.optionData.couponChannelId}&orderId=${that.data.optionData.orderId}&avatarUrl=${that.data.optionData.avatarUrl}&nickName=${that.data.optionData.nickName}` | |||||
| app.globalData.skip = 'reLaunch' | |||||
| that.judgePhonelngo() | |||||
| return; | |||||
| } | |||||
| if (that.data.path == 'index') { | |||||
| app.globalData.skipUrl = "/pages/game/index" | |||||
| app.globalData.skip = 'reLaunch' | |||||
| that.judgePhonelngo() | |||||
| } else { | |||||
| //返回主页 | |||||
| // if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup||that.data.couponChannelId && !that.data.cuserId&&app.globalData.type == 'cd') { | |||||
| if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup && app.globalData.type == 'cd') { | |||||
| // 跳转普通券/消费卡/限时秒杀/砍价详情 | |||||
| app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}` | |||||
| app.globalData.skip = 'navigateTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.couponChannelId && that.data.cuserId && !that.data.spellGroup && app.globalData.type != 'sd') { | |||||
| // 来自转赠 | |||||
| app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&cuserId=${that.data.cuserId}&coverImg=${that.data.coverImg}&userName=${that.data.userName}&avatarUrl=${that.data.avatarUrl}&couponOrderId=${that.data.couponOrderId}&updateDate=${that.data.updateDate}` | |||||
| app.globalData.skip = 'reLaunch' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.couponChannelId && app.globalData.type == 'sd' || that.data.couponChannelId && that.data.spellGroup) { | |||||
| // 拼团详情页 | |||||
| app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelId}` | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'gm') { | |||||
| // 游戏页面 | |||||
| that.getGameOne(app.globalData.token, that.data.optionData.id) | |||||
| } else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'td') { | |||||
| app.globalData.skipUrl = `/pages/topicDetail/index?id=${that.data.optionData.id}` | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } | |||||
| // 报名活动 | |||||
| else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'ra') { | |||||
| app.globalData.skipUrl = `/pages/radetail/index?id=${that.data.optionData.id}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } | |||||
| // 报名签到 | |||||
| else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'si') { | |||||
| app.globalData.skipUrl = `/pages/acSignIn/index?id=${that.data.optionData.id}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } | |||||
| // 门店详情 | |||||
| else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'md') { | |||||
| app.globalData.skipUrl = `/pages/index/searchbar/detail/index?id=${that.data.optionData.id}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } | |||||
| // 通过分享进入的门店详情页面 | |||||
| else if (that.data.id && that.data.frommd == 'md') { | |||||
| app.globalData.skipUrl = `/pages/index/searchbar/detail/index?id=${that.data.id}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.optionData != null && that.data.optionData.bt && that.data.optionData.id && app.globalData.type == 'bd') { | |||||
| // 宣传页详情 | |||||
| if (that.data.optionData != null && that.data.optionData.bt == '2') { | |||||
| // 自由图文 | |||||
| app.globalData.skipUrl = `/pages/freeBannerDetail/index?id=${that.data.optionData.id}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else { | |||||
| // 标准格式 | |||||
| app.globalData.skipUrl = `/pages/bannerdetail/index?id=${that.data.optionData.id}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } | |||||
| } else if (that.data.orderId || that.data.orderId && app.globalData.type == 'bg') { | |||||
| // 参与砍价 | |||||
| app.globalData.skipUrl = `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.orderId}&composeOrderType=${that.composeOrderType}`, | |||||
| app.globalData.skip = 'navigateTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'uc') { | |||||
| // 我的 | |||||
| app.globalData.skipUrl = '/index/user', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'in') { | |||||
| // 首页 | |||||
| app.globalData.skipUrl = app.globalData.goHomeUrl, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == "qd") { | |||||
| //每日签到 | |||||
| app.globalData.skipUrl = "/pages/activityCalendar/activityCalendar" | |||||
| app.globalData.skip = 'reLaunch' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == "hdrl") { | |||||
| //活动日历 | |||||
| app.globalData.skipUrl = `/pages/radetail/index?id=${app.globalData.activityId}` | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } | |||||
| // 积分 | |||||
| else if (app.globalData.type == 'jf') { | |||||
| app.globalData.skipUrl = '/pages/integralmall/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'pc') { | |||||
| // 停车 | |||||
| app.globalData.skipUrl = '/index/passCar', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'mc') { | |||||
| // 我的券包 | |||||
| app.globalData.skipUrl = '/pages/couponorder/index/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'mo') { | |||||
| // 我的订单 | |||||
| app.globalData.skipUrl = '/pages/order/index/index?id=all', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'ca') { | |||||
| // 我的卡包 | |||||
| app.globalData.skipUrl = '/pages/cardorder/index/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'sc') { | |||||
| // 特享礼遇 | |||||
| app.globalData.skipUrl = '/pages/specialcourtesy/specialcourtesy', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'rb') { | |||||
| // 限时秒杀 | |||||
| app.globalData.skipUrl = '/pages/rushToBuy/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'bl') { | |||||
| // 砍价专场 | |||||
| app.globalData.skipUrl = '/pages/bargain/bargain', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'mb') { | |||||
| // 我的砍价 | |||||
| app.globalData.skipUrl = '/pages/bargain/bargain?from=myhtml', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'sl') { | |||||
| // 拼团专场 | |||||
| app.globalData.skipUrl = '/pages/spellGroup/spellGroup', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'ms') { | |||||
| // 我的拼团 | |||||
| app.globalData.skipUrl = '/pages/spellGroup/spellGroup?from=myhtml', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'dc') { | |||||
| // 消费卡 | |||||
| app.globalData.skipUrl = '/pages/discountCardList/discountCardList', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'td') { | |||||
| // 专题活动页 | |||||
| app.globalData.skipUrl = '/pages/topicDetail/index', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (app.globalData.type == 'ml') { | |||||
| // 门店 | |||||
| app.globalData.skipUrl = '/index/searchbar', | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.fromflag == 'confirmation' && that.data.confirmationFlag) { | |||||
| //订单确认 confirmation | |||||
| app.globalData.skipUrl = `/pages/coupon/confirmation/confirmation?couponChannelId=${that.data.confirmationFlag}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } | |||||
| else if (that.data.fromflag == 'coupondetail' && that.data.couponChannelIdflag) { | |||||
| app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelIdflag}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.fromflag == 'spellcoupondetail' && that.data.couponChannelIdflag) { | |||||
| app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelIdflag}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else if (that.data.fromflag == 'fillIndent' && that.data.fillIndentId && that.data.couponId) { | |||||
| //线上配送 填写订单 | |||||
| app.globalData.skipUrl = `/pages/fillIndent/fillIndent?id=${that.data.fillIndentId}&couponId=${that.data.couponId}`, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } else { | |||||
| app.globalData.skipUrl = app.globalData.goHomeUrl, | |||||
| app.globalData.skip = 'redirectTo' | |||||
| that.judgePhonelngo() | |||||
| } | |||||
| } | |||||
| }) | |||||
| .catch(err => { | |||||
| tt.showToast({ | |||||
| title: err.code, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }).catch(err=>{ | |||||
| console.log(err); | |||||
| tt.showModal({ | |||||
| title: '提示', | |||||
| showCancel: false, | |||||
| content: '登录失败,请重新尝试', | |||||
| success: (res) => { | |||||
| if (res.cancel) { | |||||
| //点击取消,默认隐藏弹框 | |||||
| } else { | |||||
| //点击确定 | |||||
| tt.reLaunch({ | |||||
| url: '/pages/index/index', | |||||
| }) | |||||
| } | |||||
| } | |||||
| }); | |||||
| }) | |||||
| }), | |||||
| }); | |||||
| }, | }, | ||||
| @@ -1,4 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "抖音授权", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../components/navbar/navbar" | "navbar": "../../components/navbar/navbar" | ||||
| } | } | ||||
| @@ -1,4 +1,4 @@ | |||||
| <navbar home text="抖音授权"></navbar> | |||||
| <!-- <navbar home text="抖音授权"></navbar> --> | |||||
| <view class="login-body" > | <view class="login-body" > | ||||
| <view class="login-logo"> | <view class="login-logo"> | ||||
| <image src="{{mallImgUrl}}" mode='widthFix'></image> | <image src="{{mallImgUrl}}" mode='widthFix'></image> | ||||
| @@ -1,5 +1,5 @@ | |||||
| { | { | ||||
| "usingComponents": {}, | "usingComponents": {}, | ||||
| "navigationBarTitleText": "首页", | |||||
| "navigationBarTitleText": "", | |||||
| "navigationBarBackgroundColor": "#fff" | "navigationBarBackgroundColor": "#fff" | ||||
| } | } | ||||
| @@ -1,6 +1,6 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "商户详情", | |||||
| "navigationBarBackgroundColor": "#F4F5F9", | |||||
| "navigationBarTitleText": "门店详情", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | "navigationBarTextStyle": "black", | ||||
| "usingComponents": { | "usingComponents": { | ||||
| "c-banner": "../../../../components/banner/index", | "c-banner": "../../../../components/banner/index", | ||||
| @@ -1,5 +1,5 @@ | |||||
| <navbar back home text="门店详情"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar back home text="门店详情"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <view> | <view> | ||||
| <swiper class="index-slide" circular="false"> | <swiper class="index-slide" circular="false"> | ||||
| <block tt:for="{{imglist}}" tt:key="unique"> | <block tt:for="{{imglist}}" tt:key="unique"> | ||||
| @@ -1,7 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "积分商城", | "navigationBarTitleText": "积分商城", | ||||
| "navigationBarBackgroundColor": "#FD832D", | "navigationBarBackgroundColor": "#FD832D", | ||||
| "navigationBarTextStyle": "white", | |||||
| "navigationBarTextStyle": "#fff", | |||||
| "enablePullDownRefresh": true, | "enablePullDownRefresh": true, | ||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../components/navbar/navbar" | "navbar": "../../components/navbar/navbar" | ||||
| @@ -1,6 +1,6 @@ | |||||
| <!-- <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> --> | <!-- <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> --> | ||||
| <navbar back home text="积分商城" background='#FD832D' color="#FFF"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar back home text="积分商城" background='#FD832D' color="#FFF"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <view class='content-box' > | <view class='content-box' > | ||||
| <view class='topbg'> | <view class='topbg'> | ||||
| <view class='topbg-top'> | <view class='topbg-top'> | ||||
| @@ -1,5 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "积分变更记录", | |||||
| "navigationBarTitleText": "积分详情", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "enablePullDownRefresh": true, | "enablePullDownRefresh": true, | ||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../../components/navbar/navbar" | "navbar": "../../../components/navbar/navbar" | ||||
| @@ -1,5 +1,5 @@ | |||||
| <navbar back home text="积分详情"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar back home text="积分详情"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <view class='head' > | <view class='head' > | ||||
| <text>当前</text> | <text>当前</text> | ||||
| <text>{{creditAmount+'分'}}</text> | <text>{{creditAmount+'分'}}</text> | ||||
| @@ -1,7 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "积分兑换结果", | |||||
| "navigationBarTextStyle": "white", | |||||
| "navigationBarBackgroundColor": "#F13C42", | |||||
| "navigationBarTitleText": "兑换成功", | |||||
| "navigationBarTextStyle": "black", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "enablePullDownRefresh": true, | "enablePullDownRefresh": true, | ||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../../components/navbar/navbar" | "navbar": "../../../components/navbar/navbar" | ||||
| @@ -1,5 +1,5 @@ | |||||
| <navbar home back text="兑换成功" background='#FFF' ></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar home back text="兑换成功" background='#FFF' ></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <view class='pay-status'> | <view class='pay-status'> | ||||
| <view class='tilte'>兑换成功</view> | <view class='tilte'>兑换成功</view> | ||||
| <view class='coupon'> | <view class='coupon'> | ||||
| @@ -1,7 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "积分换礼", | "navigationBarTitleText": "积分换礼", | ||||
| "navigationBarBackgroundColor": "#F13C42", | |||||
| "navigationBarTextStyle": "white", | |||||
| "navigationBarBackgroundColor": "#FFF", | |||||
| "navigationBarTextStyle": "black", | |||||
| "enablePullDownRefresh": true, | "enablePullDownRefresh": true, | ||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../../components/navbar/navbar" | "navbar": "../../../components/navbar/navbar" | ||||
| @@ -1,6 +1,6 @@ | |||||
| <!--pages/spellDetail/index.wxml--> | <!--pages/spellDetail/index.wxml--> | ||||
| <navbar home back text="积分换礼" background='#FFF' ></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar home back text="积分换礼" background='#FFF' ></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <view class='container' > | <view class='container' > | ||||
| <!-- 拼团产品详情 --> | <!-- 拼团产品详情 --> | ||||
| <view class='detail'> | <view class='detail'> | ||||
| @@ -12,7 +12,18 @@ Page({ | |||||
| noDataFlag: false, | noDataFlag: false, | ||||
| businePageNum: 1, | businePageNum: 1, | ||||
| businessData: null, | businessData: null, | ||||
| // Lsit:[] | |||||
| Lsit:[], | |||||
| }, | |||||
| goOrder(){ | |||||
| tt.navigateTo({ | |||||
| url: '/pages/order/index/index', | |||||
| success: (res) => { | |||||
| }, | |||||
| fail: (res) => { | |||||
| }, | |||||
| }); | |||||
| }, | }, | ||||
| getCouponChannelList(key) { | getCouponChannelList(key) { | ||||
| if (app.globalData.token) { | if (app.globalData.token) { | ||||
| @@ -157,7 +168,7 @@ Page({ | |||||
| //获取券列表的价格和库存(列表接口有缓存通过这个来获取) str 列表数组里面的所有id | //获取券列表的价格和库存(列表接口有缓存通过这个来获取) str 列表数组里面的所有id | ||||
| getPriceAndStock(str) { | getPriceAndStock(str) { | ||||
| return | |||||
| console.log(str); | console.log(str); | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.batchCouponPriceAndStock, | url: config.api.batchCouponPriceAndStock, | ||||
| @@ -1,4 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "直播商品", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../components/navbar/navbar" | "navbar": "../../components/navbar/navbar" | ||||
| } | } | ||||
| @@ -1,14 +1,19 @@ | |||||
| <navbar home text="直播商品"></navbar> | |||||
| <!-- <navbar home text="直播商品"></navbar> --> | |||||
| <!-- <view style="height:{{navigationBarHeight}};line-height: {{navLineHeight}}; " class="title">直播商品</view> --> | <!-- <view style="height:{{navigationBarHeight}};line-height: {{navLineHeight}}; " class="title">直播商品</view> --> | ||||
| <view style="height:{{navigationBarHeight}};"></view> | |||||
| <!-- <view style="height:{{navigationBarHeight}};"></view> --> | |||||
| <view class="LsitBox" > | <view class="LsitBox" > | ||||
| <view tt:for="{{businessData}}" bindtap="goDetail" data-couponid="{{item.couponId}}" data-id="{{item.id}}" class="wBox"> | |||||
| <view tt:for="{{Lsit}}" bindtap="goDetail" data-couponid="{{item.couponId}}" data-id="{{item.id}}" class="wBox"> | |||||
| <view class="itemBox"> | <view class="itemBox"> | ||||
| <view class="imgBox"> | <view class="imgBox"> | ||||
| <image class="img" src="{{item.coverImg}}"> | <image class="img" src="{{item.coverImg}}"> | ||||
| </image> | </image> | ||||
| <view class="explain" tt:if="{{index==0}}"> | |||||
| <image src="../../assets/images/explain.gif" class="explainImg"></image> | |||||
| <view class="explainTitle">讲解中</view> | |||||
| </view> | |||||
| <view class="num">{{index+1}}</view> | <view class="num">{{index+1}}</view> | ||||
| </view> | </view> | ||||
| <view class="dataBox"> | <view class="dataBox"> | ||||
| <view class="titleName">{{item.title}}</view> | <view class="titleName">{{item.title}}</view> | ||||
| @@ -20,12 +25,13 @@ | |||||
| <view class="throgh">{{item.priceStr}}元</view> | <view class="throgh">{{item.priceStr}}元</view> | ||||
| <view class="discount1" tt:if="{{item.salePriceStr!=0}}">{{item.discount}}折</view> | <view class="discount1" tt:if="{{item.salePriceStr!=0}}">{{item.discount}}折</view> | ||||
| </view> | </view> | ||||
| <!-- <view class="progressBox"> | |||||
| <view class="progressBox"> | |||||
| <view class="schedule" style="width:{{item.percent}};"></view> | <view class="schedule" style="width:{{item.percent}};"></view> | ||||
| <view class="scheduleText">已售{{item.sale}}份</view> | <view class="scheduleText">已售{{item.sale}}份</view> | ||||
| </view> --> | |||||
| </view> | |||||
| <!-- <view class="discount">享{{item.discount}}折</view> --> | <!-- <view class="discount">享{{item.discount}}折</view> --> | ||||
| <view class="goPay">{{item.salePriceStr!=0?"立即抢购":"免费领取"}}</view> | |||||
| <view class="goPay" tt:if="{{item.remainInventory!=0}}">{{item.salePriceStr!=0?"立即抢购":"免费领取"}}</view> | |||||
| <view class="noPay" tt:if="{{item.remainInventory==0}}">已售空</view> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -35,6 +41,11 @@ | |||||
| </view> | </view> | ||||
| <view class="upDataBox"> | <view class="upDataBox"> | ||||
| <view class="goderImgBox" bindtap="goOrder"> | |||||
| <image src="../../assets/images/goOder.png" class="goOrder"></image> | |||||
| <view class="goOrderText">我的订单</view> | |||||
| </view> | |||||
| <view class="upData" bindtap="upDataLsit"> 点击刷新</view> | <view class="upData" bindtap="upDataLsit"> 点击刷新</view> | ||||
| </view> | </view> | ||||
| <view class="noDet" tt:if="{{noDataFlag}}">没有更多</view> | <view class="noDet" tt:if="{{noDataFlag}}">没有更多</view> | ||||
| @@ -46,6 +46,28 @@ | |||||
| left: 0; | left: 0; | ||||
| font-size: 24rpx; | font-size: 24rpx; | ||||
| } | } | ||||
| .explain{ | |||||
| position: absolute; | |||||
| bottom: 0rpx; | |||||
| left: 0; | |||||
| z-index: 1000; | |||||
| width: 100%; | |||||
| height: 40rpx; | |||||
| text-align: center; | |||||
| color: #d5af67; | |||||
| background-color: rgba(0, 0, 0, 0.5); | |||||
| font-size: 20rpx; | |||||
| line-height: 40rpx; | |||||
| } | |||||
| .explainImg{ | |||||
| width: 30rpx; | |||||
| height: 30rpx; | |||||
| float: left; | |||||
| margin: 5rpx 5rpx 5rpx 10rpx; | |||||
| } | |||||
| .explainTitle{ | |||||
| float: left; | |||||
| } | |||||
| .img{ | .img{ | ||||
| width: 100%; | width: 100%; | ||||
| height: 100%; | height: 100%; | ||||
| @@ -60,21 +82,21 @@ | |||||
| .titleName{ | .titleName{ | ||||
| color: #402e1e; | color: #402e1e; | ||||
| font-family: "PingFangSC-Regular"; | font-family: "PingFangSC-Regular"; | ||||
| font-weight: 600; | |||||
| font-weight: 700; | |||||
| width: 100%; | width: 100%; | ||||
| font-size: 28rpx; | |||||
| font-size: 26rpx; | |||||
| display: -webkit-box; | display: -webkit-box; | ||||
| -webkit-line-clamp: 1; | -webkit-line-clamp: 1; | ||||
| -webkit-box-orient: vertical; | -webkit-box-orient: vertical; | ||||
| overflow: hidden; | overflow: hidden; | ||||
| text-overflow: ellipsis; | text-overflow: ellipsis; | ||||
| margin: 20rpx 0 0 0; | |||||
| margin: 16rpx 0 0 0; | |||||
| /* height: 80rpx; */ | /* height: 80rpx; */ | ||||
| } | } | ||||
| .subTitleC{ | .subTitleC{ | ||||
| color: #402e1e; | color: #402e1e; | ||||
| font-size: 24rpx; | |||||
| margin: 6rpx 0 0 0; | |||||
| font-size: 20rpx; | |||||
| /* margin: 6rpx 0 0 0; */ | |||||
| display: -webkit-box; | display: -webkit-box; | ||||
| -webkit-line-clamp: 1; | -webkit-line-clamp: 1; | ||||
| -webkit-box-orient: vertical; | -webkit-box-orient: vertical; | ||||
| @@ -83,8 +105,8 @@ | |||||
| } | } | ||||
| .subTitle{ | .subTitle{ | ||||
| color: #a6a6a6; | color: #a6a6a6; | ||||
| font-size: 24rpx; | |||||
| margin: 6rpx 0 0 0; | |||||
| font-size: 20rpx; | |||||
| /* margin: 6rpx 0 0 0; */ | |||||
| display: -webkit-box; | display: -webkit-box; | ||||
| -webkit-line-clamp: 1; | -webkit-line-clamp: 1; | ||||
| -webkit-box-orient: vertical; | -webkit-box-orient: vertical; | ||||
| @@ -93,17 +115,17 @@ | |||||
| } | } | ||||
| .priceBox{ | .priceBox{ | ||||
| overflow: hidden; | overflow: hidden; | ||||
| margin-top: 6rpx; | |||||
| margin-bottom: 10rpx; | |||||
| margin-top: 4rpx; | |||||
| /* margin-bottom: 10rpx; */ | |||||
| } | } | ||||
| .rmb{ | .rmb{ | ||||
| color: #d5af67; | color: #d5af67; | ||||
| font-size: 24rpx; | |||||
| font-size: 22rpx; | |||||
| line-height: 40rpx; | line-height: 40rpx; | ||||
| float: left; | float: left; | ||||
| } | } | ||||
| .pri01{ | .pri01{ | ||||
| font-size: 28rpx; | |||||
| font-size: 26rpx; | |||||
| color: #d5af67; | color: #d5af67; | ||||
| letter-spacing: 0; | letter-spacing: 0; | ||||
| line-height: 40rpx; | line-height: 40rpx; | ||||
| @@ -114,30 +136,29 @@ | |||||
| text-decoration: line-through; | text-decoration: line-through; | ||||
| margin-left: 10rpx; | margin-left: 10rpx; | ||||
| color: #999 !important; | color: #999 !important; | ||||
| line-height: 40rpx; | |||||
| font-size: 24rpx; | |||||
| line-height: 38rpx; | |||||
| font-size: 22rpx; | |||||
| float: left; | float: left; | ||||
| } | } | ||||
| .progressBox{ | .progressBox{ | ||||
| height: 30rpx; | |||||
| height: 26rpx; | |||||
| width: 240rpx; | width: 240rpx; | ||||
| overflow: hidden; | overflow: hidden; | ||||
| border-radius: 20rpx; | border-radius: 20rpx; | ||||
| background-color: #d8d8d8; | background-color: #d8d8d8; | ||||
| margin-top: 16rpx; | |||||
| margin-top: 4rpx; | |||||
| position: relative; | position: relative; | ||||
| } | } | ||||
| .schedule{ | .schedule{ | ||||
| float: left; | float: left; | ||||
| height: 30rpx; | |||||
| height: 26rpx; | |||||
| border-radius: 20rpx; | border-radius: 20rpx; | ||||
| text-align: center; | text-align: center; | ||||
| color: #fff; | color: #fff; | ||||
| height: 30rpx; | |||||
| font-size: 24rpx; | |||||
| background-color: #d5af67; | background-color: #d5af67; | ||||
| } | } | ||||
| .scheduleText{ | .scheduleText{ | ||||
| line-height: 26rpx; | |||||
| position: absolute; | position: absolute; | ||||
| top: 0; | top: 0; | ||||
| left: 20rpx; | left: 20rpx; | ||||
| @@ -153,7 +174,7 @@ | |||||
| } | } | ||||
| .discount1{ | .discount1{ | ||||
| float: left; | float: left; | ||||
| font-size: 20rpx; | |||||
| font-size: 18rpx; | |||||
| border: #d5af67 1px solid; | border: #d5af67 1px solid; | ||||
| color: #d5af67; | color: #d5af67; | ||||
| border-radius: 20rpx; | border-radius: 20rpx; | ||||
| @@ -173,6 +194,18 @@ | |||||
| padding: 12rpx 16rpx; | padding: 12rpx 16rpx; | ||||
| border-radius: 40rpx; | border-radius: 40rpx; | ||||
| } | } | ||||
| .noPay{ | |||||
| position: absolute; | |||||
| bottom: 6rpx; | |||||
| right: 0rpx; | |||||
| background-color: #a6a6a6; | |||||
| color: #fff; | |||||
| font-size: 24rpx; | |||||
| text-align: center; | |||||
| line-height: 28rpx; | |||||
| padding: 12rpx 16rpx; | |||||
| border-radius: 40rpx; | |||||
| } | |||||
| .noDet{ | .noDet{ | ||||
| text-align: center; | text-align: center; | ||||
| line-height: 40rpx; | line-height: 40rpx; | ||||
| @@ -186,11 +219,29 @@ | |||||
| left: 0; | left: 0; | ||||
| background-color: #fff; | background-color: #fff; | ||||
| height: 120rpx; | height: 120rpx; | ||||
| overflow: hidden; | |||||
| } | |||||
| .goderImgBox{ | |||||
| float: left; | |||||
| margin-top: 10rpx; | |||||
| margin-left: 60rpx; | |||||
| width: 80rpx; | |||||
| overflow: hidden; | |||||
| } | |||||
| .goOrder{ | |||||
| width: 60rpx; | |||||
| height: 60rpx; | |||||
| margin-left: 8rpx; | |||||
| display: block; | |||||
| } | |||||
| .goOrderText{ | |||||
| text-align: center; | |||||
| font-size: 20rpx; | |||||
| color: #d5af67; | |||||
| } | } | ||||
| .upData{ | .upData{ | ||||
| width: 70%; | width: 70%; | ||||
| margin: 10rpx auto 0 auto; | |||||
| margin: 10rpx auto 0 40rpx; | |||||
| text-align: center; | text-align: center; | ||||
| height: 80rpx; | height: 80rpx; | ||||
| @@ -199,4 +250,5 @@ | |||||
| border-radius: 50rpx; | border-radius: 50rpx; | ||||
| color: #d5af67; | color: #d5af67; | ||||
| font-size: 32rpx; | font-size: 32rpx; | ||||
| float: left; | |||||
| } | } | ||||
| @@ -150,6 +150,11 @@ Page({ | |||||
| checkuserstatus(options) { | checkuserstatus(options) { | ||||
| let that = this; | let that = this; | ||||
| if(options && options.couponChannelId&&options.type=='orderAffirm'){ | |||||
| tt.redirectTo({ | |||||
| url:`/pages/coupon/confirmation/confirmation?couponChannelId=${options.couponChannelId}` | |||||
| }) | |||||
| } | |||||
| if(options && options.couponChannelId && !options.spellGroup && app.globalData.type != 'sd'){ | if(options && options.couponChannelId && !options.spellGroup && app.globalData.type != 'sd'){ | ||||
| if (options.cuserId) { | if (options.cuserId) { | ||||
| tt.redirectTo({ | tt.redirectTo({ | ||||
| @@ -1,5 +1,5 @@ | |||||
| { | { | ||||
| "usingComponents": {}, | "usingComponents": {}, | ||||
| "navigationBarTitleText": "首页", | |||||
| "navigationBarTitleText": "", | |||||
| "navigationBarBackgroundColor": "#fff" | "navigationBarBackgroundColor": "#fff" | ||||
| } | } | ||||
| @@ -1,125 +0,0 @@ | |||||
| const app = getApp() | |||||
| const navigationBarHeight = (getApp().statusBarHeight + 50) + "px" | |||||
| const Http = require("../../utils/HttpBasics"); | |||||
| let config = require("../../config/config.js"); | |||||
| const util = require("../../utils/util") | |||||
| Page({ | |||||
| data: { | |||||
| navigationBarHeight, | |||||
| boatLsit:[ | |||||
| { | |||||
| name:"全部", | |||||
| value:"all" | |||||
| }, | |||||
| { | |||||
| name:"待付款", | |||||
| value:"0" | |||||
| }, | |||||
| { | |||||
| name:"已完成", | |||||
| value:"1" | |||||
| }, | |||||
| ], | |||||
| boatFlag:"all", | |||||
| content:"", | |||||
| loading: false, //"上拉加载"的变量,默认false,隐藏 | |||||
| pageNum:1, | |||||
| allow_load: true, | |||||
| list:[] | |||||
| }, | |||||
| setBoatFlag(e){ | |||||
| let index = e.currentTarget.dataset.index | |||||
| console.log(index); | |||||
| this.setData({ | |||||
| boatFlag:index, | |||||
| pageNum:1, | |||||
| allow_load: true, | |||||
| }) | |||||
| this.getList() | |||||
| }, | |||||
| getList(){ | |||||
| let that = this | |||||
| if (that.data.allow_load) { | |||||
| that.setData({ | |||||
| loading: true, | |||||
| content: '小主,我在玩命加载中...' | |||||
| }) | |||||
| Http.get({ | |||||
| url:config.api.orderList, | |||||
| data:{ | |||||
| pageNum:that.data.pageNum, | |||||
| pageSize: 10, | |||||
| orderStatus:that.data.boatFlag=="all"?"":that.data.boatFlag, | |||||
| paymentType: 0, | |||||
| } | |||||
| }).then(res=>{ | |||||
| if(that.data.pageNum==1){ | |||||
| that.setData({ | |||||
| list: [] | |||||
| }) | |||||
| } | |||||
| let tempArr= that.data.list | |||||
| tempArr.map(item=>{ | |||||
| item.createDate = util.formatTime(item.createDate, "yyyy-MM-dd hh:mm:ss"); | |||||
| }) | |||||
| if(that.data.pageNum>=res.data.pages){ | |||||
| that.setData({ | |||||
| allow_load: false | |||||
| }) | |||||
| } | |||||
| if(that.data.pageNum>1){//分页 | |||||
| that.setData({ | |||||
| list:[...tempArr ,...res.data.list], | |||||
| loading:false | |||||
| }) | |||||
| }else{ | |||||
| let tempLsit = res.data.list | |||||
| tempLsit.map(item=>{ | |||||
| item.createDate = util.formatTime(item.createDate, "yyyy-MM-dd hh:mm:ss"); | |||||
| }) | |||||
| that.setData({ | |||||
| list: tempLsit, | |||||
| loading:false | |||||
| }) | |||||
| } | |||||
| }).catch(err => { | |||||
| that.setData({ | |||||
| loading:false | |||||
| }) | |||||
| tt.showToast({ | |||||
| title: err.message ? err.message : err.data, // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| }) | |||||
| }else { | |||||
| that.setData({ | |||||
| loading: true, | |||||
| content: "——— 再拉裤子就掉了啦 ———" | |||||
| }) | |||||
| setTimeout(function () { | |||||
| that.setData({ | |||||
| loading: false, | |||||
| }) | |||||
| }, 1400) | |||||
| } | |||||
| }, | |||||
| onLoad: function (options) { | |||||
| // this.getList() | |||||
| }, | |||||
| onReachBottom(){//触底 | |||||
| console.log(111); | |||||
| this.setData({ | |||||
| pageNum:this.data.pageNum+1 | |||||
| }) | |||||
| this.getList() | |||||
| }, | |||||
| onShow:function(){ | |||||
| this.getList() | |||||
| } | |||||
| }) | |||||
| @@ -1,6 +0,0 @@ | |||||
| { | |||||
| "navigationBarTitleText": "我的订单", | |||||
| "usingComponents": { | |||||
| "navbar": "../../components/navbar/navbar" | |||||
| } | |||||
| } | |||||
| @@ -1,64 +0,0 @@ | |||||
| <view class="BoxBg"> | |||||
| <navbar back home text="我的订单" background='#fff' color="#000"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <view class="boatBoxf" style="top:{{navigationBarHeight}}" > | |||||
| <view class="boatBox" > | |||||
| <view class="boatItemBox" tt:for="{{boatLsit}}" tt:key="index" bindtap="setBoatFlag" data-index="{{item.value}}"> | |||||
| <view class="{{boatFlag==item.value?'boatTitleA':'boatTitle'}}">{{item.name}}</view> | |||||
| <view class="boatA" tt:if="{{boatFlag==item.value}}"></view> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| <view style="height:96rpx "></view> | |||||
| <view class="orderListBox" tt:for="{{list}}" tt:key="{{index}}"> | |||||
| <view class="titleBox"> | |||||
| <view class="orderName">{{item.title}}</view> | |||||
| <!-- <view class="payStatus">已支付</view> --> | |||||
| <text class='wait' tt:if="{{item.orderStatus==0}}">等待付款</text> | |||||
| <!-- <text class='wait' tt:if="{{item.orderStatus==10}}">拼团中</text> --> | |||||
| <text class='sucess' tt:if="{{item.orderStatus==3}}">待退款</text> | |||||
| <text class='close' tt:if="{{item.orderStatus==2}}">交易关闭</text> | |||||
| <!-- <text class='close' tt:if="{{item.orderStatus==6}}">砍价中</text> --> | |||||
| <!-- <text class='sucess' tt:if="{{item.orderStatus==7}}">砍价成功</text> --> | |||||
| <!-- <text class='close' tt:if="{{item.orderStatus==8}}">砍价失败</text> --> | |||||
| <!-- <text class='close' tt:if="{{item.orderStatus==9}}">砍价取消</text> --> | |||||
| <!-- <text class='close' tt:if="{{item.orderStatus==12}}">拼团已过期</text> --> | |||||
| <!-- <text class='close' tt:if="{{item.orderStatus==12}}">拼团失败</text> --> | |||||
| <!-- <text class='close' tt:if="{{item.orderStatus==8}}">砍价失败</text> --> | |||||
| <text class='close' tt:if="{{item.orderStatus==4}}">已退款</text> | |||||
| <text class='wait' tt:if="{{item.orderStatus==5}}">退款失败</text> | |||||
| <!-- <text class='sucess' tt:if="{{item.orderStatus==11}}">拼团成功</text> --> | |||||
| <text class='sucess' tt:if="{{item.orderStatus==1&&item.salePrice==0&&item.type!=50&&item.type!=51}}">免费领取</text> | |||||
| <!-- <text class='sucess' tt:if="{{item.orderStatus==1&&item.salePrice==0&&(item.type==50||item.type==51)}}">积分兑换</text> --> | |||||
| <text class='sucess' tt:if="{{item.orderStatus==1&&item.salePrice!=0}}">付款成功</text> | |||||
| <!-- <view class="stayPay">待支付</view> --> | |||||
| </view> | |||||
| <view class="orderDetail"> | |||||
| <view class="orderImgBox"> | |||||
| <image mode="aspectFill" style="width: 100%; height:100%;border-radius: 12rpx;" src="{{item.coverImg}}" /> | |||||
| </view> | |||||
| <view class="orderDataBox"> | |||||
| <view class="fTitle">{{item.subTitle}}</view> | |||||
| <view class="face">{{item.price/100}}元</view> | |||||
| <view class="creationDate">{{item.createDate}}</view> | |||||
| </view> | |||||
| </view> | |||||
| <view class="practicalPayBox"> | |||||
| <view class="practicalText">实付金额:</view> | |||||
| <view class="practicalPay">{{item.payment/100}}元</view> | |||||
| <navigator class="orderLook" tt:if="{{item.orderStatus==1||item.orderStatus==11}}" url="/pages/detailOrder/detailOrder?orderId={{item.id}}" hover-class="navigator-hover" open-type="navigate">去查看</navigator> | |||||
| <navigator class="goPay" tt:if="{{item.orderStatus==0 || item.orderStatus==7}}" url="/pages/detailOrder/detailOrder?orderId={{item.id}}" hover-class="navigator-hover" open-type="navigate">去支付</navigator> | |||||
| <!-- <view class="goPay">去支付</view> --> | |||||
| </view> | |||||
| </view> | |||||
| <view class="dingdan" tt:if="{{list.length==0}}"> | |||||
| <image src="../../assets/itemImg/noOrders.png" mode="widthFix"></image> | |||||
| <text>您还没有相关订单</text> | |||||
| <text>再忙,也要记得买点什么犒赏自己~</text> | |||||
| </view> | |||||
| <view class="loading" tt:if="{{loading}}"> | |||||
| <image src="../../assets/itemImg/loading.gif" mode="widthFix"></image>{{content}} | |||||
| </view> | |||||
| </view> | |||||
| @@ -1,221 +0,0 @@ | |||||
| .boatBox{ | |||||
| width: 100% !important; | |||||
| height: 96rpx; | |||||
| display: flex; | |||||
| justify-content: space-around; | |||||
| background-color: #fff; | |||||
| } | |||||
| .boatBoxf{ | |||||
| width: 100% !important; | |||||
| position: fixed; | |||||
| top: 0; | |||||
| left: 0; | |||||
| } | |||||
| .boatTitle{ | |||||
| font-size: 30rpx; | |||||
| text-align: center; | |||||
| height: 80rpx; | |||||
| line-height: 80rpx; | |||||
| color: #999; | |||||
| } | |||||
| .boatTitleA{ | |||||
| font-size: 32rpx; | |||||
| text-align: center; | |||||
| height: 80rpx; | |||||
| line-height: 80rpx; | |||||
| font-weight: 500; | |||||
| } | |||||
| .boatA{ | |||||
| width: 80rpx; | |||||
| height: 6rpx; | |||||
| background-color: #fb3e5c; | |||||
| margin: 0 auto; | |||||
| border-radius: 10rpx; | |||||
| } | |||||
| .orderListBox{ | |||||
| width: 100%; | |||||
| margin-top: 20rpx; | |||||
| background-color: #fff; | |||||
| } | |||||
| .titleBox{ | |||||
| overflow: hidden; | |||||
| font-size: 30rpx; | |||||
| } | |||||
| .orderName{ | |||||
| float: left; | |||||
| margin: 20rpx; | |||||
| } | |||||
| .payStatus{ | |||||
| float: right; | |||||
| margin: 20rpx; | |||||
| } | |||||
| .stayPay{ | |||||
| float: right; | |||||
| color: #FD832D; | |||||
| margin: 20rpx; | |||||
| } | |||||
| .orderDetail{ | |||||
| overflow: hidden; | |||||
| } | |||||
| .orderImgBox{ | |||||
| float: left; | |||||
| width: 140rpx; | |||||
| height: 140rpx; | |||||
| background-color: #fb3e5c; | |||||
| border-radius: 12rpx; | |||||
| margin-left: 20rpx; | |||||
| } | |||||
| .orderDataBox{ | |||||
| float: left; | |||||
| width: 520rpx; | |||||
| margin-left: 20rpx; | |||||
| font-size: 28rpx; | |||||
| } | |||||
| .fTitle{ | |||||
| height: 46rpx; | |||||
| height: 46rpx; | |||||
| } | |||||
| .face{ | |||||
| height: 46rpx; | |||||
| height: 46rpx; | |||||
| } | |||||
| .face::before{ | |||||
| content: "面额:"; | |||||
| font-size: 26rpx; | |||||
| color: #999; | |||||
| ; | |||||
| } | |||||
| .creationDate{ | |||||
| height: 46rpx; | |||||
| height: 46rpx; | |||||
| } | |||||
| .creationDate::before{ | |||||
| content: "下单时间:"; | |||||
| font-size: 26rpx; | |||||
| color: #999; | |||||
| } | |||||
| .practicalPayBox{ | |||||
| /* height: 60rpx; */ | |||||
| overflow: hidden; | |||||
| line-height: 70rpx; | |||||
| font-size: 28rpx; | |||||
| border-top: #e6e6e6 1rpx solid; | |||||
| margin-top: 10rpx; | |||||
| } | |||||
| .practicalText{ | |||||
| font-size: 26rpx; | |||||
| float: left; | |||||
| margin-left: 20rpx; | |||||
| } | |||||
| .practicalPay{ | |||||
| color: #fb3e5c; | |||||
| float: left; | |||||
| font-size: 28rpx; | |||||
| } | |||||
| .orderLook{ | |||||
| float: right; | |||||
| margin-right: 20rpx; | |||||
| height: 50rpx; | |||||
| color: #fff; | |||||
| line-height: 50rpx; | |||||
| border-radius: 40rpx; | |||||
| background: linear-gradient(130deg,rgba(50,177,252,1) 0%,rgba(47,108,255,1) 100%); | |||||
| margin-top: 10rpx; | |||||
| margin-bottom: 10rpx; | |||||
| padding: 0 20rpx; | |||||
| } | |||||
| .goPay{ | |||||
| float: right; | |||||
| margin-right: 20rpx; | |||||
| height: 50rpx; | |||||
| color: #fff; | |||||
| line-height: 50rpx; | |||||
| border-radius: 40rpx; | |||||
| background: linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%); | |||||
| margin-bottom: 10rpx; | |||||
| margin-top: 10rpx; | |||||
| padding: 0 20rpx; | |||||
| } | |||||
| .loading { | |||||
| text-align: center; | |||||
| height: 80rpx; | |||||
| line-height: 80rpx; | |||||
| font-size: 26rpx; | |||||
| color: #999; | |||||
| } | |||||
| .loading image { | |||||
| width: 60rpx; | |||||
| height: 60rpx; | |||||
| vertical-align: middle; | |||||
| margin-right: 10rpx; | |||||
| } | |||||
| .dingdan { | |||||
| margin-top: 33rpx; | |||||
| } | |||||
| .dingdan text:nth-of-type(1) { | |||||
| display: block; | |||||
| font-size: 34rpx; | |||||
| color: #333; | |||||
| letter-spacing: 0; | |||||
| text-align: center; | |||||
| } | |||||
| .dingdan text:nth-of-type(2) { | |||||
| display: block; | |||||
| font-size: 28rpx; | |||||
| color: #999; | |||||
| letter-spacing: 0; | |||||
| text-align: center; | |||||
| } | |||||
| .dingdan image { | |||||
| display: block; | |||||
| width: 300rpx; | |||||
| height: 300rpx; | |||||
| margin: 0 auto 16rpx; | |||||
| } | |||||
| .wait{ | |||||
| display: inline-block; | |||||
| width: 123rpx !important; | |||||
| overflow: visible!important; | |||||
| font-size: 28rpx; | |||||
| color: #FD832D; | |||||
| letter-spacing: 0; | |||||
| text-align: right; | |||||
| line-height: 28rpx!important; | |||||
| float: right; | |||||
| margin: 20rpx; | |||||
| } | |||||
| .sucess { | |||||
| display: inline-block; | |||||
| width: 123rpx !important; | |||||
| /* overflow: hidden; */ | |||||
| font-family:PingFangSC-Regular; | |||||
| font-size: 28rpx; | |||||
| font-weight:400; | |||||
| color: #2C8DFF; | |||||
| letter-spacing: 0; | |||||
| text-align: right; | |||||
| line-height: 26px; | |||||
| float: right; | |||||
| margin: 20rpx; | |||||
| } | |||||
| .close { | |||||
| display: inline-block; | |||||
| width: 123rpx !important; | |||||
| overflow: hidden; | |||||
| font-size: 28rpx; | |||||
| color: #999; | |||||
| letter-spacing: 0; | |||||
| text-align: right; | |||||
| line-height: 28rpx; | |||||
| float: right; | |||||
| margin: 20rpx; | |||||
| } | |||||
| @@ -1,7 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "关于我们", | "navigationBarTitleText": "关于我们", | ||||
| "navigationBarBackgroundColor": "#FD832D", | |||||
| "navigationBarTextStyle": "white", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../components/navbar/navbar" | "navbar": "../../components/navbar/navbar" | ||||
| } | } | ||||
| @@ -1,5 +1,5 @@ | |||||
| <navbar back home text="关于我们" ></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar back home text="关于我们" ></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <view class='codeBox'> | <view class='codeBox'> | ||||
| <view class='code' > | <view class='code' > | ||||
| <image class='icons' src="{{img}}" mode='widthFix'></image> | <image class='icons' src="{{img}}" mode='widthFix'></image> | ||||
| @@ -10,9 +10,12 @@ Page({ | |||||
| * 页面的初始数据 | * 页面的初始数据 | ||||
| */ | */ | ||||
| data: { | data: { | ||||
| payOrderNo:"",//评价订单id | |||||
| evaluateFlag:false,//控制评价显隐藏 | |||||
| serviceUrl:'',//客服外部链接 | |||||
| curHtml: '', | |||||
| showIdFalg: false, | |||||
| outOrderNo: '',//支付2.0继续支付id | |||||
| payOrderNo: "",//评价订单id | |||||
| evaluateFlag: false,//控制评价显隐藏 | |||||
| serviceUrl: '',//客服外部链接 | |||||
| dynamicRq: "", | dynamicRq: "", | ||||
| expiredSeconds: 0, | expiredSeconds: 0, | ||||
| showhieRq: false, | showhieRq: false, | ||||
| @@ -48,6 +51,54 @@ Page({ | |||||
| contentType: 0, | contentType: 0, | ||||
| orderFlag: false, //判断是不是线上配送 | orderFlag: false, //判断是不是线上配送 | ||||
| }, | }, | ||||
| handleRefund(event) { | |||||
| const { status, result } = event.detail; | |||||
| if (status === 'success') { | |||||
| const { refundId, outRefundNo } = result; | |||||
| console.log(refundId, outRefundNo ); | |||||
| } else { | |||||
| const { errMsg } = result; | |||||
| console.log(errMsg); | |||||
| } | |||||
| }, | |||||
| applyRefund(event) { | |||||
| const { orderId } = event.detail; | |||||
| const extra = { orderId }; // 开发者需要透传的参数,可自定义内容 | |||||
| return new Promise(resolve => { | |||||
| resolve(extra); | |||||
| }); | |||||
| }, | |||||
| showId() { | |||||
| let this_ = this; | |||||
| if (!this_.data.showIdFalg) { | |||||
| tt.showModal({ | |||||
| // title: "查看券码", | |||||
| content: "是否查看完整券码", | |||||
| success(res) { | |||||
| if (res.confirm) { | |||||
| console.log("confirm, continued"); | |||||
| this_.setData({ | |||||
| showIdFalg: true | |||||
| }) | |||||
| } else if (res.cancel) { | |||||
| //取消 | |||||
| console.log("cancel, cold"); | |||||
| } else { | |||||
| // what happend? | |||||
| } | |||||
| }, | |||||
| fail(err) { | |||||
| console.log(`showModal 调用失败`, err); | |||||
| }, | |||||
| }); | |||||
| } else { | |||||
| this.setData({ | |||||
| showIdFalg: false | |||||
| }) | |||||
| } | |||||
| }, | |||||
| copeCode(e) { | copeCode(e) { | ||||
| let code = e.currentTarget.dataset.text | let code = e.currentTarget.dataset.text | ||||
| tt.setClipboardData({ | tt.setClipboardData({ | ||||
| @@ -90,13 +141,13 @@ Page({ | |||||
| }, | }, | ||||
| }); | }); | ||||
| }, | }, | ||||
| refund(){//退款 | |||||
| refund() {//退款 | |||||
| Http.post({ | Http.post({ | ||||
| url:config.api.refund, | |||||
| data:{ | |||||
| orderId:this.data.order.id | |||||
| url: config.api.refund, | |||||
| data: { | |||||
| orderId: this.data.order.id | |||||
| } | } | ||||
| }).then(res=>{ | |||||
| }).then(res => { | |||||
| tt.navigateTo({ | tt.navigateTo({ | ||||
| url: `/pages/refund/refund?id=${this.data.order.id}`, | url: `/pages/refund/refund?id=${this.data.order.id}`, | ||||
| success: (res) => { | success: (res) => { | ||||
| @@ -106,7 +157,7 @@ Page({ | |||||
| }, | }, | ||||
| }); | }); | ||||
| }).catch(err=>{ | |||||
| }).catch(err => { | |||||
| tt.showToast({ | tt.showToast({ | ||||
| title: err.message ? err.message : err.data, // 内容 | title: err.message ? err.message : err.data, // 内容 | ||||
| icon: "none" | icon: "none" | ||||
| @@ -115,14 +166,14 @@ Page({ | |||||
| }, | }, | ||||
| goRefund(e) { | goRefund(e) { | ||||
| let this_ = this | let this_ = this | ||||
| if(this_.data.order.couponOrderStatus==0){ | |||||
| if (this_.data.order.couponOrderStatus == 0) { | |||||
| tt.showModal({ | tt.showModal({ | ||||
| title: "申请退款", | title: "申请退款", | ||||
| content: "提交申请退款", | content: "提交申请退款", | ||||
| confirmText: "确定", | confirmText: "确定", | ||||
| success(res) { | success(res) { | ||||
| if (res.confirm) { | if (res.confirm) { | ||||
| this_.refund() | this_.refund() | ||||
| console.log("confirm, continued"); | console.log("confirm, continued"); | ||||
| } else if (res.cancel) { | } else if (res.cancel) { | ||||
| @@ -135,7 +186,7 @@ Page({ | |||||
| console.log(`showModal调用失败`); | console.log(`showModal调用失败`); | ||||
| }, | }, | ||||
| }); | }); | ||||
| }else if(this_.data.order.couponOrderStatus==3){//退款中 | |||||
| } else if (this_.data.order.couponOrderStatus == 3) {//退款中 | |||||
| tt.navigateTo({ | tt.navigateTo({ | ||||
| url: `/pages/refund/refund?id=${this.data.order.id}`, | url: `/pages/refund/refund?id=${this.data.order.id}`, | ||||
| success: (res) => { | success: (res) => { | ||||
| @@ -146,7 +197,7 @@ Page({ | |||||
| }, | }, | ||||
| }); | }); | ||||
| } | } | ||||
| }, | }, | ||||
| @@ -162,20 +213,88 @@ Page({ | |||||
| } | } | ||||
| }).then(res => { | }).then(res => { | ||||
| tt.hideLoading(); | tt.hideLoading(); | ||||
| var createDate = util.formatTime(res.data.orders[0].createDate, "yyyy-MM-dd hh:mm:ss"); | |||||
| var createDate = util.formatTime(res.data.orders[0].createDate, "yyyy-MM-dd"); | |||||
| let tempData = res.data.orders[0] | let tempData = res.data.orders[0] | ||||
| tempData.deliveryInfo = tempData.deliveryInfo ? JSON.parse(tempData.deliveryInfo) : "" | tempData.deliveryInfo = tempData.deliveryInfo ? JSON.parse(tempData.deliveryInfo) : "" | ||||
| tempData.itemGroup = tempData.itemGroup ? JSON.parse(tempData.itemGroup) : "" | tempData.itemGroup = tempData.itemGroup ? JSON.parse(tempData.itemGroup) : "" | ||||
| tempData.validStartDate = util.formatTime(tempData.validStartDate, "yyyy-MM-dd") | tempData.validStartDate = util.formatTime(tempData.validStartDate, "yyyy-MM-dd") | ||||
| tempData.validEndDate = util.formatTime(tempData.validEndDate, "yyyy-MM-dd") | tempData.validEndDate = util.formatTime(tempData.validEndDate, "yyyy-MM-dd") | ||||
| tempData.couponOrderIdS = tempData.couponOrderId ? tempData.couponOrderId.slice(0, 4) + `******` + tempData.couponOrderId.slice(14) : '' | |||||
| if (tempData.productAttrs && tempData.skuAttrs) { | |||||
| tempData.productAttrs = JSON.parse(tempData.productAttrs) | |||||
| tempData.skuAttrs = JSON.parse(tempData.skuAttrs) | |||||
| console.log(tempData.productAttrs); | |||||
| console.log(tempData.skuAttrs); | |||||
| console.log('****'); | |||||
| tempData.productAttrs.map(item => { | |||||
| if (item.key == "appointment") { | |||||
| let tempAppoinObj = JSON.parse(item.data) | |||||
| if (tempAppoinObj.need_appointment) { | |||||
| let subscribeSing = ""; | |||||
| if (tempAppoinObj.ahead_time_type == 1) { | |||||
| subscribeSing = `需提前${tempAppoinObj.ahead_day_num}天致电商家预约` | |||||
| } else if (tempAppoinObj.ahead_time_type == 2) { | |||||
| subscribeSing = `需提前${tempAppoinObj.ahead_hour_num}小时致电商家预约` | |||||
| } else if (tempAppoinObj.ahead_time_type == 3) { | |||||
| subscribeSing = `需提前${tempAppoinObj.ahead_minute_num}分钟致电商家预约` | |||||
| } | |||||
| tempData.subscribeSing = subscribeSing | |||||
| } | |||||
| } | |||||
| if (item.key == "Notification") { | |||||
| if (item.data != '') { | |||||
| tempData.curLsit = JSON.parse(item.data) | |||||
| } | |||||
| } | |||||
| if (item.key == "bring_out_meal") { | |||||
| tempData.besides = item.data | |||||
| } | |||||
| if (item.key == "free_pack") { | |||||
| tempData.pack = item.data | |||||
| } | |||||
| if (item.key == "superimposed_discounts") { | |||||
| tempData.superimposed_discounts = item.data | |||||
| } | |||||
| if (item.key == "private_room") { | |||||
| tempData.private_room = item.data | |||||
| } | |||||
| if (item.key == "rec_person_num_max") { | |||||
| tempData.rec_person_num_max = item.data | |||||
| } | |||||
| if (item.key == 'Description') { | |||||
| tempData.Description = JSON.parse(item.data) | |||||
| } | |||||
| if (item.key == "can_no_use_date") { | |||||
| tempData.can_no_use_date = JSON.parse(item.data) | |||||
| } | |||||
| }) | |||||
| tempData.skuAttrs.map(item => { | |||||
| if (item.key == "commodity") { | |||||
| if (item.data != '') { | |||||
| tempData.itemGroup = JSON.parse(item.data) | |||||
| } | |||||
| } | |||||
| }) | |||||
| } | |||||
| that.setData({ | that.setData({ | ||||
| outOrderNo: res.data.id, | |||||
| order: tempData, | order: tempData, | ||||
| showPage: true, | showPage: true, | ||||
| createDate: createDate, | createDate: createDate, | ||||
| composeOrderType: tempData.composeOrderType, | composeOrderType: tempData.composeOrderType, | ||||
| contentType: tempData.contentType ? tempData.contentType : 0, | contentType: tempData.contentType ? tempData.contentType : 0, | ||||
| orderFlag: tempData.type == 11 ? true : false ,//判断是不是线上配送 | |||||
| orderFlag: tempData.type == 11 ? true : false,//判断是不是线上配送 | |||||
| }) | }) | ||||
| if (tempData.couponOrderId) { //0未付款 1已支付 2已取消 3退款中 4已退款 | if (tempData.couponOrderId) { //0未付款 1已支付 2已取消 3退款中 4已退款 | ||||
| that.setRq() | that.setRq() | ||||
| @@ -220,18 +339,18 @@ Page({ | |||||
| setInter: setInter | setInter: setInter | ||||
| }) | }) | ||||
| } | } | ||||
| if(tempData.couponOrderStatus&&tempData.couponOrderStatus==1){//核销后 | |||||
| if (tempData.couponOrderStatus && tempData.couponOrderStatus == 1) {//核销后 | |||||
| that.goIfEvaluate()//判断订单是否能评价 | that.goIfEvaluate()//判断订单是否能评价 | ||||
| } | } | ||||
| }) | |||||
| .catch(error => { | |||||
| tt.hideLoading(); | |||||
| tt.showModal({ | |||||
| title: '提示', | |||||
| content: error.errMsg, | |||||
| showCancel: false | |||||
| }) | |||||
| }).catch(error => { | |||||
| console.log(error, "error"); | |||||
| tt.hideLoading(); | |||||
| tt.showModal({ | |||||
| title: '提示', | |||||
| content: error.errMsg, | |||||
| showCancel: false | |||||
| }) | }) | ||||
| }) | |||||
| }, | }, | ||||
| //确认收货 | //确认收货 | ||||
| verify() { | verify() { | ||||
| @@ -327,7 +446,7 @@ Page({ | |||||
| couponOrderId: _this.data.order.couponOrderId | couponOrderId: _this.data.order.couponOrderId | ||||
| } | } | ||||
| }).then(res => { | }).then(res => { | ||||
| console.log(res, "res") | |||||
| console.log(res, "res") | |||||
| _this.setData({ | _this.setData({ | ||||
| dynamicRq: res.data.dynamicId, | dynamicRq: res.data.dynamicId, | ||||
| expiredSeconds: res.data.expiredSeconds | expiredSeconds: res.data.expiredSeconds | ||||
| @@ -338,9 +457,9 @@ Page({ | |||||
| TYPE: "couponorder", | TYPE: "couponorder", | ||||
| ID: _this.data.dynamicRq | ID: _this.data.dynamicRq | ||||
| }) | }) | ||||
| if(res.data.expiredSeconds==0){ | |||||
| if (res.data.expiredSeconds == 0) { | |||||
| //倒计时为零直接显示券码 | //倒计时为零直接显示券码 | ||||
| }else{ | |||||
| } else { | |||||
| let inre = setInterval(() => { | let inre = setInterval(() => { | ||||
| if (_this.data.expiredSeconds > 1) { | if (_this.data.expiredSeconds > 1) { | ||||
| _this.setData({ | _this.setData({ | ||||
| @@ -440,7 +559,7 @@ Page({ | |||||
| console.log(err); | console.log(err); | ||||
| }) | }) | ||||
| }, | }, | ||||
| goEvaluate(){ | |||||
| goEvaluate() { | |||||
| let _this = this | let _this = this | ||||
| tt.rateAwemeOrder({ | tt.rateAwemeOrder({ | ||||
| orderId: _this.data.payOrderNo, | orderId: _this.data.payOrderNo, | ||||
| @@ -450,10 +569,10 @@ Page({ | |||||
| tt.navigateBack({ | tt.navigateBack({ | ||||
| delta: 1, | delta: 1, | ||||
| success: (res) => { | success: (res) => { | ||||
| }, | }, | ||||
| fail: (res) => { | fail: (res) => { | ||||
| }, | }, | ||||
| }); | }); | ||||
| // 用户已经评价的逻辑 | // 用户已经评价的逻辑 | ||||
| @@ -467,28 +586,28 @@ Page({ | |||||
| }); | }); | ||||
| }, | }, | ||||
| goIfEvaluate(){ | |||||
| goIfEvaluate() { | |||||
| let _this = this | let _this = this | ||||
| Http.get({ | Http.get({ | ||||
| url:config.api.getchanId, | |||||
| data:{ | |||||
| id:_this.data.order.couponOrderId | |||||
| url: config.api.getchanId, | |||||
| data: { | |||||
| id: _this.data.order.couponOrderId | |||||
| } | } | ||||
| }).then(res=>{ | |||||
| }).then(res => { | |||||
| tt.canRateAwemeOrders({ | tt.canRateAwemeOrders({ | ||||
| orderIds: [res.data.payOrderNo], | orderIds: [res.data.payOrderNo], | ||||
| success({ result }) { | success({ result }) { | ||||
| console.log("result", result); | console.log("result", result); | ||||
| _this.setData({ | _this.setData({ | ||||
| evaluateFlag:result[0], | |||||
| payOrderNo:res.data.payOrderNo | |||||
| evaluateFlag: result[0], | |||||
| payOrderNo: res.data.payOrderNo | |||||
| }) | }) | ||||
| }, | }, | ||||
| fail(err) { | fail(err) { | ||||
| console.log(err); | console.log(err); | ||||
| }, | }, | ||||
| }); | }); | ||||
| }).catch(err=>{ | |||||
| }).catch(err => { | |||||
| tt.showToast({ | tt.showToast({ | ||||
| title: err.message ? err.message : err.data, // 内容 | title: err.message ? err.message : err.data, // 内容 | ||||
| icon: "none" | icon: "none" | ||||
| @@ -521,7 +640,7 @@ Page({ | |||||
| title: "加载中" | title: "加载中" | ||||
| }); | }); | ||||
| }, | }, | ||||
| onShow: function () { | onShow: function () { | ||||
| @@ -531,32 +650,32 @@ Page({ | |||||
| }) | }) | ||||
| that.updetail() | that.updetail() | ||||
| }, | }, | ||||
| getSeUrl(){//获取客服链接 | |||||
| getSeUrl() {//获取客服链接 | |||||
| const openId = tt.getStorageSync('openId'); | const openId = tt.getStorageSync('openId'); | ||||
| Http.post({ | Http.post({ | ||||
| url:config.api.getServiceUrl, | |||||
| data:{ | |||||
| url: config.api.getServiceUrl, | |||||
| data: { | |||||
| appid: app.globalData.appId, | appid: app.globalData.appId, | ||||
| openid: openId | openid: openId | ||||
| } | } | ||||
| }).then(res=>{ | |||||
| }).then(res => { | |||||
| this.setData({ | this.setData({ | ||||
| serviceUrl:res.data?res.data:'' | |||||
| serviceUrl: res.data ? res.data : '' | |||||
| }) | }) | ||||
| if(res.data){ | |||||
| if (res.data) { | |||||
| tt.setStorageSync('serviceData', res.data); | tt.setStorageSync('serviceData', res.data); | ||||
| } | } | ||||
| }) | }) | ||||
| }, | }, | ||||
| goWebView(){ | |||||
| goWebView() { | |||||
| let _this = this | let _this = this | ||||
| tt.navigateTo({ | tt.navigateTo({ | ||||
| url: `/pages/serviceWebView/serviceWebView`, | url: `/pages/serviceWebView/serviceWebView`, | ||||
| success: (res) => { | success: (res) => { | ||||
| }, | }, | ||||
| fail: (res) => { | fail: (res) => { | ||||
| }, | }, | ||||
| }); | }); | ||||
| }, | }, | ||||
| @@ -589,6 +708,7 @@ Page({ | |||||
| */ | */ | ||||
| orderFunc(e) { | orderFunc(e) { | ||||
| var that = this; | var that = this; | ||||
| const orderId = "" + that.data.orderId; | |||||
| that.setData({ | that.setData({ | ||||
| showButton: true | showButton: true | ||||
| }) | }) | ||||
| @@ -596,114 +716,239 @@ Page({ | |||||
| title: "加载中..." | title: "加载中..." | ||||
| }); | }); | ||||
| const orderId = "" + that.data.orderId; | |||||
| // if (true) {//兼容不支持支付2.0 js-api !tt.canIUse('createOrder') | |||||
| if (that.data.order.payment > 0) { | if (that.data.order.payment > 0) { | ||||
| // 支付金额不为0 | |||||
| Http.post({ | |||||
| url: config.api.payOrderCreate, | |||||
| data: { | |||||
| orderId: orderId, | |||||
| composeOrderType: that.data.composeOrderType | |||||
| } | |||||
| }).then(res => { | |||||
| var payOrderId = "" + res.data.outOrderNo; | |||||
| tt.hideLoading(); | |||||
| tt.pay({ | |||||
| service: 5, | |||||
| orderInfo: { | |||||
| order_id: res.data.orderId, | |||||
| order_token: res.data.token, | |||||
| }, | |||||
| success: res => { | |||||
| tt.showLoading({ | |||||
| title: '订单正在处理中...', | |||||
| }) | |||||
| if (res.code == 0) { | |||||
| setTimeout(function () { | |||||
| tt.hideLoading() | |||||
| }, 5000) | |||||
| that.payOrderUpdate(that.data.orderId, payOrderId, 1, '', '', that); // 支付成功 | |||||
| if (res.errMsg == "requestPayment:ok") { | |||||
| if (that.data.order.type == 100) { | |||||
| tt.setStorage({ | |||||
| key: 'couponNum2', | |||||
| data: "couponNum2" | |||||
| if (tt.canIUse('createOrder')) {//支付2.0 js-api | |||||
| const outOrderNo = that.data.outOrderNo | |||||
| console.log(outOrderNo, "outOrderNo"); | |||||
| Http.post({ | |||||
| url: config.api.payOrderCreate_2, | |||||
| data: { | |||||
| // composeOrderId: outOrderNo | |||||
| orderId: outOrderNo, | |||||
| composeOrderType: that.data.composeOrderType | |||||
| } | |||||
| }).then(res => { | |||||
| if (res.data.createPay) { | |||||
| let tempCallbackData = { | |||||
| composeOrderId: res.data.outOrderNo | |||||
| } | |||||
| // tempCallbackData[that.data.data.couponChannel.ttSpuId] = that.data.data.couponChannel.id | |||||
| let options = { | |||||
| callbackData: tempCallbackData, | |||||
| goodsList: res.data.goodsList, | |||||
| payment: res.data.payment, | |||||
| success: res => { | |||||
| tt.hideLoading(); | |||||
| that.setData({ | |||||
| showbutton: false, | |||||
| }) | |||||
| const { orderId, outOrderNo } = res; | |||||
| // that.setData({ orderId, outOrderNo }); | |||||
| that.payOrderUpdate(outOrderNo, outOrderNo, 1, '', '', that, ''); | |||||
| }, | |||||
| fail: res => { | |||||
| const { orderId, outOrderNo, errNo, errMsg, errLogId } = res; | |||||
| if (errLogId) { | |||||
| tt.hideLoading(); | |||||
| that.setData({ | |||||
| showbutton: false, | |||||
| }) | }) | ||||
| } else if (that.data.order.type != 5) { | |||||
| tt.setStorage({ | |||||
| key: 'couponNum', | |||||
| data: "couponNum" | |||||
| console.log('预下单失败', errNo, errMsg, errLogId); | |||||
| let tempErrmsg = errMsg.split('开发者拒绝交易:'); | |||||
| tt.showToast({ | |||||
| title: tempErrmsg[tempErrmsg.length - 1], | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } | |||||
| if (orderId || outOrderNo) { | |||||
| tt.hideLoading(); | |||||
| that.setData({ | |||||
| showbutton: false, | |||||
| }) | }) | ||||
| console.log('支付失败', errNo, errMsg, orderId, outOrderNo); | |||||
| console.log(that.payOrderUpdate, "payOrderUpdate"); | |||||
| tt.showToast({ | |||||
| title: "取消支付", | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| that.payOrderUpdate(outOrderNo, outOrderNo, 2, '', 'fail') | |||||
| } | } | ||||
| } | |||||
| } else if (res.code === 1) { | |||||
| that.setData({ | |||||
| showButton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '支付超时', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| }, | |||||
| } | |||||
| console.log(options, "options"); | |||||
| tt.createOrder(options) | |||||
| } else { | |||||
| tt.continueToPay({ | |||||
| outOrderNo: res.data.outOrderNo, // 外部订单号 2个订单号必填一个 | |||||
| success: res => { | |||||
| // const { orderId, outOrderNo } = res; | |||||
| // console.log('success res', res); | |||||
| // console.log('orderId', orderId, 'outOrderNo', outOrderNo); | |||||
| that.setData({ | |||||
| showButton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| that.payOrderUpdate(outOrderNo, outOrderNo, 1, '', '', that); // 支付成功 | |||||
| }, | |||||
| fail: res => { | |||||
| const { orderId, outOrderNo, errNo, errMsg, errLogId } = res; | |||||
| if (errLogId) { | |||||
| console.log('查询订单信息失败', errNo, errMsg, errLogId); | |||||
| that.setData({ | |||||
| showButton: false | |||||
| }) | |||||
| tt.showToast({ | |||||
| title: errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| tt.hideLoading(); | |||||
| } | |||||
| if (orderId || outOrderNo) { | |||||
| console.log('支付失败', errNo, errMsg, orderId, outOrderNo); | |||||
| tt.showToast({ | |||||
| title: errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| that.payOrderUpdate(outOrderNo, outOrderNo, 2, '', 'fail', that); | |||||
| that.setData({ | |||||
| showButton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| } | |||||
| }, | |||||
| }); | |||||
| } | |||||
| } else if (res.code === 2) { | |||||
| that.setData({ | |||||
| showButton: false | |||||
| }).catch(err => { | |||||
| tt.showToast({ | |||||
| title: err.message ? err.message : err.data, // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| }) | |||||
| } else {//不支持支付2.0 js-api | |||||
| tt.showToast({ | |||||
| title: '请升级抖音', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| return | |||||
| // 支付金额不为0 | |||||
| Http.post({ | |||||
| url: config.api.payOrderCreate, | |||||
| data: { | |||||
| orderId: orderId, | |||||
| composeOrderType: that.data.composeOrderType | |||||
| } | |||||
| }).then(res => { | |||||
| var payOrderId = "" + res.data.outOrderNo; | |||||
| tt.hideLoading(); | |||||
| tt.pay({ | |||||
| service: 5, | |||||
| orderInfo: { | |||||
| order_id: res.data.payOrderId, | |||||
| order_token: res.data.payOrderToken, | |||||
| }, | |||||
| success: res => { | |||||
| tt.showLoading({ | |||||
| title: '订单正在处理中...', | |||||
| }) | }) | ||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '支付失败', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| if (res.code == 0) { | |||||
| setTimeout(function () { | |||||
| tt.hideLoading() | |||||
| }, 5000) | |||||
| that.payOrderUpdate(that.data.orderId, payOrderId, 1, '', '', that); // 支付成功 | |||||
| if (res.errMsg == "requestPayment:ok") { | |||||
| if (that.data.order.type == 100) { | |||||
| tt.setStorage({ | |||||
| key: 'couponNum2', | |||||
| data: "couponNum2" | |||||
| }) | |||||
| } else if (that.data.order.type != 5) { | |||||
| tt.setStorage({ | |||||
| key: 'couponNum', | |||||
| data: "couponNum" | |||||
| }) | |||||
| } | |||||
| } | |||||
| } else if (res.code === 1) { | |||||
| that.setData({ | |||||
| showButton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '支付超时', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } else if (res.code === 3) { | |||||
| that.setData({ | |||||
| showButton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '支付关闭', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } else if (res.code === 4) { | |||||
| that.setData({ | |||||
| showButton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '支付取消', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } else if (res.code === 9) { | |||||
| } else if (res.code === 2) { | |||||
| that.setData({ | |||||
| showButton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '支付失败', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } else if (res.code === 3) { | |||||
| that.setData({ | |||||
| showButton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '支付关闭', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } else if (res.code === 4) { | |||||
| that.setData({ | |||||
| showButton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '支付取消', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } else if (res.code === 9) { | |||||
| that.setData({ | |||||
| showButton: false | |||||
| }) | |||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '订单状态开发者自行获取', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } | |||||
| }, | |||||
| fail: res => { | |||||
| that.setData({ | that.setData({ | ||||
| showButton: false | showButton: false | ||||
| }) | }) | ||||
| tt.hideLoading(); | |||||
| tt.showToast({ | |||||
| title: '订单状态开发者自行获取', // 内容 | |||||
| icon: "none" | |||||
| }); | |||||
| } | |||||
| }, | |||||
| fail: res => { | |||||
| that.setData({ | |||||
| showButton: false | |||||
| }) | |||||
| that.payOrderUpdate(that.data.orderId, payOrderId, 2, '', 'fail', that); | |||||
| return; | |||||
| }, | |||||
| that.payOrderUpdate(that.data.orderId, payOrderId, 2, '', 'fail', that); | |||||
| return; | |||||
| }, | |||||
| }); | |||||
| }).catch(err => { | |||||
| tt.hideLoading(); | |||||
| that.setData({ | |||||
| showButton: false | |||||
| }) | |||||
| tt.showModal({ | |||||
| title: "抱歉", | |||||
| content: err.message, | |||||
| showCancel: false | |||||
| }) | |||||
| }); | }); | ||||
| }).catch(err => { | |||||
| tt.hideLoading(); | |||||
| that.setData({ | |||||
| showButton: false | |||||
| }) | |||||
| tt.showModal({ | |||||
| title: "抱歉", | |||||
| content: err.message, | |||||
| showCancel: false | |||||
| }) | |||||
| }); | |||||
| } | |||||
| } else { | } else { | ||||
| // 免费券 | // 免费券 | ||||
| that.payOrderUpdate(orderId, "0", 1, '', 'free') // 支付成功 | that.payOrderUpdate(orderId, "0", 1, '', 'free') // 支付成功 | ||||
| @@ -724,6 +969,11 @@ Page({ | |||||
| image: imgurl.success.url, | image: imgurl.success.url, | ||||
| }); | }); | ||||
| } | } | ||||
| // } else {//支持 支付2.0 js-api | |||||
| // } | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 支付订单更新 | * 支付订单更新 | ||||
| @@ -1,4 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "订单详情", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../../components/navbar/navbar", | "navbar": "../../../components/navbar/navbar", | ||||
| "store": "../../../components/store/index" | "store": "../../../components/store/index" | ||||
| @@ -1,5 +1,5 @@ | |||||
| <navbar home back text="订单详情"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar home back text="订单详情"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <view class='order' tt:if="{{showPage}}"> | <view class='order' tt:if="{{showPage}}"> | ||||
| <view tt:if="{{order.orderStatus==1}}" class='tips'> | <view tt:if="{{order.orderStatus==1}}" class='tips'> | ||||
| <image class='success' src='{{succUrl}}' mode='widthFix'></image> | <image class='success' src='{{succUrl}}' mode='widthFix'></image> | ||||
| @@ -17,7 +17,8 @@ | |||||
| <view class='sectionTit'> | <view class='sectionTit'> | ||||
| <text>{{order.title}}</text> | <text>{{order.title}}</text> | ||||
| </view> | </view> | ||||
| <view class='detail_msg' bindtap="goDetail"> | |||||
| <!-- --> | |||||
| <view class='detail_msg' bindtap="goDetail"> | |||||
| <view class='logo'> | <view class='logo'> | ||||
| <image mode='aspectFill' src='{{order.coverImg}}'></image> | <image mode='aspectFill' src='{{order.coverImg}}'></image> | ||||
| </view> | </view> | ||||
| @@ -37,8 +38,15 @@ | |||||
| <image class="infoArrow" src="{{chevronUrl}}" mode='widthFix'></image> | <image class="infoArrow" src="{{chevronUrl}}" mode='widthFix'></image> | ||||
| <view class="goRefund" catchtap="goRefund" data-id="{{order.id}}" tt:if="{{order.couponOrderStatus==0||order.couponOrderStatus==3}}">{{order.couponOrderStatus==0?'申请退款':'退款进度'}}</view> | |||||
| </view> | |||||
| <view class="goRefund" catchtap="goRefund" data-id="{{order.id}}" tt:if="{{order.payment!=0&&(order.couponOrderStatus==0||order.couponOrderStatus==3)}}">{{order.couponOrderStatus==0?'申请退款':'退款进度'}}</view> | |||||
| <!-- <pay-button | |||||
| class="goRefund" | |||||
| order-status="{{1}}" | |||||
| order-id="ot7122287526357895463" | |||||
| bind:refund="handleRefund" | |||||
| bind:applyrefund="applyRefund" | |||||
| /> | |||||
| </view> --> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -90,7 +98,8 @@ | |||||
| data-validstatus="{{order.validStatus}}" class='dhCode'> | data-validstatus="{{order.validStatus}}" class='dhCode'> | ||||
| <view style="width:86%;clear: both;"> | <view style="width:86%;clear: both;"> | ||||
| <text class="fl">兑换码:</text> | <text class="fl">兑换码:</text> | ||||
| <text class="fr" tt:if="{{order.validStatus!=0}}">{{order.couponOrderId}}</text> | |||||
| <text class="fr" tt:if="{{order.validStatus!=0}}">{{showIdFalg?order.couponOrderId:order.couponOrderIdS}}</text> | |||||
| <image class="barnumImg" src="../../../assets/images/password.png" bindtap="showId"></image> | |||||
| </view> | </view> | ||||
| <view> | <view> | ||||
| <!-- <image class="spcode" src="{{spcodeUrl}}" mode='widthFix'></image> | <!-- <image class="spcode" src="{{spcodeUrl}}" mode='widthFix'></image> | ||||
| @@ -167,21 +176,41 @@ | |||||
| <view class='notes'> | <view class='notes'> | ||||
| <view class="notesH">购买须知</view> | |||||
| <view class="notesH">购买须知</view> | |||||
| <view class="timeText">有效期</view> | <view class="timeText">有效期</view> | ||||
| <view class="Hchild">{{order.validStartDate}}至{{order.validEndDate}}</view> | |||||
| <view class="Hchild">• {{order.validStartDate}}至{{order.validEndDate}}</view> | |||||
| <view class="timeText">可用时间</view> | <view class="timeText">可用时间</view> | ||||
| <view class="Hchild">•商家营业时间可用</view> | |||||
| <view class="Hchild">• 商家营业时间内到店使用</view> | |||||
| <view class="Hchild" tt:if="{{order.can_no_use_date.weekend}}">• 周末不支持使用</view> | |||||
| <view class="Hchild" tt:if="{{order.can_no_use_date.HolidaysFlag}}">• 节假日(元旦、春节、清明、劳动节、端午节、中秋节、国庆节、情人节、圣诞节)不支持使用</view> | |||||
| <view class="timeText">购买限制</view> | |||||
| <view class="Hchild">• 每个用户限购{{order.useLimitQuantity}}单</view> | |||||
| <view class="timeText">预约消费</view> | <view class="timeText">预约消费</view> | ||||
| <view class="Hchild">• 不需预约,高峰时段可能需要排队</view> | |||||
| <view class="Hchild" tt:if="{{!order.subscribeSing}}">• 无需预约,高峰时段可能等位</view> | |||||
| <view class="Hchild" tt:if="{{order.subscribeSing}}">• {{order.subscribeSing}}</view> | |||||
| <view class="timeText" tt:if="{{order.rec_person_num_max}}">适用人数</view> | |||||
| <view class="Hchild" tt:if="{{order.rec_person_num_max}}">• 该团购劵最多{{order.rec_person_num_max}}人使用</view> | |||||
| <view class="timeText">温馨提示</view> | |||||
| <view class="Hchild">• 团购券不支持配送或外卖</view> | <view class="Hchild">• 团购券不支持配送或外卖</view> | ||||
| <view class="timeText">使用规则</view> | |||||
| <text class="notesText">{{order.remark}}</text> | |||||
| <!-- <text tt:if="{{curHtml==''}}" class="notesText">{{order.remark}}</text> --> | |||||
| <!-- <view tt:if="{{curHtml!=''}}"> | |||||
| <rich-text nodes="{{curHtml}}"></rich-text> | |||||
| </view> --> | |||||
| <view class="Hchild" tt:if="{{order.pack}}">• 该团购商品{{order.pack=='false'?'不支持':'支持'}}打包</view> | |||||
| <view class="Hchild" tt:if="{{order.besides}}">• {{order.besides=="false"?'不可以':'可以'}}外带餐食</view> | |||||
| <view class="Hchild" tt:if="{{order.superimposed_discounts}}">• {{order.superimposed_discounts=="false"?'不可以':'可以'}}享受店内其他优惠</view> | |||||
| <view class="Hchild" tt:if="{{order.private_room}}">• {{order.private_room=="false"?'不可以使用':'可以使用'}}包间</view> | |||||
| <view class="notesH" tt:if="{{order.curLsit}}">使用规则</view> | |||||
| <view tt:if="{{order.curLsit}}" tt:for="{{order.curLsit}}" tt:key="{{index}}"> | |||||
| <view class="timeText" tt:if="{{item.title!=''}}">{{item.title}}</view> | |||||
| <text class="Hchild">{{item.content}}</text> | |||||
| </view> | |||||
| </view> | </view> | ||||
| <!-- 子券列表 --> | <!-- 子券列表 --> | ||||
| <view class="childList" tt:if="{{order.type==12}}"> | <view class="childList" tt:if="{{order.type==12}}"> | ||||
| <view class="childTitle">礼券:</view> | <view class="childTitle">礼券:</view> | ||||
| @@ -187,6 +187,12 @@ page { | |||||
| padding-right: 5%; | padding-right: 5%; | ||||
| } | } | ||||
| .barnumImg{ | |||||
| float: left; | |||||
| height: 40rpx; | |||||
| width: 40rpx; | |||||
| margin: 24rpx 20rpx; | |||||
| } | |||||
| .classif { | .classif { | ||||
| background: #fff; | background: #fff; | ||||
| width: 100%; | width: 100%; | ||||
| @@ -7,5 +7,6 @@ | |||||
| "tabbar":"../../../components/tabbar/tabbar" | "tabbar":"../../../components/tabbar/tabbar" | ||||
| }, | }, | ||||
| "navigationBarTitleText": "我的订单", | "navigationBarTitleText": "我的订单", | ||||
| "navigationBarBackgroundColor": "#F4F5F9" | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black" | |||||
| } | } | ||||
| @@ -1,9 +1,9 @@ | |||||
| <!-- <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> --> | <!-- <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> --> | ||||
| <navbar home="{{!ifshowtab}}" back="{{!back}}" text="我的订单" background="#fff"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar home="{{!ifshowtab}}" back="{{!back}}" text="我的订单" background="#fff"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <view class="market"> | <view class="market"> | ||||
| <view class="boatBoxf" style="top:{{navigationBarHeight}}"> | |||||
| <view class="boatBoxf" > | |||||
| <view class="boatBox"> | <view class="boatBox"> | ||||
| <view class="boatItemBox" tt:for="{{tabs}}" tt:key="index" bindtap="setBoatFlag" data-index="{{item.key}}"> | <view class="boatItemBox" tt:for="{{tabs}}" tt:key="index" bindtap="setBoatFlag" data-index="{{item.key}}"> | ||||
| <view class="{{boatFlag==item.key?'boatTitleA':'boatTitle'}}">{{item.name}}</view> | <view class="{{boatFlag==item.key?'boatTitleA':'boatTitle'}}">{{item.name}}</view> | ||||
| @@ -62,9 +62,9 @@ | |||||
| <text>砍价详情</text> | <text>砍价详情</text> | ||||
| </view> | </view> | ||||
| <view tt:if="{{child.orderStatus==0 || child.orderStatus==7}}" class="cancel" data-shippingtype="{{child.shippingType}}" data-id="{{child.composeOrderId}}" bindtap="cancel"> | |||||
| <!-- <view tt:if="{{child.orderStatus==0 || child.orderStatus==7}}" class="cancel" data-shippingtype="{{child.shippingType}}" data-id="{{child.composeOrderId}}" bindtap="cancel"> | |||||
| <text>取消</text> | <text>取消</text> | ||||
| </view> | |||||
| </view> --> | |||||
| <view tt:if="{{child.orderStatus==0 || child.orderStatus==7}}" class="btnZf" data-shippingtype="{{child.shippingType}}" data-id="{{child.composeOrderId}}" bindtap="gotopay"> | <view tt:if="{{child.orderStatus==0 || child.orderStatus==7}}" class="btnZf" data-shippingtype="{{child.shippingType}}" data-id="{{child.composeOrderId}}" bindtap="gotopay"> | ||||
| <text>去支付</text> | <text>去支付</text> | ||||
| @@ -1,4 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "兑换码", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../components/navbar/navbar" | "navbar": "../../components/navbar/navbar" | ||||
| } | } | ||||
| @@ -1,5 +1,5 @@ | |||||
| <navbar home back text="兑换码" background="#fff"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar home back text="兑换码" background="#fff"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <view class='couponBox' > | <view class='couponBox' > | ||||
| <view class="couponbg"> | <view class="couponbg"> | ||||
| <view class="title">{{title}}</view> | <view class="title">{{title}}</view> | ||||
| @@ -598,12 +598,79 @@ Page({ | |||||
| if(res.data.itemGroup){ | if(res.data.itemGroup){ | ||||
| let tempObj = this.data.data | |||||
| let tempObj = that.data.data | |||||
| tempObj.itemGroup = JSON.parse(tempObj.itemGroup) | tempObj.itemGroup = JSON.parse(tempObj.itemGroup) | ||||
| this.setData({ | |||||
| that.setData({ | |||||
| data:tempObj | data:tempObj | ||||
| }) | }) | ||||
| console.log(this.data.data,"data"); | |||||
| console.log(that.data.data,"data"); | |||||
| } | |||||
| if (res.data.productAttrs && res.data.skuAttrs) { | |||||
| let tempObj = that.data.data | |||||
| tempObj.productAttrs = JSON.parse(tempObj.productAttrs) | |||||
| tempObj.skuAttrs = JSON.parse(tempObj.skuAttrs) | |||||
| tempObj.productAttrs.map(item => { | |||||
| if (item.key == "appointment") { | |||||
| let tempAppoinObj = JSON.parse(item.data) | |||||
| if (tempAppoinObj.need_appointment) { | |||||
| let subscribeSing = ""; | |||||
| if (tempAppoinObj.ahead_time_type == 1) { | |||||
| subscribeSing = `需提前${tempAppoinObj.ahead_day_num}天致电商家预约` | |||||
| } else if (tempAppoinObj.ahead_time_type == 2) { | |||||
| subscribeSing = `需提前${tempAppoinObj.ahead_hour_num}小时致电商家预约` | |||||
| } else if (tempAppoinObj.ahead_time_type == 3) { | |||||
| subscribeSing = `需提前${tempAppoinObj.ahead_minute_num}分钟致电商家预约` | |||||
| } | |||||
| tempObj.subscribeSing = subscribeSing | |||||
| } | |||||
| } | |||||
| if (item.key == "Notification") { | |||||
| if (item.data != '') { | |||||
| tempObj.curLsit = JSON.parse(item.data) | |||||
| } | |||||
| } | |||||
| if (item.key == "bring_out_meal") { | |||||
| tempObj.besides = item.data | |||||
| } | |||||
| if (item.key == "free_pack") { | |||||
| tempObj.pack = item.data | |||||
| } | |||||
| if (item.key == "superimposed_discounts") { | |||||
| tempObj.superimposed_discounts = item.data | |||||
| } | |||||
| if (item.key == "private_room") { | |||||
| tempObj.private_room = item.data | |||||
| } | |||||
| if (item.key == "rec_person_num_max") { | |||||
| tempObj.rec_person_num_max = item.data | |||||
| } | |||||
| if (item.key == 'Description') { | |||||
| tempObj.Description = JSON.parse(item.data) | |||||
| } | |||||
| if (item.key == "can_no_use_date") { | |||||
| tempObj.can_no_use_date = JSON.parse(item.data) | |||||
| } | |||||
| }) | |||||
| tempObj.skuAttrs.map(item => { | |||||
| if (item.key == "commodity") { | |||||
| if (item.data != '') { | |||||
| tempObj.itemGroup = JSON.parse(item.data) | |||||
| } | |||||
| } | |||||
| }) | |||||
| this.setData({ | |||||
| data: tempObj | |||||
| }) | |||||
| } | } | ||||
| }).catch(err => { | }).catch(err => { | ||||
| tt.showToast({ | tt.showToast({ | ||||
| @@ -5,7 +5,8 @@ | |||||
| "c-coupons": "../../components/coupons/index", | "c-coupons": "../../components/coupons/index", | ||||
| "phoen":"../../components/getPhoen/getPhoen" | "phoen":"../../components/getPhoen/getPhoen" | ||||
| }, | }, | ||||
| "navigationBarTitleText": "", | |||||
| "backgroundColor":"#f4f4f4", | |||||
| "navigationBarTitleText": "详情", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "enablePullDownRefresh": true | "enablePullDownRefresh": true | ||||
| } | } | ||||
| @@ -1,6 +1,6 @@ | |||||
| <navbar back home text="详情" background='#fff'></navbar> | |||||
| <!-- <navbar back home text="详情" background='#fff'></navbar> --> | |||||
| <view tt:if="{{showPage}}"> | <view tt:if="{{showPage}}"> | ||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <!-- 券的详情页面 --> | <!-- 券的详情页面 --> | ||||
| <view class='coupons'> | <view class='coupons'> | ||||
| <view class="coupons-body"> | <view class="coupons-body"> | ||||
| @@ -114,18 +114,39 @@ | |||||
| <store merchantVoList="{{merchantVoList}}" tt:if="{{data.type!=12}}"></store> | <store merchantVoList="{{merchantVoList}}" tt:if="{{data.type!=12}}"></store> | ||||
| <view class='notes'> | <view class='notes'> | ||||
| <view class="notesH">购买须知</view> | |||||
| <view class="notesH">购买须知</view> | |||||
| <view class="timeText">有效期</view> | <view class="timeText">有效期</view> | ||||
| <view class="Hchild">{{validStartDate}}至{{validEndDate}}</view> | |||||
| <view class="Hchild">• {{validStartDate}}至{{validEndDate}}</view> | |||||
| <view class="timeText">可用时间</view> | <view class="timeText">可用时间</view> | ||||
| <view class="Hchild">•商家营业时间可用</view> | |||||
| <view class="Hchild">• 商家营业时间内到店使用</view> | |||||
| <view class="Hchild" tt:if="{{data.can_no_use_date.weekend}}">• 周末不支持使用</view> | |||||
| <view class="Hchild" tt:if="{{data.can_no_use_date.HolidaysFlag}}">• 节假日(元旦、春节、清明、劳动节、端午节、中秋节、国庆节、情人节、圣诞节)不支持使用</view> | |||||
| <view class="timeText">购买限制</view> | |||||
| <view class="Hchild">• 每个用户限购{{data.useLimitQuantity}}单</view> | |||||
| <view class="timeText">预约消费</view> | <view class="timeText">预约消费</view> | ||||
| <view class="Hchild">• 不需预约,高峰时段可能需要排队</view> | |||||
| <view class="Hchild" tt:if="{{!data.subscribeSing}}">• 无需预约,高峰时段可能等位</view> | |||||
| <view class="Hchild" tt:if="{{data.subscribeSing}}">• {{data.subscribeSing}}</view> | |||||
| <view class="timeText" tt:if="{{data.rec_person_num_max}}">适用人数</view> | |||||
| <view class="Hchild" tt:if="{{data.rec_person_num_max}}">• 该团购劵最多{{data.rec_person_num_max}}人使用</view> | |||||
| <view class="timeText">温馨提示</view> | |||||
| <view class="Hchild">• 团购券不支持配送或外卖</view> | <view class="Hchild">• 团购券不支持配送或外卖</view> | ||||
| <view class="timeText">使用规则</view> | |||||
| <text tt:if="{{curHtml==''}}" class="notesText">{{data.remark}}</text> | |||||
| <view tt:if="{{curHtml!=''}}"> | |||||
| <rich-text nodes="{{curHtml}}"></rich-text> | |||||
| <view class="Hchild" tt:if="{{data.pack}}">• 该团购商品{{data.pack=='false'?'不支持':'支持'}}打包</view> | |||||
| <view class="Hchild" tt:if="{{data.besides}}">• {{data.besides=="false"?'不可以':'可以'}}外带餐食</view> | |||||
| <view class="Hchild" tt:if="{{data.superimposed_discounts}}">• {{data.superimposed_discounts=="false"?'不可以':'可以'}}享受店内其他优惠</view> | |||||
| <view class="Hchild" tt:if="{{data.private_room}}">• {{data.private_room=="false"?'不可以使用':'可以使用'}}包间</view> | |||||
| <view class="notesH" tt:if="{{data.curLsit}}">使用规则</view> | |||||
| <view tt:if="{{data.curLsit}}" tt:for="{{data.curLsit}}" tt:key="{{index}}"> | |||||
| <view class="timeText" tt:if="{{item.title!=''}}">{{item.title}}</view> | |||||
| <text class="Hchild">{{item.content}}</text> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -1,8 +1,9 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "问卷详情", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../components/navbar/navbar" | "navbar": "../../components/navbar/navbar" | ||||
| }, | |||||
| "navigationBarBackgroundColor": "#FD832D", | |||||
| "navigationBarTextStyle": "white" | |||||
| } | |||||
| } | } | ||||
| @@ -1,5 +1,5 @@ | |||||
| <navbar back="{{true}}" home="{{true}}" text="问卷详情" background='#FD832D' color="white"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar back="{{true}}" home="{{true}}" text="问卷详情" background='#FD832D' color="white"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <view class="Box"> | <view class="Box"> | ||||
| <!-- <view class="hidBox"> | <!-- <view class="hidBox"> | ||||
| <view class="contcBox"></view> | <view class="contcBox"></view> | ||||
| @@ -1,7 +1,8 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "问卷调查", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../../components/navbar/navbar" | "navbar": "../../../components/navbar/navbar" | ||||
| }, | |||||
| "navigationBarBackgroundColor": "#FD832D", | |||||
| "navigationBarTextStyle": "white" | |||||
| } | |||||
| } | } | ||||
| @@ -1,5 +1,5 @@ | |||||
| <navbar back="{{true}}" home="{{true}}" text="问卷调查"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar back="{{true}}" home="{{true}}" text="问卷调查"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <!-- <view class="noData" tt:if="{{list.length==0}}"> 敬请期待!</view> --> | <!-- <view class="noData" tt:if="{{list.length==0}}"> 敬请期待!</view> --> | ||||
| <view class="dingdan" tt:if="{{list.length==0}}"> | <view class="dingdan" tt:if="{{list.length==0}}"> | ||||
| <image src="../../../assets/itemImg/noOrders.png" mode="widthFix"></image> | <image src="../../../assets/itemImg/noOrders.png" mode="widthFix"></image> | ||||
| @@ -1,4 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../components/navbar/navbar" | "navbar": "../../components/navbar/navbar" | ||||
| } | } | ||||
| @@ -1,5 +1,5 @@ | |||||
| <navbar back home text="" color="white"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar back home text="" color="white"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <view class="statsBox"> | <view class="statsBox"> | ||||
| <view class="topBox"> | <view class="topBox"> | ||||
| <image src="../../assets/imgData/tiem.png" class="topImg"></image> | <image src="../../assets/imgData/tiem.png" class="topImg"></image> | ||||
| @@ -1,6 +1,6 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "门店搜索", | "navigationBarTitleText": "门店搜索", | ||||
| "navigationBarBackgroundColor": "#F4F5F9", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | "navigationBarTextStyle": "black", | ||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../components/navbar/navbar" | "navbar": "../../components/navbar/navbar" | ||||
| @@ -1,5 +1,5 @@ | |||||
| <navbar home back text="门店搜索"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> | |||||
| <!-- <navbar home back text="门店搜索"></navbar> | |||||
| <view style="height:{{navigationBarHeight}} "></view> --> | |||||
| <view class="weui-search-bar {{extClass}}" > | <view class="weui-search-bar {{extClass}}" > | ||||
| <view class="weui-search-bar__form"> | <view class="weui-search-bar__form"> | ||||
| <view class="weui-search-bar__box" style="position:relative;"> | <view class="weui-search-bar__box" style="position:relative;"> | ||||
| @@ -1,4 +1,7 @@ | |||||
| { | { | ||||
| "navigationBarTitleText": "在线客服", | |||||
| "navigationBarBackgroundColor": "#fff", | |||||
| "navigationBarTextStyle": "black", | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "navbar": "../../components/navbar/navbar" | "navbar": "../../components/navbar/navbar" | ||||
| } | } | ||||