diff --git a/app.js b/app.js
index f3995ac..91af319 100644
--- a/app.js
+++ b/app.js
@@ -517,6 +517,9 @@ App({
}
},
+ re_to(url){
+ wx.redirectTo({ url: url, }) //跳到非tabbar页
+ },
//显示提示,word提示内容,type 0失败,提示 1成功
my_warnning(word, type, that, width) {
diff --git a/app.json b/app.json
index 934ee9d..6601c6c 100644
--- a/app.json
+++ b/app.json
@@ -26,8 +26,7 @@
"pages/activity/pind_list/pind_list",
"pages/team/team_success/team_success",
"pages/team/team_show/team_show",
- "pages/team/team_ping/team_ping",
- "pages/cart/cart2_pt/cart2_pt",
+ "pages/team/team_ping/team_ping",
"pages/cart/cart_wk/cart_wk",
@@ -227,7 +226,8 @@
"pages/user/monthgiftbag/giftpacklist/giftpacklist",
"pages/user/monthgiftbag/giftpackinfo/giftpackinfo",
"pages/user/monthgiftbag/giftpackbuy/giftpackbuy",
- "pages/cart/cart2_inte/cart2_inte"
+ "pages/cart/cart2_inte/cart2_inte",
+ "pages/cart/cart2_pt/cart2_pt"
]
},
diff --git a/components/diy_public/diy_public.js b/components/diy_public/diy_public.js
new file mode 100644
index 0000000..ce4cdce
--- /dev/null
+++ b/components/diy_public/diy_public.js
@@ -0,0 +1,420 @@
+// var e = function(e) {
+// return e && e.__esModule ? e : {
+// default: e
+// };
+// }(require("../../utils/LoadMore3.js")),
+// n = new e.default(),
+var t = getApp(),
+ a = t.request,
+ o = t.globalData.setting,
+ os = o,
+ i = require("../../utils/util.js"),
+ ut = i,
+ s = require("../../utils/common.js");
+var regeneratorRuntime = require('../../utils/runtime.js');
+Component({
+ properties: {
+ // 这里定义了innerText属性,属性值可以在组件使用时指定
+ object: {
+ type: Object,
+ value: null,
+ },
+ goods_array: {
+ type: Array,
+ value: []
+ },
+ newTime: {
+ type: Number,
+ value: 0
+ },
+ prom_type:{
+ type:Number,
+ value:0
+ }
+ },
+ data: {
+ // 这里是一些组件内部数据
+ yc: false,
+ someData: null,
+ ylp_img: "https://mshopimg.yolipai.net/",
+ imghost: os.imghost,
+ timer: null,
+ user_id:0,
+ img_width:100,
+ img_height:100,
+ swiperHeight:0,
+ prom_text:"已秒",
+ kttypeArr:['','商家','会员','阶梯'],
+ imgobj:{
+ '1':"/miniapp/images/component/seckill.png",
+ '6':"/miniapp/images/component/pingd/pingd.png"
+ },
+ nav1:'/packageA/pages/goodsInfo/goodsInfo?',
+ nav2:'/pages/goods/goodsInfo/goodsInfo?',
+ },
+
+ pageLifetimes: {
+ //要处理一下,游客登录后的界面的变化,主要还该是改变会员
+ show: function () {
+
+
+ //会员身份变化
+ var th = this;
+ var g_id = this.data.object;
+
+ //只有再会员登陆之后,才重新调用接口
+ // console.log('秒杀组件------------');
+ // if(this.data.user_id!=getApp().globalData.user_id){
+ // this.data.user_id=getApp().globalData.user_id
+ // this.init(g_id);
+ // }
+ setTimeout(function () {
+ if (th.data.goods_array && th.data.goods_array.length > 0) {
+ th.data.timer = setInterval(function () {
+ th.countDown2(th);
+ }, 1000);
+ }
+ },600)
+ },
+
+ hide:function () {
+ // 页面被被销毁的时候,清除定时器
+ clearInterval(this.data.timer);
+ }
+ },
+
+ ready: function () {
+ if (this.data.prom_type==6) {
+ this.setData({
+ prom_text:'已团',
+ nav1:'/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?',
+ nav2:'/pages/goods/goodsInfo/goodsInfo?'
+ })
+ }
+ var g_id = this.data.object;
+
+ this.init(g_id);
+ this.data.user_id=getApp().globalData.user_id;
+ },
+ detached() {
+ // 页面被被销毁的时候,清除定时器
+ clearInterval(this.data.timer);
+ },
+ methods: {
+ // 这里是一个自定义方法
+ customMethod: function () { },
+ init: function (g_id) {
+ var th = this;
+ this.loadImg(g_id)
+ getApp().getConfig2(function (e) {
+ var swithc_list = e.switch_list;
+ var sw_arr = JSON.parse(swithc_list);
+
+ if(sw_arr.is_retail_price){
+ th.setData({is_retail_price:1});
+ }
+ })
+
+
+ var app = getApp(), goodsidlist = "", idlist = "";
+ if (g_id.data_type == 2) {
+ if (g_id.data && g_id.data.length > 0) {
+ //--先把商品ID串起来--
+ g_id.data.forEach(function (val, ind) {
+ var item = {};
+ goodsidlist += val.goodsid + ",";
+ idlist += val.flashid + ",";
+ })
+ goodsidlist = ut.sub_last(goodsidlist);
+ idlist = ut.sub_last(idlist);
+
+ var user_id=getApp().globalData.user_id;
+ if(!user_id){ user_id=0;}
+
+ //--调用接口,读取秒杀--
+ // var gUrl = "/api/ms/flash_sale/getGoodsList?store_id=" + os.stoid + "&goodsidlist=" + goodsidlist+"&user_id="+user_id+"&type=1";
+ let gUrl = "/api/ms/flash_sale/getGoodsList?store_id=" + os.stoid + "&idlist=" + idlist + "&user_id="+user_id+"&type=1";
+
+ if (th.data.prom_type==6) { //天天拼单
+ gUrl="/api/weshop/teamlist/getGoodsList?store_id="
+ +os.stoid+"&goodsidlist="+goodsidlist;
+ }
+
+
+ app.request.promiseGet(gUrl, {}).then(res => {
+
+ //如果秒杀的数组为空的时候
+ var goodslist = res.data.data;
+ //就算是添加的活动已经过期,就要用最新的进行中活动
+ if (goodslist && goodslist.length > 0) {
+ th.set_goods_list(g_id.data, goodslist);
+ }
+ });
+ }
+ } else {
+ th.no_gid_set();
+ }
+ },
+
+ //当是默认的情况
+ no_gid_set() {
+ var user_id=getApp().globalData.user_id;
+ if(!user_id){ user_id=0;}
+
+ let req={ store_id: os.stoid, is_end: 0, is_show: 1, timetype: 2,user_id:user_id};
+ let gUrl="/api/ms/flash_sale/spikepage?page=1&pageSize=9"
+
+ if (this.data.prom_type==6) { //天天拼单
+ gUrl="/api/weshop/teamlist/pageteam/2?page=1&pageSize=9"
+ req={
+ store_id:os.stoid,
+ is_end: 0,
+ is_show: 1,
+ user_id:user_id,
+ }
+ }
+
+ getApp().request.promiseGet(gUrl,
+ { isShowLoading: 1, data:req }
+ ).then(res => {
+
+ if (res.data.code == 0 && res.data.data.pageData && res.data.data.pageData.length > 0) {
+ var goodsidlist = res.data.data.pageData;
+ this.set_goods_list(null, goodsidlist);
+ }
+ });
+ },
+
+ //就算是添加的活动已经过期,就要用最新的活动
+ set_goods_list(g_id, goodslist) {
+ let prom_type=this.data.prom_type
+ goodslist.forEach(function (vy, indy) {
+ if(!vy.id) vy.id=vy.prom_id;
+ })
+
+ // 判断火热,预热
+ var newTime = ut.gettimestamp(), all_array = [], th = this;
+ th.setData({ newTime: newTime });
+ if (g_id) {
+ /*--商品队列按照添加的顺序排列--*/
+ g_id.forEach(function (val, ind) {
+ goodslist.forEach(function (vy, indy) {
+ if (val.goodsid == vy.goods_id) {
+ all_array.push(vy);
+ }
+ })
+ })
+ } else {
+ all_array = goodslist;
+ }
+
+ if (all_array.length == 0) {
+ all_array = goodslist;
+ }
+
+ for(let i in all_array){
+ let item=all_array[i];
+ if(item.user_price) item.price=item.user_price;
+ if(item.start_time > newTime) {
+ item.status = 0;
+ } else if(item.end_time > newTime) {
+ item.status = 1;
+ };
+
+ }
+
+
+ var promisies = [];
+ for (const key in all_array) {
+ if (Object.hasOwnProperty.call(all_array, key)) {
+ const val = all_array[key];
+
+ promisies[key] = getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +
+ os.stoid + "/"+prom_type+"/" + val.id,
+ {}
+ ).then(res => {
+ if (res.data.code == 0) {
+ if (res.data.data <= 0) all_array[key].status = 2;
+ };
+ });
+ }
+ }
+
+
+ Promise.all(promisies).then(() => {
+ // 判断活动是否结束
+ let empty=[]
+ for(let i in all_array){
+ let item=all_array[i];
+ if(newTime > item.end_time) {
+ all_array[i].status = 3;
+ };
+ // let price=all_array[i].price.toFixed(2)
+ let price=all_array[i].price + ''
+ if (price && price.indexOf('.') > -1) {
+ let priceArr = price.split(".")
+ all_array[i].price_n = priceArr[0]
+ all_array[i].price_xs = priceArr[1]
+ }else{
+ all_array[i].price_n = price
+ }
+
+ all_array[i].residue=all_array[i].goods_num*1 - all_array[i].buy_num*1
+ if (all_array[i].residue && all_array[i].residue > 0 && all_array[i].status !=2) {
+ empty.push(all_array[i])
+ }
+ }
+
+ //控制已售罄是否显示
+ if (!th.data.object.hide_sold_out_items) {
+ all_array=empty
+ }
+
+
+ var arr = new Array();
+ if (th.data.object.style==7) {
+ //--三个三个一组---
+ for (var i = 0; i < all_array.length; i += 2) {
+ arr.push(all_array.slice(i, i + 2));
+ }
+ }else{
+ //--三个三个一组---
+ for (var i = 0; i < all_array.length; i += 3) {
+ arr.push(all_array.slice(i, i + 3));
+ }
+ }
+
+
+ /*--熏染到前台--*/
+ th.setData({ goods_array: arr });
+ if (th.data.object.style==6) {
+ th.setSwiper_h()
+ }
+
+ });
+
+
+ th.data.timer = setInterval(function () {
+ th.countDown2(th);
+ }, 1000);
+ },
+ setSwiper_h(){
+ var th=this
+ wx.createSelectorQuery().in(this).select('.swiper_h').boundingClientRect(rect => {
+ if (rect && rect.height) {
+ var sumHeigth=(rect.height+13)+'px'
+ th.setData({
+ swiperHeight: sumHeigth
+ })
+ }
+ }).exec();
+ // const query = this.createSelectorQuery()
+ // query.select('.swiper_h').boundingClientRect()
+ // query.exec( (res)=> {
+ // console.log(res)
+ // console.log(res[0].height)
+ // console.log(res[0].height * data.t.length)
+ // let sumHeigth = res[0].height * data.t.length;
+ // console.error('组件高度');
+ // console.log(sumHeigth);
+ // th.setData({
+ // swiperHeight: sumHeigth
+ // })
+ // })
+ },
+
+
+ //---小于10的格式化函数----
+ timeFormat: function (param) {
+ return param < 10 ? '0' + param : param;
+ },
+ //----秒杀倒计时函数-----
+ countDown2: function (ob) {
+ if (ob == undefined) return false;
+ var ee = ob;
+ // 获取当前时间,同时得到活动结束时间数组
+ var newTime = ut.gettimestamp();
+ this.setData({ newTime: newTime });
+
+ var List = ee.data.goods_array;
+ if (List.length == 0) return false;
+ for (var j = 0; j < List.length; j++) {
+ // 对结束时间进行处理渲染到页面
+ var endTimeList = List[j];
+ for (var i = 0; i < endTimeList.length; i++) {
+ var o = endTimeList[i];
+ var endTime = o.end_time;
+ if (newTime < o.start_time) endTime = o.start_time;
+ let obj = null;
+ // 如果活动未结束,对时间进行处理
+ if (endTime - newTime > 0) {
+ let time = (endTime - newTime);
+ // 获取天、时、分、秒
+ let day = parseInt(time / (60 * 60 * 24));
+ let hou = parseInt(time % (60 * 60 * 24) / 3600);
+ let min = parseInt(time % (60 * 60 * 24) % 3600 / 60);
+ let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);
+ obj = {
+ day: this.timeFormat(day),
+ hou: this.timeFormat(hou),
+ min: this.timeFormat(min),
+ sec: this.timeFormat(sec)
+ }
+ } else {
+ //活动已结束,全部设置为'00'
+ obj = {
+ day: '00',
+ hou: '00',
+ min: '00',
+ sec: '00'
+ }
+ }
+ var txt = "goods_array[" + j + "][" + i + "].djs";
+ ee.setData({
+ [txt]: obj
+ });
+ }
+ }
+ },
+ //图片失败,默认图片
+ bind_bnerr3: function (e) {
+ var _errImg = e.target.dataset.errorimg;
+ var _errObj = {};
+ _errObj[_errImg] = "/public/images/default_goods_image_240.gif";
+ this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
+ },
+
+ go_to: function () {
+ let url= "/pages/activity/seckill_list/seckill_list"
+ if (this.data.prom_type==6) { //天天拼单
+ url="/pages/activity/pind_list/pind_list"
+ }
+ wx.navigateTo({
+ url
+ });
+ },
+ //加入购物车
+ shoppingCart(){
+ console.log('加入购物车');
+ },
+ loadImg(g_id){
+ if (g_id.style==1) {
+ let w=''
+ switch (g_id.picture_scale) {
+ case 1:
+ w=`width:calc(100%-${g_id.page_margins*2}px);height:calc(100%-${g_id.page_margins*2}px)`
+ break;
+
+ default:
+ break;
+ }
+
+
+
+ }
+ }
+
+ },
+
+
+})
\ No newline at end of file
diff --git a/components/diy_public/diy_public.json b/components/diy_public/diy_public.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/components/diy_public/diy_public.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/components/diy_public/diy_public.wxml b/components/diy_public/diy_public.wxml
new file mode 100644
index 0000000..6dce2de
--- /dev/null
+++ b/components/diy_public/diy_public.wxml
@@ -0,0 +1,465 @@
+
+
+
+
+
+
+
+ {{object.column_name}}
+
+
+ 更多
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 已售罄
+
+
+
+
+ 距结束时间
+ 距开始时间
+ {{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}
+
+
+
+
+
+ {{aitem.goods_name}}
+
+ {{aitem.ct_num}}人团
+ {{kttypeArr[aitem.kttype]}}团
+
+
+
+
+ {{prom_text}}{{aitem.buy_num}}件
+ 还剩余{{aitem.status==2 ? '0' : aitem.residue}}件
+
+
+
+ ¥{{aitem.price_n}}.{{aitem.price_xs}}
+ ¥{{aitem.shop_price || aitem.market_price}}
+
+
+
+
+
+ {{object.button_content}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 已售罄
+
+
+ {{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}
+
+
+
+ {{aitem.goods_name}}
+
+ {{aitem.ct_num}}人团
+ {{kttypeArr[aitem.kttype]}}团
+
+
+ {{prom_text}}{{aitem.buy_num}}件
+ 还剩余{{aitem.residue}}件
+
+
+
+
+ ¥{{aitem.price_n}}.{{aitem.price_xs}}
+ ¥{{aitem.shop_price || aitem.market_price}}
+
+
+
+
+ {{object.button_content}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 已售罄
+
+
+ {{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}
+
+
+
+ {{aitem.goods_name}}
+
+ {{prom_text}}{{aitem.buy_num}}件
+ 剩{{aitem.residue}}件
+
+
+
+
+ ¥{{aitem.price_n}}.{{aitem.price_xs}}
+ ¥{{aitem.shop_price || aitem.market_price}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 已售罄
+
+
+ {{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}
+
+
+
+
+ {{aitem.goods_name}}
+
+
+ {{prom_text}}{{aitem.buy_num}}件
+ 剩{{aitem.residue}}件
+
+
+
+
+ ¥{{aitem.price_n}}.{{aitem.price_xs}}¥{{aitem.shop_price || aitem.market_price}}
+
+
+
+
+
+ {{object.button_content}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 已售罄
+
+
+
+
+ 距结束时间
+ 距开始时间
+ {{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}
+
+
+
+
+
+ {{aitem.goods_name}}
+
+ {{aitem.ct_num}}人团
+ {{kttypeArr[aitem.kttype]}}团
+
+
+
+
+ {{prom_text}}{{aitem.buy_num}}件
+ 还剩余{{aitem.status==2 ? '0' : aitem.residue}}件
+
+
+
+ ¥{{aitem.price_n}}.{{aitem.price_xs}}
+ ¥{{aitem.shop_price || aitem.market_price}}
+
+
+
+
+
+ {{object.button_content}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 已售罄
+
+
+ {{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}
+
+
+
+ {{aitem.goods_name}}
+
+ {{aitem.ct_num}}人团
+ {{kttypeArr[aitem.kttype]}}团
+
+
+ {{prom_text}}{{aitem.buy_num}}件
+ 还剩余{{aitem.residue}}件
+
+
+
+
+ ¥{{aitem.price_n}}.{{aitem.price_xs}}
+ ¥{{aitem.shop_price || aitem.market_price}}
+
+
+
+
+ {{object.button_content}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 已售罄
+
+
+ {{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}
+
+
+
+ {{aitem.goods_name}}
+
+ {{aitem.ct_num}}人团
+ {{kttypeArr[aitem.kttype]}}团
+
+
+ {{prom_text}}{{aitem.buy_num}}件
+ 还剩余{{aitem.residue}}件
+
+
+
+
+ ¥{{aitem.price_n}}.{{aitem.price_xs}}
+ ¥{{aitem.shop_price || aitem.market_price}}
+
+
+
+
+ {{object.button_content}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}
+
+
+ {{aitem.goods_name}}
+
+ {{prom_text}}{{aitem.buy_num}}件
+ 还剩余{{aitem.residue}}件
+
+
+
+
+ ¥{{aitem.price}}
+ ¥{{aitem.shop_price || aitem.market_price}}
+
+
+
+
+ {{object.button_content}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 已售罄
+
+
+ {{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}}
+
+
+
+ {{aitem.goods_name}}
+
+ {{prom_text}}{{aitem.buy_num}}件
+ 剩{{aitem.residue}}件
+
+
+
+
+ ¥{{aitem.price_n}}.{{aitem.price_xs}}
+ ¥{{aitem.shop_price || aitem.market_price}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/diy_public/diy_public.wxss b/components/diy_public/diy_public.wxss
new file mode 100644
index 0000000..25c399a
--- /dev/null
+++ b/components/diy_public/diy_public.wxss
@@ -0,0 +1,548 @@
+.flex{
+ display: flex;
+ align-items: center;
+}
+.top {
+ background-color: white;
+ height: 70rpx;
+ line-height: 70rpx;
+ color: #000;
+ border-bottom: 2rpx solid #eee;
+ padding:0rpx 20rpx;
+ display: flex;
+ justify-content: space-between;
+ /* font-size: 32rpx; */
+ font-size: 24rpx;
+}
+
+.s_it {
+ width: 100%;
+ display: flex;
+ background-color: white;
+}
+
+.s_prom {
+ width: 100%;
+ background-color: white;
+ min-height: 200rpx;
+}
+
+swiper {
+ display: block;
+ height: 400rpx;
+}
+
+.right_k {
+ width: 93rpx;
+ color: #7b7b7b;
+}
+.right_k image{
+ width: 20rpx;
+ height: 20rpx;
+}
+ .t_left {
+ width: 10rpx;
+ height: 38rpx;
+ background: #f23030;
+ margin-right: 10rpx;
+}
+.n_t_ms{
+ color:#f23030;
+}
+
+.sp {
+ min-height: 300rpx;
+ width: 100%;
+ background-color: white;
+ padding: 18rpx;
+ display: flex;
+}
+
+.sp .sp_top {
+ height: 220rpx;
+ min-width: 30%;
+}
+
+.sp .sp_top .s_img {
+ width: 210rpx;
+ height: 100%;
+}
+
+.sp .sp_top .s_img image {
+ width: 210rpx;
+ height: 100%;
+ position: relative;
+ top: -74rpx;
+ left: 0rpx;
+}
+
+.sp .sp_top .s_top_kill {
+ background-color: #c4182e;
+ font-size: 24rpx;
+ height: 38rpx;
+ line-height: 38rpx;
+ padding: 4rpx 10rpx;
+ border-radius: 10rpx;
+ z-index: 999;
+ position: relative;
+ top: 1rpx;
+ width: 110rpx;
+ color: #fff;
+ text-align: center;
+}
+
+.po {
+ position: absolute;
+}
+
+.sp .sp_top .s_foot_kill {
+ font-size: 20rpx;
+ position: relative;
+ top: -90rpx;
+ width: 210rpx;
+ height: 38rpx;
+ line-height: 38rpx;
+ color: #fff;
+ text-align: center;
+ background-color: rgba(0, 0, 0, 0.5);
+}
+
+.sp_wz {
+ width: 210rpx;
+ min-height: 100rpx;
+}
+
+.sp_wz .sp_wzi {
+ font-size: 30rpx;
+ border-bottom: 2rpx solid #dcdcdc;
+ width: 100%;
+ /* text-align: left; */
+ padding: 4rpx 0;
+ /* overflow: hidden; */
+ height: 90rpx;
+ word-break: break-all;
+ /* text-overflow: ellipsis;
+ white-space: nowrap;
+ line-height: 48rpx; */
+}
+
+.sp_wz .sp_jg {
+ color: #c4182e;
+ font-size: 30rpx;
+ overflow: hidden;
+ display: inline-block;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ margin-right: 10rpx;
+}
+
+.sp_wz .sp_jgx {
+ color: #adadad;
+ text-decoration: line-through;
+ font-size: 24rpx;
+ overflow: hidden;
+ display: inline-block;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.one {
+ margin-left: 14rpx;
+}
+
+.sp .sp_top .s_top1_kill {
+ position: absolute;
+ background-color: #c4182e;
+ font-size: 24rpx;
+ height: 38rpx;
+ line-height: 38rpx;
+ left: 265rpx;
+ top: 100rpx;
+ padding: 0 10rpx;
+ color: white;
+ border-radius: 10rpx;
+}
+
+.sp .sp_top .s_top2_kill {
+ position: absolute;
+ background-color: #c4182e;
+ font-size: 24rpx;
+ height: 38rpx;
+ line-height: 38rpx;
+ right: 146rpx;
+ top: 100rpx;
+ padding: 0 10rpx;
+ color: white;
+ border-radius: 10rpx;
+}
+
+.sp .sp_top .s_foot1_kill {
+ font-size: 20rpx;
+ position: absolute;
+ top: 270rpx;
+ width: 210rpx;
+ height: 38rpx;
+ line-height: 38rpx;
+ color: #fff;
+ text-align: center;
+ background-color: rgba(0, 0, 0, 0.5);
+}
+
+.po1 {
+ position: absolute;
+}
+
+.sp .sp_top .s_foot2_kill {
+ font-size: 20rpx;
+ position: absolute;
+ top: 270rpx;
+ width: 210rpx;
+ height: 38rpx;
+ line-height: 38rpx;
+ color: #fff;
+ text-align: center;
+ background-color: rgba(0, 0, 0, 0.5);
+}
+
+.sp2 {
+ width: 100%;
+ min-height: 240rpx;
+}
+
+.sp2 .one1 {
+ background-color: white;
+ height: 285rpx;
+ display: flex;
+ padding:0rpx 20rpx;
+ border-bottom: 6rpx#eee solid;
+ align-items: center;
+}
+
+.sp2 .one1 .o1_img {
+ width: 220rpx;
+ height: 220rpx;
+ margin-right: 25rpx;
+}
+
+.o1_right .sp_wzi {
+ font-size: 30rpx;
+ margin-bottom: 6rpx;
+ /* text-align: left; */
+ padding: 4rpx 0;
+ height: 90rpx;
+ /* overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis; */
+}
+
+.o1_right .o1_sj_kill {
+ height: 60rpx;
+ margin-bottom: 10rpx;
+ font-size: 28rpx;
+}
+
+.o1_right .o1_sj_kill text {
+ background-color: #fdcb08;
+ text-align: center;
+ border-radius: 10rpx;
+ padding: 4rpx;
+ margin-left: 6rpx;
+}
+
+.o1_right .sp_jg {
+ color: #c4182e;
+ font-size: 30rpx;
+ overflow: hidden;
+ display: inline-block;
+ margin-right: 10rpx;
+}
+
+.o1_right .sp_jgx {
+ color: #dcdcdc;
+ text-decoration: line-through;
+ font-size: 26rpx;
+ overflow: hidden;
+ display: inline-block;
+}
+
+.o1_img image {
+ width: 220rpx;
+ height: 220rpx;
+}
+.o1_right{
+ width: 465rpx;
+}
+.o1_right .wo {
+ background-color: #c4182e;
+ width: 150rpx;
+ height: 50rpx;
+ line-height: 50rpx;
+ color: white;
+ text-align: center;
+ font-size: 30rpx;
+ border-radius: 14rpx;
+}
+.rob{
+ display: flex;
+ justify-content: flex-end;
+ font-size: 30rpx;
+}
+.money{
+ display: flex;
+ align-items: center;
+}
+
+.sp .sp_top .s_top_kill.gray{background-color:#bdbdc1;color: #fff;font-weight: normal}
+
+
+.ellipsis-2 {
+
+ height: 110rpx;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+}
+.ellipsis-2n {
+
+ /* height: 97rpx; */
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+}
+.pdlf10{
+ padding: 0 10rpx;
+}
+.new_item1{
+ width: 100%;
+ overflow: hidden;
+}
+
+.new_item1_image{
+ width: 100%;
+ /* max-width: 100%;
+ max-height: 100%; */
+}
+.new_item1_time{
+ height: 50rpx;
+ background: #f23030;
+ color: #fff;
+ /* font-size: 25rpx; */
+ font-size: 24rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ opacity:.8;
+ /* padding: 0rpx 30rpx; */
+
+}
+.new_item1_time image{
+ width: 188rpx;
+ height: 52rpx;
+}
+.new_item1_goods_name{
+ padding: 10rpx 10rpx 0rpx;
+ /* font-size: 26rpx; */
+ font-size: 28rpx;
+ width: 100%;
+ box-sizing: border-box;
+ color: #333333;
+}
+.new_item1_price{
+ display: flex;
+ /* padding: 0 10rpx; */
+ align-items: center;
+ justify-content: space-between;
+ /* font-size: 26rpx; */
+ font-size: 24rpx;
+ padding: 0 10rpx 10rpx;
+}
+.clor{
+ /* color: rgba(196, 24, 45, 1); */
+ color: #ec0022;
+}
+.clor7b{
+ color: #7b7b7b;
+}
+.new_item1_but{
+ width: 130rpx;
+ height: 60rpx;
+ color: #fff;
+ background-color: #f23030;
+ line-height: 60rpx;
+ text-align: center;
+ border-radius: 15rpx;
+}
+.new_item1_but1{
+ border-radius: 50rpx !important;
+}
+.new_item1_but2{
+ border-radius: 50rpx !important;
+ background-color: rgba(0, 0, 0, 0) !important;
+ color: #f23030 !important;
+ border: 1rpx solid #f23030 !important;
+}
+.new_item1_but3{
+ background-color: rgba(0, 0, 0, 0) !important;
+ color: #f23030 !important;
+ border: 1rpx solid #f23030 !important;
+}
+
+
+
+
+.new_item1_box{
+ /* padding-top: 17rpx; */
+ width: 100%;
+ box-sizing: border-box;
+ overflow: hidden;
+}
+
+.aborder{
+ border: 1px solid #e8e8e8;
+}
+.bgf{
+ background-color: #fff;
+}
+.boxsha{
+ /* box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25); */
+ /* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */
+ box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 3px 10px 0 rgba(0, 0, 0, 0.19);
+}
+.but_radius85{
+ border-radius:289rpx;
+}
+.but_radius5{
+ border-radius:8px;
+}
+.imgBox{
+ position: relative;
+}
+.imgBox_img{
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 74rpx;
+ height: 70rpx;
+
+}
+
+.aspect_ratio1{
+ aspect-ratio:1/1;
+}
+.aspect_ratio2{
+ aspect-ratio:16/9;
+}
+.aspect_ratio3{
+ aspect-ratio:3/2;
+}
+.aspect_ratio4{
+ aspect-ratio:3/4;
+}
+.container1 {
+ position: relative;
+ width:100%;
+ padding-top: 100%;
+ overflow: hidden;
+}
+.container2 {
+ position: relative;
+ width:100%;
+ padding-top: 56.25%;
+ overflow: hidden;
+}
+.container3 {
+ position: relative;
+ width:100%;
+ padding-top: 66.67%;
+ overflow: hidden;
+}
+.container4 {
+ position: relative;
+ width:100%;
+ padding-top: 133.33%;
+ overflow: hidden;
+
+}
+
+.images1 {
+ display: block;
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ object-fit: cover;
+
+}
+
+.flex2{
+ display: flex;
+ /* align-items: center; */
+ justify-content: space-between;
+ flex-wrap: wrap;
+ box-sizing: border-box;
+}
+.flex2:after {
+ content: "";
+ width: 30%;
+ height: 0px;
+ visibility: hidden;
+ }
+
+ .boxpad{
+ /* padding:11rpx 9rpx; */
+ box-sizing: border-box;
+ }
+ .pricefs28{
+ font-size: 28rpx !important;
+ }
+ .pricefs42{
+ font-size: 42rpx !important;
+ }
+ .pricefs38{
+ font-size: 38rpx !important;
+ }
+ .imgbox1{
+ width: 60rpx;
+ height: 60rpx;
+ }
+ .topBox{
+ position: relative;
+ }
+
+ .item_float{
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ box-sizing: border-box;
+ }
+ .buy_box{
+ display: flex;
+ margin: 10rpx 0 0 10rpx;
+ width: 100%;
+ opacity:.8;
+ }
+ .buy_box view{
+ padding: 10rpx;
+ background-color:#f23030;
+ color: #fff;
+ /* margin-top: 10rpx; */
+ line-height: 28rpx;
+ border-radius: 10rpx;
+ }
+ .mgr10{
+ margin-right: 10rpx;
+ }
+ .fs24{
+ font-size: 24rpx;
+ }
+ .lineh24{
+ line-height: 24rpx !important;
+ }
\ No newline at end of file
diff --git a/packageA/pages/cart2_ser/cart2_ser.js b/packageA/pages/cart2_ser/cart2_ser.js
index 7a22e7b..5c06bb6 100644
--- a/packageA/pages/cart2_ser/cart2_ser.js
+++ b/packageA/pages/cart2_ser/cart2_ser.js
@@ -3,7 +3,7 @@ var t = getApp(),
a = t.request,
e = require("../../../utils/common.js"),
s = require("../../../utils/util.js"),
- o = require("../../../utils/md5.js"),
+ ut=s, o = require("../../../utils/md5.js"),
to = getApp();
var oo = t.globalData.setting,
os = oo;
@@ -49,6 +49,10 @@ Page({
is_cart: 0, //是不是购物车进来的购买
},
onLoad: function(t) {
+
+ //定义第一次进入
+ this.data.fir_in=1;
+
wx.setNavigationBarTitle({
title: "填写订单",
});
@@ -274,11 +278,47 @@ Page({
//----------子页返回父页触发----------
onShow: function() {
- var fy=s.fy_back("/pages/user/order_list/order_list?index=2&tabindex=1",1);
- if(fy) return false;
- t_pay.set_fir();
var th = this;
+
+ //判断是不是第一次进入
+ if(this.data.fir_in){
+ this.data.fir_in=0;
+ }else{
+ var fy=s.fy_back("/pages/user/order_list/order_list?index=2&tabindex=1",1);
+ if(fy) return false;
+ t_pay.set_fir();
+
+ var back_url="/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id;
+ //-- 通联的第三方支付的返回优化 --
+ ut.is_pay_ok(th.data.order_id,back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){
+
+ if(!th.data.order_id) return false;
+ getApp().request.promiseGet("/api/weshop/recharge/user/page",
+ {data:{store_id:os.stoid,order_id:th.data.order_id,user_id:getApp().globalData.user_id }}).then(res=>{
+ if(ut.ajax_ok(res)){
+ var item=res.data.data.pageData[0];
+ if(item.pay_status==1){
+ //支付支付,返回首页
+ ut.m_toast('支付成功');
+ setTimeout(()=>{
+ getApp().re_to(back_url);
+ },1000)
+
+ }else{
+ //支付支付,返回首页
+ ut.m_toast('支付失败');
+ setTimeout(()=>{
+ getApp().re_to("/pages/user/order_list/order_list?index=2&tabindex=1");
+ },1000)
+ }
+ }
+ })
+ });
+
+ }
+
+
if (th.data.isclose == 0) {
wx.navigateTo({
url: "/pages/index/index/index"
@@ -647,6 +687,9 @@ Page({
}, 1000)
},function (e){
+
+ console.log('kkkkkkk');
+
wx.showToast({
title: e,
icon: 'none',
diff --git a/packageA/pages/details_serviceCard/details_serviceCard.js b/packageA/pages/details_serviceCard/details_serviceCard.js
index 99312e5..eb36139 100644
--- a/packageA/pages/details_serviceCard/details_serviceCard.js
+++ b/packageA/pages/details_serviceCard/details_serviceCard.js
@@ -20,6 +20,9 @@ Page({
*/
onLoad: function(options) {
+ //定义第一次进入
+ this.data.fir_in=1;
+
self = this;
this.data.options = options;
@@ -47,8 +50,87 @@ Page({
*/
onShow: function() {
this.data.is_summit_ing=0;
- util.fy_back('',0)
- t_pay.set_fir();
+
+ var th=this;
+ //判断是不是第一次进入
+ if(this.data.fir_in){
+ this.data.fir_in=0;
+ }else{
+ util.fy_back('',0)
+ t_pay.set_fir();
+
+ var back_url='/pages/user/order_list/order_list?index=2&tabindex=1';
+ var err_url='/pages/user/order_list/order_list?index=2&tabindex=1';
+
+ //判断是不是有调用支付过
+ if(th.data.payed) {
+ th.data.payed=0;
+ //-- 判断一下活动的类型 --
+ var prom_type = th.data.details.list[0].prom_type > 0 ? th.data.details.list[0].prom_type : 0;
+ var order_id = th.data.details.order_id;
+ var order_sn = th.data.details.order_sn;
+
+ var ck_url = ''; //请求地址
+ var req_data = {}; //请求参数
+ if (parseInt(prom_type) == 6) {
+ //跳转到组图的页面
+ back_url= "/packageA/pages/serviceCard_pd/team_success/team_success?ordersn=" + order_sn
+ ck_url = "/api/weshop/rechargeServicelist/page";
+ req_data = {store_id: os.stoid, order_id: order_id};
+ } else {
+ ck_url = "/api/weshop/recharge/user/page";
+ req_data = {store_id: os.stoid, order_id: order_id, user_id: getApp().globalData.user_id};
+ }
+
+ //-- 通联的第三方支付的返回优化 --
+ ut.is_pay_ok(th.data.details,back_url, err_url, function () {
+ if (!th.data.details) return false;
+ getApp().request.promiseGet(ck_url,
+ {data: req_data}).then(res => {
+ if (ut.ajax_ok(res)) {
+ var item = res.data.data.pageData[0];
+ if (parseInt(prom_type) == 6) {
+ if (item.pt_status == 1 || item.pt_status == 2) {
+ //支付支付,返回首页
+ ut.m_toast('支付成功');
+ setTimeout(() => {
+ getApp().re_to(back_url);
+ }, 1000)
+
+ } else {
+ //支付支付,返回首页
+ ut.m_toast('支付失败');
+ setTimeout(() => {
+ getApp().re_to(err_url);
+ }, 1000)
+ }
+
+ } else {
+ if (item.pay_status == 1) {
+ //支付支付,返回首页
+ ut.m_toast('支付成功');
+ setTimeout(() => {
+ getApp().re_to(back_url);
+ }, 1000)
+
+ } else {
+ //支付支付,返回首页
+ ut.m_toast('支付失败');
+ setTimeout(() => {
+ getApp().re_to(err_url);
+ }, 1000)
+ }
+ }
+
+
+ }
+ })
+ });
+ }
+
+ }
+
+
getApp().check_can_share();
if (app.globalData.userInfo) {
if (!this.data.isLogin) {
@@ -688,6 +770,8 @@ Page({
}
if (flag) {
+
+ th.data.payed=1;
t_pay.set_pay_url("/api/weshop/order/pay/createRechargeOrder");
t_pay.pay({
parentSn: order_sn,
diff --git a/packageA/pages/myGift/myGift.js b/packageA/pages/myGift/myGift.js
index 26eb1cc..9ccc3f3 100644
--- a/packageA/pages/myGift/myGift.js
+++ b/packageA/pages/myGift/myGift.js
@@ -4,6 +4,7 @@ let self = null;
var os = app.globalData.setting;
var t_pay = require("../../../utils/pay2.js");
var util = require('../../../utils/util.js');
+var ut=util;
Page({
@@ -53,6 +54,9 @@ Page({
*/
onLoad: function (options) {
+ //定义第一次进入
+ this.data.fir_in=1;
+
self = this;
if(options.index){
this.setData({currentIndex:1}); //查看我的礼包
@@ -92,9 +96,47 @@ Page({
*/
onShow: function () {
- util.fy_back('',0)
this.data.is_summit_ing=0;
- t_pay.set_fir();
+
+
+ var th=this;
+ //判断是不是第一次进入
+ if(this.data.fir_in){
+ this.data.fir_in=0;
+ }else{
+ //富友插件支付
+ util.fy_back('',0)
+ t_pay.set_fir();
+
+ //-- 通联的第三方支付的返回优化 --
+ util.is_pay_ok(th.data.ok_order_sn,"none","none",function (){
+ if(!th.data.ok_order_sn) return false;
+
+ var b_url="/api/weshop/libao/libaoFormvip/page";
+ var rq_data={
+ store_id: app.globalData.setting.stoid,
+ user_id: app.globalData.user_id,
+ number: th.data.ok_order_sn
+ };
+
+ getApp().request.promiseGet(b_url,
+ {data:rq_data}).then(res=>{
+ if(ut.ajax_ok(res)){
+ var item=res.data.data.pageData[0];
+ if(item.fbillstate==1){
+ //支付支付,返回首页
+ util.m_toast('支付成功');
+ }else{
+ //支付支付,返回首页
+ util.m_toast('支付失败');
+ }
+ }
+ })
+ });
+
+ }
+
+
getApp().check_can_share();
if(app.globalData.userInfo) {
if(!this.data.isLogin) {
@@ -306,7 +348,7 @@ Page({
},function (e){
th.data.is_summit_ing=0;
getApp().my_warnning(e, 0, th);
- })
+ },th)
// var url = "/api/weshop/libao/libaoFormvip/libaoOrder";
// getApp().request.post(url,
// {
diff --git a/packageA/pages/myGiftDetails/myGiftDetails.js b/packageA/pages/myGiftDetails/myGiftDetails.js
index c0f50fd..47e27a2 100644
--- a/packageA/pages/myGiftDetails/myGiftDetails.js
+++ b/packageA/pages/myGiftDetails/myGiftDetails.js
@@ -24,8 +24,10 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
+ //定义第一次进入
+ this.data.fir_in=1;
- self = this;
+ self = this;
// 如果从商品详情页点击促销栏里的礼包跳转过来的话,不显示底部按钮
// showBtn 控制按钮是否显示
@@ -68,9 +70,58 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
- this.data.is_summit_ing=0;
- ut.fy_back('',0)
- t_pay.set_fir();
+
+ this.data.is_summit_ing=0;
+ var th=this;
+ //判断是不是第一次进入
+ if(this.data.fir_in){
+ this.data.fir_in=0;
+ }else{
+ ut.fy_back('',0)
+ t_pay.set_fir();
+
+ //-- 通联的第三方支付的返回优化 --
+ ut.is_pay_ok(th.data.ok_order_sn,"/packageA/pages/libao_payment/payment?type=2","none",function (){
+ console.log('is_pay_ok');
+ console.log(th.data.ok_order_sn);
+ if(!th.data.ok_order_sn) return false;
+
+ var b_url="/api/weshop/libao/libaoFormvip/page";
+ var rq_data={
+ store_id: app.globalData.setting.stoid,
+ user_id: app.globalData.user_id,
+ number: th.data.ok_order_sn
+ };
+
+ getApp().request.promiseGet(b_url,
+ {data:rq_data}).then(res=>{
+
+ console.log('is_pay_ok2');
+ console.log('1111111');
+
+ if(ut.ajax_ok(res)){
+
+ var item=res.data.data.pageData[0];
+ if(item.fbillstate==1){
+ //支付支付,返回首页
+ ut.m_toast('支付成功');
+ setTimeout(()=>{
+ getApp().goto("/packageA/pages/libao_payment/payment?type=2");
+ },1000)
+
+ }else{
+ //支付支付,返回首页
+ ut.m_toast('支付失败');
+ setTimeout(()=>{
+ getApp().goto("/pages/index/index/index");
+ },1000)
+ }
+ }
+ })
+ });
+
+ }
+
getApp().check_can_share();
if(app.globalData.userInfo) {
if(!this.data.isLogin) {
@@ -248,7 +299,7 @@ Page({
},function (msg){
th.data.is_summit_ing=0;
getApp().my_warnning(msg, 0, th);
- })
+ },th)
// var url = "/api/weshop/libao/libaoFormvip/libaoOrder";
// getApp().request.post(url,
diff --git a/packageA/pages/serviceCard_pd/cart/cart.js b/packageA/pages/serviceCard_pd/cart/cart.js
index 754c836..7911842 100644
--- a/packageA/pages/serviceCard_pd/cart/cart.js
+++ b/packageA/pages/serviceCard_pd/cart/cart.js
@@ -1,5 +1,5 @@
var t = getApp(), app = t, a = t.request, e = require("../../../../utils/common.js"),
- s = require("../../../../utils/util.js"), o = require("../../../../utils/md5.js"), to = getApp();
+ s = require("../../../../utils/util.js"),ut=s, o = require("../../../../utils/md5.js"), to = getApp();
var oo = t.globalData.setting, os = oo;
var regeneratorRuntime = require('../../../../utils/runtime.js');
var util_pay = require("../../../../utils/pay.js");
@@ -71,7 +71,8 @@ Page({
},
onLoad: function (t) {
console.log("onLoad_pt_cart");
-
+ //定义第一次进入
+ this.data.fir_in=1;
var th = this; this.setData({ is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow, });
var appD = getApp().get_b_now();
@@ -245,12 +246,45 @@ Page({
//----------子页返回父页触发----------
onShow: function () {
- s.fy_back('',0);
+ var th = this;
+ //判断是不是第一次进入
+ if(this.data.fir_in){
+ this.data.fir_in=0;
+ }else{
+ s.fy_back('',0);
+ t_pay.set_fir();
+ util_pay.set_fir();
+
+ var back_url="/packageA/pages/serviceCard_pd/team_success/team_success?ordersn=" + th.data.order_sn;
+
+ //-- 通联的第三方支付的返回优化 --
+ ut.is_pay_ok(th.data.order_id,back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){
+ if(!th.data.order_id) return false;
+ getApp().request.promiseGet("/api/weshop/rechargeServicelist/page",{
+ data: { store_id: os.stoid, order_id: th.data.order_id}
+ }).then(res=>{
+ if(ut.ajax_ok(res)){
+ var item=res.data.data.pageData[0];
+ if(item.pt_status==1 || item.pt_status==2){
+ //支付支付,返回首页
+ ut.m_toast('支付成功');
+ setTimeout(()=>{
+ getApp().re_to(back_url);
+ },1000)
+
+ }else{
+ //支付支付,返回首页
+ ut.m_toast('支付失败');
+ setTimeout(()=>{
+ getApp().re_to("/pages/user/order_list/order_list?index=2&tabindex=1");
+ },1000)
+ }
+ }
+ })
+ });
+ }
- t_pay.set_fir();
- util_pay.set_fir();
- var th = this;
if (th.data.isclose == 0) {
wx.navigateTo({
url: "/pages/index/index/index"
@@ -438,12 +472,7 @@ Page({
//-- 支付失败,要返回 --
setTimeout(function () {
- var cps = getCurrentPages();
- if (cps.length > 1) {
- wx.navigateBack({ delta: 1 })
- } else {
- getApp().goto("/pages/index/index/index");
- }
+ getApp().re_to("/pages/user/order_list/order_list?index=2&tabindex=1");
}, 1000)
})
diff --git a/packageA/pages/serviceCard_pd/cart_wk/cart_wk.js b/packageA/pages/serviceCard_pd/cart_wk/cart_wk.js
index 4abcb1c..b6ac5bf 100644
--- a/packageA/pages/serviceCard_pd/cart_wk/cart_wk.js
+++ b/packageA/pages/serviceCard_pd/cart_wk/cart_wk.js
@@ -59,6 +59,8 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
+ //定义第一次进入
+ this.data.fir_in=1;
//清空is_pick_up
getApp().request.put("/api/weshop/useraddress/updatePickUp", {
@@ -94,11 +96,50 @@ Page({
*/
onShow: function () {
- ut.fy_back('',0);
this.data.paying=0;
- util_pay.set_fir();
- getApp().check_can_share();
+
var th = this;
+ //判断是不是第一次进入
+ if(this.data.fir_in){
+ this.data.fir_in=0;
+ }else{
+ ut.fy_back('',0);
+ util_pay.set_fir();
+
+
+ var back_url="/pages/payment/pay_success/pay_success?order_id=" + th.data.order.order_id + "&type=1&card=1";
+ //-- 通联的第三方支付的返回优化 --
+ ut.is_pay_ok(th.data.wk_pyed,back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){
+ if(!th.data.wk_pyed) return false;
+
+ getApp().request.promiseGet("/api/weshop/rechargeServicelist/page",{
+ data: { store_id: os.stoid, order_id: th.data.order.order_id}
+ }).then(res=>{
+ if(ut.ajax_ok(res)){
+ var item=res.data.data.pageData[0];
+ if(item.pt_status==4 || item.pt_status==5){
+ //支付支付,返回首页
+ ut.m_toast('支付成功');
+ setTimeout(()=>{
+ getApp().re_to(back_url);
+ },1000)
+
+ }else{
+ //支付支付,返回首页
+ ut.m_toast('支付失败');
+ setTimeout(()=>{
+ getApp().re_to("/pages/user/order_list/order_list?index=2&tabindex=1");
+ },1000)
+ }
+ }
+ })
+ });
+
+ }
+
+
+
+ getApp().check_can_share();
if (th.data.isclose == 0) {
wx.navigateTo({
url: "/pages/index/index/index"
@@ -606,6 +647,7 @@ Page({
return false;
}
+ th.data.wk_pyed=1;
util_pay.pay_data(t,function (){
var allmoney = th.data.allpice;
th.jumpPaymentPage(th.data.order.order_id, allmoney);
diff --git a/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js b/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
index 5ddf31a..f90b71c 100644
--- a/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
+++ b/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
@@ -128,6 +128,9 @@ Page({
},
onLoad: function (t) {
+ //定义第一次进入
+ this.data.fir_in=1;
+
// console.log('收到的传参', t);
wx.setNavigationBarTitle({
title: '填写订单',
@@ -654,11 +657,48 @@ Page({
//----------子页返回父页触发----------
onShow: function () {
- var fy=ut.fy_back('/pages/user/order_list/order_list',1);
- if(fy) return false;
-
var th = this;
- util_pay.set_fir();
+
+ //判断是不是第一次进入
+ if(this.data.fir_in){
+ this.data.fir_in=0;
+ }else{
+ var fy=ut.fy_back('/pages/user/order_list/order_list',1);
+ if(fy) return false;
+ util_pay.set_fir();
+
+ var back="/packageC/pages/luckyGo/luckyGo_details/luckyGo_details?type=1&ordersn=" + this.data.ok_order_sn +
+ "&group_id=" + th.data.param.group_id + "&goods_id=" + th.data.param.goods_id +
+ "&goods_name=" + th.data.bn_goods.goods_name;
+
+ //-- 通联的第三方支付的返回优化 --
+ ut.is_pay_ok(th.data.ok_order_sn,back,'/pages/user/order_list/order_list',function (){
+ if(!th.data.ok_order_sn) return false;
+ getApp().request.promiseGet("/api/weshop/order/page",
+ {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{
+ if(ut.ajax_ok(res)){
+ var item=res.data.data.pageData[0];
+ if(item.pay_status==1){
+ //支付支付,返回首页
+ ut.m_toast('支付成功');
+ setTimeout(()=>{
+ getApp().re_to(back);
+ },1000)
+
+ }else{
+ //支付支付,返回首页
+ ut.m_toast('支付失败');
+ setTimeout(()=>{
+ getApp().re_to("/pages/user/order_list/order_list");
+ },1000)
+ }
+ }
+ })
+ });
+
+ }
+
+
if (th.data.isclose == 0) {
wx.navigateTo({
@@ -1477,6 +1517,8 @@ Page({
// order_sn: data.data,
// type:1,
// }, 1);
+
+ th.data.ok_order_sn=data.data;
util_pay.pay(data.data, function () {
setTimeout(function () {
// wx.reLaunch({
diff --git a/packageC/pages/presell/cart/cart.js b/packageC/pages/presell/cart/cart.js
index cde6347..0af57e2 100644
--- a/packageC/pages/presell/cart/cart.js
+++ b/packageC/pages/presell/cart/cart.js
@@ -147,6 +147,9 @@ Page({
},
onLoad: function (t) {
+ //定义第一次进入
+ this.data.fir_in=1;
+
if (t.order_id) this.data.order_id = t.order_id;
if (t.order_sn) this.data.order_sn = t.order_sn;
@@ -190,17 +193,65 @@ Page({
is_no_by: {},
is_by: {}
})
+ this.data.fir_in=0;
},
//----------子页返回父页触发----------
onShow: function () {
+
this.data.paying=0;
- var fy= ut.fy_back("/pages/user/order_list/order_list",1);
- if(fy) return false;
+ console.log('onshow-2222');
- util_pay.set_fir();
var th = this;
+ //判断是不是第一次进入
+ if(this.data.fir_in){
+ this.data.fir_in=0;
+ }else{
+
+ console.log('onshow-3333');
+ //-- 富友支付的 --
+ var fy= ut.fy_back("/pages/user/order_list/order_list",1);
+ if(fy) return false;
+ util_pay.set_fir();
+
+ //-- 通联的第三方支付的返回优化 --
+ ut.is_pay_ok(th.data.ok_order_sn,"back","back",function (){
+
+ console.log('onshow-444');
+ console.log(th.data.ok_order_sn);
+
+ if(!th.data.ok_order_sn) return false;
+ getApp().request.promiseGet("/api/weshop/order/page",
+ {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{
+ if(ut.ajax_ok(res)){
+
+ console.log('onshow-444');
+ console.log(res);
+
+ var item=res.data.data.pageData[0];
+ if(item.pay_status==1){
+ //支付支付,返回首页
+ ut.m_toast('支付成功');
+ setTimeout(()=>{
+ wx.navigateBack();
+ },1000)
+
+ }else{
+ //支付支付,返回首页
+ ut.m_toast('支付失败');
+ setTimeout(()=>{
+ wx.navigateBack();
+ },1000)
+ }
+ }
+ })
+ });
+
+ }
+
+
+
th.setData({ show_submit: 0 }); //让提交先掩藏
th.data.g_cart_q_time = null;
if (th.data.isclose == 0) {
@@ -2519,6 +2570,9 @@ Page({
return false;
}
+ //-- 订单OK --
+ th.data.ok_order_sn=th.data.order.order_sn;
+
util_pay.pay_data(t,function (){
//---用余额支付---
getApp().my_warnning("支付成功", 1, th);
@@ -2981,6 +3035,8 @@ Page({
type: 1 //正常单
}, 1);--*/
+
+ th.data.ok_order_sn=this.data.order.order_sn;
util_pay.pay(this.data.order.order_sn, function () {
wx.showToast({ title: '支付成功' })
wx.navigateBack();
diff --git a/packageC/pages/presell/cart/cart2.js b/packageC/pages/presell/cart/cart2.js
index 6ce154a..6249f72 100644
--- a/packageC/pages/presell/cart/cart2.js
+++ b/packageC/pages/presell/cart/cart2.js
@@ -157,6 +157,10 @@ Page({
})
},
onLoad: function (t) {
+
+ //定义第一次进入
+ this.data.fir_in=1;
+
wx.setNavigationBarTitle({ title: "填写订单", })
var th = this;
@@ -191,19 +195,51 @@ Page({
//----------子页返回父页触发----------
onShow: function () {
var th = this;
- var fy= ut.fy_back('',0,function (){
- var cps = getCurrentPages();
- if (cps.length > 1) {
- wx.navigateBack({ delta: 1 })
- } else {
- getApp().goto("/pages/index/index/index");
- }
+ //判断是不是第一次进入
+ if(this.data.fir_in){
+ this.data.fir_in=0;
+ }else{
+ //富友支付插件
+ var fy= ut.fy_back('',0,function (){
+ var cps = getCurrentPages();
+ if (cps.length > 1) {
+ wx.navigateBack({ delta: 1 })
+ } else {
+ getApp().goto("/pages/index/index/index");
+ }
- })
- if(fy) return false;
+ })
+ if(fy) return false;
+ util_pay.set_fir();
+
+ //-- 通联的第三方支付的返回优化 --
+ ut.is_pay_ok(th.data.ok_order_sn,"/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn,
+ "/pages/user/order_list/order_list",function (){
+ if(!th.data.ok_order_sn) return false;
+ getApp().request.promiseGet("/api/weshop/order/page",
+ {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{
+ if(ut.ajax_ok(res)){
+ var item=res.data.data.pageData[0];
+ if(item.pay_status==1){
+ //支付支付,返回首页
+ ut.m_toast('支付成功');
+ setTimeout(()=>{
+ getApp().re_to("/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn);
+ },1000)
+
+ }else{
+ //支付支付,返回首页
+ ut.m_toast('支付失败');
+ setTimeout(()=>{
+ getApp().goto("/pages/index/index/index");
+ },1000)
+ }
+ }
+ })
+ });
+ }
- util_pay.set_fir();
th.data.g_cart_q_time = null;
if (th.data.isclose == 0) {
wx.navigateTo({
@@ -1667,6 +1703,8 @@ Page({
//void e.jumpToCart4({
// order_sn: data.data,
//}, 1);
+ th.data.ok_order_sn=data.data;
+
util_pay.pay(data.data, function () {
//app.my_warnning("支付成功",1,th);
//setTimeout(function () {
diff --git a/packageC/pages/presell/cart/cart2_pre.js b/packageC/pages/presell/cart/cart2_pre.js
index 170b9fa..677bcab 100644
--- a/packageC/pages/presell/cart/cart2_pre.js
+++ b/packageC/pages/presell/cart/cart2_pre.js
@@ -78,6 +78,9 @@ Page({
})
},
onLoad: function (t) {
+ //定义第一次进入
+ this.data.fir_in=1;
+
wx.setNavigationBarTitle({
title: "填写订单",
});
@@ -280,9 +283,42 @@ Page({
var fy=ut.fy_back("/pages/user/order_list/order_list",1);
if(fy) return false;
-
util_pay.set_fir();
var th = this;
+ //判断是不是第一次进入
+ if(this.data.fir_in){
+ this.data.fir_in=0;
+ }else{
+
+ //-- 支付完成后的跳转的时间 --
+ var ok_url = "/packageC/pages/presell/cart/cart?order_sn=" +this.data.ok_order_sn;
+ var err_url="/pages/user/order_list/order_list";
+ //-- 通联的第三方支付的返回优化 --
+ ut.is_pay_ok(th.data.ok_order_sn,ok_url,err_url,function (){
+ if(!th.data.ok_order_sn) return false;
+ getApp().request.promiseGet("/api/weshop/order/page",
+ {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{
+ if(ut.ajax_ok(res)){
+ var item=res.data.data.pageData[0];
+ if(item.pay_time){
+ //支付支付,返回首页
+ ut.m_toast('支付成功');
+ setTimeout(()=>{
+ getApp().re_to(ok_url);
+ },1000)
+
+ }else{
+ //支付支付,返回首页
+ ut.m_toast('支付失败');
+ setTimeout(()=>{
+ getApp().re_to(err_url);
+ },1000)
+ }
+ }
+ })
+ });
+ }
+
if (th.data.isclose == 0) {
wx.navigateTo({
url: "/pages/index/index/index"
@@ -918,6 +954,8 @@ Page({
//要进行判断,如果是用微信支付,就要跳转到支付界面
if (order_amount && parseFloat(order_amount) > 0) {
th.setData({ isclose: 0 });
+
+ th.data.ok_order_sn=data.data;
util_pay.pay(data.data, function () {
var url = "/packageC/pages/presell/cart/cart?order_sn=" + data.data;
setTimeout(function () {
diff --git a/packageD/pages/user/deposit/prepaid/msg/msg.js b/packageD/pages/user/deposit/prepaid/msg/msg.js
index 99706f5..96a717e 100644
--- a/packageD/pages/user/deposit/prepaid/msg/msg.js
+++ b/packageD/pages/user/deposit/prepaid/msg/msg.js
@@ -68,10 +68,7 @@ Page({
})
},
homepage:function(){
-
- wx.navigateTo({
- url: "../../../../index/index/index",
- })
+ getApp().goto('/pages/index/index/index');
},
/**
diff --git a/packageD/pages/user/deposit/prepaid/prepaid.js b/packageD/pages/user/deposit/prepaid/prepaid.js
index c5c1215..4aaf90e 100644
--- a/packageD/pages/user/deposit/prepaid/prepaid.js
+++ b/packageD/pages/user/deposit/prepaid/prepaid.js
@@ -15,6 +15,10 @@ Page({
perpaid: [], //数据,
paying:0
},
+ onLoad:function (){
+ //定义第一次进入
+ this.data.fir_in=1;
+ },
/* 生命周期函数--监听页面初次渲染完成*/
onReady: function() {
var th=this;
@@ -96,19 +100,49 @@ Page({
*/
onShow: function () {
+ var th=this;
+ //判断是不是第一次进入
+ if(this.data.fir_in){
+ this.data.fir_in=0;
+ }else{
+ //-- 富友插件 --
+ ut.fy_back('',0)
+ t_pay.set_fir();
+
+ //-- 通联的第三方支付的返回优化 --
+ ut.is_pay_ok(th.data.ok_order_sn,"/packageD/pages/user/deposit/prepaid/msg/msg","none",function (){
+ if(!th.data.ok_order_sn) return false;
+ var ck_url="/api/weshop/recharge/get/"+os.stoid+"/"+th.data.ok_order_sn;
+ getApp().request.promiseGet(ck_url,{}).then(res=>{
+ if(res.data.code==0 && res.data.data){
+ var item=res.data.data;
+ if(item.pay_status==1){
+ //支付支付,返回首页
+ ut.m_toast('支付成功');
+ setTimeout(()=>{
+ getApp().re_to("/packageD/pages/user/deposit/prepaid/msg/msg");
+ },1000)
+ }else{
+ //支付支付,返回首页
+ ut.m_toast('支付失败');
+
+ }
+ }
+ })
+ });
+ }
wx.setNavigationBarTitle({
title: "流动资金转预存",
})
this.data.paying=0;
- ut.fy_back('',0)
- t_pay.set_fir();
- if(getApp().globalData.user_id && !this.data.is_get){
- this.yuck();
- }
+
+ if(getApp().globalData.user_id && !this.data.is_get){
+ this.yuck();
+ }
},
//确定充值
@@ -170,6 +204,8 @@ Page({
var parentSn = msg.order_sn;
var store_id = os.stoid;
t_pay.set_pay_url("/api/weshop/order/pay/createRechargeOrder");
+
+ e.data.ok_order_sn=parentSn;
t_pay.pay({
parentSn: parentSn,
store_id: store_id
diff --git a/packageD/pages/user/integral/integral.js b/packageD/pages/user/integral/integral.js
index 048e1a3..5525f1b 100644
--- a/packageD/pages/user/integral/integral.js
+++ b/packageD/pages/user/integral/integral.js
@@ -208,6 +208,9 @@ Page({
*/
onLoad: function (options) {
+ //定义第一次进入
+ this.data.fir_in=1;
+
var th=this;
getApp().request.get("/api/wx/weappSendlist/page", {
data: {
@@ -258,6 +261,8 @@ Page({
var store_id = os.stoid;
t_pay.set_pay_url("/api/weshop/order/pay/createRechargeOrder");
+
+ th.data.ok_order_sn=parentSn;
t_pay.pay({
parentSn: parentSn,
store_id: store_id
@@ -290,10 +295,8 @@ Page({
// })
})
})
-
-
-
- },
+
+ },
//------支付成功页面--------
jumpPaymentPage: function () {
console.log("支付成功页面2333");
@@ -331,9 +334,44 @@ Page({
*/
onShow: function () {
- ut.fy_back('',0);
+
+ var th=this;
+ //判断是不是第一次进入
+ if(this.data.fir_in){
+ this.data.fir_in=0;
+ }else{
+ //-- 富友的插件 --
+ ut.fy_back('',0);
+ t_pay.set_fir();
+
+ //-- 通联的第三方支付的返回优化 --
+ ut.is_pay_ok(th.data.ok_order_sn,"/packageD/pages/user/integral/msg/msg",'none',function (){
+
+ console.log('show--11')
+ console.log(th.data.ok_order_sn);
+
+ if(!th.data.ok_order_sn) return false;
+ var ck_url="/api/weshop/recharge/get/"+os.stoid+"/"+th.data.ok_order_sn;
+ getApp().request.promiseGet(ck_url,{}).then(res=>{
+ if(res.data.code==0 && res.data.data){
+ var item=res.data.data;
+ if(item.pay_status==1){
+ //支付支付,返回首页
+ ut.m_toast('支付成功');
+ setTimeout(()=>{
+ getApp().re_to("/packageD/pages/user/integral/msg/msg");
+ },1000)
+
+ }else{
+ //支付支付,返回首页
+ ut.m_toast('支付失败');
+ }
+ }
+ })
+ });
+ }
+
this.data.paying=0;
- t_pay.set_fir();
getApp().check_can_share();
//--先判断会员状态--
var user_info = getApp().globalData.userInfo;
diff --git a/packageD/pages/user/integral/msg/msg.js b/packageD/pages/user/integral/msg/msg.js
index 9482b8e..10fb86f 100644
--- a/packageD/pages/user/integral/msg/msg.js
+++ b/packageD/pages/user/integral/msg/msg.js
@@ -68,7 +68,6 @@ Page({
})
},
homepage:function(){
-
getApp().goto('/pages/index/index/index');
},
diff --git a/packageE/pages/cart/cart2/cart2.js b/packageE/pages/cart/cart2/cart2.js
index 5607945..394ba31 100644
--- a/packageE/pages/cart/cart2/cart2.js
+++ b/packageE/pages/cart/cart2/cart2.js
@@ -196,6 +196,8 @@ Page({
onLoad: function (t) {
+ this.data.fir_in=1;
+
wx.setNavigationBarTitle({ title: "填写订单", })
var th = this;
this.setData({ is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow, });
@@ -271,15 +273,47 @@ Page({
//----------子页返回父页触发----------
onShow: function () {
- //富友支付取消支付强行回去
- var fy=ut.fy_back("/pages/user/order_list/order_list",1);
- if(fy) return false;
-
- util_pay.set_fir();
var th = this;
- th.data.g_cart_q_time = null;
+ //判断是不是第一次进入
+ if(this.data.fir_in){
+ this.data.fir_in=0;
+ }else{
+ //富友支付取消支付强行回去
+ var fy=ut.fy_back("/pages/user/order_list/order_list",1);
+ if(fy) return false;
+ util_pay.set_fir();
+
+ //-- 通联的第三方支付的返回优化 --
+ ut.is_pay_ok(th.data.ok_order_sn,"/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn,
+ "/pages/user/order_list/order_list",function (){
+ //支付信息会先记录着
+ if(!th.data.ok_order_sn) return false;
+ getApp().request.promiseGet("/api/weshop/order/page",
+ {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{
+ if(ut.ajax_ok(res)){
+ var item=res.data.data.pageData[0];
+ if(item.pay_status==1){
+ //支付支付,返回首页
+ ut.m_toast('支付成功');
+ setTimeout(()=>{
+ getApp().re_to("/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn);
+ },1000)
+ }else{
+ //支付支付,返回首页
+ ut.m_toast('支付失败');
+ setTimeout(()=>{
+ getApp().goto("/pages/index/index/index");
+ },1000)
+ }
+ }
+ })
+ });
+ }
+
+
+ th.data.g_cart_q_time = null;
if (th.data.isclose == 0) {
wx.navigateTo({
url: "/pages/index/index/index"
@@ -5183,8 +5217,7 @@ Page({
// order_sn: data.data,
//}, 1);
-
-
+ th.data.ok_order_sn=data.data;
util_pay.pay(data.data, async function () {
//app.my_warnning("支付成功",1,th);
//setTimeout(function () {
@@ -5210,17 +5243,10 @@ Page({
}, function () {
-
// return false;
//支付失败
setTimeout(function () {
- var cps = getCurrentPages();
- if (cps.length > 1) {
- wx.navigateBack({ delta: 1 })
- } else {
- getApp().goto("/pages/index/index/index");
- }
-
+ getApp().re_to("/pages/user/order_list/order_list");
}, 1000)
}, oo.stoid);
diff --git a/packageE/pages/cart/cart2_inte/cart2_inte.js b/packageE/pages/cart/cart2_inte/cart2_inte.js
index fb09df7..39296e5 100644
--- a/packageE/pages/cart/cart2_inte/cart2_inte.js
+++ b/packageE/pages/cart/cart2_inte/cart2_inte.js
@@ -110,6 +110,8 @@ Page({
})
},
onLoad: function (t) {
+
+ this.data.fir_in=1;
wx.setNavigationBarTitle({ title: "填写订单", })
var th = this;
th.data.param = t;
@@ -204,20 +206,52 @@ Page({
//----------子页返回父页触发----------
onShow: function () {
- var fy=ut.fy_back('',1,function (){
- var cps = getCurrentPages();
- if (cps.length > 1) {
- wx.navigateBack({ delta: 1 })
- } else {
- getApp().goto("/pages/index/index/index");
- }
- });
- if(fy) return false;
+ var th = this;
+ //判断是不是第一次进入
+ if(this.data.fir_in){
+ this.data.fir_in=0;
+ }else{
+ //-- 富有的支付插件 --
+ var fy=ut.fy_back('',1,function (){
+ var cps = getCurrentPages();
+ if (cps.length > 1) {
+ wx.navigateBack({ delta: 1 })
+ } else {
+ getApp().goto("/pages/index/index/index");
+ }
+ });
+ if(fy) return false;
+ util_pay.set_fir();
+
+ //-- 通联的第三方支付的返回优化 --
+ ut.is_pay_ok(th.data.ok_order_sn,"/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn,
+ "/pages/user/order_list/order_list",function (){
+ if(!th.data.ok_order_sn) return false;
+ getApp().request.promiseGet("/api/weshop/order/page",
+ {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{
+ if(ut.ajax_ok(res)){
+ var item=res.data.data.pageData[0];
+ if(item.pay_status==1){
+ //支付支付,返回首页
+ ut.m_toast('支付成功');
+ setTimeout(()=>{
+ getApp().re_to("/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn);
+ },1000)
+
+ }else{
+ //支付支付,返回首页
+ ut.m_toast('支付失败');
+ setTimeout(()=>{
+ getApp().goto("/pages/index/index/index");
+ },1000)
+ }
+ }
+ })
+ });
+ }
- util_pay.set_fir();
- var th = this;
th.data.g_cart_q_time = null;
if (th.data.isclose == 0) {
@@ -1330,6 +1364,8 @@ Page({
//void e.jumpToCart4({
// order_sn: data.data,
//}, 1);
+
+ th.data.ok_order_sn=data.data;
util_pay.pay(data.data, function () {
//app.my_warnning("支付成功",1,th);
//setTimeout(function () {
@@ -1341,7 +1377,7 @@ Page({
}, function () {
//支付失败
setTimeout(function () {
- wx.navigateBack({ delta: 1 })
+ getApp().re_to("/pages/user/order_list/order_list");
}, 1000)
}, oo.stoid);
diff --git a/pages/cart/cart2_pt/cart2_pt.js b/packageE/pages/cart/cart2_pt/cart2_pt.js
index 5c093b8..94d3cc8 100644
--- a/pages/cart/cart2_pt/cart2_pt.js
+++ b/packageE/pages/cart/cart2_pt/cart2_pt.js
@@ -1,8 +1,8 @@
-var t = getApp(), app = t, a = t.request, e = require("../../../utils/common.js"),
- s = require("../../../utils/util.js"), ut = s, o = require("../../../utils/md5.js"), to = getApp();
+var t = getApp(), app = t, a = t.request, e = require("../../../../utils/common.js"),
+ s = require("../../../../utils/util.js"), ut = s, o = require("../../../../utils/md5.js"), to = getApp();
var oo = t.globalData.setting, os = oo;
-var regeneratorRuntime = require('../../../utils/runtime.js');
-var util_pay = require("../../../utils/pay.js");
+var regeneratorRuntime = require('../../../../utils/runtime.js');
+var util_pay = require("../../../../utils/pay.js");
Page({
@@ -101,7 +101,7 @@ Page({
})
},
onLoad: function (t) {
- console.log("onLoad_pt_cart");
+ this.data.fir_in=1;
var th = this;
getApp().getConfig2(function (e) {
th.setData({
@@ -575,12 +575,45 @@ Page({
//----------子页返回父页触发----------
onShow: function () {
- var fy=ut.fy_back("/pages/user/order_list/order_list",1);
- if(fy) return false;
+ var th = this;
+ //判断是不是第一次进入
+ if(this.data.fir_in){
+ this.data.fir_in=0;
+ }else{
+ //-- 富有的支付 --
+ var fy=ut.fy_back("/pages/user/order_list/order_list",1);
+ if(fy) return false;
+ util_pay.set_fir();
+ //-- 通联的第三方支付的返回优化 --
+ ut.is_pay_ok(th.data.ok_order_sn,"/pages/team/team_success/team_success?ordersn=" + th.data.ok_order_sn,
+ "/pages/user/order_list/order_list",function (){
+ if(!th.data.ok_order_sn) return false;
+ getApp().request.promiseGet("/api/weshop/order/page",
+ {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{
+ if(ut.ajax_ok(res)){
+ var item=res.data.data.pageData[0];
+ //拼团成功的判断
+ if(item.pt_status==1 || item.pt_status==2){
+ //支付支付,返回首页
+ ut.m_toast('支付成功');
+ setTimeout(()=>{
+ getApp().re_to("/pages/team/team_success/team_success?ordersn=" + th.data.ok_order_sn);
+ },1000)
+
+ }else{
+ //支付支付,返回首页
+ ut.m_toast('支付失败');
+ setTimeout(()=>{
+ getApp().goto("/pages/index/index/index");
+ },1000)
+ }
+ }
+ })
+ });
+
+ }
- util_pay.set_fir();
- var th = this;
if (th.data.isclose == 0) {
wx.navigateTo({
url: "/pages/index/index/index"
@@ -1339,6 +1372,7 @@ Page({
// order_sn: data.data,
// type:1,
// }, 1);
+ th.data.ok_order_sn=data.data;
util_pay.pay(data.data, function () {
setTimeout(function () {
wx.reLaunch({
diff --git a/pages/cart/cart2_pt/cart2_pt.json b/packageE/pages/cart/cart2_pt/cart2_pt.json
index 0cfb931..0cfb931 100644
--- a/pages/cart/cart2_pt/cart2_pt.json
+++ b/packageE/pages/cart/cart2_pt/cart2_pt.json
diff --git a/pages/cart/cart2_pt/cart2_pt.wxml b/packageE/pages/cart/cart2_pt/cart2_pt.wxml
index b464fc2..35d9a8e 100644
--- a/pages/cart/cart2_pt/cart2_pt.wxml
+++ b/packageE/pages/cart/cart2_pt/cart2_pt.wxml
@@ -1,4 +1,4 @@
-
+