├── .gitignore ├── README.md ├── app.js ├── app.json ├── app.wxss ├── components ├── SearchInput │ ├── SearchInput.js │ ├── SearchInput.json │ ├── SearchInput.wxml │ └── SearchInput.wxss ├── Tabs │ ├── Tabs.js │ ├── Tabs.json │ ├── Tabs.wxml │ └── Tabs.wxss ├── Upimg │ ├── Upimg.js │ ├── Upimg.json │ ├── Upimg.wxml │ └── Upimg.wxss ├── float-menu │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss └── region-picker │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── config.js ├── icons ├── cart-o.png ├── cart.png ├── category-o.png ├── category.png ├── home-o.png ├── home.png ├── my-o.png └── my.png ├── images ├── 1nologin.png ├── icon │ └── close.svg ├── no-order.png └── nologin.png ├── lib └── runtime │ └── runtime.js ├── miniprogram_npm └── apifm-wxapi │ └── index.js ├── node_modules └── apifm-wxapi │ ├── .babelrc │ ├── .eslintrc.js │ ├── LICENSE │ ├── README.md │ ├── gulpfile.js │ ├── instructions.md │ ├── miniprogram_dist │ └── index.js │ ├── package.json │ └── src │ └── index.js ├── package-lock.json ├── package.json ├── pages ├── address-add │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── cart │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── category │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── collect │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── feedback │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── goods_detail │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── goods_list │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── index │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── order │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── pay │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── search │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── select-address │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss └── user │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── project.config.json ├── request └── index.js ├── sitemap.json ├── styles └── iconfont.wxss ├── template └── login │ ├── index.js │ ├── index.wxml │ └── index.wxss ├── utils ├── asyncWx.js ├── auth.js ├── pay.js └── util.js ├── weui ├── base │ ├── fn.wxss │ ├── mixin │ │ ├── mobile.wxss │ │ ├── setArrow.wxss │ │ ├── setOnepx.wxss │ │ └── text.wxss │ ├── reset.wxss │ └── variable │ │ ├── color.wxss │ │ ├── global.wxss │ │ ├── weui-button.wxss │ │ ├── weui-cell.wxss │ │ ├── weui-dialog.wxss │ │ ├── weui-grid.wxss │ │ ├── weui-msg.wxss │ │ ├── weui-progress.wxss │ │ └── weui-tab.wxss ├── weui.wxss └── widget │ ├── weui-agree │ └── weui-agree.wxss │ ├── weui-animate │ └── weui-animate.wxss │ ├── weui-button │ ├── weui-btn_cell.wxss │ ├── weui-btn_default.wxss │ ├── weui-btn_disabled.wxss │ ├── weui-btn_global.wxss │ ├── weui-btn_loading.wxss │ ├── weui-btn_plain.wxss │ ├── weui-btn_primary.wxss │ ├── weui-btn_warn.wxss │ └── weui-button.wxss │ ├── weui-cell │ ├── weui-access.wxss │ ├── weui-cell.wxss │ ├── weui-cells__group.wxss │ ├── weui-check.wxss │ ├── weui-form.wxss │ ├── weui-form │ │ ├── weui-form-preview.wxss │ │ ├── weui-form_common.wxss │ │ ├── weui-select.wxss │ │ └── weui-vcode.wxss │ ├── weui-gallery.wxss │ ├── weui-slideview.wxss │ ├── weui-switch.wxss │ └── weui-uploader.wxss │ ├── weui-flex │ └── weui-flex.wxss │ ├── weui-footer │ └── weui-footer.wxss │ ├── weui-grid │ └── weui-grid.wxss │ ├── weui-icon │ └── weui-icon.wxss │ ├── weui-loading │ ├── weui-dot-loading.wxss │ └── weui-loading.wxss │ ├── weui-media-box │ └── weui-media-box.wxss │ ├── weui-navigation-bar │ └── weui-navigation-bar.wxss │ ├── weui-page │ ├── weui-article.wxss │ ├── weui-form.wxss │ └── weui-msg.wxss │ ├── weui-panel │ └── weui-panel.wxss │ ├── weui-progress │ └── weui-progress.wxss │ ├── weui-searchbar │ └── weui-searchbar.wxss │ ├── weui-tab │ ├── weui-navbar.wxss │ ├── weui-tab.wxss │ └── weui-tabbar.wxss │ └── weui-tips │ ├── weui-actionsheet.wxss │ ├── weui-badge.wxss │ ├── weui-dialog.wxss │ ├── weui-half-screen-dialog.wxss │ ├── weui-loadmore.wxss │ ├── weui-mask.wxss │ └── weui-toptips.wxss └── wxParse ├── emojis ├── 00.gif ├── 01.gif ├── 02.gif ├── 03.gif ├── 04.gif ├── 05.gif ├── 06.gif ├── 07.gif ├── 08.gif ├── 09.gif ├── 10.gif ├── 100.gif ├── 101.gif ├── 102.gif ├── 103.gif ├── 104.gif ├── 105.gif ├── 106.gif ├── 107.gif ├── 108.gif ├── 109.gif ├── 11.gif ├── 110.gif ├── 111.gif ├── 112.gif ├── 113.gif ├── 114.gif ├── 115.gif ├── 116.gif ├── 117.gif ├── 118.gif ├── 119.gif ├── 12.gif ├── 120.gif ├── 121.gif ├── 122.gif ├── 123.gif ├── 124.gif ├── 125.gif ├── 126.gif ├── 127.gif ├── 128.gif ├── 129.gif ├── 13.gif ├── 130.gif ├── 131.gif ├── 132.gif ├── 133.gif ├── 134.gif ├── 14.gif ├── 15.gif ├── 16.gif ├── 17.gif ├── 18.gif ├── 19.gif ├── 20.gif ├── 21.gif ├── 22.gif ├── 23.gif ├── 24.gif ├── 25.gif ├── 26.gif ├── 27.gif ├── 28.gif ├── 29.gif ├── 30.gif ├── 31.gif ├── 32.gif ├── 33.gif ├── 34.gif ├── 35.gif ├── 36.gif ├── 37.gif ├── 38.gif ├── 39.gif ├── 40.gif ├── 41.gif ├── 42.gif ├── 43.gif ├── 44.gif ├── 45.gif ├── 46.gif ├── 47.gif ├── 48.gif ├── 49.gif ├── 50.gif ├── 51.gif ├── 52.gif ├── 53.gif ├── 54.gif ├── 55.gif ├── 56.gif ├── 57.gif ├── 58.gif ├── 59.gif ├── 60.gif ├── 61.gif ├── 62.gif ├── 63.gif ├── 64.gif ├── 65.gif ├── 66.gif ├── 67.gif ├── 68.gif ├── 69.gif ├── 70.gif ├── 71.gif ├── 72.gif ├── 73.gif ├── 74.gif ├── 75.gif ├── 76.gif ├── 77.gif ├── 78.gif ├── 79.gif ├── 80.gif ├── 81.gif ├── 82.gif ├── 83.gif ├── 84.gif ├── 85.gif ├── 86.gif ├── 87.gif ├── 88.gif ├── 89.gif ├── 90.gif ├── 91.gif ├── 92.gif ├── 93.gif ├── 94.gif ├── 95.gif ├── 96.gif ├── 97.gif ├── 98.gif └── 99.gif ├── html2json.js ├── htmlparser.js ├── showdown.js ├── wxDiscode.js ├── wxParse.js ├── wxParse.wxml └── wxParse.wxss /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Editor directories and files 3 | .idea 4 | .vscode 5 | *.css 6 | *.less 7 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | //app.js 2 | const WXAPI = require('apifm-wxapi'); 3 | 4 | // WXAPI.init('kotoba'); 5 | 6 | App({ 7 | //onLaunch,onShow: options(path,query,scene,shareTicket,referrerInfo(appId,extraData)) 8 | onLaunch: function (options) { 9 | WXAPI.init(this.globalData.subDomain); 10 | }, 11 | handleDestruction(res) { 12 | const { 13 | data = [] 14 | } = res; // 设默认值为 [] 以免获取数据失败时发生错误 15 | return data; 16 | }, 17 | login(e) { 18 | if (!e.detail.userInfo) { 19 | // 你点了取消授权 20 | return; 21 | } 22 | wx.login({ 23 | success: function (res) { 24 | const code = res.code; // 微信登录接口返回的 code 参数,下面登录接口需要用到 25 | WXAPI.login_wx(code).then(function (res) { 26 | // 登录接口返回结果 27 | console.log(res) 28 | }) 29 | } 30 | }) 31 | }, 32 | onShow(e) { 33 | this.globalData.launchOption = e 34 | // 保存邀请人 35 | if (e && e.query && e.query.inviter_id) { 36 | wx.setStorageSync('referrer', e.query.inviter_id) 37 | if (e.shareTicket) { 38 | // 通过分享链接进来 39 | wx.getShareInfo({ 40 | shareTicket: e.shareTicket, 41 | success: res => { 42 | // console.error(res) 43 | // console.error({ 44 | // referrer: e.query.inviter_id, 45 | // encryptedData: res.encryptedData, 46 | // iv: res.iv 47 | // }) 48 | WXAPI.shareGroupGetScore( 49 | e.query.inviter_id, 50 | res.encryptedData, 51 | res.iv 52 | ) 53 | } 54 | }) 55 | } 56 | } 57 | // 自动登录 58 | // AUTH.checkHasLogined().then(isLogined => { 59 | // if (!isLogined) { 60 | // AUTH.login() 61 | // } 62 | // }) 63 | }, 64 | globalData: { 65 | subDomain: "kotoba" 66 | } 67 | }); -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "pages/index/index", 4 | "pages/category/index", 5 | "pages/goods_list/index", 6 | "pages/goods_detail/index", 7 | "pages/cart/index", 8 | "pages/collect/index", 9 | "pages/order/index", 10 | "pages/search/index", 11 | "pages/user/index", 12 | "pages/feedback/index", 13 | "pages/pay/index", 14 | "pages/address-add/index", 15 | "pages/select-address/index" 16 | ], 17 | "window": { 18 | "backgroundTextStyle": "light", 19 | "navigationBarBackgroundColor": "#1CD8D2", 20 | "navigationBarTitleText": "品优购", 21 | "navigationBarTextStyle": "white" 22 | }, 23 | "tabBar": { 24 | "color": "#999", 25 | "selectedColor": "#1CD8D2", 26 | "backgroundColor": "#fafafa", 27 | "list": [{ 28 | "pagePath": "pages/index/index", 29 | "text": "首页", 30 | "iconPath": "/icons/home.png", 31 | "selectedIconPath": "/icons/home-o.png" 32 | }, 33 | { 34 | "pagePath": "pages/category/index", 35 | "text": "分类", 36 | "iconPath": "icons/category.png", 37 | "selectedIconPath": "icons/category-o.png" 38 | }, 39 | { 40 | "pagePath": "pages/cart/index", 41 | "text": "购物车", 42 | "iconPath": "icons/cart.png", 43 | "selectedIconPath": "icons/cart-o.png" 44 | }, 45 | { 46 | "pagePath": "pages/user/index", 47 | "text": "我的", 48 | "iconPath": "icons/my.png", 49 | "selectedIconPath": "icons/my-o.png" 50 | } 51 | ] 52 | }, 53 | "sitemapLocation": "sitemap.json" 54 | } -------------------------------------------------------------------------------- /app.wxss: -------------------------------------------------------------------------------- 1 | @import './styles/iconfont.wxss'; 2 | @import 'weui/weui.wxss'; 3 | 4 | 5 | page, 6 | view, 7 | text, 8 | swiper, 9 | swiper-item, 10 | image, 11 | navigator { 12 | padding: 0; 13 | margin: 0; 14 | box-sizing: border-box; 15 | } 16 | 17 | page { 18 | /* 定义主题颜色 */ 19 | --themeColor: #eb4450; 20 | /* 21 | 定义统一字体大小 假设设计稿 大小是 375px 22 | 1px= 2rpx 23 | 14px = 28rpx 24 | */ 25 | font-size: 28rpx; 26 | } 27 | 28 | image { 29 | width: 100%; 30 | } 31 | 32 | .safeAreaOldPaddingBttom { 33 | padding-bottom: env(safe-area-inset-bottom); 34 | } 35 | 36 | .safeAreaNewPaddingBttom { 37 | padding-bottom: constant(safe-area-inset-bottom); 38 | } 39 | 40 | .safeAreaOldMarginBttom { 41 | margin-bottom: env(safe-area-inset-bottom); 42 | } 43 | 44 | .safeAreaNewMarginBttom { 45 | margin-bottom: constant(safe-area-inset-bottom); 46 | } 47 | 48 | .no-data { 49 | width: 100%; 50 | display: flex; 51 | justify-content: center; 52 | align-items: center; 53 | } 54 | 55 | .no-data .line { 56 | width: 132rpx; 57 | height: 2rpx; 58 | background: #999; 59 | } 60 | 61 | .no-data .txt { 62 | font-size: 26rpx; 63 | color: rgba(153, 153, 153, 1); 64 | margin: 0 16rpx; 65 | } -------------------------------------------------------------------------------- /components/SearchInput/SearchInput.js: -------------------------------------------------------------------------------- 1 | // components/SearchInput/SearchInput.js 2 | Component({ 3 | /** 4 | * 组件的属性列表 5 | */ 6 | properties: { 7 | 8 | }, 9 | 10 | /** 11 | * 组件的初始数据 12 | */ 13 | data: { 14 | 15 | }, 16 | 17 | /** 18 | * 组件的方法列表 19 | */ 20 | methods: { 21 | 22 | } 23 | }) 24 | -------------------------------------------------------------------------------- /components/SearchInput/SearchInput.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /components/SearchInput/SearchInput.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 搜索 4 | 5 | -------------------------------------------------------------------------------- /components/SearchInput/SearchInput.wxss: -------------------------------------------------------------------------------- 1 | /* components/SearchInput/SearchInput.wxss */ 2 | .search_input { 3 | height: 90rpx; 4 | padding: 10rpx; 5 | background-color: #1CD8D2; 6 | } 7 | .search_input navigator { 8 | height: 100%; 9 | display: flex; 10 | justify-content: center; 11 | align-items: center; 12 | background-color: #fff; 13 | border-radius: 15rpx; 14 | color: #666; 15 | } 16 | -------------------------------------------------------------------------------- /components/Tabs/Tabs.js: -------------------------------------------------------------------------------- 1 | // components/Tabs/Tabs.js 2 | Component({ 3 | /** 4 | * 组件的属性列表 5 | */ 6 | properties: { 7 | tabs:{ 8 | type:Array, 9 | value: [] 10 | }, 11 | }, 12 | 13 | /** 14 | * 组件的初始数据 15 | */ 16 | data: { 17 | 18 | }, 19 | 20 | /** 21 | * 组件的方法列表 22 | */ 23 | methods: { 24 | handleItemTap(e) { 25 | const {index} = e.currentTarget.dataset 26 | console.log(index, '<-e->'); 27 | this.triggerEvent('tabsItemChange', {index}) 28 | } 29 | } 30 | }) 31 | -------------------------------------------------------------------------------- /components/Tabs/Tabs.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /components/Tabs/Tabs.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | {{item.value}} 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /components/Tabs/Tabs.wxss: -------------------------------------------------------------------------------- 1 | /* components/Tabs/Tabs.wxss */ 2 | .tabs{} 3 | .tabs_title{ 4 | display: flex; 5 | } 6 | .title_item{ 7 | display: flex; 8 | justify-content: center; 9 | align-items: center; 10 | flex: 1; 11 | padding: 15rpx 0; 12 | } 13 | .active{ 14 | color:var(--themeColor); 15 | border-bottom: 5rpx solid currentColor; 16 | } 17 | .tabs_content{} -------------------------------------------------------------------------------- /components/Upimg/Upimg.js: -------------------------------------------------------------------------------- 1 | // components/Upimg/Upimg.js 2 | Component({ 3 | /** 4 | * 组件的属性列表 5 | */ 6 | properties: { 7 | src:{ 8 | type: String, 9 | value: '', 10 | } 11 | }, 12 | 13 | /** 14 | * 组件的初始数据 15 | */ 16 | data: { 17 | 18 | }, 19 | 20 | /** 21 | * 组件的方法列表 22 | */ 23 | methods: { 24 | 25 | } 26 | }) 27 | -------------------------------------------------------------------------------- /components/Upimg/Upimg.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /components/Upimg/Upimg.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /components/Upimg/Upimg.wxss: -------------------------------------------------------------------------------- 1 | /* components/Upimg/Upimg.wxss */ 2 | .up_img_wrap{ 3 | width: 90rpx; 4 | height: 90rpx; 5 | position: relative; 6 | } 7 | .up_img_wrap image{ 8 | width: 100%; 9 | height: 100%; 10 | border-radius: 15rpx; 11 | } 12 | .up_img_wrap icon{ 13 | position: absolute; 14 | top:-22rpx; 15 | right: -22rpx; 16 | } -------------------------------------------------------------------------------- /components/float-menu/index.js: -------------------------------------------------------------------------------- 1 | const App = getApp(); 2 | 3 | Component({ 4 | options: { 5 | addGlobalClass: true, 6 | }, 7 | /** 8 | * 组件的对外属性,是属性名到属性设置的映射表 9 | */ 10 | properties: { 11 | activePos: String, 12 | }, 13 | 14 | /** 15 | * 组件的内部数据,和 properties 一同用于组件的模板渲染 16 | */ 17 | data: { 18 | isClose: true 19 | }, 20 | // 组件数据字段监听器,用于监听 properties 和 data 的变化 21 | observers: { 22 | 23 | }, 24 | lifetimes: { 25 | attached: function () { 26 | this.setData({ 27 | 28 | }) 29 | }, 30 | detached: function () { 31 | // 在组件实例被从页面节点树移除时执行 32 | }, 33 | }, 34 | /** 35 | * 组件的方法列表 36 | */ 37 | methods: { 38 | //回退 39 | open(){ 40 | this.setData({ 41 | isClose: false 42 | }) 43 | }, 44 | close(){ 45 | this.setData({ 46 | isClose: true 47 | }) 48 | }, 49 | navBack: function () { 50 | wx.navigateBack({ 51 | delta: 1 52 | }) 53 | }, 54 | //回主页 55 | toIndex: function () { 56 | wx.navigateTo({ 57 | url: '/pages/admin/home/index/index' 58 | }) 59 | }, 60 | } 61 | }) -------------------------------------------------------------------------------- /components/float-menu/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | 5 | } 6 | } -------------------------------------------------------------------------------- /components/float-menu/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 快速 5 | 导航 6 | 7 | 8 | 9 | 10 | 11 | 快速 12 | 导航 13 | 14 | 15 | 16 | 17 | 18 | 19 | 首页 20 | 21 | 22 | 23 | 24 | 25 | 分类 26 | 27 | 28 | 29 | 30 | 31 | 购物车 32 | 33 | 34 | 35 | 36 | 37 | 我的 38 | 39 | 40 | -------------------------------------------------------------------------------- /components/float-menu/index.wxss: -------------------------------------------------------------------------------- 1 | .float-menu-cover { 2 | position: fixed; 3 | right: 0; 4 | bottom: 200rpx; 5 | display: flex; 6 | align-items: center; 7 | padding: 16rpx; 8 | background:rgba(0,0,0,0.7); 9 | border-radius: 16rpx 0 0 16rpx; 10 | z-index: 999; 11 | } 12 | .float-menu-cover-open { 13 | right: 440rpx; 14 | } 15 | .float-menu-cover .arrows { 16 | width: 34rpx; 17 | height: 34rpx; 18 | } 19 | .float-menu-cover .r { 20 | color: #fff; 21 | display: flex; 22 | flex-direction: column; 23 | font-size: 10pt; 24 | margin-left: 16rpx; 25 | } 26 | .float-menu-items { 27 | width: 440rpx; 28 | background: #fff; 29 | position: fixed; 30 | right: 0; 31 | bottom: 180rpx; 32 | border-radius: 16rpx 0 0 16rpx; 33 | display: flex; 34 | flex-wrap: wrap; 35 | padding-bottom: 32rpx; 36 | z-index: 999; 37 | } 38 | .float-menu-items .item { 39 | display: flex; 40 | flex-direction: column; 41 | align-items: center; 42 | margin-left: 32rpx; 43 | margin-right: 16rpx; 44 | margin-top: 32rpx; 45 | } 46 | .float-menu-items .item image { 47 | width: 43rpx; 48 | height: 43rpx; 49 | } 50 | .float-menu-items .item text { 51 | margin-top: 8rpx; 52 | color: #333; 53 | font-size: 10pt; 54 | } -------------------------------------------------------------------------------- /components/region-picker/index.js: -------------------------------------------------------------------------------- 1 | const WXAPI = require('apifm-wxapi') 2 | 3 | Component({ 4 | options: { 5 | addGlobalClass: true, 6 | }, 7 | /** 8 | * 组件的对外属性,是属性名到属性设置的映射表 9 | */ 10 | properties: { 11 | activePos: String, 12 | }, 13 | 14 | /** 15 | * 组件的内部数据,和 properties 一同用于组件的模板渲染 16 | */ 17 | data: { 18 | tabs: ['省', '市', '区/县', '街道/镇', '社区/村委会'], 19 | tabIndex: 0, 20 | selectRegion: [] // 已选择 21 | }, 22 | // 组件数据字段监听器,用于监听 properties 和 data 的变化 23 | observers: { 24 | 25 | }, 26 | lifetimes: { 27 | attached: function () { 28 | this.provinces() 29 | }, 30 | detached: function () { 31 | // 在组件实例被从页面节点树移除时执行 32 | }, 33 | }, 34 | /** 35 | * 组件的方法列表 36 | */ 37 | methods: { 38 | async provinces (){ 39 | const res = await WXAPI.province() 40 | if (res.code == 0) { 41 | this.setData({ 42 | redionData: res.data 43 | }) 44 | } 45 | }, 46 | async _click(e){ 47 | const index = e.currentTarget.dataset.index 48 | let redionData = this.data.redionData 49 | const _curEntity = redionData[index] 50 | redionData.forEach(ele => { 51 | ele.active = false 52 | }) 53 | _curEntity.active = true 54 | this.data.selectRegion[this.data.tabIndex] = _curEntity 55 | let tabIndex = this.data.tabIndex 56 | const res = await WXAPI.nextRegion(_curEntity.id) 57 | if (res.code == 0) { 58 | tabIndex++ 59 | redionData = res.data 60 | } 61 | this.setData({ 62 | redionData: redionData, 63 | selectRegion: this.data.selectRegion, 64 | tabIndex 65 | }) 66 | if (res.code != 0) { 67 | this.triggerEvent('selectAddress', this.data, {}) 68 | this.close() 69 | } 70 | }, 71 | async tabClick(e){ 72 | const index = e.currentTarget.dataset.index 73 | if (index == this.data.tabIndex) { 74 | return 75 | } 76 | const selectRegion = this.data.selectRegion 77 | selectRegion.splice(index) 78 | let redionData = this.data.redionData 79 | if (index == 0) { 80 | const res = await await WXAPI.province() 81 | if (res.code == 0) { 82 | redionData = res.data 83 | } 84 | } else { 85 | const lastSelectEntity = selectRegion[selectRegion.length - 1] 86 | const res = await WXAPI.nextRegion(lastSelectEntity.id) 87 | if (res.code == 0) { 88 | redionData = res.data 89 | } 90 | } 91 | this.setData({ 92 | tabIndex: index, 93 | selectRegion, 94 | redionData 95 | }) 96 | }, 97 | close(){ 98 | this.triggerEvent('closeAddress', {}, {}) 99 | } 100 | } 101 | }) -------------------------------------------------------------------------------- /components/region-picker/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | 5 | } 6 | } -------------------------------------------------------------------------------- /components/region-picker/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 请选择 5 | 6 | 7 | 8 | {{ item }} 9 | 10 | 11 | 12 | 13 | {{ item.name }} 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /components/region-picker/index.wxss: -------------------------------------------------------------------------------- 1 | .bg { 2 | position: fixed; 3 | top: 0; 4 | left: 0; 5 | width: 100vw; 6 | height: 100vh; 7 | background: rgba(0, 0, 0, 0.4); 8 | z-index: 9998; 9 | } 10 | .container-box { 11 | position: fixed; 12 | bottom: 0; 13 | left: 0; 14 | width: 100vw; 15 | height: 70vh; 16 | background: #fff; 17 | z-index: 9999; 18 | border-radius: 32rpx 32rpx 0 0; 19 | display: flex; 20 | flex-direction: column; 21 | } 22 | .container-box .h { 23 | position: relative; 24 | margin-top: 32rpx; 25 | text-align: center; 26 | } 27 | .container-box .h text { 28 | font-size: 26rpx; 29 | color: #666; 30 | } 31 | .container-box .h image { 32 | width: 32rpx; 33 | height: 32rpx; 34 | position: absolute; 35 | top: 8rpx; 36 | right: 32rpx; 37 | } 38 | .tabs { 39 | width: 100vw; 40 | display: flex; 41 | height: 88rpx; 42 | margin-top: 32rpx; 43 | } 44 | .tabs .tab { 45 | height: 88rpx; 46 | line-height: 88rpx; 47 | background: #f0f0f0; 48 | color: #999; 49 | text-align: center; 50 | flex-grow: 1; 51 | } 52 | .tabs .tab.active { 53 | background: #fff; 54 | color: #4a4a4a; 55 | border-bottom: 1rpx solid #f0f0f0; 56 | font-weight: 700; 57 | } 58 | .data { 59 | margin: 32rpx; 60 | line-height: 80rpx; 61 | flex: 1; 62 | height: 0; 63 | } 64 | .data scroll-view { 65 | height: 100%; 66 | } 67 | .data .active { 68 | color: #e64340; 69 | font-weight: 700; 70 | } -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | subDomain: "kotoba", // 根据教程 https://www.yuque.com/apifm/doc/qr6l4m 查看你自己的 subDomain 3 | appid: "wx510521a2f79c490d", // 您的小程序的appid,购物单功能需要使用 4 | shareProfile: '百款精品商品,总有一款适合您', // 首页转发的时候话术 5 | kanjiaRequirePlayAd: false, // 是否必须要观看视频广告后才可以砍价 6 | goodsDetailSkuShowType: 0, // 0 为点击立即购买按钮后出现规格尺寸、数量的选择; 1为直接在商品详情页面显示规格尺寸、数量的选择,而不弹框 7 | } -------------------------------------------------------------------------------- /icons/cart-o.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kotoba209/wx-mall/e332c3d86f0943c2da301f944efc5d3a948ef7d1/icons/cart-o.png -------------------------------------------------------------------------------- /icons/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kotoba209/wx-mall/e332c3d86f0943c2da301f944efc5d3a948ef7d1/icons/cart.png -------------------------------------------------------------------------------- /icons/category-o.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kotoba209/wx-mall/e332c3d86f0943c2da301f944efc5d3a948ef7d1/icons/category-o.png -------------------------------------------------------------------------------- /icons/category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kotoba209/wx-mall/e332c3d86f0943c2da301f944efc5d3a948ef7d1/icons/category.png -------------------------------------------------------------------------------- /icons/home-o.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kotoba209/wx-mall/e332c3d86f0943c2da301f944efc5d3a948ef7d1/icons/home-o.png -------------------------------------------------------------------------------- /icons/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kotoba209/wx-mall/e332c3d86f0943c2da301f944efc5d3a948ef7d1/icons/home.png -------------------------------------------------------------------------------- /icons/my-o.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kotoba209/wx-mall/e332c3d86f0943c2da301f944efc5d3a948ef7d1/icons/my-o.png -------------------------------------------------------------------------------- /icons/my.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kotoba209/wx-mall/e332c3d86f0943c2da301f944efc5d3a948ef7d1/icons/my.png -------------------------------------------------------------------------------- /images/1nologin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kotoba209/wx-mall/e332c3d86f0943c2da301f944efc5d3a948ef7d1/images/1nologin.png -------------------------------------------------------------------------------- /images/icon/close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/no-order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kotoba209/wx-mall/e332c3d86f0943c2da301f944efc5d3a948ef7d1/images/no-order.png -------------------------------------------------------------------------------- /images/nologin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kotoba209/wx-mall/e332c3d86f0943c2da301f944efc5d3a948ef7d1/images/nologin.png -------------------------------------------------------------------------------- /node_modules/apifm-wxapi/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | ["module-resolver", { 4 | "root": ["./src"], 5 | "alias": {} 6 | }] 7 | ], 8 | "presets": [ 9 | ["env", {"loose": true, "modules": "commonjs"}] 10 | ] 11 | } -------------------------------------------------------------------------------- /node_modules/apifm-wxapi/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'extends': [ 3 | 'airbnb-base', 4 | 'plugin:promise/recommended' 5 | ], 6 | 'parserOptions': { 7 | 'ecmaVersion': 9, 8 | 'ecmaFeatures': { 9 | 'jsx': false 10 | }, 11 | 'sourceType': 'module' 12 | }, 13 | 'env': { 14 | 'es6': true, 15 | 'node': true, 16 | 'jest': true 17 | }, 18 | 'plugins': [ 19 | 'import', 20 | 'node', 21 | 'promise' 22 | ], 23 | 'rules': { 24 | 'arrow-parens': 'off', 25 | 'comma-dangle': [ 26 | 'error', 27 | 'only-multiline' 28 | ], 29 | 'complexity': ['error', 10], 30 | 'func-names': 'off', 31 | 'global-require': 'off', 32 | 'handle-callback-err': [ 33 | 'error', 34 | '^(err|error)$' 35 | ], 36 | 'import/no-unresolved': [ 37 | 'error', 38 | { 39 | 'caseSensitive': true, 40 | 'commonjs': true, 41 | 'ignore': ['^[^.]'] 42 | } 43 | ], 44 | 'import/prefer-default-export': 'off', 45 | 'linebreak-style': 'off', 46 | 'no-catch-shadow': 'error', 47 | 'no-continue': 'off', 48 | 'no-div-regex': 'warn', 49 | 'no-else-return': 'off', 50 | 'no-param-reassign': 'off', 51 | 'no-plusplus': 'off', 52 | 'no-shadow': 'off', 53 | 'no-multi-assign': 'off', 54 | 'no-underscore-dangle': 'off', 55 | 'node/no-deprecated-api': 'error', 56 | 'node/process-exit-as-throw': 'error', 57 | 'object-curly-spacing': [ 58 | 'error', 59 | 'never' 60 | ], 61 | 'operator-linebreak': [ 62 | 'error', 63 | 'after', 64 | { 65 | 'overrides': { 66 | ':': 'before', 67 | '?': 'before' 68 | } 69 | } 70 | ], 71 | 'prefer-arrow-callback': 'off', 72 | 'prefer-destructuring': 'off', 73 | 'prefer-template': 'off', 74 | 'quote-props': [ 75 | 1, 76 | 'as-needed', 77 | { 78 | 'unnecessary': true 79 | } 80 | ], 81 | 'semi': [ 82 | 'error', 83 | 'never' 84 | ], 85 | 'no-await-in-loop': 'off', 86 | 'no-restricted-syntax': 'off', 87 | 'promise/always-return': 'off', 88 | }, 89 | 'globals': { 90 | 'window': true, 91 | 'document': true, 92 | 'App': true, 93 | 'Page': true, 94 | 'Component': true, 95 | 'Behavior': true, 96 | 'wx': true, 97 | 'getCurrentPages': true, 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /node_modules/apifm-wxapi/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 gooking 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/apifm-wxapi/README.md: -------------------------------------------------------------------------------- 1 | # 功能介绍 2 | 3 | 微信小程序接口工具包,无需服务器,无需开发后台,开箱即用,轻松开发小程序 4 | 5 | 交流 QQ 群: 629639122 6 | 7 | 欢迎大家进群交流,文档持续更新中... 8 | 9 | # 平台支持 10 | 11 | * [微信小程序开发](https://github.com/gooking/apifm-wxapi) 12 | * [web/h5 网站开发](https://github.com/gooking/apifm-webapi) 13 | * [Flutter 开发](https://github.com/gooking/apifm-flutter) 14 | 15 | # 使用方法 16 | 17 | ## 安装 18 | 19 | ``` 20 | npm install apifm-wxapi 21 | ``` 22 | 23 | *如果你的项目还不支持 npm (检查根目录下有没有 package.json 文件),请先初始化:* 24 | 25 | ``` 26 | npm init 27 | ``` 28 | 29 | ## 构建 npm 模块 30 | 31 | 小程序安装的 npm 模块,还不能直接使用,你需要在开发工具: “工具” --> “构建 npm” ,提示构建成功后,才能使用! 32 | 33 | ## 小程序调用 34 | 35 | 1. js文件头部引入插件: 36 | 37 | ``` 38 | const WXAPI = require('apifm-wxapi') 39 | WXAPI.init('gooking') 40 | ``` 41 | 42 | 2. js文件直接调用方法: 43 | 44 | ``` 45 | WXAPI.banners().then(res => { 46 | if (res.code == 0) { 47 | this.setData({ 48 | banners: res.data 49 | }) 50 | } 51 | }) 52 | ``` 53 | 54 | *上述例子完成了读取后台的 banner 轮播图片的数据,后台发布轮播图,小程序端直接这样简单调用即可~* 55 | 56 | # 返回值说明 57 | 58 | WXAPI 方法返回数据主要包含 3 个内容: 59 | 60 | 1. code 错误码,0 代表操作重构,其他数字均表示错误,具体错误描述请查看 msg; 61 | 2. msg 如果上面的code不为0,那么 msg 将会返回具体的错误说明描述 62 | 3. data 字段保存了 code 为0 时候的数据,一起你需要的数据,都保存在 data 中返回给你 63 | 64 | # 相关资源 65 | 66 | [「5分钟使用教程」](https://www.yuque.com/apifm/doc/mdldsd) 67 | [「Demo程序下载」](https://github.com/gooking/apifm-wxapi-demo) 68 | [「功能说明文档」](instructions.md) 69 | [「api接口文档」](https://api.it120.cc/doc.html) 70 | 71 | # TA们在用 72 | 73 | | 天使童装| 舔果果小铺 | 面馆风格小程序 | AI名片 | 74 | | :------:| :------: | :------: | :------: | 75 | | | | | | 76 | | [开源地址](https://github.com/EastWorld/wechat-app-mall) | [开源地址](hhttps://github.com/walcer/TianguoguoXiaopu) | [开源地址](https://gitee.com/javazj/noodle_shop_procedures) | [开源地址](https://github.com/gooking/visitingCard) | 77 | 78 |   79 | 80 | | fire-shop-lite| 培训机构 | 面馆风格小程序 | AI名片 | 81 | | :------:| :------: | :------: | :------: | 82 | | | | | | 83 | | [开源地址](https://github.com/thundersword/fire-shop-lite) | [开源地址](https://github.com/fukcup/lofter) | [开源地址](https://gitee.com/javazj/noodle_shop_procedures) | [开源地址](https://github.com/gooking/visitingCard) | 84 | 85 | # 联系作者 86 | 87 | | ➕微信 | ➕支付宝 | ➕QQ | 88 | | :------: | :------: | :------: | 89 | | | | | 90 | 91 | # 授权协议 92 | 93 | [MIT License](LICENSE) -------------------------------------------------------------------------------- /node_modules/apifm-wxapi/gulpfile.js: -------------------------------------------------------------------------------- 1 | const gulp = require('gulp') 2 | const clean = require('gulp-clean') 3 | 4 | const config = require('./tools/config') 5 | const BuildTask = require('./tools/build') 6 | const id = require('./package.json').name || 'miniprogram-custom-component' 7 | 8 | // 构建任务实例 9 | // eslint-disable-next-line no-new 10 | new BuildTask(id, config.entry) 11 | 12 | // 清空生成目录和文件 13 | gulp.task('clean', gulp.series(() => gulp.src(config.distPath, {read: false, allowEmpty: true}).pipe(clean()), done => { 14 | if (config.isDev) { 15 | return gulp.src(config.demoDist, {read: false, allowEmpty: true}) 16 | .pipe(clean()) 17 | } 18 | 19 | return done() 20 | })) 21 | // 监听文件变化并进行开发模式构建 22 | gulp.task('watch', gulp.series(`${id}-watch`)) 23 | // 开发模式构建 24 | gulp.task('dev', gulp.series(`${id}-dev`)) 25 | // 生产模式构建 26 | gulp.task('default', gulp.series(`${id}-default`)) 27 | -------------------------------------------------------------------------------- /node_modules/apifm-wxapi/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "apifm-wxapi", 3 | "_id": "apifm-wxapi@3.0.0", 4 | "_inBundle": false, 5 | "_integrity": "sha1-MR9yDSiCqnSNDdkjpImjMr1R5Yo=", 6 | "_location": "/apifm-wxapi", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "tag", 10 | "registry": true, 11 | "raw": "apifm-wxapi", 12 | "name": "apifm-wxapi", 13 | "escapedName": "apifm-wxapi", 14 | "rawSpec": "", 15 | "saveSpec": null, 16 | "fetchSpec": "latest" 17 | }, 18 | "_requiredBy": [ 19 | "#USER", 20 | "/" 21 | ], 22 | "_resolved": "https://registry.npm.taobao.org/apifm-wxapi/download/apifm-wxapi-3.0.0.tgz", 23 | "_shasum": "311f720d2882aa748d0dd923a489a332bd51e58a", 24 | "_spec": "apifm-wxapi", 25 | "_where": "E:\\wxdemo\\preDemo\\wx-mall", 26 | "author": { 27 | "name": "gooking" 28 | }, 29 | "bugs": { 30 | "url": "https://github.com/gooking/wxapi/issues" 31 | }, 32 | "bundleDependencies": false, 33 | "dependencies": {}, 34 | "deprecated": false, 35 | "description": "读取商品砍价设置接口升级至V2", 36 | "devDependencies": { 37 | "babel-core": "^6.26.3", 38 | "babel-loader": "^7.1.5", 39 | "babel-plugin-module-resolver": "^3.2.0", 40 | "babel-preset-env": "^1.7.0", 41 | "colors": "^1.3.1", 42 | "eslint": "^5.14.1", 43 | "eslint-config-airbnb-base": "13.1.0", 44 | "eslint-loader": "^2.1.2", 45 | "eslint-plugin-import": "^2.16.0", 46 | "eslint-plugin-node": "^7.0.1", 47 | "eslint-plugin-promise": "^3.8.0", 48 | "gulp": "^4.0.0", 49 | "gulp-clean": "^0.4.0", 50 | "gulp-if": "^2.0.2", 51 | "gulp-install": "^1.1.0", 52 | "gulp-less": "^4.0.1", 53 | "gulp-rename": "^1.4.0", 54 | "gulp-sourcemaps": "^2.6.5", 55 | "jest": "^23.5.0", 56 | "miniprogram-simulate": "^1.0.0", 57 | "through2": "^2.0.3", 58 | "vinyl": "^2.2.0", 59 | "webpack": "^4.29.5", 60 | "webpack-node-externals": "^1.7.2" 61 | }, 62 | "homepage": "https://github.com/gooking/wxapi#readme", 63 | "jest": { 64 | "testEnvironment": "jsdom", 65 | "testURL": "https://jest.test", 66 | "collectCoverageFrom": [ 67 | "src/**/*.js" 68 | ], 69 | "moduleDirectories": [ 70 | "node_modules", 71 | "src" 72 | ] 73 | }, 74 | "license": "MIT", 75 | "main": "miniprogram_dist/index.js", 76 | "miniprogram": "miniprogram_dist", 77 | "name": "apifm-wxapi", 78 | "repository": { 79 | "type": "git", 80 | "url": "git+https://github.com/gooking/wxapi.git" 81 | }, 82 | "scripts": { 83 | "build": "gulp", 84 | "clean": "gulp clean", 85 | "clean-dev": "gulp clean --develop", 86 | "coverage": "jest ./test/* --coverage --bail", 87 | "dev": "gulp dev --develop", 88 | "dist": "npm run build", 89 | "lint": "eslint \"src/**/*.js\" --fix", 90 | "lint-tools": "eslint \"tools/**/*.js\" --rule \"import/no-extraneous-dependencies: false\" --fix", 91 | "test": "jest --bail", 92 | "test-debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand --bail", 93 | "watch": "gulp watch --develop --watch" 94 | }, 95 | "version": "3.0.0" 96 | } 97 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wx-mall", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "apifm-wxapi": { 8 | "version": "3.0.0", 9 | "resolved": "https://registry.npm.taobao.org/apifm-wxapi/download/apifm-wxapi-3.0.0.tgz", 10 | "integrity": "sha1-MR9yDSiCqnSNDdkjpImjMr1R5Yo=" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wx-mall", 3 | "version": "1.0.0", 4 | "description": "视频学习:[零基础玩转微信小程序](https://www.bilibili.com/video/av73342655?p=131)", 5 | "main": "app.js", 6 | "directories": { 7 | "lib": "lib" 8 | }, 9 | "scripts": { 10 | "test": "echo \"Error: no test specified\" && exit 1" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/Kotoba209/-.git" 15 | }, 16 | "author": "", 17 | "license": "ISC", 18 | "bugs": { 19 | "url": "https://github.com/Kotoba209/-/issues" 20 | }, 21 | "homepage": "https://github.com/Kotoba209/-#readme", 22 | "dependencies": { 23 | "apifm-wxapi": "^3.0.0" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /pages/address-add/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "新增地址", 3 | "usingComponents": { 4 | "region-picker": "/components/region-picker/index" 5 | } 6 | } -------------------------------------------------------------------------------- /pages/address-add/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 5 |
6 | 7 | 8 | 联系人 9 | 10 | 11 | 12 | 13 | 14 | 手机号码 15 | 16 | 17 | 18 | 19 | 20 | 选择地区 21 | {{showRegionStr}} 22 | 23 | 24 | 详细地址 25 | 26 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /pages/feedback/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/feedback/index.wxss */ 2 | page { 3 | background-color: #eeeeee; 4 | } 5 | 6 | .fb_main { 7 | padding: 20rpx; 8 | color: #666; 9 | } 10 | 11 | .fb_main .fb_tips { 12 | display: flex; 13 | flex-wrap: wrap; 14 | } 15 | 16 | .fb_main .fb_tips text { 17 | width: 30%; 18 | padding: 10rpx; 19 | text-align: center; 20 | background-color: #fff; 21 | margin: 20rpx 10rpx; 22 | } 23 | 24 | .fb_main .fb_content { 25 | background-color: #fff; 26 | margin-top: 20rpx; 27 | } 28 | 29 | .fb_main .fb_content textarea { 30 | padding: 10rpx; 31 | } 32 | 33 | .fb_main .fb_tool { 34 | display: flex; 35 | flex-wrap: wrap; 36 | padding-bottom: 30rpx; 37 | } 38 | 39 | .fb_main .fb_tool button { 40 | margin: 0; 41 | width: 90rpx; 42 | height: 90rpx; 43 | font-size: 60rpx; 44 | padding: 0; 45 | display: flex; 46 | justify-content: center; 47 | align-items: center; 48 | margin-left: 20rpx; 49 | margin-top: 20rpx; 50 | color: #ccc; 51 | } 52 | 53 | .fb_main .fb_tool .up_img_item { 54 | margin-left: 20rpx; 55 | margin-top: 20rpx; 56 | } 57 | 58 | .fb_main .form_btn_wrap { 59 | margin-top: 20rpx; 60 | display: flex; 61 | justify-content: flex-end; 62 | } 63 | 64 | .fb_main .form_btn_wrap button { 65 | margin: 0; 66 | width: 40%; 67 | background-color: var(--themeColor); 68 | color: #fff; 69 | text-align: center; 70 | display: flex; 71 | justify-content: space-between; 72 | align-items: center; 73 | } -------------------------------------------------------------------------------- /pages/goods_detail/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "商品详情" 4 | } -------------------------------------------------------------------------------- /pages/goods_detail/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | ¥{{goodsObj.goods_price}} 11 | 12 | {{goodsObj.goods_name}} 13 | 14 | 15 | 收藏 16 | 17 | 18 | 19 | 图文详情 20 | 21 | 22 | 23 | 24 |