TinyShop(RF 微商城)安装记录

Demo

H5 预览: http://h5.tinyshop.rageframe.com
uni-app发布页: https://m3w.cn/rageframewsc


后台预览: http://demo2.rageframe.com/backend
账号: demo
密码: 123456

 

TinyShop项目地址

前端开源地址: https://github.com/stavyan/TinyShop-UniApp

后端开源地址: https://github.com/jianyan74/TinyShop

一款基于 RageFrame2 的免费开源的基础销售功能的微商城

前端基于 uni-app,一端发布多端通用,目前已经适配 H5、微信小程序、QQ小程序、Ios App、Android App。目前开源的版本功能为 V1 版,更多增强功能(V2、V3)敬请期待。

 

一、安装 RageFrame (2.6.0以上)

RageFrame 遵循 Apache2 开源协议发布,并提供免费使用。

项目介绍:https://github.com/jianyan74/rageframe2

安装文档:https://github.com/jianyan74/rageframe2/blob/master/docs/guide-zh-CN/start-installation.md

环境要求

  • PHP >= 7.2 (卸载邮件依赖 7.1.3 亦可,win7下配置php7.2到PATH)
  • PHP cURL 扩展
  • PHP OpenSSL 扩展
  • PHP fileinfo 拓展 素材管理模块需要用到
  • Mysql >= 5.7
  • Apache 或 Nginx
  • Composer 

用于管理第三方扩展包,

win环境在https://getcomposer.org/download/下载Composer-Setup.exe安装,

linux宝塔

在软件商店安装需要的php7.2版本

登陆ssh或者用面板自带的“宝塔SSH终端”

运行命令:rm -f /usr/bin/php

比如要改到php7.2版本的composer就要再次运行一下的命令:

ln -sf /www/server/php/72/bin/php /usr/bin/php

默认安装的PHP是禁用了proc_open与putenv两个函数,

打开就可以愉快的composer install了!

  • 安装CA证书 (windows开发环境下)

CA证书参考:
https://blog.csdn.net/ijijni/article/details/86537234

必须先看环境搭建文档,安装完毕后务必配置站点和对应的伪静态还有常见问题文档

安装

1、克隆

git clone https://github.com/jianyan74/rageframe2.git

2、进入目录

cd rageframe2

3、安装依赖

// 如果你只有 php 7.1 也可以忽略版本进行安装 php composer.phar install --ignore-platform-reqs

php composer.phar install 



遇到问题:
Warning: putenv() has been disabled for security reasons in...

编辑php.ini文件
disable_functions = scandir,passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,fsocket,fsockopen
去掉putenv或者在disable_functions 添加;分号注释,
保存并重起php即可。

使用代理或者使用国内源:

解决方法,更改 Packagist 为国内镜像,不知道会不会对后续操作有影响,反正现在是可以了:
composer config -g repo.packagist composer https://packagist.phpcomposer.com

Cloning failed using an ssh key for authentication, enter your GitHub credential
s to access private repos
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+
on+%5B0x77489020%5D+ANOMALY%3A+meaningless+REX+prefix+used%0D%0AWIN7AN3+2020-04-
12+2251
to retrieve a token. It will be stored in "C:/Users/Admin/AppData/Roaming/Compos
er/auth.json" for future use by Composer.
Token (hidden):
    Failed to download kartik-v/yii2-widget-datepicker from source: The 'https:/
/api.github.com/' URL could not be accessed: HTTP/1.0 400 Bad Request

    Now trying to download from dist


重新获取token:
https://blog.csdn.net/weixin_34062329/article/details/86000735



  - Installing swoole/ide-helper (dev-master a7bae64): Failed to update https://
github.com/swoole/ide-helper.git in cache, package installation for swoole/ide-h
elper might fail.
Cloning a7bae64317 from cache
    Failed to download swoole/ide-helper from source: Failed to execute git clon
e --no-checkout "C:/Users/Admin/AppData/Local/Composer/vcs/https---github.com-sw
oole-ide-helper.git/" "E:\WebSite\PHP\www\llj\ragefram\rageframe2\vendor\swoole\
ide-helper" --dissociate --reference "C:/Users/Admin/AppData/Local/Composer/vcs/
https---github.com-swoole-ide-helper.git/" && cd /D "E:\WebSite\PHP\www\llj\rage
fram\rageframe2\vendor\swoole\ide-helper" && git remote set-url origin "https://
github.com/swoole/ide-helper.git.git" && git remote add composer "https://github
.com/swoole/ide-helper.git.git"

