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
21ea4a44
Commit
21ea4a44
authored
Sep 24, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
2e19bc8d
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
704 additions
and
618 deletions
+704
-618
tmallCat.exchangeGood.json
...ct/src/canvas/game/mock/miniTb/tmallCat.exchangeGood.json
+14
-0
tmallCat.exchangeGoodList.json
...rc/canvas/game/mock/miniTb/tmallCat.exchangeGoodList.json
+2
-2
spark.json
spark.json
+631
-592
pageshop.js
taobao_mini/client/pages/pageshop/pageshop.js
+32
-24
resList.js
taobao_mini/client/resconfig/resList.js
+25
-0
No files found.
project/src/canvas/game/mock/miniTb/tmallCat.exchangeGood.json
0 → 100644
View file @
21ea4a44
{
"success"
:
0
,
"data"
:
{
"channel"
:
"aliqua sint fugiat non do"
,
"strategyCode"
:
"anim"
,
"code"
:
"amet"
,
"image"
:
"ea nulla aute eu"
,
"name"
:
"in"
,
"type"
:
-27273675.128173023
},
"code"
:
"quis nostrud fugiat pariatur"
,
"message"
:
"欢乐币不足"
}
\ No newline at end of file
project/src/canvas/game/mock/miniTb/tmallCat.exchangeGoodList.json
View file @
21ea4a44
...
...
@@ -11,7 +11,7 @@
"type"
:
4112149.6368029267
,
"_id"
:
"2"
,
"value"
:
51585947.06940037
,
"status"
:
2
"status"
:
1
},
{
"hasStock"
:
false
,
...
...
@@ -21,7 +21,7 @@
"type"
:
4112149.6368029267
,
"_id"
:
"2"
,
"value"
:
51585947.06940037
,
"status"
:
2
"status"
:
1
},
{
"hasStock"
:
false
,
...
...
spark.json
View file @
21ea4a44
This diff is collapsed.
Click to expand it.
taobao_mini/client/pages/pageshop/pageshop.js
View file @
21ea4a44
...
...
@@ -5,6 +5,10 @@ const EXCHANGE_STATUS = {
};
import
resList
from
'../../resconfig/resList'
;
//import API from '../../api';
import
API
from
'../../api'
;
const
app
=
getApp
();
const
{
tbcc
}
=
app
;
const
{
commonToast
}
=
tbcc
.
tb
;
let
flag
=
0
;
Page
({
data
:
{
...
...
@@ -17,43 +21,47 @@ Page({
resList
:
resList
});
this
.
updateData
();
this
.
getExchangeGoodList
();
},
async
handleClick
(
e
)
{
if
(
flag
)
return
;
flag
=
1
;
const
{
item
:
{
_id
}
}
=
e
.
target
.
dataset
;
const
{
item
:
{
_id
}
}
=
e
.
target
.
dataset
;
const
{
success
,
data
,
message
}
=
await
API
.
exchangeGood
({
_id
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
flag
=
0
;
})
||
{};
if
(
success
&&
data
)
{
commonToast
(
'兑换成功'
)
}
await
this
.
getExchangeGoodList
();
flag
=
0
;
},
async
onItemExchange
(
_id
)
{
const
{
success
,
data
,
message
}
=
await
API
.
exchangeGood
({
_id
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
)
})
||
{};
//
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 => {
// });
},
//
// 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
()
{
async
getExchangeGoodList
()
{
const
{
data
:
{
list
,
happyCoin
}
}
=
await
API
.
exchangeGoodList
();
list
.
forEach
(
item
=>
{
item
.
exchanged
=
item
.
status
==
EXCHANGE_STATUS
.
DONE
;
...
...
taobao_mini/client/resconfig/resList.js
View file @
21ea4a44
const
resList
=
{
'6768cd2f-8a8e-4a49-9f20-29a4fdefe142'
:
{
name
:
'exchanged_bg'
,
ext
:
'.png'
,
uuid
:
'6768cd2f-8a8e-4a49-9f20-29a4fdefe142'
,
url
:
'//yun.duiba.com.cn/spark/assets/3e668721c6b9582be3b62f7e1e1a7b20cdb597ce.png'
},
'5fbf3c28-003e-46c6-833d-968eaeb820cf'
:
{
name
:
'exchanged_imgbg'
,
ext
:
'.png'
,
uuid
:
'5fbf3c28-003e-46c6-833d-968eaeb820cf'
,
url
:
'//yun.duiba.com.cn/spark/assets/adbbe665822e7e67c405ee5a62b56859521ab715.png'
},
'e170173f-d814-4e58-a5b0-95c2d80b9673'
:
{
name
:
'exchanged_close'
,
ext
:
'.png'
,
uuid
:
'e170173f-d814-4e58-a5b0-95c2d80b9673'
,
url
:
'//yun.duiba.com.cn/spark/assets/2b22fec0227db9f7df6ee42e5161939aa4f9a06f.png'
},
'9df943b3-e90f-4593-b144-d5d47bba5c4d'
:
{
name
:
'exchanged_btn'
,
ext
:
'.png'
,
uuid
:
'9df943b3-e90f-4593-b144-d5d47bba5c4d'
,
url
:
'//yun.duiba.com.cn/spark/assets/5193855f40ff72dea9f48022083a6a35240b6dc6.png'
},
'0c446868-16d2-47f1-a0d6-27dadff681f2'
:
{
...
...
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