kuaishoubind.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  1. <template>
  2. <view style="position: relative;">
  3. <!-- 胶囊 -->
  4. <mvBar :mysNavConfig="mysNavConfig"></mvBar>
  5. <view :style="{marginTop:navH}"></view>
  6. <view class="home">
  7. <view class="card" v-if="!loading">
  8. <view class="head">
  9. <image
  10. src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/lQLPDhrXwll1_NcjI7AD0T3viYtxQwGOvh1SwG0A_35_35.png"
  11. mode="aspectFill">
  12. </image>
  13. <span>快手账号绑定</span>
  14. </view>
  15. <view class="body">
  16. <view>
  17. <!-- 绑定成功展示信息 v-if -->
  18. <view v-if="isBindKuaishou">
  19. <!-- 左侧图片和文字 -->
  20. <view class="task-info-left" style="display: flex;">
  21. <!-- 图片 -->
  22. <image class="head-img" :src="head_uri"></image>
  23. <view class="task-info-txt">
  24. <p style="margin-bottom: 15rpx;">{{nick_name}}</p>
  25. <!-- <p style="color: #81838f;">剩余100天</p> -->
  26. </view>
  27. </view>
  28. <view class="sale_txt">
  29. <p>粉丝数:<span>{{fansCount}}</span></p>
  30. <p>近30日橱窗销量:<span style="padding-left: 30rpx;">{{saleNum_30}}</span></p>
  31. </view>
  32. </view>
  33. <!-- 分割线 -->
  34. <view class="heng-line"></view>
  35. <!-- 点击弹窗 toggle(触发)-->
  36. <button class="btn1" @click="getqrcode('center')">
  37. {{ isBindKuaishou ? '刷新授权' : '添加快手账号' }}
  38. </button>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. <!-- 普通弹窗 公众号-->
  44. <uni-popup ref="popup4" class="share" background-color="#fff" @change="change" :maskClick="true">
  45. <view class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }">
  46. <view class="sharepage">
  47. <view class="projecttext1">
  48. <span>快手账号登录</span>
  49. </view>
  50. <view class="sharetxt">
  51. <text style="color:#9a9a9a ;">
  52. 截屏或下载二维码,使用快手APP\n
  53. 打开[首页-搜索-扫一扫]后扫码进行
  54. </text>
  55. </view>
  56. <!-- 授权码展示 -->
  57. <view class="sharemap">
  58. <!-- 根据 countdownTime 的值为 image 元素应用不同的类名 -->
  59. <image :class="{'expired-image': countdownTime <= 0, 'active-image': countdownTime > 0}"
  60. :src="qrcodeURL" mode=""></image>
  61. <!-- 条件渲染:当 countdownTime 小于等于 0 时显示蒙版 -->
  62. <image v-if="countdownTime <= 0"
  63. src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/qrOOD.png"
  64. style="width: 150rpx;height: 150rpx;position: absolute;top: 240rpx;left: 200rpx;"></image>
  65. </view>
  66. <view style="margin: 30rpx 0;">
  67. <button class="butmin1" size="mini" @tap="freshqrcode" :disabled="countdownTime > 0">
  68. {{ countdownTime > 0 ? `刷新二维码(${countdownTime}秒后到期)` : '刷新二维码 (已过期)' }}
  69. </button>
  70. </view>
  71. <view class="importentInfo1">
  72. <view class="sharetxt1" style="font-size: 22rpx;">
  73. <text style="white-space: pre-line; text-align: left;line-height: 1;">
  74. 登录成功后: \n
  75. ·同步账号基础信息及查看账号运营数据\n
  76. ·获得免费领样权限\n
  77. ·获得承接快手悬赏任务权限\n
  78. ·为达人橱窗快速选品\n
  79. ·为直播带货快速选品\n
  80. ·样叽专属高佣商品,同一商品,更高佣金\n
  81. ·变现种草任务参与资质\n
  82. </text>
  83. </view>
  84. </view>
  85. <view style="margin: 30rpx 0;">
  86. <button class="butmin" size="mini" @tap="saveImage">下载二维码至手机</button>
  87. </view>
  88. </view>
  89. </view>
  90. </uni-popup>
  91. </view>
  92. </template>
  93. <script>
  94. import mvBar from "@/components/mys_navBar/mysNavBar";
  95. import htzImageUpload from '@/components/htz-image-upload/htz-image-upload.vue';
  96. import getPolicyEncode from '@/components/obs/getPolicy.js';
  97. import getSignature from '@/components/obs/GetSignature.js';
  98. import {
  99. saveImageToPhotosAlbum,
  100. showToast,
  101. downloadFile
  102. } from '@/uni_modules/sakura-canvas/js_sdk/util'
  103. export default {
  104. components: {
  105. mvBar,
  106. htzImageUpload,
  107. },
  108. data() {
  109. return {
  110. countdownTime: 100, // 初始倒计时时间(秒)
  111. intervalId: null, // 计时器 ID
  112. qrcodeURL: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/lQLPDhrXwll1_NcjI7AD0T3viYtxQwGOvh1SwG0A_35_35.png', // 用来保存二维码URL的变量
  113. // qrcodeURL: '',
  114. head_uri: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/lQLPDhrXwll1_NcjI7AD0T3viYtxQwGOvh1SwG0A_35_35.png',
  115. nick_name: "",
  116. navH: getApp().globalData.navHeight,
  117. hasClicked: false,
  118. loading: true,
  119. accountId: '',
  120. platform: {
  121. platform_id: '',
  122. platform_name: '',
  123. platform_icon: '',
  124. },
  125. isBind: true,
  126. isBindKuaishou: true,
  127. imageData: [],
  128. formData: {
  129. platform_nickname: '',
  130. fans_count: '',
  131. home_page_url: '',
  132. home_page_capture_url: ''
  133. },
  134. // 二维码地址
  135. imageUrl: '',
  136. index: 0,
  137. fansLabel: "选择单位",
  138. fansCount: null,
  139. saleNum_30: 0,
  140. fansCountInfo: 1,
  141. fansRange: [{
  142. value: 1,
  143. label: '个'
  144. },
  145. {
  146. value: 10000,
  147. label: '万'
  148. },
  149. {
  150. value: 100000000,
  151. label: '亿'
  152. }
  153. ],
  154. mysNavConfig: {
  155. /* 开启单页显示首页图标 */
  156. isHome: true,
  157. /* 固定导航 */
  158. navFixed: true,
  159. /* 标题 (屏幕中心居中 两边图标中心居中使用slot center1) */
  160. navTitle: {
  161. text: "社媒账号绑定",
  162. color: "",
  163. fontSize: "32rpx", // px upx rpx
  164. fontWeight: "normal", // 100 - 700
  165. },
  166. btnType: "type2",
  167. onLeftClick: '',
  168. /* type2 按钮 */
  169. type2Config: {
  170. // 左图标
  171. leftPath: "/static/img/png2.png",
  172. // 右图标
  173. rightPath: "/static/img/png4.png",
  174. // 圆角
  175. radius: "40rpx",
  176. },
  177. }, // 密码登录校验规则
  178. bindRules: {
  179. name: {
  180. rules: [{
  181. required: true,
  182. errorMessage: '请输入昵称'
  183. }]
  184. },
  185. home_img: {
  186. rules: [{
  187. required: true,
  188. errorMessage: '请上传主页截图',
  189. }]
  190. }
  191. },
  192. urlRegList: [
  193. /(.*)http(s?)\:\/\/((www\.)?)(xiaohongshu\.com)(.*)/,
  194. /(.*)http(s?)\:\/\/((www\.)?)((v\.)?)(douyin\.com)(.*)/,
  195. /(.*)http(s?)\:\/\/((www\.)?)((m\.)?)(weibo\.(com|cn))(.*)/,
  196. /(.*)http(s?)\:\/\/((www\.)?)((v|kpfshanghai)\.m\.chenzhongtech\.com)(.*)/,
  197. /(.*)http(s?)\:\/\/((www\.)?)(b23\.tv)(.*)/,
  198. /(.*)http(s?)\:\/\/((www\.)?)((m\.)?)(dianping\.(com|cn))(.*)/,
  199. /(.*)http(s?)\:\/\/((www\.)?)(zhihu\.com)(.*)/,
  200. ]
  201. }
  202. },
  203. onReady() {},
  204. async onShow() {},
  205. async onLoad(options) {
  206. await this.checkaccount()
  207. this.platform.platform_id = parseInt(options.platform_id)
  208. if (options.account_id) {
  209. this.accountId = parseInt(options.account_id)
  210. this.isBind = false
  211. }
  212. this.loading = true;
  213. uni.showLoading({
  214. title: '加载中'
  215. });
  216. await this.getinfo();
  217. if (!this.isBind) {
  218. // await this.getaccount()
  219. };
  220. this.loading = false;
  221. uni.hideLoading();
  222. },
  223. methods: {
  224. checkaccount() {
  225. this.$https.get('/youngee/c/t/g/check-account').then(res => {
  226. // todo:得到用户数据并赋值 ,头像、粉丝,
  227. console.log("Backend response res:", res);
  228. // 如果后端响应了您想要的结果,则关闭 uni-popup,并停止向后端发送请求
  229. //如果/kuangshouauth执行完毕(存在含tid的数据)
  230. //data ==-1表示数据库中没有数据 -2表示token过期。
  231. if (res.data.code == 0) {
  232. this.nick_name = res.data.data.nick_name
  233. this.head_uri = res.data.data.head_uri
  234. this.fansCount = res.data.data.fan
  235. //继续往数据中填充30天销量字段
  236. this.$https.get('/youngee/c/t/g/query-sales-for30-days').then(res => {
  237. console.log("30days+++++++", res)
  238. this.saleNum_30 = res.data.data
  239. })
  240. this.isBindKuaishou = true
  241. //从数据库中取到accesstoken和
  242. } else {
  243. //没查到数据,或者token过期
  244. this.isBindKuaishou = false
  245. }
  246. }).catch(err => {
  247. console.error("Error:", err);
  248. });
  249. },
  250. // 获得二维码
  251. async getqrcode(type) {
  252. this.type4 = type;
  253. this.$refs.popup4.open(type);
  254. this.loading = true;
  255. uni.showLoading({
  256. title: '加载中',
  257. })
  258. // 从后端中请求二维码图片展示出来
  259. //达人id在后端通过session获取
  260. await this.$https.get('/youngee/c/t/g/display-qrcode').then(res => {
  261. this.qrcodeURL = res.data.data;
  262. })
  263. this.startCountdown();
  264. this.loading = false;
  265. uni.hideLoading();
  266. },
  267. // 倒计时结束才能点击
  268. async freshqrcode() {
  269. this.qrcodeURL =
  270. 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/lQLPDhrXwll1_NcjI7AD0T3viYtxQwGOvh1SwG0A_35_35.png'
  271. if (this.intervalId != null) {
  272. clearInterval(this.intervalId);
  273. this.countdownTime = 100;
  274. }
  275. //重新设置倒计时时间
  276. this.countdownTime = 100; // 重置为 10 秒
  277. this.loading = true;
  278. uni.showLoading({
  279. title: '加载中',
  280. })
  281. await this.$https.get('/youngee/c/t/g/display-qrcode').then(res => {
  282. this.qrcodeURL = res.data.data;
  283. console.log("refresh--url:", this.qrcodeURL);
  284. })
  285. // 启动倒计时计时器
  286. this.startCountdown();
  287. this.loading = false;
  288. uni.hideLoading();
  289. },
  290. // startCountdown() {
  291. // // 每秒减少剩余时间
  292. // this.intervalId = setInterval(() => {
  293. // if (this.countdownTime > 0) {
  294. // this.countdownTime--;
  295. // this.$https.get('/youngee/c/t/g/check-account').then(res => {
  296. // // todo:得到用户数据并赋值
  297. // console.log("Backend response res:", res);
  298. // // 如果后端响应了您想要的结果,则关闭 uni-popup,并停止向后端发送请求
  299. // if (res.data.code != -1 && this.intervalId != null) {
  300. // clearInterval(this.intervalId);
  301. // this.countdownTime = 100;
  302. // this.closepop() // 关闭 uni-popup
  303. // }
  304. // }).catch(err => {
  305. // console.error("Error:", err);
  306. // });
  307. // }
  308. // }, 1000); // 每秒执行一次
  309. // },
  310. startCountdown() {
  311. // 每秒减少剩余时间
  312. this.intervalId = setInterval(() => {
  313. if (this.countdownTime > 0) {
  314. this.countdownTime--;
  315. this.$https.get('/youngee/c/t/g/check-new-account').then(res => {
  316. // 如果后端响应了您想要的结果,则关闭 uni-popup,并停止向后端发送请求
  317. if (res.data.code == 0 && this.intervalId != null) {
  318. clearInterval(this.intervalId);
  319. this.countdownTime = 100;
  320. this.closepop() // 关闭 uni-popup
  321. }
  322. }).catch(err => {
  323. console.error("Error:", err);
  324. });
  325. }
  326. }, 1000); // 每秒执行一次
  327. },
  328. // startCountdown() {
  329. // // 每秒减少剩余时间
  330. // this.intervalId = setInterval(() => {
  331. // if (this.countdownTime > 0) {
  332. // this.countdownTime--;
  333. // }
  334. // }, 1000); // 每秒执行一次
  335. // },
  336. //unipop出现/消失自动触发
  337. async change(e) {
  338. if (this.loading) {
  339. this.loading = false;
  340. uni.hideLoading();
  341. }
  342. if (this.intervalId != null) {
  343. clearInterval(this.intervalId);
  344. this.countdownTime = 100;
  345. }
  346. await this.checkaccount()
  347. this.qrcodeURL =
  348. 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/lQLPDhrXwll1_NcjI7AD0T3viYtxQwGOvh1SwG0A_35_35.png'
  349. },
  350. // 保存图片
  351. async saveImage() {
  352. console.log("进入保存方法");
  353. // 将base64数据部分提取出来
  354. const base64 = this.qrcodeURL.replace(/^data:image\/\w+;base64,/, "");
  355. // 将base64字符串转换为ArrayBuffer
  356. const buffer = wx.base64ToArrayBuffer(base64);
  357. // 使用文件系统管理器将ArrayBuffer写入文件
  358. wx.getFileSystemManager().writeFile({
  359. filePath: `${wx.env.USER_DATA_PATH}/qrcode.png`,
  360. data: buffer,
  361. encoding: 'binary',
  362. success: res => {
  363. // 文件写入成功后,保存图片到相册
  364. wx.saveImageToPhotosAlbum({
  365. filePath: `${wx.env.USER_DATA_PATH}/qrcode.png`,
  366. success: function(data) {
  367. wx.showToast({
  368. title: "保存成功",
  369. icon: "success",
  370. duration: 2000
  371. });
  372. },
  373. fail: function(err) {
  374. console.log(err);
  375. },
  376. complete: function(res) {
  377. console.log(res);
  378. }
  379. });
  380. },
  381. fail: err => {
  382. console.log(err);
  383. }
  384. });
  385. },
  386. // async saveImage() {
  387. // console.log("into save")
  388. // // showToast('保存成功')
  389. // wx.downloadFile({
  390. // url: this.qrcodeURL,
  391. // success: function(res) {
  392. // wx.saveImageToPhotosAlbum({
  393. // filePath: res.tempFilePath,
  394. // success: function(data) {
  395. // wx.showToast({
  396. // title: "保存成功",
  397. // icon: "success",
  398. // duration: 2000
  399. // })
  400. // },
  401. // fail: function(err) {
  402. // console.log(err);
  403. // },
  404. // complete(res) {
  405. // console.log(res);
  406. // }
  407. // })
  408. // }
  409. // })
  410. // },
  411. closepop() {
  412. this.$refs.popup4.close()
  413. },
  414. // 默认信息表,获取平台logo
  415. getinfo() {
  416. return this.$https.get('/youngee/c/g/get-info-tables')
  417. .then(res => {
  418. let list = res.data.data.ThirdPlatform
  419. for (var i = 0; i < list.length; ++i) {
  420. if (list[i].id == this.platform.platform_id) {
  421. this.platform.platform_icon = list[i].platform_icon
  422. this.platform.platform_name = list[i].platform_name
  423. }
  424. }
  425. })
  426. },
  427. // getaccount() {
  428. // return this.$https.get('/youngee/c/t/g/get-talent-account')
  429. // .then(res => {
  430. // console.log(res)
  431. // if (res.data.code !== -3) {
  432. // this.account = res.data.data
  433. // this.imageData = []
  434. // for (var i = 0; i < this.account.length; i++) {
  435. // if (this.platform.platform_id == this.account[i].platform_id) {
  436. // this.hasClicked = true
  437. // this.formData.platform_nickname = this.account[i].platform_nickname
  438. // this.formData.fans_count = this.account[i].fans_count
  439. // this.formData.home_page_url = this.account[i].home_page_url
  440. // this.imageData.push(this.account[i].home_page_capture_url);
  441. // if (this.formData.fans_count >= 100000000) {
  442. // this.index = 2
  443. // this.fansCountInfo = this.fansRange[this.index].value;
  444. // this.fansLabel = this.fansRange[this.index].label;
  445. // this.fansCount = (this.formData.fans_count / 100000000).toFixed(1)
  446. // } else if (this.formData.fans_count >= 10000) {
  447. // this.index = 1
  448. // this.fansCountInfo = this.fansRange[this.index].value;
  449. // this.fansLabel = this.fansRange[this.index].label;
  450. // this.fansCount = (this.formData.fans_count / 10000).toFixed(1)
  451. // } else {
  452. // this.index = 0
  453. // this.fansCountInfo = this.fansRange[this.index].value;
  454. // this.fansLabel = this.fansRange[this.index].label;
  455. // this.fansCount = this.formData.fans_count
  456. // }
  457. // }
  458. // }
  459. // }
  460. // })
  461. // },
  462. exit() {
  463. uni.navigateBack()
  464. },
  465. // 粉丝量量级选择
  466. bindPickerChange: function(e) {
  467. if (this.index !== e.detail.value) {
  468. this.fansCount = null
  469. }
  470. this.index = e.detail.value;
  471. this.fansLabel = this.fansRange[this.index].label
  472. this.fansCountInfo = this.fansRange[this.index].value
  473. },
  474. ceshiChooseSuccess(tempFilePaths, e) { //选择图片返回
  475. console.log('ceshiChooseSuccess', tempFilePaths, e);
  476. if (e == 0) {
  477. this.store = 'talent_upload/' + this.guid() + '.png'
  478. // this.store = 'talent_upload/icon-whole-pipline.png'
  479. // this.store = 'youngee/talent_upload/icon-edit.2png'
  480. } else if (e == 1) {
  481. this.store = 'talent_upload/' + this.guid() + '.mp4'
  482. }
  483. /****************
  484. 以下代码是自定义上传逻辑,仅供参考
  485. ***************/
  486. this.imgUpload(tempFilePaths);
  487. /*******************************/
  488. },
  489. imgUpload(tempFilePaths) {
  490. let that = this
  491. let config = {
  492. AccessKeyId: 'IVW21DTGIIUBBAGXKK0Y', //AK
  493. SecretKey: 'Y01nEQNcLOATMw7uJwrk3yOdQZ2fqLhSnXcOKVDE', //SK
  494. EndPoint: 'https://horastar.obs.cn-east-3.myhuaweicloud.com', //上传文件的路径
  495. };
  496. let fileName = this.store; //指定上传到OBS桶中的对象名
  497. let OBSPolicy = { //设定policy内容
  498. "expiration": "2089-12-31T12:00:00.000Z",
  499. "conditions": [{
  500. "bucket": "horastar"
  501. }, //Bucket name
  502. // {"bucket": "goin"},
  503. {
  504. 'key': fileName
  505. }
  506. ]
  507. }
  508. let policyEncoded = getPolicyEncode(OBSPolicy); //计算policy编码值
  509. let signature = getSignature(policyEncoded, config.SecretKey); //计算signature
  510. uni.uploadFile({
  511. //url: config.EndPoint,
  512. url: config.EndPoint,
  513. filePath: tempFilePaths[0],
  514. name: 'file',
  515. formData: {
  516. 'AccessKeyID': config.AccessKeyId,
  517. 'policy': policyEncoded,
  518. 'signature': signature,
  519. 'key': fileName,
  520. },
  521. success: function(res) {
  522. console.log("res", res); //打印响应状态码
  523. if (res.statusCode == 204) {
  524. // that.imageData.push(config.EndPoint + '/' + fileName);
  525. let obs_url = config.EndPoint + '/' + fileName; //用你自己的 bucket 名替换星号
  526. that.imageData.push(obs_url)
  527. that.formData.home_page_capture_url = obs_url
  528. uni.showToast({
  529. title: '上传成功',
  530. icon: '成功'
  531. });
  532. } else {
  533. uni.showToast({
  534. title: '上传失败',
  535. icon: '失败'
  536. });
  537. }
  538. },
  539. fail: function(e) {
  540. console.log(e);
  541. uni.showToast({
  542. title: '上传失败',
  543. icon: '失败'
  544. });
  545. }
  546. })
  547. },
  548. guid() {
  549. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
  550. var r = Math.random() * 16 | 0,
  551. v = c == 'x' ? r : (r & 0x3 | 0x8);
  552. return v.toString(16);
  553. });
  554. },
  555. onInput(e) {
  556. console.log(e)
  557. e = (e.match(/^\d*(\.?\d{0,1})/g)[0]) || null
  558. // //重新赋值给input
  559. if (e < 0 || e > 9999.9) {
  560. uni.showToast({
  561. title: '请输入[1,9999.9]区间内的数',
  562. icon: 'none'
  563. })
  564. console.log('请输入[1,9999.9]区间内的数')
  565. }
  566. this.$nextTick(() => {
  567. this.fansCount = (e > 0 && e <= 9999.9) ? e : null
  568. })
  569. },
  570. onInput1(e) {
  571. // 验证是否是纯数字
  572. const isNumber = /^\d*$/.test(e)
  573. // 过滤非数字
  574. e = e.replace(/\D/g, '')
  575. if (!isNumber || e < 0 || e > 9999) {
  576. uni.showToast({
  577. title: '请输入[0,9999]区间的整数',
  578. icon: 'none'
  579. })
  580. console.log('请输入[0,9999]区间的整数')
  581. }
  582. this.$nextTick(() => {
  583. this.fansCount = (e >= 0 && e <= 9999 && e.match(/^\d*/g)[0]) ? e : null
  584. })
  585. }
  586. },
  587. }
  588. </script>
  589. <style>
  590. /deep/ .share .uni-popup .uni-popup__wrapper {
  591. width: 70% !important;
  592. border-radius: 15rpx !important;
  593. }
  594. </style>
  595. <style lang="scss" scoped>
  596. .importentInfo1 {
  597. margin-left: 59rpx;
  598. background-color: #efefef;
  599. border-radius: 8px;
  600. height: 370rpx;
  601. width: 400rpx;
  602. }
  603. // 主体样式
  604. .card {
  605. padding: 24rpx;
  606. margin-top: 30rpx;
  607. border: 1rpx solid #F0D232;
  608. background-color: #ffffff;
  609. margin: 0 10rpx;
  610. }
  611. .head {
  612. padding-top: 5%;
  613. padding: 0 0 0 1%;
  614. height: 80rpx;
  615. margin-top: 2%;
  616. }
  617. .head span {
  618. color: #333333;
  619. font-size: 80%;
  620. font-weight: 550;
  621. text-indent: 2em;
  622. }
  623. .head image {
  624. vertical-align: middle;
  625. width: 50rpx;
  626. height: 50rpx;
  627. display: inline-block;
  628. padding-right: 14rpx;
  629. }
  630. .task-info-txt {
  631. margin-top: 10rpx;
  632. margin-left: 20rpx;
  633. }
  634. .head-img {
  635. width: 120rpx;
  636. height: 120rpx;
  637. border-radius: 100rpx;
  638. }
  639. .sale_txt {
  640. margin-top: 30rpx;
  641. }
  642. .sale_txt p {
  643. margin-bottom: 17rpx;
  644. color: #81838f;
  645. }
  646. .sale_txt span {
  647. padding-left: 160rpx;
  648. }
  649. .home-link {
  650. /deep/.uni-easyinput__content-input {
  651. background-color: #EBEBEB;
  652. border-radius: 15rpx;
  653. }
  654. }
  655. .heng-line {
  656. margin-top: 60rpx;
  657. margin-bottom: 50rpx;
  658. border-bottom: 1rpx solid #DCDCDC;
  659. }
  660. .signupbtn p {
  661. font-size: 30rpx;
  662. }
  663. .exit-btn {
  664. width: 200rpx;
  665. text-align: center;
  666. padding: 10rpx 30rpx;
  667. background-color: #C0C0C0;
  668. border: 0;
  669. border-radius: 10rpx;
  670. color: #FFFFFF;
  671. font-size: 30rpx;
  672. line-height: 180%;
  673. }
  674. .btn1 {
  675. margin: 30rpx;
  676. font-size: 35rpx;
  677. color: #000;
  678. background-color: #F0D232;
  679. border: none;
  680. border-radius: 0;
  681. }
  682. //弹窗
  683. .share {
  684. text-align: center;
  685. line-height: 10rpx;
  686. margin-top: 10rpx;
  687. }
  688. .sharepage {
  689. // width: 90%;
  690. margin: 0 auto;
  691. // position: relative;
  692. }
  693. /deep/ .share.uni-popup .uni-popup__wrapper {
  694. width: 70%;
  695. border-radius: 15rpx;
  696. }
  697. .projecttext1 {
  698. // padding-top: 5%;
  699. padding: 0 0 0 1%;
  700. margin: 5% 0;
  701. text-align: center;
  702. }
  703. .projecttext1 image {
  704. vertical-align: middle;
  705. width: 80rpx;
  706. height: 80rpx;
  707. display: inline-block;
  708. padding-right: 14rpx;
  709. }
  710. .sharemap {
  711. margin: 0 auto;
  712. text-align: center;
  713. // margin-top: 15%;
  714. // margin-bottom: 15%;
  715. }
  716. .expired-image {
  717. width: 300rpx;
  718. height: 300rpx;
  719. background-color: #000;
  720. opacity: 0.2;
  721. /* 例如,设置透明度为 0.5 */
  722. }
  723. /* 定义活跃图片的样式 */
  724. .active-image {
  725. width: 300rpx;
  726. height: 300rpx;
  727. /* 如果有特定样式,可以在这里定义 */
  728. }
  729. .sharemap image {
  730. width: 300rpx;
  731. height: 300rpx;
  732. }
  733. .sharetxt {
  734. height: 100rpx;
  735. display: flex;
  736. flex-direction: column;
  737. align-items: center;
  738. justify-content: center;
  739. }
  740. .sharetxt1 {
  741. padding: 10rpx;
  742. height: 345rpx;
  743. display: flex;
  744. flex-direction: column;
  745. align-items: center;
  746. justify-content: center;
  747. }
  748. .sharetxt text {
  749. font-size: 24rpx;
  750. text-align: left;
  751. line-height: 20rpx
  752. }
  753. .butmin {
  754. // height: 48rpx;
  755. width: 380rpx;
  756. height: 65rpx;
  757. background-color: #FCCF41;
  758. line-height: 60rpx;
  759. font-weight: bold;
  760. }
  761. .butmin1 {
  762. // height: 48rpx;
  763. width: 400rpx;
  764. background-color: #ffffff;
  765. border: #000000 10rpx;
  766. line-height: 48rpx;
  767. color: #FCCF41;
  768. font-weight: bold;
  769. font-size: 20rpx;
  770. }
  771. </style>