Cloning into 'E:\WebSite\PHP\www\llj\ragefram\rageframe2\vendor\swoole\ide-helpe
r'...
done.
fatal: repack: Expecting full hex object ID lines only from pack-objects.
fatal: cannot repack to clean up

    Now trying to download from dist
  - Installing swoole/ide-helper (dev-master a7bae64): Downloading (connecting..
Downloading (100%)
  - Installing yiisoft/yii2-bootstrap (2.0.10): Downloading (100%)
  - Installing yiisoft/yii2-debug (2.0.14): Downloading (100%)
  - Installing fzaninotto/faker (v1.9.1): Downloading (100%)
  - Installing yiisoft/yii2-faker (2.0.4): Downloading (100%)
  - Installing phpspec/php-diff (v1.1.0): Downloading (100%)
  - Installing bower-asset/typeahead.js (v0.11.1): Downloading (connecting...)
  Failed to download bower-asset/typeahead.js from dist: The 'https://api.github
.com/repos/twitter/typeahead.js/zipball/588440f66559714280628a4f9799f0c4eb880a4a
' URL could not be accessed: HTTP/1.0 400 Bad Request

    Now trying to download from source
  - Installing bower-asset/typeahead.js (v0.11.1): Cloning 588440f665


  [RuntimeException]
  Failed to execute git clone --no-checkout "https://7f208908497b155a0e941435
  a1c1239f5b113d26%0A%5B0x77489020%5D%20ANOMALY%3A%20meaningless%20REX%20pref
  ix%20used:***@github.com/twitter/typeahead.js.git" "E:\WebSite\PHP\www\llj\
  ragefram\rageframe2\vendor\bower-asset\typeahead.js" && cd /D "E:\WebSite\P
  HP\www\llj\ragefram\rageframe2\vendor\bower-asset\typeahead.js" && git remo
  te add composer "https://7f208908497b155a0e941435a1c1239f5b113d26%0A%5B0x77
  489020%5D%20ANOMALY%3A%20meaningless%20REX%20prefix%20used:***@github.com/t
  witter/typeahead.js.git" && git fetch composer && git remote set-url origin
   "https://github.com/twitter/typeahead.js.git" && git remote set-url compos
  er "https://github.com/twitter/typeahead.js.git"

  Cloning into 'E:\WebSite\PHP\www\llj\ragefram\rageframe2\vendor\bower-asset
  \typeahead.js'...
  fatal:***@github.com/twitter/typeahead.js.git/': URL using bad/illegal form
  at or missing URL


install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-c
ustom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest
] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative]
 [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...

4、初始化项目

php init // 然后输入0回车,再输入yes回车

5、配置数据库信息

找到 common/config/main-local.php 并配置相应的信息, 注意要先创建好数据库

6、安装数据库(Mysql5.7及以上)

php ./yii migrate/up

7、初始化账号密码,一键创建总管理员账号密码(注意保存)

php ./yii password/init

截止到这里就安装完成了,可以去配置站点了,下面(8、9步骤)的都是根据自己实际的情况去执行

8、建议更新第三方扩展包(可选)

php composer.phar update

9、Linux 下文件缓存权限授权

Linux 环境下如果是文件缓存去 backend/runtime 目录执行一下 chmod -R 777 cache,不执行可能会造成修改了网站设置缓存不生效的情况

站点配置

注意:Nginx/IIS 先要设置好伪静态,Apache 默认已配置

伪静态

目录

  • Nginx
  • Apache
  • IIS

Nginx

推荐配置

location / {
    try_files $uri $uri/ /index.php$is_args$args;
}
location /backend {
    try_files $uri $uri/ /backend/index.php$is_args$args;
}
location /api {
    try_files $uri $uri/ /api/index.php$is_args$args;
}
location /merchant {
    try_files $uri $uri/ /merchant/index.php$is_args$args;
}
location /merapi {
    try_files $uri $uri/ /merapi/index.php$is_args$args;
}
location /html5 {
    try_files $uri $uri/ /html5/index.php$is_args$args;
}
location /oauth2 {
    try_files $uri $uri/ /oauth2/index.php$is_args$args;
}

类似Apache的配置

location / 
{
     index  index.html index.htm index.php;

     if (!-e $request_filename) {
           rewrite ^/backend(.*)$ /backend/index.php?s=$1 last;
           rewrite ^/merchant(.*)$ /merchant/index.php?s=$1 last;
           rewrite ^/merapi(.*)$ /merapi/index.php?s=$1 last;
           rewrite ^/api(.*)$ /api/index.php?s=$1 last;
           rewrite ^/html5(.*)$ /html5/index.php?s=$1 last;
           rewrite ^/oauth2(.*)$ /oauth2/index.php?s=$1 last;
           rewrite ^/(.*)$ /index.php?s=$1 last;
           break;
     }
         
     #autoindex  on;
}

Apache

注意系统默认自带了.htaccess,所以环境如果是apache可以不用再配置

Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php

IIS...

https://github.com/jianyan74/rageframe2/blob/master/docs/guide-zh-CN/start-rewrite.md

 

站点指向目录为当前项目的web下

例如:

/path/to/rageframe2/web/

访问说明

应用Url
后台当前域名/backend
商户当前域名/merchant
商户接口当前域名/merapi
Html5当前域名/html5
Api当前域名/api
OAuth2当前域名/oauth2

安装成功后如果需要微信公众号管理、商户管理等等功能,请到 系统管理->应用管理 进行安装插件

 

 

 

 

 

二、安装TinyShop

git clone https://github.com/jianyan74/TinyShop.git

2、拷贝进 RageFrame 根目录的 addons 目录下

3、RageFrame 后台进入 系统管理->应用管理->安装插件->找到在微商城进行安装

4、刷新整个后台页面后进行查看

 

 

 

 

三,前端 uni-app

 

安装运行

1. HBuilderX导入

  1. 使用HBuilderX导入
  2. 点击菜单栏 -> 运行 直接运行对应设备

2. vue-cli命令运行

推荐使用yarn命令,使用npm/cnpm会存在报错问题。

  1. 去github上clone项目至本地
  2. 进入项目目录,安装相关依赖
// 安装yarn命令
npm i -g yarn
// 安装依赖
yarn

3. 运行到指定平台

// 运行到H5
yarn serve
// 运行至对应的小程序平台 
yarn dev:PLATFORM // PLATFORM的值可以是 mp-weixin mp-alipay mp-baidu mp-toutiao mp-qq

接口配置文件:/src/api/params.js
// 主机地址
const hostUrl = "http://localhost:8080";
// 后台接口请求地址
const baseUrl = "http://b.com/api";

 

小程序微信登录有点问题:

Request URL: http://b.com/api/tiny-shop/v1/third-party/wechat-mp
Request Method: POST

type: "GuzzleHttp\Exception\RequestException"
file: "rageframe2\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php"
errorMessage: "cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)"
line: 201

rageframe2\addons\TinyShop\api\modules\v1\controllers\ThirdPartyController.php
68行:public function actionWechatMp(){}


https://curl.haxx.se/docs/caextract.html
下载cacert.pem
并在php.ini文件添加
curl.cainfo="D:/php72/extras/ssl/cacert.pem"
openssl.cafile="D:/php72/extras/ssl/cacert.pem"

参考:
https://blog.csdn.net/ijijni/article/details/86537234

 

 

4. 打包至线上部署

// H5打包
yarn build
// 打包至对应的小程序平台 
yarn build:PLATFORM // 平台信息同上




//HbuilderX 用android studio 本地打包app                ************
https://blog.csdn.net/cuberk/article/details/103647190

// Android 平台 HTML5+ SDK的集成(HBuilder离线打包)    ************
https://blog.csdn.net/qq_33337504/article/details/80061055

//HBuilderX生成本地打包App资源                        *************
https://ask.dcloud.net.cn/question/60254

//Android离线打包(支持广告)
https://ask.dcloud.net.cn/article/13141

//uni-app离线打包Android平台注意事项
https://ask.dcloud.net.cn/article/35139


//APP:
//Android平台本地(离线)打包指南 - Android Studio
https://ask.dcloud.net.cn/article/508

//iOS离线打包
https://ask.dcloud.net.cn/article/41

//DCloud appid 用途/作用/使用说明
https://ask.dcloud.net.cn/article/35907

//Android平台云端打包 - 公共测试证书
https://ask.dcloud.net.cn/article/36522

//iOS证书(.p12)和描述文件(.mobileprovision)申请
https://ask.dcloud.net.cn/article/152

 

 

导出本地app编译包时,遇到错误:

未检测到微信web开发者工具,即使开发App也需要此工具。如已安装,请确认路径配置是否正确(HBuilderX设置-运行配置-微信开发者工具路径),或检查是否微信工具版本过低

解决方法:

重新安装正式版微信开发工具

 

  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
### 回答1: smartrf flash programmer是一款用于编程和调试无线电设备的软件。安装该软件需要按照以下步骤进行: 1. 首先,从TI官网下载smartrf flash programmer软件安装包。 2. 打开安装包,按照提示进行安装。在安装过程中,需要选择安装路径和安装组件。 3. 安装完成后,打开smartrf flash programmer软件。在软件界面中,可以选择设备类型、端口和波特率等参数。 4. 连接无线电设备到计算机,并按照设备连接方式进行设置。 5. 在smartrf flash programmer软件中,选择需要编程的程序或固件,并进行编程和调试操作。 总之,smartrf flash programmer是一款功能强大的无线电设备编程和调试软件,安装和使用都比较简单。 ### 回答2: Smartrf Flash Programmer是一款用于编程TI公司的无线芯片的软件,使用它可以对TI公司的无线芯片进行特定的编程操作,包括各种参数的修改、程序的烧录等。该软件的安装较为繁琐,以下是安装Smartrf Flash Programmer的步骤: 第一步,前往TI公司官网下载Smartrf Flash Programmer软件安装包。在官网下载页面中,找到Smartrf Flash Programmer的入口,选择下载适合自己操作系统的软件安装包。 第二步,双击下载的安装包进行安装。在安装过程中,需要按照软件提示选择安装路径、选择需要安装的组件,设置快捷方式等。 第三步,启动Smartrf Flash Programmer软件。在第一次启动时,需要进行一些设置。首先,选择使用的接口类型,根据自己编程使用的无线芯片型号以及所用的编程工具选择相应的接口类型。同时,还需要设置目标设备的型号、厂商、Flash大小等参数。 第四步,进行编程操作。将需要编程的无线芯片连接上电脑,并进行相应的连接、校验等步骤,如出现错误提示,需要根据提示进行处理。在编程完成后,再次进行连接的检测以及程序的校验等操作,确保编程成功。 总体来说,Smartrf Flash Programmer是一款十分实用的无线芯片编程软件,通过以上步骤可以较为方便地安装和使用。但是,在进行编程操作时,需要注意相关的细节和操作步骤,以确保编程等操作的顺利完成。 ### 回答3: Smartrf flash programmer是一款用于CCxxxx系列控制器固件编程的软件。在使用该软件之前,我们需要先将其安装到电脑上。以下是安装步骤: 第一步:下载软件 在TI官网上下载Smartrf flash programmer。下载完成后解压缩压缩包,找到“setup.exe”文件。 第二步:安装软件 执行“setup.exe”文件,进入安装界面,在其中可以选择需要安装的组件。建议将所有组件都安装上,以便更好地支持控制器的固件编程。安装过程中需要选择安装路径,这里建议直接使用默认路径即可。等待安装完成后,点击“完成”按钮退出安装程序。 第三步:连接设备 Smartrf flash programmer需要通过USB连接计算机和目标设备。所以在把编程器接入计算机前需要先安装驱动程序。根据不同的操作系统,需下载对应的驱动程序并完成安装。 第四步:启动软件 安装完成后,可以在桌面上找到软件图标双击启动。如果安装路径不在桌面上,也可以通过搜索或进入安装路径手动启动软件。 到这里,安装就已经完成了。接下来,您可以使用Smartrf flash programmer进行CCxxxx系列控制器的固件编程了。需要注意的是,在使用Smartrf flash programmer之前,最好先阅读一下使用手册,了解其操作及相关注意事项,以确保成功完成固件编程工作。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值