var a = getApp();
Page({
data: {
suiji: "",
contactTip: "",
selectedStar: "",
selectedAge: "",
index: 1,
ageList: ["0-18", "18-25", "25-30", "30-99"],
starList: ["白羊座", "金牛座", "双子座", "巨蟹座", "狮子座", "处女座", "天秤座", "天蝎座", "射手座", "魔羯座", "水瓶座", "双鱼座"],
sex: "",
container: "",
containertxt: "",
isShowModal: !1,
cardCur: 0,
swiperList: [],
gzhUrl: "",
indexTip: "",
indexTipStatus: !1,
sharePic: "",
shareTitle: "",
videoAd: "",
originAd: "",
chapinAd: "",
bannerAd: "",
showStatus: !0
},
tapceshi: function() {
wx.showModal({
title: '哇偶,运气爆表',
content: '您的爱情指数为67😊',
success (res) {
if (res.confirm) {
console.log('用户点击确定')
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
},
// 复制
confirmWord: function () {
var t = this;
wx.setClipboardData({
data: this.data.userInfo.code,
success: function (e) {
t.setData({
isShowModal: !1
});
}
});
},
hideModal: function () {
this.setData({
isShowModal: !1
});
},
showPop: function () {
this.hidestarModal()
var t = this;
wx.showLoading({
title: "获取中...."
}), wx.cloud.callFunction({
name: "user",
data: {
action: "getCode",
gender: this.data.sex,
selectedAge: this.data.selectedAge
},
success: function (e) {
console.log("[云函数]getcode", e), -1 == e.result.code ? wx.showToast({
icon: "none",
title: t.data.contactTip
}) : 0 == e.result.code ? wx.showToast({
icon: "none",
title: "请先登记,再来匹配"
}) : (
t.setData({
suiji : Math.ceil(Math.random()*e.result.data.length),
isShowModal: !0,
userInfo: e.result.data
}), wx.hideLoading({
success: function (t) {}
}),
console.log(t.data.suiji),
console.log(t.data.userInfo[t.data.suiji]),
t.setData({
userInfo: t.data.userInfo[t.data.suiji]
})
);
},
fail: function (t) {
wx.hideLoading({
success: function (t) {}
}), console.error("[云函数] [getcode] 调用失败", t);
}
});
},
pay(payData) {
let that = this;
//官方标准的支付方法
wx.requestPayment({
timeStamp: payData.timeStamp,
nonceStr: payData.nonceStr,
package: payData.package, //统一下单接口返回的 prepay_id 格式如:prepay_id=***
signType: 'MD5',
paySign: payData.paySign, //签名
success(res) {
console.log("支付成功", res)
, that.showPop();
},
fail(res) {
console.log("支付失败", res)
},
complete(res) {
console.log("支付完成", res)
}
})
},
createOrder: function() {
let that = this;
wx.cloud.callFunction({
name: "pay",
data: {
money: that.data.index
},
success(res) {
console.log("提交成功", res.result)
that.pay(res.result)
},
fail(res) {
console.log("提交失败", res)
}
})
},
confirmAgeChange: function () {
"" != this.data.selectedAge ? (this.setData({
isShowSelectModal: !1
}), this.createOrder()) : wx.showToast({
title: "请选择意向年龄"
});
},
selectAgeChange: function (t) {
console.log(t), this.setData({
selectedAge: t.detail.value
});
},
hideAgeModal: function () {
this.setData({
isShowSelectModal: !1
});
},
showSelectAgeModal: function (t) {
this.data.sex = t.currentTarget.dataset.gender, this.setData({
sex: t.currentTarget.dataset.gender,
isShowSelectModal: !0
});
console.log(this.data.sex)
},
//星座逻辑
showPop1: function () {
this.hidestarModal()
var t = this;
wx.showLoading({
title: "获取中...."
}), wx.cloud.callFunction({
name: "user",
data: {
action: "getStarCode",
gender: this.data.sex,
selectedStar: this.data.selectedStar
},
success: function (e) {
console.log("[云函数]getcode", e), -1 == e.result.code ? wx.showToast({
icon: "none",
title: t.data.contactTip
}) : 0 == e.result.code ? wx.showToast({
icon: "none",
title: "请先登记,再来匹配"
}) : (
t.setData({
suiji : Math.ceil(Math.random()*e.result.data.length),
isShowModal: !0,
userInfo: e.result.data
}), wx.hideLoading({
success: function (t) {}
}),
console.log(t.data.suiji),
console.log(t.data.userInfo[t.data.suiji]),
t.setData({
userInfo: t.data.userInfo[t.data.suiji]
})
);
},
fail: function (t) {
wx.hideLoading({
success: function (t) {}
}), console.error("[云函数] [getcode] 调用失败", t);
}
});
},
pay1(payData) {
let that = this;
//官方标准的支付方法
wx.requestPayment({
timeStamp: payData.timeStamp,
nonceStr: payData.nonceStr,
package: payData.package, //统一下单接口返回的 prepay_id 格式如:prepay_id=***
signType: 'MD5',
paySign: payData.paySign, //签名
success(res) {
console.log("支付成功", res)
, that.showPop1();
},
fail(res) {
console.log("支付失败", res)
},
complete(res) {
console.log("支付完成", res)
}
})
},
createOrder1: function() {
let that = this;
wx.cloud.callFunction({
name: "pay",
data: {
money: that.data.index
},
success(res) {
console.log("提交成功", res.result)
that.pay1(res.result)
},
fail(res) {
console.log("提交失败", res)
}
})
},
//星座
confirmStarChange: function () {
"" != this.data.selectedStar ? (this.setData({
isShowSelectModal: !1
}), this.createOrder1()) : wx.showToast({
title: "请选择意向星座"
没有合适的资源?快使用搜索试试~ 我知道了~
交友盲盒小程序源码版本 全开源版本

共120个文件
js:35个
json:30个
png:25个

1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉

温馨提示
前段时间花钱买的小程序源码 感觉太单调了 全开源版本小程序 这个小程序是云开发的不需要服务器域名 支持流量主wx支付。超级能吸引年轻人的一款小程序 版本新增: 1.Ui美化 2.星座匹配(通过星座进行盲盒) 3.后台管理(可以实时看到用户数量) 4.支付S I P 9功能(后台可以设置支付金额) 5.骗审核模式(可以快速帮助大家通过小程序审核实现上线) 企业小程序可以对接wx支付,非企业小程序只能流量主。 搭建出来一直放那界面单调 就不想运营了 放在那也没啥用 拿出来分享一下吧 4.支付S I P 9功能(后台可以设置支付金额) 5.骗审核模式(可以快速帮助大家通过小程序审核实现上线) 企业小程序可以对接wx支付,非企业小程序只能流量主。 搭建出来一直放那界面单调 就不想运营了 放在那也没啥用 拿出来分享一下吧
资源推荐
资源详情
资源评论



















收起资源包目录





































































































共 120 条
- 1
- 2
资源评论

- 第一晚心动了2024-01-30作者买了不会用能不能教教啊
- so_982024-08-10简直是宝藏资源,实用价值很高,支持!
- undefined(找不到对象)2023-02-20这个资源对我启发很大,受益匪浅,学到了很多,谢谢分享~
- m0_740157262023-12-16资源内容总结的很到位,内容详实,很受用,学到了~

yxkfw
- 粉丝: 86
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 基于单片机的数字频率计的设计.doc
- 试论计算机网络应用安全问题及影响因素.docx
- yudao-ui-admin-vben-Typescript资源
- 网络资源在计算机教学中的应用.docx
- 论小学数学与信息化技术的有效融合.docx
- 数据库课程设计方案教材征订与发放数据库—需求分析.doc
- 探讨面向物联网应用的电能信息采集终端研究与设计分析.docx
- minotaur-Go资源
- 提升监理工作效果的信息化与数字化手段.docx
- DevOps-Master技术白皮书.docx
- 浅析互联网时代对医院住出院处工作的影响.docx
- 基于单片机的简易电子时钟方案设计书.doc
- 《计算机控制技术》课程实验教学探讨.docx
- 单片机的PID控制器设计.doc
- 慕课在中职学校计算机网络教学中的应用.docx
- xx高速公路通信管道工程分项施工方案.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
