diff --git a/components/shop/shop.js b/components/shop/shop.js new file mode 100644 index 0000000..0a51677 --- /dev/null +++ b/components/shop/shop.js @@ -0,0 +1,12 @@ +// c:\Users\Holy-Knight-IX\Desktop\Working Space\3.TikTok-MiniPro\ttc\components\shop\shop.js +Component({ + data: { + + }, + properties: { + + }, + methods: { + + } +}) \ No newline at end of file diff --git a/components/shop/shop.json b/components/shop/shop.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/components/shop/shop.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/components/shop/shop.ttml b/components/shop/shop.ttml new file mode 100644 index 0000000..a95926b --- /dev/null +++ b/components/shop/shop.ttml @@ -0,0 +1,2 @@ + +c:\Users\Holy-Knight-IX\Desktop\Working Space\3.TikTok-MiniPro\ttc\components\shop\shop.ttml \ No newline at end of file diff --git a/components/shop/shop.ttss b/components/shop/shop.ttss new file mode 100644 index 0000000..1d36417 --- /dev/null +++ b/components/shop/shop.ttss @@ -0,0 +1 @@ +/* c:\Users\Holy-Knight-IX\Desktop\Working Space\3.TikTok-MiniPro\ttc\components\shop\shop.ttss */ \ No newline at end of file diff --git a/ext.json b/ext.json index a76f587..bd289e8 100644 --- a/ext.json +++ b/ext.json @@ -3,7 +3,7 @@ "attr": { "configUrl": "https://ctest.malls.iformall.com/C/api" }, - "name": "福喵", + "name": "富茂券券集团版", "weappId": "tt620e14b3fd30264101" }, "window": { diff --git a/index/user.js b/index/user.js index 62841c3..87d3cca 100644 --- a/index/user.js +++ b/index/user.js @@ -10,7 +10,7 @@ Page({ text: "授权手机号", avatarUrl: "", nickName: "", - mouldType:1, + mouldType: 1, }, showPhoemBtn() { @@ -23,7 +23,7 @@ Page({ let url = e.currentTarget.dataset.url console.log(url); if (url == '/pages/order/index/index?id=all') { - app.globalData.ifshowtab=false + app.globalData.ifshowtab = false tt.navigateTo({ url: url, success: (res) => { @@ -64,6 +64,13 @@ Page({ }, }); }, + + goSetUserInfo() { + tt.navigateTo({ + url: '/pages/getuserinfo/getuserinfo?mineFlag=mine', + }); + }, + getmemberId: function (token) { Http.get({ url: config.api.getScore, @@ -92,19 +99,19 @@ Page({ }) tt.reLaunch({ url: "/index/index", - success(res) { - console.log(`${res}`); - app.globalData.selected = 0 - }, - fail(err) { - console.log(`navigateTo调用失败`,err); - }, + success(res) { + console.log(`${res}`); + app.globalData.selected = 0 + }, + fail(err) { + console.log(`navigateTo调用失败`, err); + }, }); // tt.showToast({ // title: '取消授权', // 内容 // icon: 'none', // 图标 // success: (res) => { - + // }, // fail: (res) => { @@ -112,9 +119,9 @@ Page({ // }); }, onShow: function (options) { - + this.setData({ - mouldType:app.globalData.mouldType + mouldType: app.globalData.mouldType }) this.getmemberId() Http.get({ @@ -127,24 +134,24 @@ Page({ url: config.api.checkPhoneStatus, }).then(res => { this.setData({ - text:res.data.phone + text: res.data.phone }) }).catch(err => { - - if(app.globalData.ifCongPh==1){ + + if (app.globalData.ifCongPh == 1) { tt.navigateTo({ url: '/pages/getPhone/getPhone?mineFlag=mine', }); - }else{ + } else { this.setData({ - showPhoem:true + showPhoem: true }) } - + }) }).catch(err => { - if (err.code == 11004) {//未授权抖音 + if (err.code == 11004) { //未授权抖音 app.globalData.type = 'uc' tt.navigateTo({ url: '/pages/getuserinfo/getuserinfo', diff --git a/index/user.ttml b/index/user.ttml index 3cc4986..2946f67 100644 --- a/index/user.ttml +++ b/index/user.ttml @@ -4,29 +4,36 @@ --> - - - + + + + 个人信息 - + + + 我的订单 - + + + 我的券包 - + - 更多服务 + 更多服务 - + - - - + + + 关于我们 - - - + + + 服务资质 - + - - \ No newline at end of file + + \ No newline at end of file diff --git a/pages/coupon/confirmation/confirmation.js b/pages/coupon/confirmation/confirmation.js index 97ce928..0064613 100644 --- a/pages/coupon/confirmation/confirmation.js +++ b/pages/coupon/confirmation/confirmation.js @@ -894,12 +894,15 @@ Page({ * 将值传到用户手机号授权的页面 * */ - // tt.navigateTo({ - // url: `/pages/getPhone/getPhone?couponChannelId=${that.data.couponChannelId}&path=qr` - // }); - this.setData({ - showPhoem: true - }) + if (app.globalData.ifCongPh == 1) { + tt.navigateTo({ + url: `/pages/getPhone/getPhone?couponChannelId=${that.data.couponChannelId}&path=qr`, + }); + } else { + this.setData({ + showPhoem: true + }) + } } else if (err.code == 11006) { // 用户手机已加密 tt.navigateTo({ diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index ba76fc4..53d39ab 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -598,20 +598,33 @@ Page({ couponChannelId: couponChannelId } }).then(res => { - if (res.data && res.data.length) { - let merchantVoList = res.data - let idList = [] - merchantVoList.map(item => { - idList.push(item.id) - }) - this.setData({ - idList: idList - }) - this.getCouponList(idList) //获取推荐列表 - } - this.setData({ - merchantVoList: res.data + console.log(res.data, 'Merchant') + const keys = Object.keys(res.data) + const mallList = [] + keys.forEach(item => { + const arr = item.split('|') + const obj = { + tenantId: arr[0], + mallName: arr[1], + merchantVoList: res.data[item] + } + mallList.push(obj) }) + console.log(mallList, 'mallList'); + // if (res.data && res.data.length) { + // let merchantVoList = res.data + // let idList = [] + // merchantVoList.map(item => { + // idList.push(item.id) + // }) + // this.setData({ + // idList: idList + // }) + // this.getCouponList(idList) //获取推荐列表 + // } + // this.setData({ + // merchantVoList: res.data + // }) }) }, diff --git a/pages/coupon/detail/index.ttml b/pages/coupon/detail/index.ttml index c2f2a69..e62a8c7 100644 --- a/pages/coupon/detail/index.ttml +++ b/pages/coupon/detail/index.ttml @@ -49,9 +49,9 @@ {{data.title}}电子卡 - - - + + + 定金: @@ -77,18 +77,21 @@ 积分 - {{priceAndStockObj.price/100}}元 + {{priceAndStockObj.price/100}}元 {{priceAndStockObj.price/100}}小时 - + {{priceAndStockObj.salePrice/100}} {{data.pressLimitNum+'人可砍至底价'}} {{priceAndStockObj.price/100}}元 - {{'已售'+(priceAndStockObj.inventory-priceAndStockObj.remainInventory)+'|'+'库存'+priceAndStockObj.remainInventory}} + + {{'已售'+(priceAndStockObj.inventory-priceAndStockObj.remainInventory)+'|'+'库存'+priceAndStockObj.remainInventory}} + - + - 购买须知 + 购买须知 有效期 • {{validStartDate}}至{{validEndDate}} 可用时间 • 商家营业时间内到店使用 • 周末不支持使用 - • 节假日(元旦、春节、清明、劳动节、端午节、中秋节、国庆节、情人节、圣诞节)不支持使用 - + • 节假日(元旦、春节、清明、劳动节、端午节、中秋节、国庆节、情人节、圣诞节)不支持使用 + + 购买限制 • 每个用户限购{{data.useLimitQuantity}}单 @@ -149,7 +153,7 @@ • 无需预约,高峰时段可能等位 • {{data.subscribeSing}} - + 适用人数 • 该团购劵最多{{data.rec_person_num_max}}人使用 @@ -157,8 +161,9 @@ • 团购券不支持配送或外卖 • 该团购商品{{data.pack=='false'?'不支持':'支持'}}打包 • {{data.besides=="false"?'不可以':'可以'}}外带餐食 - - • {{data.superimposed_discounts=="false"?'不可以':'可以'}}享受店内其他优惠 + + • + {{data.superimposed_discounts=="false"?'不可以':'可以'}}享受店内其他优惠 • {{data.private_room=="false"?'不可以使用':'可以使用'}}包间 使用规则 @@ -172,9 +177,10 @@ {{item.content}} - + 其他活动 + style="color: #333;letter-spacing: 0;font-size: 30rpx;height: 70rpx;line-height: 70rpx;margin-left: 35rpx;font-weight: bold;"> + 其他活动 -
+ -
+ -
+ {{data.type!=50?'¥':''}} {{data.type==50?priceAndStockObj.creditPrice+'积分':priceAndStockObj.salePrice/100}} - ¥{{priceAndStockObj.price/100}} - + ¥{{priceAndStockObj.price/100}} + @@ -248,8 +254,8 @@ @@ -262,7 +268,7 @@ 首页 - + --> - + \ No newline at end of file diff --git a/pages/getuserinfo/getuserinfo.js b/pages/getuserinfo/getuserinfo.js index 5a33436..9e88270 100644 --- a/pages/getuserinfo/getuserinfo.js +++ b/pages/getuserinfo/getuserinfo.js @@ -13,13 +13,13 @@ Page({ optionData: null, fromflag: '', couponChannelIdflag: '', - confirmationFlag:'', + confirmationFlag: '', wjId: "", composeOrderType: "", fillIndentId: "", - url: null,//游戏路径 - id: null,//游戏id, - gameId: null,//游戏gameId + url: null, //游戏路径 + id: null, //游戏id, + gameId: null, //游戏gameId }, backHome() { @@ -32,10 +32,10 @@ Page({ tt.reLaunch({ url: "/index/index", success: (res) => { - + }, fail: (res) => { - + }, }); }, @@ -75,29 +75,29 @@ Page({ } }).catch(err => { - if(app.globalData.ifCongPh==1){ + if (app.globalData.ifCongPh == 1) { tt.redirectTo({ url: `/pages/getPhone/getPhone?skipUrl=1` }); - }else{ + } else { tt.navigateBack({ delta: 1, }) } - + }) }, onLoad: function (options) { - + console.log(app.globalData.skip, app.globalData.skipUrl, app.globalData.type, "跳转地址") var that = this; // options.fromflag == 'coupondetail'; // 游戏页面 if (options && options.url && options.id && options.gameId) { that.setData({ - url: options.url,//游戏路径 - id: options.id,//游戏id, - gameId: options.gameId,//游戏gameId + url: options.url, //游戏路径 + id: options.id, //游戏id, + gameId: options.gameId, //游戏gameId }) } // 来自优惠券详情页面 @@ -130,6 +130,12 @@ Page({ confirmationFlag: options.confirmationFlag }) } + // 我的 + if (options && options.mineFlag) { + that.setData({ + mineFlag: options.mineFlag + }) + } //调查问卷 if (options && !options.wjId || options.wjId) { this.setData({ @@ -184,18 +190,18 @@ Page({ }) } Http.get({ - url: config.api.marketicon, - data: { - appId: app.globalData.appId - } - }).then(res => { - that.setData({ - mallImgUrl: res.data.mallImgUrl - }); - tt.setNavigationBarTitle({ - title: res.data.mallName + url: config.api.marketicon, + data: { + appId: app.globalData.appId + } + }).then(res => { + that.setData({ + mallImgUrl: res.data.mallImgUrl + }); + tt.setNavigationBarTitle({ + title: res.data.mallName + }) }) - }) .catch(err => { tt.showToast({ title: err.errMsg, @@ -246,241 +252,248 @@ Page({ // console.log(res,"数据"); // return tt.login({ - success:(res=>{ - let {code} = res - console.log(code,"code"); + 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) + url: config.api.login, + data: { + code: code, + appId: app.globalData.appId, + systemInfo: JSON.stringify(app.globalData.systemInfo) } - }).then(res=>{ + }).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' - 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' + 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() - } 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}` + return; + } + if (that.data.wjId) { + app.globalData.skipUrl = `/pages/questionnaire/questionnaire?id=${that.data.wjId}` 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}` + return; + } + if (that.data.mineFlag) { + app.globalData.skipUrl = `/index/user` app.globalData.skip = 'redirectTo' that.judgePhonelngo() + return; } - // 报名活动 - 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' + if (that.data.fromflag == 'poster') { + app.globalData.skipUrl = `/pages/canvas/index?couponChannelId=${that.data.couponChannelId}` + app.globalData.skip = 'redirectTo' that.judgePhonelngo() + return; } - // 报名签到 - 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' + // + + 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; } - // 门店详情 - 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' + if (that.data.path == 'index') { + app.globalData.skipUrl = "/pages/game/index" + app.globalData.skip = 'reLaunch' that.judgePhonelngo() - } - // 通过分享进入的门店详情页面 - else if (that.data.id && that.data.frommd == 'md') { - app.globalData.skipUrl = `/pages/index/searchbar/detail/index?id=${that.data.id}`, + } 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.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}`, + 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 { - // 标准格式 - app.globalData.skipUrl = `/pages/bannerdetail/index?id=${that.data.optionData.id}`, + } + // 报名签到 + 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.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, + // 门店详情 + 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() + 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, @@ -489,8 +502,8 @@ Page({ mask: false }); }) - - }).catch(err=>{ + + }).catch(err => { console.log(err); tt.showModal({ title: '提示', @@ -508,11 +521,11 @@ Page({ } }); }) - + }), - + }); - + }, @@ -524,16 +537,16 @@ Page({ getGameOne: function (token, id) { let _this = this; Http.get({ - url: config.api.getOneGame, - data: { - token: token, - id: id - } - }).then(res => { - tt.redirectTo({ - url: '/pages/game/index?url=' + res.data.url + "&id=" + res.data.id + "&gameId=" + res.data.gameId, + url: config.api.getOneGame, + data: { + token: token, + id: id + } + }).then(res => { + tt.redirectTo({ + url: '/pages/game/index?url=' + res.data.url + "&id=" + res.data.id + "&gameId=" + res.data.gameId, + }) }) - }) .catch(err => { tt.showModal({ title: '提示', diff --git a/pages/liveLsit/liveLsit.js b/pages/liveLsit/liveLsit.js index de23f79..e149408 100644 --- a/pages/liveLsit/liveLsit.js +++ b/pages/liveLsit/liveLsit.js @@ -3,7 +3,9 @@ const util = require("../../utils/util.js"); const Http = require("../../utils/HttpBasics"); const config = require("../../config/config"); const imgurl = require("../../utils/imgurl"); -const { alipay } = require("../../utils/imgurl"); +const { + alipay +} = require("../../utils/imgurl"); let app = getApp(); Page({ data: { @@ -12,16 +14,16 @@ Page({ noDataFlag: false, businePageNum: 1, businessData: null, - Lsit:[], + Lsit: [], }, - goOrder(){ + goOrder() { tt.navigateTo({ url: '/pages/order/index/index', success: (res) => { - + }, fail: (res) => { - + }, }); }, @@ -60,8 +62,8 @@ Page({ let data = res.data.list data.map(item => { tempArr.push(item.id) - - item.discount = (((item.salePriceStr*1)/(item.priceStr*1))*10).toFixed(1) + + item.discount = (((item.salePriceStr * 1) / (item.priceStr * 1)) * 10).toFixed(1) }) if (this.data.businePageNum > 1) { this.setData({ @@ -122,7 +124,7 @@ Page({ let data = res.data.list data.map(item => { tempArr.push(item.id) - item.discount = (((item.salePriceStr*1)/(item.priceStr*1))*10).toFixed(1) + item.discount = (((item.salePriceStr * 1) / (item.priceStr * 1)) * 10).toFixed(1) }) if (this.data.businePageNum > 1) { this.setData({ @@ -210,7 +212,8 @@ Page({ }) }, onLoad: function (options) { - app.globalData.ifCongPh = 1//固定写法 放在指定要手机号授权框出现 + //固定写法 放在指定要手机号授权框出现 + // app.globalData.ifCongPh = 1 this.getCouponChannelList() }, onReachBottom: function () { @@ -219,7 +222,7 @@ Page({ that.setData({ businePageNum: that.data.businePageNum + 1 }); - console.log("加载更多页数" + that.data.page,); + console.log("加载更多页数" + that.data.page, ); console.log("加载更多key" + that.data.code); this.getCouponChannelList(0) }, diff --git a/project.config.json b/project.config.json index 82eb689..53ef8c6 100644 --- a/project.config.json +++ b/project.config.json @@ -1,61 +1,24 @@ { - "setting": { - "urlCheck": true, - "es6": true, - "newFeature": false, - "postcss": false, - "mockUpdate": true, - "minified": false, - "autoPush": false, - "scripts": false, - "mockLogin": false, - "autoCompile": true, - "localPlugins": false, - "IDEPreviewHotRestartCache": false - }, - "appid": "ttde7ca8c141425a2301", - "projectname": "tt富茂C", - "condition": { - "miniprogram": { - "current": -1, - "list": [ - { - "id": 1669558749378, - "name": "商品详情页", - "pathName": "pages/main/index", - "query": "type=cd&couponChannelId=756802201412231168&tenantId=1034", - "scene": "990001", - "launchFrom": "scan", - "location": "qr_code" - }, - { - "id": 1669632886124, - "name": "商品支付页", - "pathName": "pages/main/index", - "query": "type=orderAffirm&couponChannelId=756802201412231168&tenantId=1034", - "scene": "990001", - "launchFrom": "scan", - "location": "qr_code" - }, - { - "id": 1669798102509, - "name": "二维码进入(index)", - "pathName": "pages/index/index", - "query": "scene=t:cd:756802201412231168:1034", - "scene": "990001", - "launchFrom": "scan", - "location": "qr_code" - }, - { - "id": 1669799932530, - "name": "二维码进入(main)", - "pathName": "pages/main/index", - "query": "scene=t:cd:756802201412231168:1034", - "scene": "990001", - "launchFrom": "scan", - "location": "qr_code" + "setting": { + "urlCheck": false, + "es6": true, + "newFeature": false, + "postcss": false, + "mockUpdate": true, + "minified": false, + "autoPush": false, + "scripts": false, + "mockLogin": false, + "autoCompile": true, + "localPlugins": false, + "IDEPreviewHotRestartCache": false + }, + "appid": "ttde7ca8c141425a2301", + "projectname": "tt富茂C", + "condition": { + "miniprogram": { + "current": -1, + "list": [] } - ] } - } }