Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
b44f1601
Commit
b44f1601
authored
Aug 28, 2020
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时提交
parent
26cbedf8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
709 additions
and
596 deletions
+709
-596
pages.json
pages.json
+47
-47
goods.vue
pages/goods/goods.vue
+7
-7
order-commit.vue
pages/order/order-commit.vue
+15
-0
index.vue
pages/quick_share/index.vue
+546
-446
api.js
plugin/api.js
+94
-96
No files found.
pages.json
View file @
b44f1601
...
...
@@ -33,7 +33,7 @@
{
"path"
:
"pages/webbox/webbox"
}
],
"subPackages"
:
[{
"root"
:
"pages/goods"
,
...
...
@@ -81,7 +81,7 @@
"root"
:
"pages/live"
,
"plugins"
:
{
"live-player-plugin"
:
{
"version"
:
"1.1.
4
"
,
"version"
:
"1.1.
8
"
,
"provider"
:
"wx2b03c6e691cd7370"
}
},
...
...
@@ -253,51 +253,51 @@
}
]
},
{
"root"
:
"pages/microShop"
,
"pages"
:
[{
"path"
:
"index/index"
,
"style"
:
{
"navigationStyle"
:
"custom"
}
},
{
"path"
:
"myClients/myClients"
},
{
"path"
:
"wdWithdrawal"
},
{
"path"
:
"wdOrder"
},
{
"path"
:
"wdCase"
},
{
"path"
:
"shopSettings"
},
{
"path"
:
"storeManagement/storeManagement"
},
{
"path"
:
"storeManagement/goodsEdit"
},
{
"path"
:
"storeManagement/addGoods"
},
{
"path"
:
"storeManagement/index"
}
]
},
{
"root"
:
"pages/quick_share"
,
"pages"
:
[{
"path"
:
"index"
}]
}
{
"root"
:
"pages/microShop"
,
"pages"
:
[{
"path"
:
"index/index"
,
"style"
:
{
"navigationStyle"
:
"custom"
}
},
{
"path"
:
"myClients/myClients"
},
{
"path"
:
"wdWithdrawal"
},
{
"path"
:
"wdOrder"
},
{
"path"
:
"wdCase"
},
{
"path"
:
"shopSettings"
},
{
"path"
:
"storeManagement/storeManagement"
},
{
"path"
:
"storeManagement/goodsEdit"
},
{
"path"
:
"storeManagement/addGoods"
},
{
"path"
:
"storeManagement/index"
}
]
},
{
"root"
:
"pages/quick_share"
,
"pages"
:
[{
"path"
:
"index"
}]
}
],
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
...
...
pages/goods/goods.vue
View file @
b44f1601
...
...
@@ -462,13 +462,13 @@ export default {
},
initImages
()
{
// let that = this;
let
info
=
uni
.
createSelectorQuery
().
in
(
this
);
info
.
select
(
".goods"
)
.
boundingClientRect
((
data
)
=>
{
console
.
log
(
"得到布局位置信息"
+
JSON
.
stringify
(
data
));
})
.
exec
();
//
let info = uni.createSelectorQuery().in(this);
//
info
//
.select(".goods")
//
.boundingClientRect((data) => {
//
console.log("得到布局位置信息" + JSON.stringify(data));
//
})
//
.exec();
// info
// .boundingClientRect(function (data) {
// console.log(data)
...
...
pages/order/order-commit.vue
0 → 100644
View file @
b44f1601
<
template
>
<view
class=
"commit-box"
>
</view>
</
template
>
<
script
>
export
default
{
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
pages/quick_share/index.vue
View file @
b44f1601
This diff is collapsed.
Click to expand it.
plugin/api.js
View file @
b44f1601
export
default
{
install
(
Vue
,
options
)
{
Vue
.
prototype
.
host
=
"https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
// Vue.prototype.host2 = "http://192.168.0.110:8200"
// Vue.prototype.host2 = "https://mallApi.oytour.com"
Vue
.
prototype
.
host2
=
"http://192.168.2.16:8088"
// Vue.prototype.host2 = "http://192.168.2.65"
Vue
.
prototype
.
request
=
function
(
param
,
success
,
failed
)
{
//网络请求
uni
.
request
({
url
:
this
.
host
+
"&r="
+
param
.
data
.
r
,
method
:
param
.
method
||
"GET"
,
header
:
param
.
header
||
{
'content-type'
:
"application/json"
},
data
:
param
.
data
,
success
:
res
=>
{
if
(
res
.
data
.
code
!=
0
&&
res
.
data
.
msg
!=
"商品未上架"
)
{
}
typeof
success
==
"function"
&&
success
(
res
.
data
);
},
fail
:
(
e
)
=>
{
console
.
log
(
"网络请求fail:"
+
JSON
.
stringify
(
e
));
uni
.
showModal
({
content
:
""
+
res
.
errMsg
});
typeof
failed
==
"function"
&&
failed
(
res
.
data
);
}
});
}
Vue
.
prototype
.
request2
=
function
(
param
,
success
,
failed
)
{
Vue
.
prototype
.
host
=
"https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
// Vue.prototype.host2 = "http://192.168.0.110:8200"
// Vue.prototype.host2 = "https://mallApi.oytour.com"
Vue
.
prototype
.
host2
=
"https://mallApi.oytour.com"
// Vue.prototype.host2 = "http://192.168.2.65"
Vue
.
prototype
.
request
=
function
(
param
,
success
,
failed
)
{
//网络请求
uni
.
request
({
url
:
this
.
host
2
+
param
.
url
,
method
:
param
.
method
||
"
Post
"
,
url
:
this
.
host
+
"&r="
+
param
.
data
.
r
,
method
:
param
.
method
||
"
GET
"
,
header
:
param
.
header
||
{
'content-type'
:
"application/json"
},
data
:
{
MallBaseId
:
1
,
TenantId
:
1
,
OpenId
:
this
.
GetOpenId
().
OpenId
,
UserId
:
this
.
GetOpenId
().
UserId
,
SmallShopsId
:
this
.
GetOpenId
().
SmallShopsId
,
MiniAppId
:
this
.
GetMiniAppId
(),
msg
:
param
.
data
,
token
:
this
.
GetOpenId
().
token
},
data
:
param
.
data
,
success
:
res
=>
{
if
(
res
.
data
.
resultCode
==
10000
){
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
u
){
this
.
getLogin_t
(
u
)
typeof
failed
==
"function"
&&
failed
(
res
.
data
);
}
}
else
if
(
res
.
data
.
resultCode
!=
1
)
{
if
(
res
.
data
.
message
!=
''
){
uni
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
"none"
,
});
}
typeof
failed
==
"function"
&&
failed
(
res
.
data
);
}
else
{
typeof
success
==
"function"
&&
success
(
res
.
data
);
if
(
res
.
data
.
code
!=
0
&&
res
.
data
.
msg
!=
"商品未上架"
)
{
}
typeof
success
==
"function"
&&
success
(
res
.
data
);
},
fail
:
(
e
)
=>
{
console
.
log
(
"网络请求fail:"
+
JSON
.
stringify
(
e
));
...
...
@@ -84,36 +29,89 @@ export default {
}
});
}
// token失效再次登录接口
Vue
.
prototype
.
getLogin_t
=
function
(
obj
)
{
let
pid
=
uni
.
getStorageSync
(
"pid"
)?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
;
let
SmallShopId
=
uni
.
getStorageSync
(
"SmallShopId"
)?
uni
.
getStorageSync
(
"SmallShopId"
).
SmallShopId
:
0
;
this
.
request2
(
{
url
:
'/api/AppletLogin/Login'
,
data
:
{
Source
:
1
,
OpenId
:
obj
.
OpenId
,
Name
:
obj
.
Name
,
Photo
:
obj
.
Photo
,
Moblie
:
''
,
SuperiorId
:
pid
,
SmallShopId
:
SmallShopId
,
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
setStorageSync
(
'mall_UserInfo'
,
res
.
data
);
uni
.
removeStorageSync
(
'pid'
);
uni
.
removeStorageSync
(
'SmallShopId'
);
}
}
);
}
// 获取小程序APPID
Vue
.
prototype
.
request2
=
function
(
param
,
success
,
failed
)
{
//网络请求
uni
.
request
({
url
:
this
.
host2
+
param
.
url
,
method
:
param
.
method
||
"Post"
,
header
:
param
.
header
||
{
'content-type'
:
"application/json"
},
data
:
{
MallBaseId
:
1
,
TenantId
:
1
,
OpenId
:
this
.
GetOpenId
().
OpenId
,
UserId
:
this
.
GetOpenId
().
UserId
,
SmallShopsId
:
this
.
GetOpenId
().
SmallShopsId
,
MiniAppId
:
this
.
GetMiniAppId
(),
msg
:
param
.
data
,
token
:
this
.
GetOpenId
().
token
},
success
:
res
=>
{
if
(
res
.
data
.
resultCode
==
10000
)
{
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
u
)
{
this
.
getLogin_t
(
u
)
typeof
failed
==
"function"
&&
failed
(
res
.
data
);
}
}
else
if
(
res
.
data
.
resultCode
!=
1
)
{
if
(
res
.
data
.
message
!=
''
)
{
uni
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
"none"
,
});
}
typeof
failed
==
"function"
&&
failed
(
res
.
data
);
}
else
{
typeof
success
==
"function"
&&
success
(
res
.
data
);
}
},
fail
:
(
e
)
=>
{
console
.
log
(
"网络请求fail:"
+
JSON
.
stringify
(
e
));
uni
.
showModal
({
content
:
""
+
res
.
errMsg
});
typeof
failed
==
"function"
&&
failed
(
res
.
data
);
}
});
}
// token失效再次登录接口
Vue
.
prototype
.
getLogin_t
=
function
(
obj
)
{
let
pid
=
uni
.
getStorageSync
(
"pid"
)
?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
;
let
SmallShopId
=
uni
.
getStorageSync
(
"SmallShopId"
)
?
uni
.
getStorageSync
(
"SmallShopId"
).
SmallShopId
:
0
;
this
.
request2
({
url
:
'/api/AppletLogin/Login'
,
data
:
{
Source
:
1
,
OpenId
:
obj
.
OpenId
,
Name
:
obj
.
Name
,
Photo
:
obj
.
Photo
,
Moblie
:
''
,
SuperiorId
:
pid
,
SmallShopId
:
SmallShopId
,
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
setStorageSync
(
'mall_UserInfo'
,
res
.
data
);
uni
.
removeStorageSync
(
'pid'
);
uni
.
removeStorageSync
(
'SmallShopId'
);
}
}
);
}
// 获取小程序APPID
Vue
.
prototype
.
GetMiniAppId
=
function
()
{
return
'wxacd9f8cc3480d29e'
// return 'wxcf0727a7c78b501e' //旅小友
// return 'wxcf0727a7c78b501e' //旅小友
}
//获取OpenId
Vue
.
prototype
.
GetOpenId
=
function
()
{
...
...
@@ -122,7 +120,7 @@ export default {
OpenId
:
''
,
UserId
:
0
,
token
:
''
,
SmallShopsId
:
0
,
SmallShopsId
:
0
,
}
if
(
mall_userinfo
)
{
if
(
mall_userinfo
.
OpenId
)
{
...
...
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