Commit 708013ea authored by qinhaitao's avatar qinhaitao

feat: 🎸 数据需求

parent c27fe523
No preview for this file type
This diff is collapsed.
...@@ -5,10 +5,12 @@ cloud.init({ ...@@ -5,10 +5,12 @@ cloud.init({
}); });
App({ App({
cloud, cloud,
requestType: 'tornadoAPI',
cloudName: "filaStar", //待修改 cloudName: "filaStar", //待修改
cloudName2:"filaStar", cloudName2:"filaStar",
cloudName3:"filaStar2", cloudName3: "filaStar2",
sellerId :676606897, tornadoAPI: 'https://tornado.duibadev.com.cn/tbServer/api?db=db3000000027010092&proxyIp=172.16.77.124', // 新增:当requestType: 'tornadoAPI'时,找服务端提供地
sellerId :1745656365,
onLaunch(options) { onLaunch(options) {
// 第一次打开 // 第一次打开
// options.query == {number:1}///"enableSkia": "true" // options.query == {number:1}///"enableSkia": "true"
...@@ -16,8 +18,9 @@ App({ ...@@ -16,8 +18,9 @@ App({
const { activityId } = options.query || {}; const { activityId } = options.query || {};
console.log(activityId); console.log(activityId);
// this.activityId = activityId || '5efc831552bbde91d19e2cac'; // this.activityId = activityId || '5efc831552bbde91d19e2cac';
// this.activityId = activityId || '5ef880873075d9927e7f10b4'; // 5f8d4da30cb7336de513a864
this.activityId = activityId || '5efc14a98e6a08930b59105d'; this.activityId = activityId || '5f86ae30086e65b741b19b14';
//this.activityId = activityId || '5efc14a98e6a08930b59105d';
}, },
onShow(options) { onShow(options) {
// 从后台被 scheme 重新打开 // 从后台被 scheme 重新打开
......
import { Main, GDispatcher } from './output'; import { Main, GDispatcher } from './output7';
import { getUserAddress, favorShop, getAuthUserInfo, checkShopFavoredStatus ,getCaixukunName} from '../../utils/utils'; import { getUserAddress, favorShop, getAuthUserInfo, checkShopFavoredStatus ,getCaixukunName} from '../../utils/utils';
const app = getApp() const app = getApp()
...@@ -80,16 +80,45 @@ Page({ ...@@ -80,16 +80,45 @@ Page({
if (this.inviteId !== undefined) { if (this.inviteId !== undefined) {
loginParams.inviteId = this.inviteId loginParams.inviteId = this.inviteId
} }
+ // +
console.warn('发送接口filaStar login,发送参数为', JSON.stringify(loginParams), loginParams); // console.warn('发送接口filaStar login,发送参数为', JSON.stringify(loginParams), loginParams);
// my.request({
// url: 'https://tornado.duibadev.com.cn/tbServer/api',
// method: 'post',
// data: {
// db: 'db3000000027010092',
// proxyIp: '172.16.77.124',
// openId: 1111,
// data: {
// handler: 'login',
// data: loginParams
// }
// },
// dataType: 'json'
// }).then(({ data: res }) => {
// console.log(`调用风驰台返回结果`, res)
// if (res && res.success) {
// console.warn('filaStar login调用完毕返回数据为', JSON.stringify(res), res);
// app.inviteId = res.data.openId
// app.isNewUser = res.data.newUser
// // app.sellerId = res.data.sellerId;
// //创建Main
// this.createMain()
// } else {
// }
// }).catch(res=> {
// console.log(res)
// })
fc.invoke( fc.invoke(
"filaStar", loginParams, "starTest", loginParams,
"login" "login"
) )
.then(async res => { //登录完才显示页面 .then(async res => { //登录完才显示页面
console.warn('filaStar login调用完毕返回数据为', JSON.stringify(res), res); console.warn('filaStar login调用完毕返回数据为', JSON.stringify(res), res);
app.inviteId = res.data.inviteId app.inviteId = res.data.openId
app.isNewUser = res.data.isNewUser app.isNewUser = res.data.newUser
// app.sellerId = res.data.sellerId; // app.sellerId = res.data.sellerId;
//创建Main //创建Main
this.createMain() this.createMain()
...@@ -255,8 +284,29 @@ Page({ ...@@ -255,8 +284,29 @@ Page({
} else { } else {
//获取后端接口 //获取后端接口
const { function: fc } = app.cloud; const { function: fc } = app.cloud;
const [myCloudName,handler] = netName.split("."); const [myCloudName, handler] = netName.split(".");
//#endregion
// my.request({
// url: 'https://tornado.duibadev.com.cn/tbServer/api?db=db3000000027010092&proxyIp=172.16.77.124',
// method: 'post',
// data: {
// db: 'db3000000027010092',
// proxyIp: '172.16.77.124',
// data: {
// handler,
// data: parameter
// }
// },
// dataType: 'json'
// }).then(({ data: res }) => {
// console.log(`调用风驰台返回结果`, res)
// if (res && res.success) {
// this.postMessage(netName, res)
// } else {
// }
// })
fc.invoke(myCloudName, parameter, handler) fc.invoke(myCloudName, parameter, handler)
// fc.invoke(app.cloudName, parameter, netName.split(".")[1]) // fc.invoke(app.cloudName, parameter, netName.split(".")[1])
.then(res => { .then(res => {
......
...@@ -1523,7 +1523,7 @@ var TbNetName; ...@@ -1523,7 +1523,7 @@ var TbNetName;
TbNetName["filaStarGetActivityBaseInfoById"] = "filaStar.getActivityBaseInfoById"; TbNetName["filaStarGetActivityBaseInfoById"] = "filaStar.getActivityBaseInfoById";
TbNetName["filaStar2GetExtraPrize"] = "filaStar2.getExtraPrize"; TbNetName["filaStar2GetExtraPrize"] = "filaStar2.getExtraPrize";
TbNetName["filaStarGetGameInfo"] = "filaStar.getGameInfo"; TbNetName["filaStarGetGameInfo"] = "filaStar.getGameInfo";
TbNetName["filaStarStartGame"] = "filaStar.startGame"; TbNetName["filaStarStartGame"] = "mine.startGame";
TbNetName["prizeList"] = "mine.prizeList"; TbNetName["prizeList"] = "mine.prizeList";
TbNetName["taskList"] = "mine.taskList"; TbNetName["taskList"] = "mine.taskList";
TbNetName["completeTask"] = "mine.completeTask"; TbNetName["completeTask"] = "mine.completeTask";
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{ {
"cloud": { "cloud": {
"type": "CLOUDAPP" "type": "CLOUDAPP"
}, },
"miniprogramRoot": "./client" "miniprogramRoot": "./client",
"exclude": [
"server/**"
]
} }
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