Skip to content

Commit

Permalink
shopdz小程序源码
Browse files Browse the repository at this point in the history
  • Loading branch information
leiyu committed Jul 31, 2019
1 parent cf06606 commit fe9bd0a
Show file tree
Hide file tree
Showing 265 changed files with 25,420 additions and 0 deletions.
Binary file added CategoryIcon/baby/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/baby/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/baby/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/baby/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/bedding/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/bedding/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/bedding/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/bedding/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/bedding/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/bedding/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/bedding/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/diet/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/diet/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/diet/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/diet/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/home/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/home/14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/home/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/home/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/home/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/home/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/kitchen/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/kitchen/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/kitchen/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/kitchen/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CategoryIcon/kitchen/5.png
Binary file added CategoryIcon/kitchen/6.png
Binary file added CategoryIcon/kitchen/7.png
Binary file added CategoryIcon/kitchen/8.png
Binary file added CategoryIcon/outfit/2.png
Binary file added CategoryIcon/outfit/3.png
Binary file added CategoryIcon/outfit/4.png
Binary file added CategoryIcon/outfit/5.png
Binary file added CategoryIcon/outfit/6.png
Binary file added CategoryIcon/outfit/banshenqun.png
Binary file added CategoryIcon/outfit/chenshan.png
Binary file added CategoryIcon/outfit/diaodai.png
Binary file added CategoryIcon/outfit/polo.png
Binary file added CategoryIcon/personal/1.png
Binary file added CategoryIcon/personal/2.png
Binary file added CategoryIcon/personal/3.png
Binary file added CategoryIcon/personal/4.png
Binary file added CategoryIcon/personal/hufu.png
5 changes: 5 additions & 0 deletions README.md
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 接口地址
- 使用开发者工具运行小程序,测试功能是否正常
81 changes: 81 additions & 0 deletions app.js
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,
}
})
78 changes: 78 additions & 0 deletions app.json
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"
}
14 changes: 14 additions & 0 deletions app.wxss
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;
}
8 changes: 8 additions & 0 deletions config.js
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
Binary file added images/Shopping.png
Binary file added images/add_to cart.png
Binary file added images/already_shipped.png
Binary file added images/birthday.png
Binary file added images/choice_n.png
Binary file added images/choice_y.png
Binary file added images/completed.png
Binary file added images/delete.png
Binary file added images/edit.png
Binary file added images/festival.png
Binary file added images/home_page_n.png
Binary file added images/home_page_y.png
Binary file added images/img1.jpg
Binary file added images/img2.jpg
Binary file added images/img3.jpg
Binary file added images/list1.png
Binary file added images/list2.png
Binary file added images/list3.png
Binary file added images/list4.png
Binary file added images/logo.png
Binary file added images/my_n.png
Binary file added images/my_order.png
Binary file added images/my_y.png
Binary file added images/party.png
Binary file added images/pending_delivery.png
Binary file added images/pending_payment.png
Binary file added images/return.png
Binary file added images/shopping_cart_return.png
Binary file added images/shopping_f.png
Binary file added images/shopping_f_t.png
Binary file added images/shopping_select.png
Binary file added images/triangle.png
Binary file added images/triangle_2.png
Binary file added images/wedding.png
Binary file added img/accunt.png
Binary file added img/banner.jpg
Binary file added img/bg1.png
Binary file added img/cart.png
Binary file added img/collecticon.png
Binary file added img/collecticon2.png
Binary file added img/gotop.png
Binary file added img/group.png
Binary file added img/groupH.png
Binary file added img/home.png
Binary file added img/icon0-0.png
Binary file added img/login.jpg
Binary file added img/logo.png
Binary file added img/menu.png
Binary file added img/more_b.png
Binary file added img/pwd.png
Binary file added img/searchbtn.png
Binary file added img/shareicon.png
Binary file added img/shopcar.png
Binary file added img/shops1.png
Binary file added img/shops2.png
Binary file added img/shops3.png.png
Binary file added img/toggle.png
Binary file added img/toggle1.png
Binary file added img/toggle2.png
Loading

0 comments on commit fe9bd0a

Please sign in to comment.