Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
new_taobao
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
new_taobao
Commits
029fa202
Commit
029fa202
authored
Sep 24, 2020
by
Edwise
🍷
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'refs/remotes/origin/tianmaoxiaoyuan' into tianmaoxiaoyuan
parents
03228a52
2e19bc8d
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
320 additions
and
180 deletions
+320
-180
db.js
project/src/canvas/game/db.js
+6
-0
tmallCat.exchangeGoodList.json
...rc/canvas/game/mock/miniTb/tmallCat.exchangeGoodList.json
+39
-0
api.js
taobao_mini/client/api.js
+10
-0
app.js
taobao_mini/client/app.js
+1
-1
app.json
taobao_mini/client/app.json
+1
-1
shopModal.acss
taobao_mini/client/components/shopModal/shopModal.acss
+139
-0
shopModal.axml
taobao_mini/client/components/shopModal/shopModal.axml
+20
-0
shopModal.js
taobao_mini/client/components/shopModal/shopModal.js
+24
-0
shopModal.json
taobao_mini/client/components/shopModal/shopModal.json
+4
-0
pagecanvas.js
taobao_mini/client/pages/pagecanvas/pagecanvas.js
+12
-12
pageshop.acss
taobao_mini/client/pages/pageshop/pageshop.acss
+0
-138
pageshop.axml
taobao_mini/client/pages/pageshop/pageshop.axml
+5
-19
pageshop.js
taobao_mini/client/pages/pageshop/pageshop.js
+53
-6
pageshop.json
taobao_mini/client/pages/pageshop/pageshop.json
+3
-1
request.js
taobao_mini/client/tbcc-sdk/lib/request.js
+3
-2
No files found.
project/src/canvas/game/db.js
0 → 100644
View file @
029fa202
module
.
exports
=
()
=>
{
const
data
=
{
"tmallCat.exchangeGoodList"
:
require
(
'./mock/miniTb/tmallCat.exchangeGoodList.json'
)
}
return
data
}
\ No newline at end of file
project/src/canvas/game/mock/miniTb/tmallCat.exchangeGoodList.json
0 → 100644
View file @
029fa202
{
"success"
:
true
,
"fuck"
:
"1"
,
"data"
:
{
"list"
:
[
{
"hasStock"
:
false
,
"image"
:
"Excepteur eiusmod sit dolor"
,
"name"
:
"aliquip"
,
"code"
:
"reprehenderit"
,
"type"
:
4112149.6368029267
,
"_id"
:
"2"
,
"value"
:
51585947.06940037
,
"status"
:
2
},
{
"hasStock"
:
false
,
"image"
:
"Excepteur eiusmod sit dolor"
,
"name"
:
"aliquip"
,
"code"
:
"reprehenderit"
,
"type"
:
4112149.6368029267
,
"_id"
:
"2"
,
"value"
:
51585947.06940037
,
"status"
:
2
},
{
"hasStock"
:
false
,
"image"
:
"Excepteur eiusmod sit dolor"
,
"name"
:
"aliquip"
,
"code"
:
"reprehenderit"
,
"type"
:
4112149.6368029267
,
"_id"
:
"1"
,
"value"
:
51585947.06940037
,
"status"
:
1
}
],
"happyCoin"
:
56338398.29509869
}
}
\ No newline at end of file
taobao_mini/client/api.js
View file @
029fa202
...
@@ -51,6 +51,16 @@ const apiList = {
...
@@ -51,6 +51,16 @@ const apiList = {
handle
:
'recallInfo'
,
handle
:
'recallInfo'
,
method
:
'get'
,
method
:
'get'
,
isShowLoading
:
false
isShowLoading
:
false
},
exchangeGood
:{
handle
:
'exchangeGood'
,
method
:
'get'
,
isShowLoading
:
false
},
exchangeGoodList
:{
handle
:
'exchangeGoodList'
,
method
:
'get'
,
isShowLoading
:
false
}
}
};
};
...
...
taobao_mini/client/app.js
View file @
029fa202
...
@@ -7,7 +7,7 @@ cloud.init({
...
@@ -7,7 +7,7 @@ cloud.init({
App
({
App
({
requestType
:
'cloud'
,
// yapi,cloud: 云函数
requestType
:
'cloud'
,
// yapi,cloud: 云函数
requestType
:
'
yapi
'
,
// yapi,cloud: 云函数
requestType
:
'
local
'
,
// yapi,cloud: 云函数
cloudName
:
'tmallCat'
,
// 主云函数项目名 tmallCat
cloudName
:
'tmallCat'
,
// 主云函数项目名 tmallCat
// cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat
// cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat
cloud
,
cloud
,
...
...
taobao_mini/client/app.json
View file @
029fa202
{
{
"pages"
:
[
"pages"
:
[
"pages/pageshop/pageshop"
,
"pages/pagecanvas/pagecanvas"
,
"pages/pagecanvas/pagecanvas"
,
"pages/index/index"
,
"pages/index/index"
,
"pages/pageshop/pageshop"
,
"pages/myprize/myprize"
"pages/myprize/myprize"
],
],
"window"
:
{
"window"
:
{
...
...
taobao_mini/client/components/shopModal/shopModal.acss
0 → 100644
View file @
029fa202
.shop-page {
width: 100vw;
height: 100vh;
opacity: 1;
position: absolute;
top: 0;
left: 0;
overflow: hidden;
/* background: url('') no-repeat center top/cover; */
}
.shop-wrap {
width: 100%;
position: absolute;
bottom: 0;
top: 254rpx;
padding-left: 54rpx;
right:0;
overflow-x: auto;
}
.shop-list {
width: 100%;
height: auto;
/* background-color: black; */
display: flex;
flex-flow: row wrap;
align-content: flex-start;
}
.shop .shopbg {
width: 750rpx;
height: 1624rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.shop .shopitem {
position: relative;
/* display: flex;
justify-content: center;
align-items: center; */
box-sizing: border-box;
width: 309rpx;
height: 324rpx;
opacity: 1;
margin: 0 30rpx 30rpx 0;
/* left: 54rpx;
top: 254rpx; */
}
.shop .shopitem .shopitem_bg2 {
width: 309rpx;
height: 324rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.shop .shopitem .shopitem_bg1 {
width: 224rpx;
height: 161rpx;
opacity: 1;
left: 45rpx;
top: 29rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.shop .shopitem .shopitem_disabledbtn {
width: 209rpx;
height: 60rpx;
opacity: 1;
left: 49rpx;
top: 241rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.shop .shopitem .shopitem_buybtn {
width: 217rpx;
height: 68rpx;
opacity: 1;
left: 45rpx;
top: 237rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.shop .shopitem .shopitem_txt {
pointer-events: none;
width: 88rpx;
/* height: 20rpx; */
opacity: 1;
left: 136rpx;
top: 261rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 21.79723rpx;
color: #474543;
}
.shop .shopitem .shopitem_name {
width: 209rpx;
/* height: 23rpx; */
opacity: 1;
left: 51rpx;
top: 203rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 20.12052rpx;
color: #474543;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.shop .shop_gold {
width: 98rpx;
height: 21rpx;
opacity: 1;
left: 348rpx;
top: 151rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 23.47394rpx;
color: #7b644e;
}
.shop .shop_backbtn {
width: 67rpx;
height: 67rpx;
opacity: 1;
left: 48rpx;
top: 41rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
\ No newline at end of file
taobao_mini/client/components/shopModal/shopModal.axml
0 → 100644
View file @
029fa202
<view class="shop">
<view class="shop-page" style="{{{'background':`url(${resList['da6bc001-768a-4b1c-95af-a9a8853ef6f9'].url}) no-repeat center top/cover`}}}">
<label class="shop_gold">{{happyCoin}}</label>
<image a:if={{false}} class="shop_backbtn" src={{resList['bdab9777-8a4d-4659-ba23-66aaddb7fa5b'].url}} />
<view class="shop-wrap">
<view class="shop-list">
<!--<image class="shopbg" src={{resList['da6bc001-768a-4b1c-95af-a9a8853ef6f9'].url}} /> -->
<view class="shopitem" a:for="{{list}}">
<image class="shopitem_bg2" src={{resList['a5230993-3870-4a91-bdd1-ffc4782770d0'].url}} />
<image class="shopitem_bg1" src={{resList['dd4ee407-16e4-4cb7-9eba-365b33f466a3'].url}} />
<image onTap="handleClick" data-item="{{item}}" a:if="{{!item.exchanged}}" class="shopitem_buybtn" src={{resList['dd8ea96e-e33f-4f5d-b31f-29f332c3c867'].url}} />
<image a:if="{{item.exchanged}}" class="shopitem_disabledbtn" src={{resList['8d08152f-311a-446a-a15a-ff02ebed0139'].url}} />
<label a:if="{{!item.exchanged}}" class="shopitem_txt">101010</label>
<label class="shopitem_name">{{item.name}}</label>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
taobao_mini/client/components/shopModal/shopModal.js
0 → 100644
View file @
029fa202
'use strict'
;
import
resList
from
'../../resconfig/resList'
;
Component
({
props
:
{},
data
:
{
resList
:
resList
},
methods
:
{
handleClick
(
e
)
{
this
.
props
.
onHandleClick
(
e
)
}
// onBtnClick() {
// console.log('onBtnClick');
// this.onModalClose();
// },
// onModalClose() {
// const { onModalClose } = this.props;
// onModalClose && onModalClose();
// console.log('onModalClose')
// }
}
});
\ No newline at end of file
taobao_mini/client/components/shopModal/shopModal.json
0 → 100644
View file @
029fa202
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
taobao_mini/client/pages/pagecanvas/pagecanvas.js
View file @
029fa202
...
@@ -55,18 +55,18 @@ Page({
...
@@ -55,18 +55,18 @@ Page({
onReady
()
{
onReady
()
{
console
.
log
(
'on ready'
)
console
.
log
(
'on ready'
)
var
that
=
this
;
var
that
=
this
;
setTimeout
(()
=>
{
//
setTimeout(() => {
var
parameter
=
{
//
var parameter = {
name
:
"selectcatModal"
//
name: "selectcatModal"
}
//
}
var
data
=
{
//
var data = {
netName
:
"mine.showModal"
,
//
netName: "mine.showModal",
parameter
//
parameter
}
//
}
that
.
onMessage
({
//
that.onMessage({
data
:
data
//
data: data
})
//
})
},
1000
)
//
}, 1000)
//授权和登录先搞
//授权和登录先搞
// this.getAuth();
// this.getAuth();
my
.
__onMessage__
=
(
e
)
=>
{
my
.
__onMessage__
=
(
e
)
=>
{
...
...
taobao_mini/client/pages/pageshop/pageshop.acss
View file @
029fa202
.shop-page {
width: 100vw;
height: 100vh;
opacity: 1;
position: absolute;
top: 0;
left: 0;
overflow: hidden;
/* background: url('') no-repeat center top/cover; */
}
.shop-wrap {
width: 100%;
position: absolute;
bottom: 0;
top: 254rpx;
padding-left: 54rpx;
right:0;
overflow-x: auto;
}
.shop-list {
width: 100%;
height: auto;
/* background-color: black; */
display: flex;
flex-flow: row wrap;
align-content: flex-start;
}
.shop .shopbg {
width: 750rpx;
height: 1624rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.shop .shopitem {
position: relative;
/* display: flex;
justify-content: center;
align-items: center; */
box-sizing: border-box;
width: 309rpx;
height: 324rpx;
opacity: 1;
margin: 0 30rpx 30rpx 0;
/* left: 54rpx;
top: 254rpx; */
}
.shop .shopitem .shopitem_bg2 {
width: 309rpx;
height: 324rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.shop .shopitem .shopitem_bg1 {
width: 224rpx;
height: 161rpx;
opacity: 1;
left: 45rpx;
top: 29rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.shop .shopitem .shopitem_disabledbtn {
width: 209rpx;
height: 60rpx;
opacity: 1;
left: 49rpx;
top: 241rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.shop .shopitem .shopitem_buybtn {
width: 217rpx;
height: 68rpx;
opacity: 1;
left: 45rpx;
top: 237rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.shop .shopitem .shopitem_txt {
width: 88rpx;
height: 20rpx;
opacity: 1;
left: 136rpx;
top: 261rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 21.79723rpx;
color: #474543;
}
.shop .shopitem .shopitem_name {
width: 209rpx;
height: 23rpx;
opacity: 1;
left: 51rpx;
top: 203rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 20.12052rpx;
color: #474543;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.shop .shop_gold {
width: 98rpx;
height: 21rpx;
opacity: 1;
left: 348rpx;
top: 151rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 23.47394rpx;
color: #7b644e;
}
.shop .shop_backbtn {
width: 67rpx;
height: 67rpx;
opacity: 1;
left: 48rpx;
top: 41rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
\ No newline at end of file
taobao_mini/client/pages/pageshop/pageshop.axml
View file @
029fa202
<view class="shop">
<view class="fuck-shop">
<view class="shop-page" style="{{{'background':`url(${resList['da6bc001-768a-4b1c-95af-a9a8853ef6f9'].url}) no-repeat center top/cover`}}}">
<shop-modal
<label class="shop_gold">101010</label>
list ="{{list}}"
<image a:if={{false}} class="shop_backbtn" src={{resList['bdab9777-8a4d-4659-ba23-66aaddb7fa5b'].url}} />
happyCoin ="{{happyCoin}}"
<view class="shop-wrap">
onHandleClick="handleClick" />
<view class="shop-list">
<!--<image class="shopbg" src={{resList['da6bc001-768a-4b1c-95af-a9a8853ef6f9'].url}} /> -->
<view class="shopitem" a:for="{{list}}">
<image class="shopitem_bg2" src={{resList['a5230993-3870-4a91-bdd1-ffc4782770d0'].url}} />
<image class="shopitem_bg1" src={{resList['dd4ee407-16e4-4cb7-9eba-365b33f466a3'].url}} />
<image class="shopitem_disabledbtn" src={{resList['8d08152f-311a-446a-a15a-ff02ebed0139'].url}} />
<image class="shopitem_buybtn" src={{resList['dd8ea96e-e33f-4f5d-b31f-29f332c3c867'].url}} />
<label class="shopitem_txt">101010</label>
<label class="shopitem_name">start{{item}}eeeeeeend</label>
</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
taobao_mini/client/pages/pageshop/pageshop.js
View file @
029fa202
'use strict'
;
'use strict'
;
const
EXCHANGE_STATUS
=
{
NO_EXCHANGE
:
1
,
DONE
:
2
};
import
resList
from
'../../resconfig/resList'
;
//import API from '../../api';
import
resList
from
'../../resconfig/resList'
;
//import API from '../../api';
import
API
from
'../../api'
;
let
flag
=
0
;
Page
({
Page
({
data
:
{
data
:
{
list
:[
1
,
2
,
3
,
4
,
5
]
list
:
[],
happyCoin
:
null
},
},
onLoad
(
props
)
{
async
onLoad
(
props
)
{
this
.
setData
(
{
this
.
setData
({
resList
:
resList
resList
:
resList
});
});
}
this
.
updateData
();
},
async
handleClick
(
e
)
{
if
(
flag
)
return
;
flag
=
1
;
const
{
item
:{
_id
}
}
=
e
.
target
.
dataset
;
const
{
success
,
data
,
message
}
=
await
API
.
exchangeGood
({
_id
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
flag
=
0
;
})
||
{};
flag
=
0
;
},
async
onItemExchange
(
_id
)
{
const
{
success
,
data
,
message
}
=
await
API
.
exchangeGood
({
_id
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
)
})
||
{};
// API.exchangeGood({ _id })
// .then(() => {
// _list.forEach(item => {
// if (item._id == _id) {
// item.exchanged = true;
// }
// })
// console.log('_list', _list)
// this.setData({ list: [] });
// // this.updateData();
// })
// .catch(res => {
// });
},
async
updateData
()
{
const
{
data
:
{
list
,
happyCoin
}
}
=
await
API
.
exchangeGoodList
();
list
.
forEach
(
item
=>
{
item
.
exchanged
=
item
.
status
==
EXCHANGE_STATUS
.
DONE
;
});
this
.
setData
({
list
,
happyCoin
});
}
});
});
\ No newline at end of file
taobao_mini/client/pages/pageshop/pageshop.json
View file @
029fa202
{
{
"usingComponents"
:
{}
"usingComponents"
:
{
"shop-modal"
:
"/components/shopModal/shopModal"
}
}
}
\ No newline at end of file
taobao_mini/client/tbcc-sdk/lib/request.js
View file @
029fa202
...
@@ -53,6 +53,7 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
...
@@ -53,6 +53,7 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
const
requestMock
=
()
=>
{
const
requestMock
=
()
=>
{
const
mockUrlPrefix
=
{
const
mockUrlPrefix
=
{
ams
:
'https://ams.dui88.com/server/index.php?g=Web&c=Mock&o=simple&projectID=218&uri='
,
ams
:
'https://ams.dui88.com/server/index.php?g=Web&c=Mock&o=simple&projectID=218&uri='
,
local
:
'http://localhost:3000/'
,
yapi
:
'https://docs.dui88.com/mock/140/'
yapi
:
'https://docs.dui88.com/mock/140/'
};
};
const
mockUrl
=
null
;
const
mockUrl
=
null
;
...
@@ -84,7 +85,7 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
...
@@ -84,7 +85,7 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
const
requestCloud
=
()
=>
{
const
requestCloud
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
cloud
.
function
.
invoke
(
_cloudName
,
params
,
handle
).
then
(
res
=>
{
cloud
.
function
.
invoke
(
_cloudName
,
params
,
handle
).
then
(
res
=>
{
console
.
log
(
'request Cloud callback=>'
,
handle
,
res
,
JSON
.
stringify
(
res
));
console
.
log
(
'request Cloud callback=>'
,
handle
,
res
,
JSON
.
stringify
(
res
));
// console.log('requestCloud', handle, params, res);
// console.log('requestCloud', handle, params, res);
hideMyLoading
();
hideMyLoading
();
if
(
res
&&
res
.
success
)
{
if
(
res
&&
res
.
success
)
{
...
@@ -103,7 +104,7 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
...
@@ -103,7 +104,7 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
// console.log('requestCloud', _cloudName, handle, params);
// console.log('requestCloud', _cloudName, handle, params);
// return requestType === 'ams' ? requestAms() : requestCloud();
// return requestType === 'ams' ? requestAms() : requestCloud();
return
(
requestType
===
'ams'
||
requestType
===
'yapi'
)
?
requestMock
()
:
requestCloud
();
return
(
requestType
===
'ams'
||
requestType
===
'yapi'
||
requestType
===
'local'
)
?
requestMock
()
:
requestCloud
();
};
};
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment