1 Star 0 Fork 5

wisdomwei201804 / wechat_shop

forked from tekintian / wechat_shop 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

wechatshop 微信小程序商城完整版

小程序服务端 server_api 部署方法

  • PS: 注意,你的服务器一定要支持url rewrite模式,且PHP版本最好是 PHP5.6 , 支持PHP7.0;

部署步骤

  1. 上传 server_api 目录下的所有代码到你的服务器并运行 yourname.com/adminer.php 使用你的mysql账号登录后 导入数据 wechat_shop.sql.gz 【会自动创建数据库和导入演示数据】

  2. 修改App/Common/Conf/db.php 里面的数据库连接参数为你自己的;

  • 只需要修改你的数据库用户名和密码即可
'DB_USER'               =>  'root',      // 用户名
'DB_PWD'                =>  '123456',      //数据库用户密码
  1. App/Api/Conf/config.php 微信小程序的appid、secret、mchid、key、notify_url,SELF_ROOT的参数修改;

  2. ThinkPHP\Library\Vendor\wxpay\lib\WxPay.Config.php 微信小程序的appid、appsecret、mchid、key参数修改;

  3. ThinkPHP\Library\Vendor\WeiXinpay\lib\WxPay.Config.php 微信小程序的appid、appsecret、mchid、key、notify_url参数修改;

  4. App/Api/Controller/WxPayController.class.php 50行修改链接

  5. 必须开启 URL Rewrite才能使用本系统

  • 后台登录地址: youname.com/Admin/Login/index.html 用户名是admin,密码是123456

PHP开启pathinfo模式支持方法

打开你的php.ini配置文件,找到 cgi.fix_pathinfo 将前面的 ; 注释去掉, 后面的值改为0

cgi.fix_pathinfo=0

Tengine/nginx配置文件示例

server {
    listen    80;
    #你的域名,根据实际情况修改
    server_name  wxshop.yunnan.ws;
    #你的server_api文件夹位置,,根据实际情况修改
    root    /home/wechat_shop/server_api;
    #模式页面配置
    index index.html index.php index.htm;
  #这个是你的php的执行配置,根据实际情况修改
  location ~ [^/]\.php(/|$) {
    #fastcgi_pass remote_php_ip:9000;
    fastcgi_pass unix:/dev/shm/php-cgi.sock;
    fastcgi_index index.php;
    include fastcgi.conf;
    }
  #rewrite配置,很重要,如果你不知道你在做什么,请勿修改!!!
  if (!-e $request_filename) {
    rewrite "^/(.*)"  /index.php?s=/$1 last;
    break;
  }
  #禁止访问.ht文件配置
  location ~ /\.ht {
    deny all;
  }
  #禁止上传/静态目录的脚本权限
  location ~* .*\/(Data|public|static|uploads|images)\/.*\.(php|php5|phps|asp|aspx|jsp)$ {
     deny all;
  }
  # access_log
  access_log  /home/wwwlogs/wxshop.dd_access.log  combined;
}

Apache URL Rewrite配置示例

.htaccess 文件

<IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On

  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$  /index.php?s=$1 [QSA,PT,L]
</IfModule>

小程序源码目录 wxss_src

  • 小程序配置方法:

wxss_src/app.js 配置 hostUrl、 ceshiUrl 为你安装的服务端的URL地址

  • 腾讯云解决方案分配的域名 wxss_src/config.js

小程序源码:https://github.com/tekintian/wechat_shop/tree/master/wxss_src

PS:

本项目为学习项目,基础代码来源网络,在此之上做了功能模块的增强和安全方面的修复,欢迎for.......... 欢迎 star!

空文件

简介

基于thinkphp 后台系统的微信小程序商城系统,后端API+前端小程序APP源码 展开 收起
JavaScript
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/wisdomwei201804/wechat_shop.git
git@gitee.com:wisdomwei201804/wechat_shop.git
wisdomwei201804
wechat_shop
wechat_shop
master

搜索帮助