Commit 56449934 authored by 罗超's avatar 罗超

1

parent d2e7b505
......@@ -1059,68 +1059,68 @@ export default {
this.mainColor = this.$uiConfig.mainColor;
},
methods: {
downloadFile() {
let msg = {
configId: "7274",
cityId: "0",
tcid: "11409",
orderId: "0",
FileName: "2021-10-11飞猪平台九寨沟3天2晚3日游",
isShowBase: 1,
isShowFlight: 1,
isShowFeature: 1,
isShowFee: 1,
isShowShop: 1,
isShowTip: 1,
isShowB2B: 1,
isShowTrip: 1,
isShowTitle: 0,
isShowGuest: 0,
isShowMan: 1,
isShowTCNUM: 1,
isShowTripImage: 1,
isShowVisa: 1,
isShowVideoImg: 1,
isPc: 2,
templateId: 3,
UId: 615,
};
this.apipostDownload("GetWebHtmlTwo_V2", msg, (res) => {
console.log(res);
let url = "https://reborn.oytour.com" + res.data;
uni.downloadFile({
url: url,
success: (res) => {
if (res.statusCode === 200) {
console.log("下载成功");
}
},
});
});
},
downloadFile2() {
let url =
"https://reborn.oytour.com/Upload/Temporary/C7274_T11409_CTY0_OD0_MMDD637695432017412893_1_1.pdf";
uni.downloadFile({
url: url,
success: (res) => {
console.log("suc", res);
if (res.statusCode === 200) {
console.log("下载成功");
const tempFilePath = res.tempFilePath; //返回的文件临时地址,用于后面打开本地预览所用
wx.openDocument({
filePath: tempFilePath,
showMenu: true,
fileType: "pdf",
success: function (res) {},
});
}
},
fail(err) {
console.log("err", err);
},
});
},
// downloadFile() {
// let msg = {
// configId: "7274",
// cityId: "0",
// tcid: "11409",
// orderId: "0",
// FileName: "2021-10-11飞猪平台九寨沟3天2晚3日游",
// isShowBase: 1,
// isShowFlight: 1,
// isShowFeature: 1,
// isShowFee: 1,
// isShowShop: 1,
// isShowTip: 1,
// isShowB2B: 1,
// isShowTrip: 1,
// isShowTitle: 0,
// isShowGuest: 0,
// isShowMan: 1,
// isShowTCNUM: 1,
// isShowTripImage: 1,
// isShowVisa: 1,
// isShowVideoImg: 1,
// isPc: 2,
// templateId: 3,
// UId: 615,
// };
// this.apipostDownload("GetWebHtmlTwo_V2", msg, (res) => {
// console.log(res);
// let url = "https://reborn.oytour.com" + res.data;
// uni.downloadFile({
// url: url,
// success: (res) => {
// if (res.statusCode === 200) {
// console.log("下载成功");
// }
// },
// });
// });
// },
// downloadFile2() {
// let url =
// "https://reborn.oytour.com/Upload/Temporary/C7274_T11409_CTY0_OD0_MMDD637695432017412893_1_1.pdf";
// uni.downloadFile({
// url: url,
// success: (res) => {
// console.log("suc", res);
// if (res.statusCode === 200) {
// console.log("下载成功");
// const tempFilePath = res.tempFilePath; //返回的文件临时地址,用于后面打开本地预览所用
// wx.openDocument({
// filePath: tempFilePath,
// showMenu: true,
// fileType: "pdf",
// success: function (res) {},
// });
// }
// },
// fail(err) {
// console.log("err", err);
// },
// });
// },
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
},
......
......@@ -297,7 +297,7 @@
<view class="big-title">
<text>{{ currentPriceInfo.startCityName }}出发</text>
</view>
<view class="jz_ReseQue">
<view class="jz_ReseQue" @click="subscribeMsgAli">
<img
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/zuanshi.png"
/>即时确认:本产品付款后可快速确认,放心期待您的旅行
......@@ -340,7 +340,7 @@
/>
</view>
</view>
<view class="form-items" style="margin-top:-5px;">
<view class="form-items" style="margin-top: -5px">
<view class="label">学生</view>
<view class="val">
<!-- <checkbox-group @change="changecheckbox($event, subIndex, subItem)">
......@@ -349,7 +349,12 @@
:checked="subItem.IsHightSchool"
/>
</checkbox-group> -->
<u-switch v-model="subItem.IsHightSchool" size="30" active-value="1" inactive-value="2"></u-switch>
<u-switch
v-model="subItem.IsHightSchool"
size="30"
active-value="1"
inactive-value="2"
></u-switch>
</view>
</view>
</view>
......@@ -519,9 +524,6 @@
</template>
<script>
// #ifdef MP-ALIPAY
import { SubscribeMsgAli } from "../../plugin/utils";
// #endif
export default {
components: {},
data() {
......@@ -758,7 +760,9 @@ export default {
TradeWay: 0,
PlatformOrder: "",
GuestNum:
parseInt(this.orderMsg.ManNum) + parseInt(this.orderMsg.ChirdNum) + parseInt(this.orderMsg.BabyNum),
parseInt(this.orderMsg.ManNum) +
parseInt(this.orderMsg.ChirdNum) +
parseInt(this.orderMsg.BabyNum),
IsChildrenTour: this.currentPriceInfo.isSupportChildren,
IsBirdDiscount: this.zaoniao > 0 ? 1 : 2,
PredictRoomNum: 1,
......@@ -831,6 +835,14 @@ export default {
(res) => {
this.orderInfo = JSON.parse(res.data);
console.log(718, res.data);
// let idsArr = uni.getStorageSync("basedata")?.mall?.alimessage ?? [];
// let ids=[]
// if(idsArr.length>0){
// }
// uni.requestSubscribeMessage({
// tmplIds: ids,
// success(res) {},
// });
this.Pay(OrderId);
}
);
......@@ -875,6 +887,17 @@ export default {
// #endif
// #ifdef MP-ALIPAY
//支付宝支付
subscribeMsgAli() {
let idsArr = uni.getStorageSync("basedata")?.mall?.alimessage ?? [];
let ids = [];
if (idsArr.length > 0) {
idsArr.map((e) => {
ids.push(e.MessageId);
});
}
console.log("ids", ids);
this.$utils.SubscribeMsgAli(ids, () => {});
},
querenAli(data) {
let that = this;
let url = "/api/WeChatPay/GetTravlePayInfo";
......
......@@ -41,10 +41,37 @@ function getretailer() {//判断是否是分销商
// 引入消息模板方法
const { requestSubscribeMessage } = requirePlugin("subscribeMsg");
function SubscribeMsgAli(ids, cb) {//支付宝小程序订阅消息
if (ids.length === 0) {
my.showToast({
type: 'fail',
content: '请传入模板id',
duration: 3000,
});
return;
}
requestSubscribeMessage({ // 触发消息订阅弹框
entityIds: ids, // 模板消息id,
callback(res) {
cb(res)
console.log('订阅回调', res);
if (res.success) {
cb();
} else {
switch (res.errorCode) {
case 11: {
my.call('toast', {
content: '用户未订阅关闭弹窗',
});
break;
}
default: {
my.call('toast', {
content: `ErrorCode: ${res.errorCode}, ErrorMsg: ${res.errorMessage}`,
});
break;
}
}
cb();
}
}
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment