小程序
小游戏
企业微信
微信支付
扫描小程序码分享
如红圈所示,只发了部分长度的文件。遇到这种情况,wx.cloud.uploadFile会返回fail 吗?
1 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
补充:有关程序
puke:function(){//生成32副随机牌套并发到云存储(名为puke+屋号.txt)
var i,ii,iii,j,j1,j2,j3,j4,k,aaa='',bbb=15
var x=[]
var pk=["","SA","SK","SQ","SJ","ST","S9","S8","S7","S6","S5","S4","S3","S2",
"HA","HK","HQ","HJ","HT","H9","H8","H7","H6","H5","H4","H3","H2",
"DA","DK","DQ","DJ","DT","D9","D8","D7","D6","D5","D4","D3","D2",
"CA","CK","CQ","CJ","CT","C9","C8","C7","C6","C5","C4","C3","C2"]
var sss=[],hhh=[],ddd=[],ccc=[]
var text1=["","","","",""]
var text2=["","","","",""]
var text3=["","","","",""]
var text4=["","","","",""]
var ns=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var nh=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var nd=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var nc=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var es=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var eh=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var ed=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var ec=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var ws=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var wh=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var wd=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var wc=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var ss=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var sh=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var sd=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var sc=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var fsm = wx.getFileSystemManager()
........//省略无关语句
fsm.writeFile({ //先建立一个空文件:puke.txt
filePath: wx.env.USER_DATA_PATH + '/puke.txt',
data: (""),
encoding: 'utf-8',
})
for( i=1;i<=32;i++){
fsm.appendFile({
data: (//和打牌桌面一致,按南西北东顺序排
'"'+ss[i]+'""'+sh[i]+'""'+sd[i]+'""'+sc[i]+'""'
+ws[i]+'""'+wh[i]+'""'+wd[i]+'""'+wc[i]+'""'
+ns[i]+'""'+nh[i]+'""'+nd[i]+'""'+nc[i]+'""'
+es[i]+'""'+eh[i]+'""'+ed[i]+'""'+ec[i]+'"'
),
encoding: 'utf8',
}
wx.cloud.uploadFile({
cloudPath:'puke/puke'+(App.globalData.roomNumber).toString()+'.txt',
},
txt文件样例:
"542""J76""T86""JT42""AJT6""AT2""AK2""653""KQ9""KQ84""J753""AK""873""953""Q94""Q987""A43""T""KQJT52""JT3""976""A984""A643""K8""Q852""Q7653""7""Q94""KJT""KJ2""98""A7652""A85""KJ752""K""Q742""T42""Q63""AQ""AT965""93""AT94""T9764""K3""KQJ76""8""J8532""J8""85432""54""K95""AK6""AQ96""KQ983""3""QJ2""K7""A7""AQJT62""953""JT""JT62""874""T874""Q93""953""863""A854""AT765""AJ""K52""T32""J""KQ82""A94""KQJ96""K842""T764""QJT7""7""T32""82""QJ7542""Q4""A75""K9654""T83""K3""KQ6""T3""AK9""A9865""J984""AQJ7""6""JT72""AQJT42""KQ5""QT7""2""953""A43""A65""KJT9""87""J876""982""AQ83""K6""T92""KJ43""7654""K832""T7""K86532""T""AQJ96""J53""T""AK87""74""AKQ8""AQ""QJ642""T5""9642""J974""953""J432""QJ873""J7""J4""9876""62""T532""Q72""AK5""K94""84""KT853""QT""AT5""AKQ96""A96""QJ9642""K5""92""AKT""K85""QJ974""87""842""T7""AT862""K5""QJ73""A3""3""AQJT643""965""64""Q""J864""AQ9763""872""AJ98764""K""J4""KQJ""K53""QT5""KT52""AT953""T2""A9732""8""Q732""QT6""54""9653""K84""A85""AQT76""87""AJT9""KJ942""K9""QJ""65""73""J832""AKT42""K942""T9542""KJ""32""QT5""76""Q832""KJT7""A3""AKQJ""A5""AQ964""J876""83""T9764""85""43""AQT8""Q64""JT96""87""K5""8532""AKQ75""AKQT5""J92""J""8432""J962""7643""AKT97""""A5""K73""AKJT4""Q92""KT93""QJ""Q932""A83""Q62""A652""6""KT654""J874""T984""875""J7""963""KT95""JT3""K84""Q8""Q832""Q96""JT95""K4""AJ4""A874""A732""AJT752""76""K52""Q6""AJ84""K32""QJ7""A65""76""JT65""K985""K97""""984""AT432""QJ832""KQT9532""AQ7""6""T4""32""72""KQT2""J9754""J""9""A98653""AQT62""AKQT87""AJT6""J""83""9654""KQ8543""74""K""A2""JT8652""T""A984""T8""AK943""743""QT6""KJ74""Q""KQJ52""J75""Q9653""7""A986""K32""AJ5""JT82""742""842""KQ432""A6""AK85""Q6""T97""K754""QJ3""J97""86""Q93""T96""AKT53""AJT2""AJT4""87""J84""654""K762""Q93""T96""KQ9873""85""T42""K2""""Q93""AKJ65""AQ753""75""AQ754""T9874""4""AK83""KJT93""""AKT7""Q9""86""AK3""QJ6532""JT642""2""QJ652""98""J75""AKT82""QJ3""K2""QT98""QJ""T7""AQ743""AK43""753""A9""T965""62""964""K86542""J8""AQT5""J743""K5""AJ5""K762""""QJT76""9864""943""A85""A3""KT732""J8""KQT962""9842""Q""T942""6""KJ9642""94""Q85""QJ93""T75""Q65""AK""KT74""AQ""AJT87""J763""A852""83""K32""KQ86""4""KT7652""JT""94""KQJT3""AJ4""764""52""8752""Q983""AK2""AJT73""A96""""Q9853""Q74""T9653""K973""2""9""AKQJ""A52""T8754""A65""872""T4""AKJ96""KJT832""4""QJ86""Q3""T2""AQ2""JT943""K97""Q94""J985""Q8""T643""AK8653""64""K752""5""J7""KT73""A6""AQJ82""J2""KQJ63""QT73""T8""T863""42""J8""76543""AK754""A85""A42""AJ""Q9""T97""K965""KQ92""K8""AT93""KT962""AQ""AQ97""QJ65""Q83""87""J6432""K8742""7""K6""T5""""AJ54""JT95432""JT7""9762""2""AT953""A5""AKT54""AT65""Q2""KQ96432""J""KQ""K86""8""Q83""J98743""J74""Q8742""J7""AK854""T""K96""AT654""J97""A4""AJ53""K32""QT62""82""T""Q98""3""KQJ97653"
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
补充:有关程序
puke:function(){//生成32副随机牌套并发到云存储(名为puke+屋号.txt)
var i,ii,iii,j,j1,j2,j3,j4,k,aaa='',bbb=15
var x=[]
var pk=["","SA","SK","SQ","SJ","ST","S9","S8","S7","S6","S5","S4","S3","S2",
"HA","HK","HQ","HJ","HT","H9","H8","H7","H6","H5","H4","H3","H2",
"DA","DK","DQ","DJ","DT","D9","D8","D7","D6","D5","D4","D3","D2",
"CA","CK","CQ","CJ","CT","C9","C8","C7","C6","C5","C4","C3","C2"]
var sss=[],hhh=[],ddd=[],ccc=[]
var text1=["","","","",""]
var text2=["","","","",""]
var text3=["","","","",""]
var text4=["","","","",""]
var ns=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var nh=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var nd=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var nc=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var es=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var eh=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var ed=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var ec=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var ws=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var wh=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var wd=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var wc=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var ss=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var sh=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var sd=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var sc=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
var fsm = wx.getFileSystemManager()
........//省略无关语句
fsm.writeFile({ //先建立一个空文件:puke.txt
filePath: wx.env.USER_DATA_PATH + '/puke.txt',
data: (""),
encoding: 'utf-8',
})
for( i=1;i<=32;i++){
fsm.appendFile({
filePath: wx.env.USER_DATA_PATH + '/puke.txt',
data: (//和打牌桌面一致,按南西北东顺序排
'"'+ss[i]+'""'+sh[i]+'""'+sd[i]+'""'+sc[i]+'""'
+ws[i]+'""'+wh[i]+'""'+wd[i]+'""'+wc[i]+'""'
+ns[i]+'""'+nh[i]+'""'+nd[i]+'""'+nc[i]+'""'
+es[i]+'""'+eh[i]+'""'+ed[i]+'""'+ec[i]+'"'
),
encoding: 'utf8',
})
}
wx.cloud.uploadFile({
cloudPath:'puke/puke'+(App.globalData.roomNumber).toString()+'.txt',
filePath: wx.env.USER_DATA_PATH + '/puke.txt',
})
},
txt文件样例:
"542""J76""T86""JT42""AJT6""AT2""AK2""653""KQ9""KQ84""J753""AK""873""953""Q94""Q987""A43""T""KQJT52""JT3""976""A984""A643""K8""Q852""Q7653""7""Q94""KJT""KJ2""98""A7652""A85""KJ752""K""Q742""T42""Q63""AQ""AT965""93""AT94""T9764""K3""KQJ76""8""J8532""J8""85432""54""K95""AK6""AQ96""KQ983""3""QJ2""K7""A7""AQJT62""953""JT""JT62""874""T874""Q93""953""863""A854""AT765""AJ""K52""T32""J""KQ82""A94""KQJ96""K842""T764""QJT7""7""T32""82""QJ7542""Q4""A75""K9654""T83""K3""KQ6""T3""AK9""A9865""J984""AQJ7""6""JT72""AQJT42""KQ5""QT7""2""953""A43""A65""KJT9""87""J876""982""AQ83""K6""T92""KJ43""7654""K832""T7""K86532""T""AQJ96""J53""T""AK87""74""AKQ8""AQ""QJ642""T5""9642""J974""953""J432""QJ873""J7""J4""9876""62""T532""Q72""AK5""K94""84""KT853""QT""AT5""AKQ96""A96""QJ9642""K5""92""AKT""K85""QJ974""87""842""T7""AT862""K5""QJ73""A3""3""AQJT643""965""64""Q""J864""AQ9763""872""AJ98764""K""J4""KQJ""K53""QT5""KT52""AT953""T2""A9732""8""Q732""QT6""54""9653""K84""A85""AQT76""87""AJT9""KJ942""K9""QJ""65""73""J832""AKT42""K942""T9542""KJ""32""QT5""76""Q832""KJT7""A3""AKQJ""A5""AQ964""J876""83""T9764""85""43""AQT8""Q64""JT96""87""K5""8532""AKQ75""AKQT5""J92""J""8432""J962""7643""AKT97""""A5""K73""AKJT4""Q92""KT93""QJ""Q932""A83""Q62""A652""6""KT654""J874""T984""875""J7""963""KT95""JT3""K84""Q8""Q832""Q96""JT95""K4""AJ4""A874""A732""AJT752""76""K52""Q6""AJ84""K32""QJ7""A65""76""JT65""K985""K97""""984""AT432""QJ832""KQT9532""AQ7""6""T4""32""72""KQT2""J9754""J""9""A98653""AQT62""AKQT87""AJT6""J""83""9654""KQ8543""74""K""A2""JT8652""T""A984""T8""AK943""743""QT6""KJ74""Q""KQJ52""J75""Q9653""7""A986""K32""AJ5""JT82""742""842""KQ432""A6""AK85""Q6""T97""K754""QJ3""J97""86""Q93""T96""AKT53""AJT2""AJT4""87""J84""654""K762""Q93""T96""KQ9873""85""T42""K2""""Q93""AKJ65""AQ753""75""AQ754""T9874""4""AK83""KJT93""""AKT7""Q9""86""AK3""QJ6532""JT642""2""QJ652""98""J75""AKT82""QJ3""K2""QT98""QJ""T7""AQ743""AK43""753""A9""T965""62""964""K86542""J8""AQT5""J743""K5""AJ5""K762""""QJT76""9864""943""A85""A3""KT732""J8""KQT962""9842""Q""T942""6""KJ9642""94""Q85""QJ93""T75""Q65""AK""KT74""AQ""AJT87""J763""A852""83""K32""KQ86""4""KT7652""JT""94""KQJT3""AJ4""764""52""8752""Q983""AK2""AJT73""A96""""Q9853""Q74""T9653""K973""2""9""AKQJ""A52""T8754""A65""872""T4""AKJ96""KJT832""4""QJ86""Q3""T2""AQ2""JT943""K97""Q94""J985""Q8""T643""AK8653""64""K752""5""J7""KT73""A6""AQJ82""J2""KQJ63""QT73""T8""T863""42""J8""76543""AK754""A85""A42""AJ""Q9""T97""K965""KQ92""K8""AT93""KT962""AQ""AQ97""QJ65""Q83""87""J6432""K8742""7""K6""T5""""AJ54""JT95432""JT7""9762""2""AT953""A5""AKT54""AT65""Q2""KQ96432""J""KQ""K86""8""Q83""J98743""J74""Q8742""J7""AK854""T""K96""AT654""J97""A4""AJ53""K32""QT62""82""T""Q98""3""KQJ97653"