银行基线挖坑笔记

Taro行内样式转化规则无效
在编译时,Taro 会帮你对样式做尺寸转换操作,但是如果是在 JS 中书写了行内样式,那么编译时就无法做替换了,针对这种情况,Taro 提供了 API Taro.pxTransform 来做运行时的尺寸转换。

<View className='index' style={{height:Taro.pxTransform(40)}}>
    <Text className='text'>Hello world!</Text>
</View>

AppServer长啥样

方法写在fundapp-service。
model/interface在父目录,implementation/class在/impl
class路径:
fundapp-service\src\main\java\com\hundsun\fund\fundapp\service\product\impl\ProductServiceImpl.java
interface路径:
fundapp-service\src\main\java\com\hundsun\fund\fundapp\service\product\ProductService.java

Server routing/mapping写在fundapp-server
fundapp-server\src\main\java\com\hundsun\fund\fundapp\server\product\ProductController.java

  1. 引入 fundapp/service/product目录下的ProductService.java
    import com.hundsun.fund.fundapp.service.product.ProductService;

  2. 使用引入的ProductService
    主routing为/product/product,当get /product/product/productInfoList.json时调用productInfoList方法,该方法调用productService.productInfoList

@Api(basePath = "/product",value = "产品信息",tags = "产品信息")
@Controller
@RequestMapping("/product/product")
public class ProductController {
    @Autowired
    private ProductService productService;

    @ApiOperation(value = "产品列表,客户端使用",response = ProductInfoVM.class)
    @RequestMapping(value = "/productInfoList.json",method = {RequestMethod.GET,RequestMethod.POST})
    @ResponseBody
    public ViewModelAdapter productInfoList(@ModelAttribute FundStateQueryParam param){
        return productService.productInfoList(param);
    }
}

原生打包配置

如何修改arr模板库

替换lib中的miniappgmu.aar

如何修改前端模板库

可以直接将zip重命名为版本号后放进miniapp文件夹,文件夹中根据最高的版本号打包

如何打离线包

将编译好的文件放到stream/main/0.0.0中

如何打远程包

main.gmu中将默认main.vhost.light.com改为自己的本地地址。

如何指定路径和拼接入参

后面填入pages页面路径,后面拼接入参。需要注意需要encodeURI。
encode之前:
gmu://miniapp?standaloneMode=false&startPage=http://192.168.137.1:4777/app.miniapp.js#pages/index/home?name=LDY681&text=jsnToMiniprogramDemo
encode之后:
gmu://miniapp?standaloneMode=false&startPage=http%3A%2F%2F192.168.137.1%3A4777%2Fapp.miniapp.js%23pages%2Findex%2Fhome%3Fname%3DLDY681%26text%3DjsnToMiniprogramDemo

如何打摇一摇

需要增加以下6个依赖,build.gradle中加入依赖

    implementation(name: 'jsndebug', ext: 'aar')
    implementation(name: 'lightviewpreview', ext: 'aar')
    implementation(name: 'miniappdebug', ext: 'aar')
    implementation(name: 'jsnativegmu', ext: 'aar')
    implementation(name: 'barcodegmu-release', ext: 'aar')
    implementation(name: 'servicegmu-release', ext: 'aar')

www中增加入口页面

入口页面是带了摇一摇功能的几个tab页,第二个tab页可以直接点击进入默认的小程序 。配置地址方式和之前一样

app指向www页面

通过web方式打开www中的index.html

现在研发中心支持3种方式
如果是js打头的,那么就是走原来老light的jsnative
如果是miniapp打头的,那么就是走小程序的lightweb
如果是web,那就是web