mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-12 06:15:38 +08:00
style(custom): scope
This commit is contained in:
@@ -64,7 +64,6 @@ APP_CDN_BUCKET=unat-bucket
|
||||
# 更换命令:npm install -g cnpm --registry=https://registry.npm.taobao.org
|
||||
|
||||
# 先安装插件
|
||||
npm install @shopex/taro-plugin-modules -S --registry=http://registry.npm.ishopex.cn
|
||||
|
||||
# 再安装其他依赖
|
||||
npm install
|
||||
|
||||
1078
companys.conf
1078
companys.conf
File diff suppressed because it is too large
Load Diff
@@ -82,7 +82,6 @@ const config = {
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
// '@shopex/taro-plugin-modules',
|
||||
// path.join(__dirname, "../src/plugin/test.js")
|
||||
// path.join(__dirname, "./modify-taro.js")
|
||||
],
|
||||
|
||||
132
dev.sh
132
dev.sh
@@ -1,132 +0,0 @@
|
||||
###
|
||||
# @Author: Arvin
|
||||
# @GitHub: https://github.com/973749104
|
||||
# @Blog: https://liuhgxu.com
|
||||
# @Description: 说明
|
||||
# @FilePath: /unite-vshop/dev.sh
|
||||
# @Date: 2020-06-10 10:15:51
|
||||
# @LastEditors: PrendsMoi
|
||||
# @LastEditTime: 2021-04-01 16:09:56
|
||||
###
|
||||
#/usr/bash
|
||||
|
||||
cd $(dirname "$0")
|
||||
|
||||
conf="companys.conf"
|
||||
if [ ! -n "$1" ]
|
||||
then
|
||||
if [ ! -f ${conf} ]
|
||||
then
|
||||
echo "not find companys.conf"
|
||||
exit
|
||||
else
|
||||
sections=`sed -n '/\[*\]/p' ${conf} |grep -v '^#'|tr -d []`
|
||||
fi
|
||||
|
||||
COLUMNS=1
|
||||
echo "选择需要发布的客户"
|
||||
select var in ${sections};
|
||||
do
|
||||
if [ ! -n "$var" ]
|
||||
then
|
||||
echo "请选择正确的数字"
|
||||
exit
|
||||
fi
|
||||
appid=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^appid/{print $3}')
|
||||
baseUrl=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^base_url/{print $3}')
|
||||
appName=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^app_name/{print $3}')
|
||||
websocket=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^websocket/{print $3}')
|
||||
company_id=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^company_id/{print $3}')
|
||||
platform=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^platform/{print $3}')
|
||||
custom_server=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^custom_server/{print $3}')
|
||||
home_page=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^home_page/{print $3}')
|
||||
map_key=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^map_key/{print $3}')
|
||||
map_name=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^map_name/{print $3}')
|
||||
image_cdn=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^image_cdn/{print $3}')
|
||||
break
|
||||
done
|
||||
else
|
||||
appid=${1}
|
||||
baseUrl=${2}
|
||||
appName=${3}
|
||||
websocket=${4}
|
||||
company_id=${5}
|
||||
platform=${6}
|
||||
custom_server=${7}
|
||||
home_page=${8}
|
||||
map_key=${9}
|
||||
map_name=${10}
|
||||
image_cdn=${11}
|
||||
fi
|
||||
|
||||
# version=$(git describe --tags `git rev-list --tags --max-count=1`)
|
||||
# desc="微商城小程序"
|
||||
|
||||
# 需要被替换的小程序appid,在./src/ext.json和 ./project.config.json
|
||||
# oldAppid="wx912913df9fef6ddd"
|
||||
# oldAppName="通用小程序"
|
||||
|
||||
# if grep -q ${oldAppid} ./src/ext.json
|
||||
# then
|
||||
# sed -i "" "s#${oldAppid}#${appid}#g" ./src/ext.json
|
||||
# sed -i "" "s#${oldAppName}#${appName}#g" ./src/ext.json
|
||||
# sed -i "" "s#${oldAppid}#${appid}#g" ./project.config.json
|
||||
# echo "【SUCCESS】替换appid成功"
|
||||
# else
|
||||
# echo "【ERROR】待替换的小程序APPID ${oldAppid} 在./src/ext.json 中不存在"
|
||||
# exit
|
||||
# fi
|
||||
|
||||
echo '{
|
||||
"extEnable": true,
|
||||
"extAppid": "'${appid}'",
|
||||
"ext": {
|
||||
"company_id": "'${company_id}'",
|
||||
"appid": "'${appid}'",
|
||||
"wxa_name": "'${appName}'"
|
||||
},
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTitleText": "微商城",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}' > ./src/ext.json
|
||||
|
||||
echo 'APP_BASE_URL='${baseUrl}'
|
||||
APP_WEBSOCKET='${websocket}'
|
||||
APP_COMPANY_ID='${company_id}'
|
||||
APP_PLATFORM='${platform}'
|
||||
APP_CUSTOM_SERVER='${custom_server}'
|
||||
APP_HOME_PAGE='${home_page}'
|
||||
APP_TRACK=youshu
|
||||
APP_YOUSHU_TOKEN=bi281e87ab2424481a
|
||||
APP_ID='${appid}'
|
||||
APP_MAP_KEY='${map_key}'
|
||||
APP_MAP_NAME='${map_name}'
|
||||
APP_IMAGE_CDN='${image_cdn}'
|
||||
APP_DIANWU_URL='
|
||||
|
||||
> ./.env
|
||||
|
||||
|
||||
echo "请选择编译方式"
|
||||
|
||||
buildType="WEAPP H5"
|
||||
|
||||
select type in $buildType
|
||||
do
|
||||
if [ "$type" = 'WEAPP' ];then
|
||||
if [ "$(uname)" == "Darwin" ]
|
||||
then
|
||||
echo "npm run dev:weapp"
|
||||
npm run dev:weapp
|
||||
else
|
||||
echo "npm run dev:weapp:windows"
|
||||
npm run dev:weapp:windows
|
||||
fi
|
||||
else
|
||||
npm run dev:h5
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"description": "taro app for bbc",
|
||||
"scripts": {
|
||||
"clean": "rm -rf node_modules/.cache",
|
||||
"release:h5": "RELEASE=h5 npm run build:h5",
|
||||
"lint": "prettier-eslint 'src/**/*.{js,jsx}' --write",
|
||||
"build:weapp": "taro build --type weapp --trace-warnings",
|
||||
"build:weapp:live": "cross-env APP_LIVE=true taro build --type weapp --trace-warnings",
|
||||
@@ -39,7 +38,6 @@
|
||||
"husky:add": "npx husky add .husky/pre-commit 'npx --no-install lint-staged' & npx husky add .husky/commit-msg 'npx --no-install commitlint --edit \"$1\"'"
|
||||
},
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "16.16.0"
|
||||
},
|
||||
|
||||
135
run.sh
135
run.sh
@@ -1,135 +0,0 @@
|
||||
#/usr/bash
|
||||
|
||||
cd $(dirname "$0")
|
||||
|
||||
conf="companys.conf"
|
||||
if [ ! -n "$1" ]
|
||||
then
|
||||
if [ ! -f ${conf} ]
|
||||
then
|
||||
echo "not find companys.conf"
|
||||
exit
|
||||
else
|
||||
sections=`sed -n '/\[*\]/p' ${conf} |grep -v '^#'|tr -d []`
|
||||
fi
|
||||
|
||||
COLUMNS=1
|
||||
echo "选择需要发布的客户"
|
||||
select var in ${sections};
|
||||
do
|
||||
if [ ! -n "$var" ]
|
||||
then
|
||||
echo "请选择正确的数字"
|
||||
exit
|
||||
fi
|
||||
appid=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^appid/{print $3}')
|
||||
baseUrl=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^base_url/{print $3}')
|
||||
appName=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^app_name/{print $3}')
|
||||
websocket=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^websocket/{print $3}')
|
||||
company_id=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^company_id/{print $3}')
|
||||
platform=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^platform/{print $3}')
|
||||
custom_server=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^custom_server/{print $3}')
|
||||
home_page=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^home_page/{print $3}')
|
||||
map_key=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^map_key/{print $3}')
|
||||
map_name=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^map_name/{print $3}')
|
||||
image_cdn=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^image_cdn/{print $3}')
|
||||
ali_isvid=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^ali_isvid/{print $3}')
|
||||
dianwu_url=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^dianwu_url/{print $3}')
|
||||
merchant_url=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^merchant_url/{print $3}')
|
||||
adapay=$(sed -n '/\['$var'\]/,/^$/p' $conf|grep -Ev '\[|\]|^$'|awk '/^adapay/{print $3}')
|
||||
break
|
||||
done
|
||||
else
|
||||
appid=${1}
|
||||
baseUrl=${2}
|
||||
appName=${3}
|
||||
websocket=${4}
|
||||
company_id=${5}
|
||||
platform=${6}
|
||||
custom_server=${7}
|
||||
home_page=${8}
|
||||
map_key=${9}
|
||||
map_name=${10}
|
||||
image_cdn=${11}
|
||||
ali_isvid=${12}
|
||||
dianwu_url=${13}
|
||||
merchant_url=${14}
|
||||
adapay=${15}
|
||||
fi
|
||||
|
||||
# version=$(git describe --tags `git rev-list --tags --max-count=1`)
|
||||
# desc="微商城小程序"
|
||||
|
||||
# 需要被替换的小程序appid,在./src/ext.json和 ./project.config.json
|
||||
# oldAppid="wx912913df9fef6ddd"
|
||||
# oldAppName="通用小程序"
|
||||
|
||||
# if grep -q ${oldAppid} ./src/ext.json
|
||||
# then
|
||||
# sed -i "" "s#${oldAppid}#${appid}#g" ./src/ext.json
|
||||
# sed -i "" "s#${oldAppName}#${appName}#g" ./src/ext.json
|
||||
# sed -i "" "s#${oldAppid}#${appid}#g" ./project.config.json
|
||||
# echo "【SUCCESS】替换appid成功"
|
||||
# else
|
||||
# echo "【ERROR】待替换的小程序APPID ${oldAppid} 在./src/ext.json 中不存在"
|
||||
# exit
|
||||
# fi
|
||||
|
||||
# PROJECT_FILE_PATH='./project.config.json'
|
||||
# oldappid=$(cat ${PROJECT_FILE_PATH} | sed 's/,/\n/g' | grep "appid" | sed 's/:/\n/g' | sed '1d' | sed 's/}//g')
|
||||
# sed -i "" "s#${oldappid}#\"${appid}\"#g" ${PROJECT_FILE_PATH}
|
||||
|
||||
echo '{
|
||||
"extEnable": true,
|
||||
"extAppid": "'${appid}'",
|
||||
"ext": {
|
||||
"company_id": "'${company_id}'",
|
||||
"appid": "'${appid}'",
|
||||
"wxa_name": "'${appName}'",
|
||||
"ali_isvid":"'${ali_isvid}'"
|
||||
},
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTitleText": "微商城",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}' > ./src/ext.json
|
||||
|
||||
echo 'APP_BASE_URL='${baseUrl}'
|
||||
APP_WEBSOCKET='${websocket}'
|
||||
APP_COMPANY_ID='${company_id}'
|
||||
APP_PLATFORM='${platform}'
|
||||
APP_CUSTOM_SERVER='${custom_server}'
|
||||
APP_HOME_PAGE='${home_page}'
|
||||
APP_TRACK=youshu
|
||||
APP_YOUSHU_TOKEN=bi281e87ab2424481a
|
||||
APP_ID='${appid}'
|
||||
APP_MAP_KEY='${map_key}'
|
||||
APP_MAP_NAME='${map_name}'
|
||||
APP_IMAGE_CDN='${image_cdn}'
|
||||
APP_DIANWU_URL='${dianwu_url}'
|
||||
APP_MERCHANT_URL='${merchant_url}'
|
||||
APP_ADAPAY='${adapay}'
|
||||
' > ./.env
|
||||
|
||||
echo "请选择编译方式"
|
||||
|
||||
buildType='weapp h5 alipay'
|
||||
|
||||
select type in $buildType
|
||||
do
|
||||
if [ "$type" == 'weapp' ]
|
||||
then
|
||||
echo "npm run build:weapp"
|
||||
npm run build:weapp
|
||||
elif [ "$type" == 'alipay' ]
|
||||
then
|
||||
echo "npm run build:alipay"
|
||||
npm run build:h5
|
||||
else
|
||||
echo "npm run build:h5"
|
||||
npm run build:alipay
|
||||
fi
|
||||
break
|
||||
done
|
||||
Reference in New Issue
Block a user