-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
leiyu
committed
Jul 31, 2019
1 parent
cf06606
commit fe9bd0a
Showing
265 changed files
with
25,420 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
# shopdz-minapp | ||
shopdz 商城小程序源码 | ||
|
||
# 使用步骤 | ||
- 申请小程序号,将小程序号AppId填写到 project.config.json appid 中。 | ||
- 修改 config.js host 接口地址 | ||
- 使用开发者工具运行小程序,测试功能是否正常 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
//app.js | ||
const curl = require('./config').host; | ||
App({ | ||
onLaunch: function (options) { | ||
console.log(options); | ||
// 展示本地存储能力 | ||
var self = this; | ||
var logs = wx.getStorageSync('logs') || [] | ||
logs.unshift(Date.now()) | ||
wx.setStorageSync('logs', logs) | ||
|
||
// 登录 | ||
|
||
// 获取用户信息 | ||
wx.getSetting({ | ||
success: res => { | ||
if (res.authSetting['scope.userInfo']) { | ||
// 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 | ||
wx.getUserInfo({ | ||
success: res => { | ||
console.log(res.userInfo) | ||
var nickName = res.userInfo.nickName; | ||
var avatarUrl = res.userInfo.avatarUrl; | ||
wx.setStorageSync('nickName', nickName); | ||
wx.setStorageSync('avatarUrl', avatarUrl); | ||
} | ||
}) | ||
} | ||
} | ||
}) | ||
|
||
}, | ||
|
||
http: function (url, data='', method="GET") { //封装http请求 | ||
const apiUrl = 'http://shopdz.shopdz.cn/' //请求域名 | ||
console.log(this.globalData) | ||
const currency = { | ||
//openid: this.globalData.openid | ||
} | ||
return new Promise((resolve, reject) => { | ||
wx.request({ | ||
url: apiUrl + url, | ||
header: { | ||
'content-type': 'application/x-www-form-urlencoded' // 默认值 | ||
}, | ||
data: Object.assign(currency,data), | ||
method: method, | ||
success: function (res) { | ||
if(res.data.code != 200){ | ||
wx.showModal({ | ||
title: '提示', | ||
content: res.data.message, | ||
success: function (res) { | ||
if (res.confirm) { | ||
console.log('用户点击确定') | ||
} else if (res.cancel) { | ||
console.log('用户点击取消') | ||
} | ||
} | ||
}) | ||
} | ||
resolve(res.data) | ||
}, | ||
fail: function (res) { | ||
reject(res); | ||
}, | ||
complete: function () { | ||
console.log('complete'); | ||
} | ||
}) | ||
}) | ||
}, | ||
|
||
globalData: { | ||
userInfo: null, | ||
openid:null, | ||
nickName: null, | ||
avatarUrl: null, | ||
num:0, | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"pages": [ | ||
"pages/index/index", | ||
"pages/list/index", | ||
"pages/cart/index", | ||
"pages/user/index", | ||
"pages/details/index", | ||
"pages/bindPhone/index", | ||
"pages/coupon/index", | ||
"pages/order/index", | ||
"pages/addressList/index", | ||
"pages/addressAdd/index", | ||
"pages/address-Add/index", | ||
"pages/address-Adds/index", | ||
"pages/orderDetails/index", | ||
"pages/detail/detail", | ||
"pages/settlement/index", | ||
"pages/integral/index", | ||
"pages/coupon_all/index", | ||
"pages/footprint/index", | ||
"pages/feedback/index", | ||
"pages/help/index", | ||
"pages/yijian/yijian", | ||
"pages/question/question", | ||
"pages/questiong/question", | ||
"pages/refund/index", | ||
"pages/assemble/index", | ||
"pages/assemble_detail/index", | ||
"pages/extension/index", | ||
"pages/evaluate/index", | ||
"pages/refund_detail/index", | ||
"pages/logistics/index", | ||
"pages/comment/index", | ||
"pages/return_goods/index", | ||
"pages/withdrawaccount/index", | ||
"pages/fenlei/index", | ||
"pages/record/index" | ||
], | ||
"window": { | ||
"backgroundTextStyle": "light", | ||
"navigationBarBackgroundColor": "#fff", | ||
"navigationBarTitleText": "ShopDZ商城", | ||
"navigationBarTextStyle": "black" | ||
}, | ||
"tabBar": { | ||
"backgroundColor": "#fff", | ||
"borderStyle": "black", | ||
"color": "#333", | ||
"selectedColor": "#ff5f19", | ||
"list": [ | ||
{ | ||
"selectedIconPath": "images/home_page_n.png", | ||
"iconPath": "images/home_page_y.png", | ||
"pagePath": "pages/index/index", | ||
"text": "首页" | ||
}, | ||
{ | ||
"selectedIconPath": "images/shopping_f_t.png", | ||
"iconPath": "images/shopping_f.png", | ||
"pagePath": "pages/fenlei/index", | ||
"text": "分类" | ||
}, | ||
{ | ||
"selectedIconPath": "images/Shopping.png", | ||
"iconPath": "images/shopping_select.png", | ||
"pagePath": "pages/cart/index", | ||
"text": "购物车" | ||
}, | ||
{ | ||
"selectedIconPath": "images/my_y.png", | ||
"iconPath": "images/my_n.png", | ||
"pagePath": "pages/user/index", | ||
"text": "我的" | ||
} | ||
] | ||
}, | ||
"sitemapLocation": "sitemap.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/**app.wxss**/ | ||
@import "/lib/weui.wxss"; | ||
.container { | ||
height: 100%; | ||
} | ||
image{ | ||
width: 100%; | ||
} | ||
.fl{ | ||
float: left | ||
} | ||
.fr{ | ||
float: right; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// var host = 'http://shopdz.pm.comsenz-service.com/'; | ||
// var host = 'https://miniapp.shopdz.cn/'; | ||
var host = 'https://shopdz.shopdz.cn/'; | ||
const config = { | ||
host, | ||
} | ||
|
||
module.exports = config |
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.