tekintian/wechat_shop
Acerca de
基于thinkphp 后台系统的微信小程序商城系统,后端API+前端小程序APP源码
Desarrollo web y de aplicacionesCrecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
Originalwechatshop 微信小程序商城完整版
小程序服务端 server_api 部署方法
- PS: 注意,你的服务器一定要支持url rewrite模式,且PHP版本最好是 PHP5.6 , 支持PHP7.0;
部署步骤
上传 server_api 目录下的所有代码到你的服务器并运行 yourname.com/adminer.php 使用你的mysql账号登录后 导入数据 docs\wechat_shop.sql.gz 【会自动创建数据库和导入演示数据】
修改App/Common/Conf/db.php 里面的数据库连接参数为你自己的;
- 只需要修改你的数据库用户名和密码即可
'DB_USER' => 'root', // 用户名
'DB_PWD' => '123456', //数据库用户密码
App/Api/Conf/config.php 微信小程序的appid、secret、mchid、key、notify_url,SELF_ROOT的参数修改;
ThinkPHP\Library\Vendor\wxpay\lib\WxPay.Config.php 微信小程序的appid、appsecret、mchid、key参数修改;
ThinkPHP\Library\Vendor\WeiXinpay\lib\WxPay.Config.php 微信小程序的appid、appsecret、mchid、key、notify_url参数修改;
App/Api/Controller/WxPayController.class.php 50行修改链接
必须开启 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!
Explorar proyectos relacionados
Cargando…