Problem Description
The errorMessage shows "Not authorized to call across domains" because no secure domain name is configured in the background of the DingTalk applet.
resolution process
Official bug solution:
The solution given by the help center is: configure all the addresses accessed by the front end of the applet into the "safe domain name" of the applet.
Then I went to add the domain name I requested under "Safe domain name". [DingTalk Open Platform ——> Application Development——> Small Programs —> Security and Monitoring —> Security Center]
However, the error is still repeated (in fact, some "children's shoes" can be successfully resolved after configuring this, and an explanation will be given later). Later, my partner and I searched a lot of documents, and finally found a solution in the comment area of an article. method:
Because our project uses the api interface provided by the DingTalk development platform, we not only need to add the domain name of the background server, but also the domain name provided by the DingTalk development platform.
According to the solution provided by the help center, if it is an already released applet, the version needs to be republished after reconfiguring the security domain name.
The above is the whole process of solving this bug, if there is any mistake, please correct me!