Zhezheng nail stepping pit record: real machine debugging-H5APP does not exist


​Although the official

Unified project background : uniAPP wrote DingTalk applet (ZhezhengTalk), some problems encountered

1. Problem: Debugging on the real machine - the QR code cannot be displayed or the H5APP does not exist

Solution: check the configuration --> locate the problem

1. Project directory execution :

npm install gdt-jsapi

2. Add the main.js file

import dd from 'gdt-jsapi'

3. Add DingTalk configuration to package.json

    "uni-app": {
        "scripts": {
            "mp-dingtalk": {
                "title": "钉钉小程序",
                "env": {
                    "UNI_PLATFORM": "mp-alipay"
                },
                "define": {
                    "MP-DINGTALK": true
                }
            }
        }
    }

4. Alipay developer tool, left toolbar configuration (mPaas toolbox): set whitelist

Where to find the whitelist (⊙o⊙) Operation steps

For official documents, refer to Management Workbench - Organization and Personnel Management, click on the details of the corresponding person to obtain the developer UID. ​Fill in the UID in
the developer 5. Associated application
Copy the UID here


If the above steps have been executed, there is still no way to preview on the real machine》》》》》

The compilation log shows

1. Replace the whitelist,
2. Replace the associated applet, or create a new applet in the workbench and associate it

These two steps have been tried back and forth, and the personal test can solve the problem of Error: H5APP does not exist

2. Problem: scan the code to debug on the real machine, and the page keeps loading

bug screenshot
**Solution: **Click on the upper right corner of the developer tools - [Details]
insert image description here

3. Problem: The DingTalk applet, both local and real machine debugging are normal, the version is the latest, and the workbench is still opened with the previous version

Solution: The problem of version update, you can try to update the version multiple times, the version is sometimes a little bit, something like cache exists

4. Problem: white screen error: system error, please try again later

Solution:
Component compatibility problem: the picker tag cannot be used, and it needs to be replaced with picker-view

//以下是例子
     <uni-popup ref="selePop" type="bottom" :mask-click="false">
		<view @click="seleClose" style="font-size: 40rpx; color: #000000; width: 100vw;background: #FFFFFF;padding: 20rpx 40rpx;">关闭</view>
			<picker-view  :value="selType" @change="selectType" class="picker-view">
				<picker-view-column>
					<view class="item" v-for="(item,index) in problemType" :key="index">{
    
    {
    
    item}}</view>
				</picker-view-column>
			</picker-view>
	</uni-popup>
	
{
    
    {
    
    (selType !== null && selType !== undefined)?problemType[selType]:'请选择'}}
					 

//data:
	selType:null,//选择的整改状态
	problemType:['整改中','已整改'],

//js
seleOpen(){
    
    
	this.$refs.selePop.open()
	},
seleClose(){
    
    
	this.$refs.selePop.close()
	},
// 选择场所类型
selectType(e){
    
    
	console.log(e.detail.value)		
	this.selType = e.detail.value
},				

Guess you like

Origin blog.csdn.net/qq_21113235/article/details/125598345