preface

This is in the cloud flash pay small program development process of some records, priority in GitHub and language sparrow update, welcome to pay attention to add star

record

Tread pit record 1

Official document UnionPay open platform access technology Gitee

Online information is less, the documents also write a long story, cloud flash pay has a QQ group 457767672, there are their technical personnel, a point to add group first!! You can also go to their Gitee to raise issues.

Pit record 2

First find the boss or operation and maintenance to test the server, cloud flash developer tools are a long story, the key moment or can only be real machine test.

Pit record 3

Introduction of front-end SDK, it is not recommended to use the third party SDK plug-in above NPM, direct introduction of upSDK index.html, Simple and crude has no side effects < script type = “text/javascript” SRC = “https://open.95516.com/s/open/js/upsdk.js” > < / script >

Pit record 4

useupsdk.configInitialize thesdk, applet inside can not initialize (applet openWebview, webviewIf you want to use the small program capability, you may need to use it, haven’t tried), don’t bother with this, and the back end of this for a long time.

Pit record 5

Upsdk. getLocationGps getLocationGps getLocationGps getLocationGps getLocationGps getLocationGps getLocationGps getLocationGps getLocationGps getLocationGps getLocationGps getLocationGps getLocationGps getLocationGps getLocationGps let position = typeof res === ‘string’? JSON. Parse (res) : res

Pit record 6

Authorization Component documentationOpentools.95516.com/applet/#/do…

//mainjs
import VueCupUI from './static/vue-cup-ui/lib/vue-cup-ui.umd.js'
import './static/vue-cup-ui/lib/vue-cup-ui.css'
Vue.use(VueCupUI)
Copy the code
<! <template> <UPButton class="login" scope="scope.mobile" @click="getPhoneNumber"> </UPButton> </template> <script> export default { methods: GetPhoneNumber (e, err, result) {if (err) {console.log(' Authorization failed, This. LoginByAuth (result.code)}},},} </script>Copy the code

Pit record 7

Own less upconsole debugging tool function, can match eruda use www.npmjs.com/package/eru…

Pit record 8

In ios, go to the second page from the home page and click the reload button of the capsule. This will return to the home page, but the navigation bar will show a back button. 0}) can not be removed, the official reply is a framework problem (do not use document.title with document.

Pit record 9

async pay() {
      let tn = await getTN()
      upsdk.pay({
        tn,
        success: function() {
          payTime = setInterval(() = > {
            // check the payment status
          }, 1000)},fail: function(err) {
          console.log('err=>', err.msg)
        },
      })
    },
Copy the code

Pit record 10

The Flex layout has some problems on Android

conclusion

First published in the finch documentation @is_tao