Commit 56449934 authored by 罗超's avatar 罗超

1

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